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AMz4Q,IAAO,2lBAqBb,MAAMq6Z,8BAA8BJ,sBAChClza,cACIC,QACA4pC,QAAQhyB,MAAMoB,IACjB,EAGL,MAAMs6Z,YAAc,IAAI5va,+CAAe,cAAnB,8BCtqGpB,0BACA,IACA,cACAi+U,SAIA,CAHA,MAAIn8S,GAEJ,YADA0gG,IAEA,CAEA12H,OACAC,KAEAyX,4BAEA,CAEe,cACf,kBACA,WACAg/G,YACA,iCACA,mBAEA,cACAzkG,qBACA,CAEA,cACAA,sBACA,CAEAigT,SACA,EACA,CACA","names":["GenericBrowserDomAdapter","ɵDomAdapter","constructor","super","arguments","this","supportsDOMEvents","BrowserDomAdapter","static","ɵsetRootDomAdapter","onAndCancel","el","evt","listener","addEventListener","removeEventListener","dispatchEvent","remove","node","parentNode","removeChild","createElement","tagName","doc","getDefaultDocument","createHtmlDocument","document","implementation","createHTMLDocument","isElementNode","nodeType","Node","ELEMENT_NODE","isShadowRoot","DocumentFragment","getGlobalEventTarget","target","window","body","getBaseHref","href","baseElement","querySelector","getAttribute","getBaseElementHref","url","urlParsingNode","setAttribute","pathName","pathname","charAt","relativePath","resetBaseElement","getUserAgent","navigator","userAgent","getCookie","name","ɵparseCookieValue","cookie","TRANSITION_ID","InjectionToken","SERVER_TRANSITION_PROVIDERS","provide","APP_INITIALIZER","useFactory","transitionId","injector","get","ApplicationInitStatus","donePromise","then","dom","ɵgetDOM","styles","querySelectorAll","i","length","deps","DOCUMENT","Injector","multi","BrowserXhr","build","XMLHttpRequest","ɵfac","ɵprov","i0","factory","EVENT_MANAGER_PLUGINS","EventManager","plugins","_zone","_eventNameToPlugin","Map","forEach","p","manager","_plugins","slice","reverse","element","eventName","handler","plugin","_findPluginFor","addGlobalEventListener","getZone","supports","set","Error","EventManagerPlugin","_doc","SharedStylesHost","_stylesSet","Set","addStyles","additions","style","has","add","onStylesAdded","getAllStyles","Array","from","DomSharedStylesHost","_hostNodes","head","_addStylesToHost","host","styleNodes","styleEl","textContent","push","appendChild","addHost","hostNode","removeHost","removeStyle","delete","ngOnDestroy","styleNode","NAMESPACE_URIS","svg","xhtml","xlink","xml","xmlns","math","COMPONENT_REGEX","COMPONENT_VARIABLE","HOST_ATTR","CONTENT_ATTR","compId","isArray","flattenStyles","replace","eventHandler","event","allowDefaultBehavior","preventDefault","returnValue","DomRendererFactory2","eventManager","sharedStylesHost","appId","rendererByCompId","defaultRenderer","DefaultDomRenderer2","createRenderer","type","encapsulation","ViewEncapsulation","renderer","id","EmulatedEncapsulationDomRenderer2","applyToHost","ShadowDomRenderer","begin","end","APP_ID","data","Object","create","destroyNode","destroy","namespace","createElementNS","createComment","value","createText","createTextNode","parent","newChild","isTemplateNode","content","insertBefore","refChild","oldChild","selectRootElement","selectorOrNode","preserveContent","nextSibling","namespaceUri","setAttributeNS","removeAttribute","removeAttributeNS","addClass","classList","removeClass","setStyle","flags","RendererStyleFlags2","setProperty","removeProperty","setValue","nodeValue","listen","callback","decoratePreventDefault","undefined","component","contentAttr","componentShortId","shimContentAttribute","hostAttr","shimHostAttribute","hostEl","shadowRoot","attachShadow","mode","nodeOrShadowRoot","DomEventsPlugin","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","control","ctrlKey","meta","metaKey","shift","shiftKey","KeyEventsPlugin","parseEventName","parsedEvent","outsideHandler","eventCallback","fullKey","runOutsideAngular","domEventName","parts","toLowerCase","split","key","_normalizeKey","pop","modifierName","index","indexOf","splice","result","keyIdentifier","startsWith","String","fromCharCode","parseInt","substring","location","hasOwnProperty","getEventKey","r","modifierGetter","zone","getEventFullKey","runGuarded","keyName","platformBrowser","createPlatformFactory","platformCore","PLATFORM_ID","useValue","ɵPLATFORM_BROWSER_ID","PLATFORM_INITIALIZER","makeCurrent","ɵsetDocument","BROWSER_MODULE_PROVIDERS_MARKER","TESTABILITY_PROVIDERS","ɵTESTABILITY_GETTER","useClass","BrowserGetTestability","addToWindow","registry","ɵglobal","elem","findInAncestors","testability","findTestabilityInTree","getAllTestabilities","getAllRootElements","testabilities","count","didWork","decrement","didWork_","whenStable","getTestability","parentElement","ɵTESTABILITY","Testability","NgZone","TestabilityRegistry","BROWSER_MODULE_PROVIDERS","ɵINJECTOR_SCOPE","ErrorHandler","RendererFactory2","useExisting","XhrFactory","BrowserModule","providersAlreadyPresent","params","ngModule","providers","ɵmod","ɵinj","imports","CommonModule","ApplicationModule","Title","getTitle","title","setTitle","newTitle","ɵɵinject","createTitle","DomSanitizer","DomSanitizerImpl","sanitize","ctx","SecurityContext","ɵallowSanitizationBypassAndThrow","ɵunwrapSafeValue","ɵ_sanitizeHtml","toString","ɵ_sanitizeUrl","bypassSecurityTrustHtml","ɵbypassSanitizationTrustHtml","bypassSecurityTrustStyle","ɵbypassSanitizationTrustStyle","bypassSecurityTrustScript","ɵbypassSanitizationTrustScript","bypassSecurityTrustUrl","ɵbypassSanitizationTrustUrl","bypassSecurityTrustResourceUrl","ɵbypassSanitizationTrustResourceUrl","domSanitizerImplFactory","Notification","kind","error","hasValue","observe","observer","observeNotification","do","nextHandler","errorHandler","completeHandler","accept","nextOrObserver","complete","_a","isFunction","next","toObservable","of","throwError","EMPTY","TypeError","err","completeNotification","notification","_b","_c","call","keySelector","elementOrOptions","duration","connector","operate","source","subscriber","groups","notify","cb","handleError","consumer","activeGroups","teardownAttempted","groupBySourceSubscriber","OperatorSubscriber","group","Subject","grouped","groupSubject","Observable","groupSubscriber","innerSub","subscribe","unsubscribe","createGroupedObservable","durationSubscriber","createOperatorSubscriber","innerFrom","clear","project","resultSelector","pipe","exhaustMap","a","map","b","ii","isComplete","outerValue","DEFAULT_EFFECT_CONFIG","dispatch","useEffectsErrorHandler","CREATE_EFFECT_METADATA_KEY","config","effect","defineProperty","instance","propertyNames","getOwnPropertyNames","filter","propertyName","property","getPrototypeOf","METADATA_KEY","compose","getEffectMetadataEntries","getSourceForInstance","sourceProto","hasMetadataEntries","sourceInstance","globalErrorHandler","effectsErrorHandler","sourceName","observables$","effects","getEffectDecoratorMetadata","getCreateEffectMetadata","reduce","sources","concat","getSourceMetadata","observable$","effectAction$","ignoreElements","materialized$","materialize","merge","retryAttemptLeft","catchError","defaultEffectsErrorHandler","Actions","lift","operator","observable","ScannedActionsSubject","allowedTypes","action","some","typeOrActionCreator","functionName","_ROOT_EFFECTS_GUARD","USER_PROVIDED_EFFECTS","_ROOT_EFFECTS","ROOT_EFFECTS","_FEATURE_EFFECTS","FEATURE_EFFECTS","EFFECTS_ERROR_HANDLER","EffectSources","addEffects","effectSourceInstance","toActions","groupBy","mergeMap","source$","effectsInstance","effect$","mergedEffects$","mergeEffects","isOnRunEffects","ngrxOnRunEffects","resolveEffectSource","output","reporter","isAction","isMethod","getEffectName","JSON","stringify","reportInvalidActions","dematerialize","init$","take","isOnInitEffects","ngrxOnInitEffects","isOnIdentifyEffects","ngrxOnIdentifyEffects","EffectsRunner","effectSources","store","effectsSubscription","start","i3","ROOT_EFFECTS_INIT","createAction","EffectsRootModule","runner","rootEffects","storeRootModule","storeFeatureModule","guard","EffectsFeatureModule","root","effectSourceGroups","EffectsModule","featureEffects","createEffects","_provideForRootGuard","Optional","SkipSelf","Self","effectGroups","userProvidedEffectGroups","mergedEffects","effectGroup","userProvidedEffectGroup","createEffectInstances","observableFactory","connection","_refCount","refCounter","sharedConnection","_connection","conn","closed","connect","ConnectableObservable","subjectFactory","_subject","hasLift","_subscribe","getSubject","subject","isStopped","_teardown","Subscription","refCount","higherOrderRefCount","values","scheduler","popScheduler","buffer","predicate","defaultValue","hasDefaultValue","v","identity","takeLast","defaultIfEmpty","throwIfEmpty","EmptyError","inclusive","PRIMARY_OUTLET","ParamsAsMap","prototype","getAll","keys","segments","segmentGroup","route","path","pathMatch","hasChildren","posParams","part","segment","consumed","k1","k2","equalArraysOrString","aSorted","sort","bSorted","every","val","arr","apply","prop","ɵisObservable","ɵisPromise","Promise","resolve","pathCompareMap","exact","container","containee","matrixParams","equalPath","matrixParamsMatch","numberOfChildren","c","children","equalSegmentGroups","subset","containsSegmentGroup","paramCompareMap","shallowEqual","ignored","options","paths","queryParams","fragment","containsSegmentGroupHelper","containeePaths","current","containerPaths","containeeSegment","parameters","UrlTree","queryParamMap","_queryParamMap","convertToParamMap","DEFAULT_SERIALIZER","serialize","UrlSegmentGroup","k","serializePaths","UrlSegment","parameterMap","_parameterMap","serializePath","as","bs","UrlSerializer","DefaultUrlSerializer","parse","UrlParser","parseRootSegment","parseQueryParams","parseFragment","tree","serializeSegment","query","strParams","encodeUriQuery","join","s","serializeQueryParams","encodeURI","encodeUriFragment","primary","fn","res","child","childOutlet","mapChildrenIntoArray","encodeURIComponent","encodeUriString","decodeURIComponent","decode","encodeUriSegment","serializeMatrixParams","SEGMENT_RE","str","match","QUERY_PARAM_RE","QUERY_PARAM_VALUE_RE","remaining","consumeOptional","peekStartsWith","parseChildren","parseQueryParam","parseSegment","capture","parseParens","matchSegments","ɵRuntimeError","ngDevMode","parseMatrixParams","parseParam","valueMatch","matchQueryParams","matchUrlQueryParamValue","decodedKey","decodeQuery","decodedVal","currentVal","allowPrimary","outletName","rootCandidate","pn","newChildren","childCandidate","squashSegmentGroup","mergeTrivialChildren","urlTree","commands","nav","Navigation","numberOfDoubleDots","isAbsolute","cmd","cmdIdx","outlets","segmentPath","urlPart","partIndex","computeNavigation","toRoot","lastPathIndex","startingPosition","Position","g","ci","dd","createPositionApplyingDoubleDots","isMatrixParams","findStartingPosition","snapshot","_urlSegment","processChildren","updateSegmentGroupChildren","updateSegmentGroup","createTreeUsingPathIndex","_lastPathIndex","command","oldRoot","oldSegmentGroup","newSegmentGroup","qp","replaceSegment","newRoot","createRoot","oldSegment","newSegment","cmdWithOutlet","find","isCommandWithOutlets","last","startIndex","m","currentCommandIndex","currentPathIndex","noMatch","pathIndex","commandIndex","curr","compare","prefixedWith","slicedCommands","createNewSegmentGroup","getOutlets","outlet","createNewSegmentChildren","RouterEvent","NavigationStart","navigationTrigger","restoredState","NavigationEnd","urlAfterRedirects","NavigationCancel","reason","code","NavigationError","RoutesRecognized","state","GuardsCheckStart","GuardsCheckEnd","shouldActivate","ResolveStart","ResolveEnd","RouteConfigLoadStart","RouteConfigLoadEnd","ChildActivationStart","routeConfig","ChildActivationEnd","ActivationStart","ActivationEnd","routerEvent","position","anchor","Tree","_root","t","pathFromRoot","n","findNode","firstChild","siblings","findPath","cc","unshift","TreeNode","RouterState","setRouterState","rootComponent","activated","ActivatedRouteSnapshot","RouterStateSnapshot","createEmptyStateSnapshot","emptyUrl","BehaviorSubject","emptyParams","emptyData","emptyQueryParams","ActivatedRoute","futureSnapshot","_futureSnapshot","_routerState","paramMap","_paramMap","paramsInheritanceStrategy","inheritingStartingFrom","_resolvedData","flattenInherited","urlSegment","correctedLastPathIndex","_correctedLastPathIndex","_resolve","serializeNode","currentSnapshot","nextSnapshot","shallowEqualArrays","equalUrlParams","equalSegments","equalParamsAndUrlSegments","routeReuseStrategy","prevState","shouldReuseRoute","createNode","createOrReuseChildren","shouldAttach","detachedRouteHandle","retrieve","createActivatedRoute","NAVIGATION_CANCELING_ERROR","urlSerializer","redirect","redirectTo","navigationBehaviorOptions","isUrlTree","navigationCancelingError","message","redirectUrl","cancellationCode","isNavigationCancelingError$1","OutletContext","resolver","ChildrenOutletContexts","attachRef","contexts","onChildOutletCreated","childName","context","getOrCreateContext","onChildOutletDestroyed","getContext","onOutletDeactivated","onOutletReAttached","NG_DEV_MODE$5","RouterOutlet","parentContexts","changeDetector","environmentInjector","_activatedRoute","activateEvents","EventEmitter","deactivateEvents","attachEvents","detachEvents","ngOnInit","attach","activateWith","isActivated","activatedRoute","activatedRouteData","detach","cmp","emit","ref","insert","hostView","deactivate","resolverOrInjector","childContexts","OutletInjector","item","resolveComponentFactory","isComponentFactoryResolver","createComponent","markForCheck","ɵdir","selectors","token","notFoundValue","ɵEmptyOutletComponent","ɵcmp","currentInjector","_injector","createEnvironmentInjector","standardizeConfig","loadComponent","loadChildren","routes","sortedConfig","getOutlet","_loadedInjector","ActivateRoutes","futureState","currState","forwardEvent","activate","futureRoot","currRoot","deactivateChildRoutes","advanceActivatedRoute","activateChildRoutes","futureNode","currNode","nodeChildrenAsMap","futureChild","childOutletName","deactivateRoutes","deactivateRouteAndItsChildren","parentContext","future","shouldDetach","detachAndStoreRouteSubtree","deactivateRouteAndOutlet","componentRef","activateRoutes","stored","getClosestRouteInjector","cmpFactoryResolver","ComponentFactoryResolver","CanActivate","CanDeactivate","getChildRouteGuards","fallbackInjector","futurePath","checks","canDeactivateChecks","canActivateChecks","prevChildren","shouldRun","shouldRunGuardsAndResolvers","runGuardsAndResolvers","getRouteGuards","o","INITIAL_VALUE","Symbol","switchMap","obs","combineLatest","startWith","results","tap","redirectingNavigationError","noMatch$1","matched","consumedSegments","remainingSegments","positionalParamSegments","canMatch","canMatchObservables","injectionToken","guardVal","isCanMatch","wrapIntoObservable","prioritizedGuardValue","redirectIfUrlTree","runCanMatchGuards","getOrCreateRouteInjectorIfNeeded","matcher","defaultUrlMatcher","slicedSegments","relativeLinkResolution","emptyPathMatch","containsEmptyPathMatchesWithNamedOutlets","primarySegment","_sourceSegment","_segmentIndexShift","createChildrenForEmptyPaths","containsEmptyPathMatches","addEmptyPathsToChildrenIfNeeded","rawSegment","NG_DEV_MODE$4","NoMatch$1","AbsoluteRedirect","newTree","ApplyRedirects","configLoader","allowRedirects","splitGroup","rootSegmentGroup","urlTrees$","expandSegmentGroup","createUrlTree","e","noMatchError","mapped$","expandChildren","expandSegment","childOutlets","concatMap","sortedRoutes","sortByMatchingOutlets","scan","expandedChild","last$1","expanded$","expandSegmentAgainstRoute","first","_","noLeftoversInUrl","isImmediateMatch","matchSegmentAgainstRoute","expandSegmentAgainstRouteUsingRedirect","expandWildCardWithParamsAgainstRouteUsingRedirect","expandRegularSegmentAgainstRouteUsingRedirect","applyRedirectCommands","absoluteRedirect","lineralizeSegments","newSegments","rawSegmentGroup","_loadedRoutes","cfg","matchWithChecks","childConfig$","getChildConfig","routerConfig","childInjector","childConfig","splitSegmentGroup","matchedOnOutlet","cs","canLoad","canLoadObservables","isCanLoad","runCanLoadGuards","shouldLoadResult","canLoadFails","applyRedirectCreateUrlTree","createSegmentGroup","createQueryParams","redirectToParams","actualParams","updatedSegments","createSegments","redirectToSegments","actualSegments","findPosParam","findOrReturn","redirectToUrlSegment","pos","idx","NoMatch","Recognizer","rootComponentType","recognize","processSegmentGroup","freeze","rootNode","routeState","inheritParamsAndData","routeNode","inheritedParamsDataResolve","processSegment","outletChildren","takeWhile","mergedChildren","mergeEmptyPathMatches","nodes","localeCompare","sortActivatedRouteSnapshots","processSegmentAgainstRoute","x","matchResult","pathIndexShift","getPathIndexShift","getData","_loadedComponent","getSourceSegmentGroup","getResolve","mergedNodes","hasEmptyPathConfig","duplicateEmptyPathNode","resultNode","mergedNode","RouteTitle","nextResult","DefaultRouteReuseStrategy","BaseRouteReuseStrategy","detachedTree","ROUTES","RouterConfigLoader","compiler","componentLoaders","WeakMap","childrenLoaders","onLoadStartListener","loadRunner","onLoadEndListener","finalize","loader","parentInjector","moduleFactoryOrRoutes$","loadModuleFactoryOrRoutes","factoryOrRoutes","rawRoutes","requireStandaloneComponents","flatten","InjectFlags","NG_DEV_MODE$2","NgModuleFactory","compileModuleAsync","DefaultUrlHandlingStrategy","shouldProcessUrl","extract","newUrlPart","wholeUrl","exactMatchOptions","subsetMatchOptions","Router","rootContexts","lastSuccessfulNavigation","currentNavigation","disposed","navigationId","currentPageId","isNgZoneEnabled","events","defaultErrorHandler","malformedUriErrorHandler","defaultMalformedUriErrorHandler","navigated","lastSuccessfulId","afterPreactivation","urlHandlingStrategy","onSameUrlNavigation","urlUpdateStrategy","canceledNavigationResolution","triggerEvent","NgModuleRef","console","ɵConsole","ngZone","resetConfig","currentUrlTree","createEmptyUrlTree","rawUrlTree","browserUrlTree","routerState","createEmptyState","transitions","targetPageId","currentRawUrl","extractedUrl","rawUrl","extras","reject","promise","targetSnapshot","currentRouterState","targetRouterState","guards","guardsResult","navigations","setupNavigations","processNavigations","browserPageId","getState","ɵrouterPageId","eventsSubject","overallTransitionState","completed","errored","initialUrl","trigger","previousNavigation","urlTransition","isBrowserTriggeredNavigation","transition","getValue","serializeUrl","applyRedirects$1","applyRedirects","finalUrl","serializer","newObservableError","recognize$1","skipLocationChange","setBrowserUrl","routesRecognized","navStart","replaceUrl","guardsStart","getAllRouteGuards","moduleInjector","futureRSS","currRSS","check","currARS","canDeactivate","canDeactivateObservables","getToken","isCanDeactivate","runCanDeactivate","runCanDeactivateChecks","isBoolean","fireChildActivationStart","fireActivationStart","futureARS","canActivateChildGuardsMapped","canActivateChildGuards","canActivateChild","getCanActivateChild","d","defer","guardsMapped","isCanActivateChild","runCanActivateChild","canActivate","canActivateObservables","isCanActivate","runCanActivate","runCanActivateChecks","checkGuards","guardsEnd","restoreHistory","cancelNavigationTransition","switchTap","resolveStart","dataResolved","canActivateChecksResolved","hasStaticTitle","obj","getOwnPropertySymbols","getDataKeys","getResolver","mapTo","resolveNode","resolvedData","runResolve","resolveData","resolveEnd","loadComponents","loaders","loadedComponent","createRouterState","isRedirectingNavigationCancelingError$1","navCancel","mergedTree","scheduleNavigation","navError","ee","resetRootComponentType","setTransition","initialNavigation","setUpLocationChangeListener","navigateByUrl","locationSubscription","setTimeout","stateCopy","parseUrl","getCurrentNavigation","dispose","navigationExtras","relativeTo","queryParamsHandling","preserveFragment","f","q","removeEmptyProps","navigate","validateCommands","isActive","matchOptions","containsTree","titleStrategy","updateTitle","warn","priorPromise","rej","catch","generateNgRouterState","isCurrentPathEqualTo","replaceState","go","restoringFromCaughtError","targetPagePosition","resetState","resetUrlToCurrentUrlTree","historyGo","routerPageId","RouterLink","router","tabIndexAttribute","onChanges","setTabIndexIfNotOnNativeEl","newTabIndex","nativeElement","ngOnChanges","changes","routerLink","onClick","ɵcoerceToBoolean","TitleStrategy","buildTitle","pageTitle","getResolvedTitleForRoute","inject","DefaultTitleStrategy","i1","PreloadingStrategy","RouterPreloader","preloadingStrategy","setUpPreloading","subscription","preload","processRoutes","injectorForCurrentRoute","injectorForChildren","preloadConfig","mergeAll","loadedChildren$","recursiveLoadChildren$","loadComponent$","ROUTER_SCROLLER","RouterScroller","viewportScroller","lastId","lastSource","restoredId","scrollPositionRestoration","anchorScrolling","init","setHistoryScrollRestoration","routerEventsSubscription","createScrollEvents","scrollEventsSubscription","consumeScrollEvents","getScrollPosition","scheduleScrollEvent","scrollToPosition","scrollToAnchor","ROUTER_CONFIGURATION","providedIn","ROUTER_FORROOT_GUARD","ROUTER_PRELOADER","ROUTER_PROVIDERS","Location","opts","assignExtraOptionsToRouter","Compiler","UrlHandlingStrategy","RouteReuseStrategy","NgProbeToken","RouterModule","provideRoutes","provideForRootGuard","useHash","LocationStrategy","HashLocationStrategy","PathLocationStrategy","ViewportScroller","scrollOffset","setOffset","providePreloading","routerNgProbeToken","provideInitialNavigation","ROUTER_INITIALIZER","getBootstrapListener","APP_BOOTSTRAP_LISTENER","ANALYZE_FOR_ENTRY_COMPONENTS","bootstrappedComponentRef","ApplicationRef","components","bootstrapDone","BOOTSTRAP_DONE","INITIAL_NAVIGATION","componentTypes","locationInitialized","LOCATION_INITIALIZED","initNavigation","afterNextNavigation","ROUTER_REQUEST","ROUTER_NAVIGATION","props","ROUTER_CANCEL","ROUTER_ERROR","ROUTER_NAVIGATED","RouterStateSerializer","FullRouterStateSerializer","serializeRoute","MinimalRouterStateSerializer","NavigationActionTiming","PreActivation","PostActivation","_ROUTER_CONFIG","ROUTER_CONFIG","stateKey","navigationActionTiming","RouterTrigger","NONE","ROUTER","STORE","StoreRouterConnectingModule","activeRuntimeChecks","lastEvent","isNgrxMockEnvironment","isDevMode","strictActionSerializability","strictStateSerializability","setUpStoreStateListener","setUpRouterEventsListener","_createRouterConfig","select","withLatestFrom","routerStoreState","storeState","navigateIfNeeded","second","stripTrailingSlash","isSameUrl","dispatchNavLate","dispatchRouterRequest","dispatchRouterNavigation","dispatchRouterCancel","reset","dispatchRouterError","dispatchRouterNavigated","dispatchRouterAction","lastRoutesRecognized","nextRouterState","payload","i2","ACTIVE_RUNTIME_CHECKS","text","hasV8BreakIterator","Intl","v8BreakIterator","supportedInputTypes","Platform","_platformId","isBrowser","isPlatformBrowser","EDGE","test","TRIDENT","BLINK","chrome","CSS","WEBKIT","IOS","FIREFOX","ANDROID","SAFARI","candidateInputTypes","featureTestInput","supportsPassiveEvents","scrollBehaviorSupported","shadowDomIsSupported","supportsPassiveEventListeners","Element","documentElement","scrollToFunction","scrollTo","activeElement","newActiveElement","composedPath","__karma__","jasmine","jest","Mocha","modifiers","modifier","fallbackValue","isNaN","parseFloat","Number","_isNumberValue","elementOrRef","ElementRef","MutationObserverFactory","MutationObserver","ContentObserver","_mutationObserverFactory","_observedElements","_cleanupObserver","coerceElement","stream","_observeElement","_unobserveElement","mutations","characterData","childList","subtree","disconnect","CdkObserveContent","_contentObserver","_elementRef","_ngZone","_disabled","_currentSubscription","disabled","coerceBooleanProperty","_unsubscribe","debounce","_debounce","coerceNumberProperty","ngAfterContentInit","debounceTime","ObserversModule","mediaQueriesForWebkitCompatibility","mediaQueryStyleNode","MediaMatcher","_platform","_matchMedia","matchMedia","bind","noopMatchMedia","sheet","insertRule","createEmptyStyleRule","matches","media","addListener","removeListener","BreakpointObserver","_mediaMatcher","_queries","_destroySubject","isMatched","queries","coerceArray","mediaQuery","_registerQuery","mql","observables","stateObservable","skip","breakpointStates","response","breakpoints","run","takeUntil","a1","a2","trim","attr","CDK_DESCRIBEDBY_ID_PREFIX","CDK_DESCRIBEDBY_HOST_ATTRIBUTE","nextId","AriaDescriber","_document","_messageRegistry","_messagesContainer","_id","describe","hostElement","role","_canBeDescribed","getKey","setMessageId","messageElement","referenceCount","_createMessageElement","_isElementDescribedByMessage","_addMessageReference","removeDescription","_isElementNode","_removeMessageReference","registeredMessage","_deleteMessageElement","childNodes","describedElements","_removeCdkDescribedByReferenceIds","_createMessagesContainer","containerClassName","serverContainers","messagesContainer","visibility","originalReferenceIds","getAriaReferenceIds","ids","existingId","addAriaReferencedId","filteredIds","removeAriaReferencedId","referenceIds","messageId","trimmedMessage","ariaLabel","serviceId","ListKeyManager","_items","_activeItemIndex","_activeItem","_wrap","_letterKeyStream","_typeaheadSubscription","_vertical","_allowedModifierKeys","_homeAndEnd","_skipPredicateFn","_pressedLetters","tabOut","change","QueryList","newItems","newIndex","itemArray","toArray","skipPredicate","withWrap","shouldWrap","withVerticalOrientation","enabled","withHorizontalOrientation","direction","_horizontal","withAllowedModifierKeys","withTypeAhead","debounceInterval","letter","inputString","items","_getItemsArray","getLabel","toUpperCase","setActiveItem","withHomeAndEnd","previousActiveItem","updateActiveItem","onKeydown","keyCode","isModifierAllowed","setNextItemActive","setPreviousItemActive","setFirstItemActive","setLastItemActive","hasModifierKey","toLocaleUpperCase","activeItemIndex","activeItem","isTyping","_setActiveItemByIndex","_setActiveItemByDelta","delta","_setActiveInWrapMode","_setActiveInDefaultMode","fallbackDelta","ActiveDescendantKeyManager","setInactiveStyles","setActiveStyles","FocusKeyManager","_origin","setFocusOrigin","origin","focus","InteractivityChecker","isDisabled","hasAttribute","isVisible","offsetWidth","offsetHeight","getClientRects","hasGeometry","getComputedStyle","isTabbable","frameElement","getFrameElement","ownerDocument","defaultView","getWindow","getTabIndexValue","nodeName","tabIndexValue","inputType","isPotentiallyTabbableIOS","tabIndex","isFocusable","isInputElement","isHiddenInput","isNativeFormElement","isAnchorElement","isAnchorWithHref","hasValidTabIndex","isPotentiallyFocusable","ignoreVisibility","FocusTrap","_element","_checker","deferAnchors","_hasAttached","startAnchorListener","focusLastTabbableElement","endAnchorListener","focusFirstTabbableElement","_enabled","attachAnchors","_startAnchor","_endAnchor","_toggleAnchorTabIndex","startAnchor","endAnchor","_createAnchor","focusInitialElementWhenReady","_executeOnStable","focusInitialElement","focusFirstTabbableElementWhenReady","focusLastTabbableElementWhenReady","_getRegionBoundary","bound","markers","_getFirstTabbableElement","_getLastTabbableElement","redirectToElement","focusableChild","hasAttached","tabbableChild","isEnabled","toggleAnchors","isStable","onStable","FocusTrapFactory","deferCaptureElements","buttons","offsetX","offsetY","touch","touches","changedTouches","identifier","radiusX","radiusY","INPUT_MODALITY_DETECTOR_OPTIONS","INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS","ignoreKeys","modalityEventListenerOptions","normalizePassiveListenerOptions","passive","InputModalityDetector","_mostRecentTarget","_modality","_lastTouchMs","_onKeydown","_options","_getEventTarget","_onMousedown","Date","now","isFakeMousedownFromScreenReader","_onTouchstart","isFakeTouchstartFromScreenReader","modalityDetected","modalityChanged","distinctUntilChanged","mostRecentModality","LIVE_ANNOUNCER_ELEMENT_TOKEN","LIVE_ANNOUNCER_DEFAULT_OPTIONS","LiveAnnouncer","elementToken","_defaultOptions","_liveElement","_createLiveElement","announce","args","defaultOptions","politeness","clearTimeout","_previousTimeout","_currentPromise","_currentResolve","elementClass","previousElements","getElementsByClassName","liveEl","FOCUS_MONITOR_DEFAULT_OPTIONS","captureEventListenerOptions","FocusMonitor","_inputModalityDetector","_windowFocused","_originFromTouchInteraction","_elementInfo","_monitoredElementCount","_rootNodeFocusListenerCount","_windowFocusListener","_windowFocusTimeoutId","_stopInputModalityDetector","_rootNodeFocusAndBlurListener","_onFocus","_onBlur","_detectionMode","detectionMode","monitor","checkChildren","createShadowRoot","_supportsShadowDom","getRootNode","ShadowRoot","_getShadowRoot","_getDocument","cachedInfo","info","_registerGlobalListeners","stopMonitoring","elementInfo","_setClasses","_removeGlobalListeners","focusVia","_getClosestElementsInfo","currentElement","_originChanged","_setOrigin","_info","_getWindow","_getFocusOrigin","focusEventTarget","_shouldBeAttributedToTouch","_lastFocusOrigin","_isLastInteractionFromInputLabel","contains","toggle","isFromInteraction","_originTimeoutId","relatedTarget","_emitOrigin","observers","rootNodeFocusListeners","modality","mostRecentTarget","labels","CdkMonitorFocus","_focusMonitor","cdkFocusChange","ngAfterViewInit","_monitorSubscription","BLACK_ON_WHITE_CSS_CLASS","WHITE_ON_BLACK_CSS_CLASS","HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS","HighContrastModeDetector","_breakpointSubscription","_hasCheckedHighContrastMode","_applyBodyHighContrastModeCssClasses","getHighContrastMode","testElement","backgroundColor","documentWindow","computedStyle","computedColor","bodyClasses","A11yModule","highContrastModeDetector","DIR_DOCUMENT","RTL_LOCALE_PATTERN","Directionality","htmlDir","dir","rawValue","language","_resolveDirectionality","BidiModule","AnimationCurves","STANDARD_CURVE","DECELERATION_CURVE","ACCELERATION_CURVE","SHARP_CURVE","AnimationDurations","COMPLEX","ENTERING","EXITING","MATERIAL_SANITY_CHECKS","MatCommonModule","_sanityChecks","_hasDoneGlobalChecks","_checkIsEnabled","_isTestEnvironment","base","defaultColor","color","_color","colorPalette","_disableRipple","disableRipple","defaultTabIndex","_tabIndex","errorState","updateErrorState","oldState","newState","errorStateMatcher","_defaultErrorStateMatcher","isErrorState","ngControl","_parentFormGroup","_parentForm","stateChanges","_isInitialized","_pendingSubscribers","initialized","_notifySubscriber","_markInitialized","ErrorStateMatcher","form","invalid","touched","submitted","RippleRef","_renderer","_animationForciblyDisabledThroughCss","fadeOut","fadeOutRipple","defaultRippleAnimationConfig","enterDuration","exitDuration","passiveEventOptions","pointerDownEvents","pointerUpEvents","RippleRenderer","_target","elementOrElementRef","platform","_isPointerDown","_activeRipples","_pointerUpEventsRegistered","_containerElement","fadeInRipple","y","containerRect","_containerRect","getBoundingClientRect","animationConfig","animation","centered","left","width","top","height","radius","rect","distX","Math","max","abs","right","distY","bottom","sqrt","distanceToFurthestCorner","ripple","transitionDuration","computedStyles","userTransitionDuration","animationForciblyDisabledThroughCss","transitionProperty","rippleRef","transform","persistent","_mostRecentTransientRipple","eventListeners","onTransitionEnd","_finishRippleTransition","onTransitionCancel","_destroyRipple","rippleEl","opacity","fadeOutAll","_getActiveRipples","fadeOutAllNonPersistent","setupTriggerEvents","_triggerElement","_removeTriggerEvents","_registerEvents","handleEvent","_onTouchStart","_onPointerUp","_startFadeOutTransition","isMostRecentTransientRipple","size","isFakeMousedown","isSyntheticEvent","_lastTouchStartEvent","rippleDisabled","clientX","clientY","rippleConfig","terminateOnPointerUp","eventTypes","MAT_RIPPLE_GLOBAL_OPTIONS","MatRipple","globalOptions","_animationMode","_globalOptions","_rippleRenderer","_setupTriggerEventsIfEnabled","_trigger","launch","configOrX","i1$1","ANIMATION_MODULE_TYPE","MatRippleModule","MatPseudoCheckbox","MatPseudoCheckboxModule","MAT_OPTION_PARENT_COMPONENT","_MatOptgroupMixinBase","mixinDisabled","_uniqueOptgroupIdCounter","_MatOptgroupBase","_labelId","_inert","inertGroups","inputs","MAT_OPTGROUP","MatOptgroup","ngContentSelectors","xM","_uniqueIdCounter","MatOptionSelectionChange","isUserInput","_MatOptionBase","_changeDetectorRef","_parent","_selected","_active","_mostRecentViewValue","onSelectionChange","_stateChanges","multiple","selected","active","viewValue","_getHostElement","_emitSelectionChangeEvent","deselect","_handleKeydown","_selectViaInteraction","_getAriaSelected","_getTabIndex","ngAfterViewChecked","MatOption","changeDetectorRef","optionIndex","optionGroups","optionsArray","groupCounter","MatOptionModule","BUTTON_HOST_ATTRIBUTES","_MatButtonBase","mixinColor","mixinDisableRipple","MatButton","elementRef","isRoundButton","_hasHostAttributes","isIconButton","_isRippleDisabled","attributes","attribute","attrs","MatButtonModule","nodeEventEmitterMethods","eventTargetMethods","jqueryMethods","fromEvent","mapOneOrManyArgs","isEventTarget","methodName","isNodeStyleEventEmitter","toCommonHandlerRegistry","on","off","isJQueryStyleEventEmitter","isArrayLike","subTarget","animationFrameProvider","schedule","request","requestAnimationFrame","cancel","cancelAnimationFrame","delegate","handle","timestamp","AnimationFrameScheduler","AsyncScheduler","flush","flushId","_scheduled","actions","execute","delay","AnimationFrameAction","AsyncAction","work","requestAsyncId","recycleAsyncId","resolved","nextHandle","activeHandles","Immediate","setImmediate","findAndClearHandle","clearImmediate","immediateProvider","asapScheduler","AsapScheduler","AsapAction","asyncScheduler","durationSelector","lastValue","endDuration","cleanupDuration","audit","timer","ScrollDispatcher","_scrolled","_globalSubscription","_scrolledCount","scrollContainers","register","scrollable","elementScrolled","deregister","scrollableReference","scrolled","auditTimeInMs","_addGlobalListener","auditTime","_removeGlobalListener","ancestorScrolled","ancestors","getAncestorScrollContainers","scrollingContainers","_subscription","_scrollableContainsElement","scrollableElement","getElementRef","ViewportRuler","_change","_changeListener","_viewportSize","getViewportSize","_updateViewportSize","getViewportRect","scrollPosition","getViewportScrollPosition","documentRect","scrollTop","scrollY","scrollLeft","scrollX","throttleTime","innerWidth","innerHeight","CdkScrollableModule","ScrollingModule","Portal","_attachedHost","isAttached","setAttachedHost","ComponentPortal","viewContainerRef","componentFactoryResolver","TemplatePortal","templateRef","DomPortal","BasePortalOutlet","_isDisposed","attachDomPortal","_attachedPortal","portal","attachComponentPortal","attachTemplatePortal","_invokeDisposeFn","setDisposeFn","_disposeFn","DomPortalOutlet","outletElement","_componentFactoryResolver","_appRef","_defaultInjector","anchorNode","replaceChild","componentFactory","attachView","viewCount","detachView","_getComponentRootNode","viewContainer","viewRef","createEmbeddedView","rootNodes","detectChanges","CdkPortalOutlet","_viewContainerRef","attached","_getRootNode","attachedRef","_attachedRef","PortalModule","supportsScrollBehavior","BlockScrollStrategy","_viewportRuler","_previousHTMLStyles","_isEnabled","enable","_canBeEnabled","_previousScrollPosition","coerceCssPixelValue","disable","html","htmlStyle","bodyStyle","previousHtmlScrollBehavior","scrollBehavior","previousBodyScrollBehavior","scroll","viewport","scrollHeight","scrollWidth","CloseScrollStrategy","_scrollDispatcher","_config","_scrollSubscription","_detach","_overlayRef","overlayRef","threshold","_initialScrollPosition","updatePosition","NoopScrollStrategy","containerBounds","scrollContainerRect","RepositionScrollStrategy","scrollThrottle","autoClose","overlayRect","overlayElement","isElementScrolledOutsideView","ScrollStrategyOptions","noop","close","block","reposition","OverlayConfig","scrollStrategy","panelClass","hasBackdrop","backdropClass","disposeOnNavigation","configKeys","ConnectedOverlayPositionChange","connectionPair","scrollableViewProperties","BaseOverlayDispatcher","_attachedOverlays","OverlayKeyboardDispatcher","_keydownListener","overlays","_keydownEvents","keydownEvents","_isAttached","OverlayOutsideClickDispatcher","_cursorStyleIsSet","_pointerDownListener","_pointerDownEventTarget","_clickListener","_outsidePointerEvents","outsidePointerEvents","_addEventListeners","_cursorOriginalValue","cursor","OverlayContainer","getContainerElement","_createContainer","containerClass","oppositePlatformContainers","Eg","OverlayRef","_portalOutlet","_host","_pane","_keyboardDispatcher","_location","_outsideClickDispatcher","_animationsDisabled","_backdropElement","_backdropClick","_attachments","_detachments","_locationChanges","_backdropClickHandler","_backdropTransitionendHandler","_disposeBackdrop","_scrollStrategy","_positionStrategy","positionStrategy","backdropElement","_previousHostParent","attachResult","_updateStackingOrder","_updateElementSize","_updateElementDirection","_togglePointerEvents","_attachBackdrop","_toggleClasses","detachBackdrop","detachmentResult","_detachContentWhenStable","_disposeScrollStrategy","backdropClick","attachments","detachments","getConfig","updatePositionStrategy","strategy","updateSize","sizeConfig","setDirection","addPanelClass","classes","removePanelClass","getDirection","updateScrollStrategy","minWidth","minHeight","maxWidth","maxHeight","enablePointer","pointerEvents","showingClass","backdropToDetach","_backdropTimeout","cssClasses","isAdd","backdrop","boundingBoxClass","cssUnitPattern","FlexibleConnectedPositionStrategy","connectedTo","_overlayContainer","_lastBoundingBoxSize","_isPushed","_canPush","_growAfterOpen","_hasFlexibleDimensions","_positionLocked","_viewportMargin","_scrollables","_preferredPositions","_positionChanges","_resizeSubscription","_offsetX","_offsetY","_appliedPanelClasses","positionChanges","setOrigin","positions","_validatePositions","_boundingBox","_isInitialRender","_lastPosition","reapplyLastPosition","_clearPanelClasses","_resetOverlayElementStyles","_resetBoundingBoxStyles","_viewportRect","_getNarrowedViewportRect","_originRect","_getOriginRect","_overlayRect","originRect","viewportRect","flexibleFits","fallback","originPoint","_getOriginPoint","overlayPoint","_getOverlayPoint","overlayFit","_getOverlayFit","isCompletelyWithinViewport","_applyPosition","_canFitWithFlexibleDimensions","boundingBoxRect","_calculateBoundingBoxRect","visibleArea","bestFit","bestScore","fit","score","weight","_previousPushAmount","extendStyles","alignItems","justifyContent","lastPosition","withScrollableContainers","scrollables","withPositions","withViewportMargin","margin","withFlexibleDimensions","flexibleDimensions","withGrowAfterOpen","growAfterOpen","withPush","canPush","withLockedPosition","isLocked","withDefaultOffsetX","offset","withDefaultOffsetY","withTransformOriginOn","selector","_transformOriginSelector","originX","startX","_isRtl","endX","originY","overlayStartX","overlayStartY","overlayX","overlayY","point","rawOverlayRect","overlay","getRoundedBoundingClientRect","_getOffset","topOverflow","bottomOverflow","visibleWidth","_subtractOverflows","visibleHeight","fitsInViewportVertically","fitsInViewportHorizontally","availableHeight","availableWidth","getPixelValue","horizontalFit","_pushOverlayOnScreen","overflowRight","overflowBottom","overflowTop","overflowLeft","pushX","pushY","_setTransformOrigin","_setOverlayElementStyles","_setBoundingBoxStyles","_addPanelClasses","_getScrollVisibility","changeEvent","elements","xOrigin","yOrigin","transformOrigin","isRtl","smallestDistanceToViewportEdge","min","previousHeight","previousWidth","_hasExactPosition","hasExactPosition","hasFlexibleDimensions","_getExactOverlayY","_getExactOverlayX","transformString","clientHeight","horizontalStyleProperty","clientWidth","originBounds","overlayBounds","scrollContainerBounds","isOriginClipped","isElementClippedByScrolling","isOriginOutsideView","isOverlayClipped","isOverlayOutsideView","overflows","currentValue","currentOverflow","axis","cssClass","destination","input","units","clientRect","floor","wrapperClass","GlobalPositionStrategy","_cssPosition","_topOffset","_bottomOffset","_alignItems","_xPosition","_xOffset","_width","_height","centerHorizontally","centerVertically","parentStyles","shouldBeFlushHorizontally","shouldBeFlushVertically","xPosition","xOffset","marginLeft","marginRight","oe","marginTop","marginBottom","OverlayPositionBuilder","global","flexibleConnectedTo","nextUniqueId","Overlay","scrollStrategies","_positionBuilder","_directionality","_animationsModuleType","_createHostElement","pane","_createPaneElement","portalOutlet","_createPortalOutlet","overlayConfig","i5","i6","defaultPositionList","CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY","CdkOverlayOrigin","CdkConnectedOverlay","_overlay","scrollStrategyFactory","_dir","_hasBackdrop","_lockPosition","_flexibleDimensions","_push","_backdropSubscription","_attachSubscription","_detachSubscription","_positionSubscription","viewportMargin","open","disableClose","positionChange","overlayKeydown","overlayOutsideClick","_templatePortal","_scrollStrategyFactory","_position","_updatePositionStrategy","lockPosition","_attachOverlay","_detachOverlay","_createOverlay","_buildConfig","_createPositionStrategy","currentPosition","_getFlexibleConnectedPositionStrategyOrigin","transformOriginSelector","CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER","OverlayModule","DialogConfig","ariaDescribedBy","ariaLabelledBy","ariaModal","autoFocus","restoreFocus","closeOnNavigation","closeOnDestroy","CdkDialogContainer","_focusTrapFactory","_interactivityChecker","_elementFocusedBeforeDialogWasOpened","_closeInteractionType","_contentAttached","_ariaLabelledBy","_initializeFocusTrap","_handleBackdropClicks","_captureInitialFocus","_trapFocus","_restoreFocus","_recaptureFocus","_containsFocus","_forceFocus","_focusByCssSelector","elementToFocus","_focusTrap","focusedSuccessfully","_focusDialogContainer","focusConfig","focusTargetElement","_getFocusedElementPierceShadowDom","decls","DialogRef","focusOrigin","containerInstance","closedSubject","componentInstance","DIALOG_SCROLL_STRATEGY","DIALOG_DATA","DEFAULT_DIALOG_CONFIG","DIALOG_SCROLL_STRATEGY_PROVIDER","uniqueId","Dialog","_parentDialog","_openDialogsAtThisLevel","_afterAllClosedAtThisLevel","_afterOpenedAtThisLevel","_ariaHiddenElements","afterAllClosed","openDialogs","_getAfterAllClosed","afterOpened","componentOrTemplateRef","getDialogById","_getOverlayConfig","dialogRef","dialogContainer","_attachContainer","_attachDialogContent","_hideNonDialogContentFromAssistiveTechnology","_removeOpenDialog","closeAll","reverseForEach","dialog","userInjector","containerType","containerPortal","containerRef","_createInjector","TemplateRef","$implicit","templateContext","contentRef","emitEvent","previousValue","overlayContainer","sibling","DialogModule","AnimationBuilder","AUTO_STYLE","definitions","timings","steps","tokens","stateChangeExpr","expr","NoopAnimationPlayer","_onDoneFns","_onStartFns","_onDestroyFns","_originalOnDoneFns","_originalOnStartFns","_started","_destroyed","_finished","parentPlayer","totalTime","_onFinish","onStart","onDone","onDestroy","hasStarted","play","_onStart","triggerMicrotask","scheduleMicroTask","pause","restart","finish","setPosition","getPosition","triggerCallback","phaseName","methods","AnimationGroupPlayer","_players","players","doneCount","destroyCount","startCount","total","player","_onDestroy","time","timeAtPosition","longestPlayer","longestSoFar","newPlayerIsLongest","beforeDestroy","defaultParams","enterAnimationDuration","exitAnimationDuration","matDialogAnimations","animate","animateChild","optional","MatDialogConfig","delayFocusTrap","_MatDialogContainerBase","focusTrapFactory","dialogConfig","interactivityChecker","focusMonitor","_animationStateChanged","_openAnimationDone","MatDialogContainer","checker","_state","_onAnimationDone","toState","_onAnimationStart","_startExitAnimation","_getAnimationState","i4","MatDialogRef","_ref","_containerInstance","_afterOpened","_beforeClosed","_closeFallbackTimeout","_finishDialogClose","_result","interactionType","_closeDialogVia","dialogResult","afterClosed","beforeClosed","MAT_DIALOG_DATA","MAT_DIALOG_DEFAULT_OPTIONS","MAT_DIALOG_SCROLL_STRATEGY","MAT_DIALOG_SCROLL_STRATEGY_PROVIDER","_MatDialogBase","_dialogRefConstructor","_dialogContainerType","_dialogDataToken","_idPrefix","_dialog","cdkRef","cdkConfig","_closeDialogs","dialogs","MatDialog","parentDialog","animationMode","dialogElementUid","MatDialogTitle","_dialogRef","getClosestDialog","MatDialogContent","MatDialogActions","align","MatDialogModule","PendingCopy","textarea","_textarea","readOnly","copy","successful","currentFocus","setSelectionRange","execCommand","Clipboard","pendingCopy","beginCopy","ClipboardModule","matMenuAnimations","transformMenu","fadeInItems","MAT_MENU_CONTENT","MAT_MENU_PANEL","_MatMenuItemBase","MatMenuItem","_parentMenu","_hovered","_focused","_highlighted","_triggersSubmenu","addItem","removeItem","_checkDisabled","stopPropagation","_handleMouseEnter","clone","cloneNode","icons","_setHighlighted","isHighlighted","_hasFocus","MAT_MENU_DEFAULT_OPTIONS","overlapTrigger","yPosition","menuPanelUid","_MatMenuBase","_yPosition","_directDescendantItems","_tabSubscription","_classList","_panelAnimationState","_animationDone","overlayPanelClass","_overlapTrigger","panelId","setPositionClasses","previousPanelClass","_previousPanelClass","className","_updateDirectDescendants","_keyManager","focusedItem","itemsList","itemChanges","_item","parentMenu","focusFirstItem","menuPanel","closest","resetActiveItem","setElevation","depth","elevation","_baseElevation","newElevation","_elevationPrefix","customElevation","_previousElevation","posX","posY","_startAnimation","_resetAnimation","_isAnimating","_allItems","notifyOnChanges","contentQueries","MatMenu","changeDetection","MAT_MENU_SCROLL_STRATEGY","MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER","passiveEventListenerOptions","_MatMenuTriggerBase","_menuItemInstance","_menuOpen","_closingActionsSubscription","_hoverSubscription","_menuCloseSubscription","_handleTouchStart","_openedBy","menuOpened","onMenuOpen","menuClosed","onMenuClose","_parentMaterialMenu","triggersSubmenu","_deprecatedMatMenuTriggerFor","menu","_menu","_destroyMenu","_handleHover","menuOpen","toggleMenu","closeMenu","openMenu","_setPosition","_getPortal","lazyContent","menuData","_menuClosingActions","_initMenu","_attached","_setIsMenuOpen","_setMenuElevation","isOpen","_subscribeToPositions","originFallbackX","overlayFallbackY","originFallbackY","overlayFallbackX","_parentInnerPadding","firstItem","offsetTop","parentClose","hover","_handleMousedown","button","_handleClick","_portal","i3$1","hostVars","MatMenuTrigger","MatMenuModule","PANEL_CLASS","passiveListenerOptions","MAT_TOOLTIP_SCROLL_STRATEGY","MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER","MAT_TOOLTIP_DEFAULT_OPTIONS","showDelay","hideDelay","touchendHideDelay","_MatTooltipBase","_ariaDescriber","_viewInitialized","_pointerExitEventsInitialized","_cssClassPrefix","_showDelay","_hideDelay","touchGestures","_message","_passiveListeners","_updatePosition","_tooltipInstance","show","hide","_setupPointerEnterEventsIfNeeded","_mouseLeaveHideDelay","_isTooltipVisible","_updateTooltipMessage","tooltipClass","_tooltipClass","_setTooltipClass","_touchstartTimeout","_showTimeoutId","_hideTimeoutId","_tooltipComponent","afterHidden","scrollableAncestors","_updateCurrentPositionClass","_handleBodyInteraction","disableTooltipInteractivity","_getOrigin","_getOverlayPosition","_addOffset","main","isLtr","originPosition","_invertPosition","overlayPosition","_markForCheck","onMicrotaskEmpty","newPosition","_currentPosition","classPrefix","_platformSupportsMouseEvents","_setupPointerExitEventsIfNeeded","_disableNativeGesturesIfNecessary","_addListeners","exitListeners","newTarget","_wheelListener","touchendListener","listeners","elementUnderPointer","elementFromPoint","gestures","userSelect","msUserSelect","webkitUserSelect","MozUserSelect","draggable","webkitUserDrag","touchAction","webkitTapHighlightColor","MatTooltip","scrollDispatcher","ariaDescriber","TooltipComponent","_TooltipComponentBase","_visibility","_closeOnInteraction","_isVisible","_onHide","_toggleVisibility","_handleMouseLeave","_onShow","_handleAnimationEnd","animationName","_showAnimation","_hideAnimation","_finalizeAnimation","toVisible","tooltip","_tooltip","showClass","hideClass","getPropertyValue","_breakpointObserver","_isHandset","mD","i7","MatTooltipModule","popResultSelector","argsArgArrayOrObject","remainingCompletions","remainingEmissions","sourceIndex","createObject","BaseControlValueAccessor","onChange","onTouched","registerOnTouched","registerOnChange","setDisabledState","BuiltInControlValueAccessor","features","NG_VALUE_ACCESSOR","DEFAULT_VALUE_ACCESSOR","forwardRef","DefaultValueAccessor","COMPOSITION_BUFFER_MODE","_compositionMode","_composing","_isAndroid","writeValue","_handleInput","_compositionStart","_compositionEnd","NG_VALIDATORS","NG_ASYNC_VALIDATORS","EMAIL_REGEXP","Validators","isEmptyInputValue","actual","minValidator","maxValidator","requiredValidator","required","requiredTrueValidator","email","emailValidator","minLength","hasValidLength","minlength","requiredLength","actualLength","minLengthValidator","maxLength","maxLengthValidator","pattern","nullValidator","regex","regexStr","RegExp","requiredPattern","actualValue","patternValidator","validators","composeAsync","maxlength","arrayOfErrors","errors","validator","validate","isValidatorFn","presentValidators","isPresent","mergeErrors","executeValidators","normalizeValidators","forkJoin","controlValidators","dirValidator","_rawValidators","_rawAsyncValidators","includes","currentValidators","makeValidatorsArray","validatorsToAdd","hasValidator","AbstractControlDirective","_onDestroyCallbacks","valid","pending","pristine","dirty","status","untouched","statusChanges","valueChanges","_setValidators","_composedValidatorFn","composeValidators","_setAsyncValidators","_composedAsyncValidatorFn","composeAsyncValidators","asyncValidator","_registerOnDestroy","_invokeOnDestroyCallbacks","hasError","errorCode","getError","ControlContainer","formDirective","NgControl","valueAccessor","AbstractControlStatus","cd","_cd","isTouched","isUntouched","isPristine","isDirty","isValid","isInvalid","isPending","isSubmitted","NgControlStatus","NgControlStatusGroup","VALID","INVALID","PENDING","DISABLED","validatorOrOpts","isOptionsObj","asyncValidators","isGroup","controls","_forEachChild","AbstractControl","_pendingDirty","_hasOwnPendingAsyncValidator","_pendingTouched","_onCollectionChange","_onDisabledChange","coerceToValidator","coerceToAsyncValidator","validatorFn","asyncValidatorFn","updateOn","_updateOn","setValidators","setAsyncValidators","addValidators","addAsyncValidators","removeValidators","removeAsyncValidators","hasAsyncValidator","clearValidators","clearAsyncValidators","markAsTouched","onlySelf","markAllAsTouched","markAsUntouched","_updateTouched","markAsDirty","markAsPristine","_updatePristine","markAsPending","skipPristineCheck","_parentMarkedDirty","_updateValue","_updateAncestors","changeFn","updateValueAndValidity","setParent","getRawValue","_setInitialStatus","_cancelExistingSubscription","_runValidator","_calculateStatus","_runAsyncValidator","_updateTreeValidity","ctrl","_allControlsDisabled","_asyncValidationSubscription","setErrors","_updateControlsErrors","currPath","_find","_initObservables","_anyControlsHaveStatus","_anyControls","_anyControlsDirty","_anyControlsTouched","_registerOnCollectionChange","_setUpdateStrategy","FormGroup","pickValidators","pickAsyncValidators","_setUpControls","registerControl","addControl","removeControl","setControl","controlName","assertAllValuesPresent","assertControlPresent","patchValue","_reduceChildren","acc","_syncPendingControls","subtreeUpdated","updated","_reduceValue","condition","entries","initValue","setUpValidators","newValue","_pendingValue","_pendingChange","updateControl","setUpViewChangePipeline","emitModelEvent","viewToModelUpdate","_unregisterOnChange","setUpModelChangePipeline","setUpBlurPipeline","onDisabledChange","registerOnDisabledChange","_unregisterOnDisabledChange","setUpDisabledChangeHandler","validateControlPresenceOnChange","cleanUpValidators","registerOnValidatorChange","getControlValidators","mergeValidators","getControlAsyncValidators","onValidatorChange","isControlUpdated","updatedValidators","updatedAsyncValidators","emitModelToViewChange","viewModel","model","isFirstChange","is","directives","valueAccessors","defaultAccessor","builtinAccessor","customAccessor","WS","formDirectiveProvider$1","NgForm","resolvedPromise$1","_directives","ngSubmit","_findContainer","setUpControl","getControl","addFormGroup","setUpFormContainer","removeFormGroup","getFormGroup","updateModel","onSubmit","$event","syncPendingControls","onReset","resetForm","list","formState","FormControl","_onChange","_applyFormState","nonNullable","initialValueIsDefault","isFormControlState","emitViewToModelChange","removeListItem","formControlBinding$1","NgModel","resolvedPromise","_registered","update","selectValueAccessor","_checkForErrors","_checkName","oldName","_getPath","_setUpControl","_updateDisabled","isPropertyUpdated","_isStandalone","_setUpStandalone","standalone","_checkParentType","disabledValue","controlPath","ChangeDetectorRef","ɵNgNoValidate","RadioControlRegistryModule","NG_MODEL_WITH_FORM_CONTROL_WARNING","formControlBinding","FormControlDirective","_ngModelWarningConfig","_ngModelWarningSent","_isControlChanged","previousForm","cleanUpControl","_ngModelWarningSentOnce","formDirectiveProvider","FormGroupDirective","_updateDomValue","_checkFormPresent","_updateValidators","_updateRegistrations","_oldForm","removeListItem$1","_setUpFormContainer","_cleanUpFormContainer","addFormArray","removeFormArray","getFormArray","oldCtrl","newCtrl","isFormControl","cleanUpFormContainer","controlNameBinding","FormControlName","_added","SELECT_VALUE_ACCESSOR","SelectControlValueAccessor","_optionMap","_idCounter","_compareWith","compareWith","valueString","_buildValueString$1","_getOptionId","_getOptionValue","_registerOption","_extractId$1","NgSelectOption","_select","ngValue","_setElementValue","SELECT_MULTIPLE_VALUE_ACCESSOR","SelectMultipleControlValueAccessor","optionSelectedStateSetter","opt","_setSelected","selectedOptions","_value","_extractId","ɵNgSelectMultipleOption","_buildValueString","AbstractValidatorDirective","_validator","inputName","normalizeInput","createValidator","REQUIRED_VALIDATOR","RequiredValidator","MAX_LENGTH_VALIDATOR","MaxLengthValidator","toInteger","ɵInternalFormsSharedModule","FormsModule","ReactiveFormsModule","warnOnNgModelWithFormControl","FormArray","at","_adjustIndex","_registerControl","removeAt","adjustedIndex","FormBuilder","useNonNullable","nnfb","reducedControls","_reduceControls","newOptions","isAbstractControlOptions","array","createdControls","_createControl","UntypedFormBuilder","controlsConfig","doSelect","isFinite","isNumber","NgbDate","year","month","day","isInteger","date","equals","other","before","after","prev","dateComparator","minDate","maxDate","markDisabled","jsDate","getFullYear","getMonth","getDate","getTime","setFullYear","NgbCalendar","NgbCalendarGregorian","NGB_DATEPICKER_CALENDAR_FACTORY","getDaysPerWeek","getMonths","getWeeksPerMonth","getNext","period","number","toJSDate","checkMonth","expectedMonth","setMonth","setDate","fromJSDate","getPrev","getWeekday","getDay","getWeekNumber","week","firstDayOfWeek","round","getToday","NgbDatepickerI18n","getMonthLabel","getMonthFullName","getYearNumerals","getDayNumerals","getWeekNumerals","weekNumber","getWeekLabel","locale","NgbDatepickerI18nDefault","NGB_DATEPICKER_18N_FACTORY","LOCALE_ID","_locale","_monthsShort","getLocaleMonthNames","FormStyle","TranslationWidth","_monthsFull","getWeekdayLabel","weekday","weekdaysStartingOnSunday","getLocaleDayNames","weekdays","getMonthShortName","getDayAriaLabel","formatDate","NgbDatepickerService","_calendar","_i18n","_VALIDATORS","dayTemplateData","displayMonths","focusVisible","toValidDate","isChangedDate","navigation","outsideDays","weekdayWidth","weekdaysVisible","_model$","_dateSelect$","firstDate","lastDate","focusDate","months","prevDisabled","nextDisabled","selectedDate","selectBoxes","years","model$","dateSelect$","patch","_nextState","focusedDate","focusSelect","isDateSelectable","isChangedMonth","ngbDate","struct","_updateState","_patchContexts","weeks","days","focused","tabindex","hidden","assign","startDate","checkMinBeforeMax","checkDateInRange","calendar","i18n","force","monthsToReuse","firstDates","reusedIndex","findIndex","calendarToday","daysPerWeek","firstMonthDate","dayOfWeek","getFirstViewDate","weekObject","collapsed","newDate","nextDate","today","contextUserData","dayObject","currentMonth","currentYear","buildMonth","buildMonths","yearChanged","monthChanged","numbers","generateSelectBoxYears","generateSelectBoxMonths","prevDate","prevMonthDisabled","nextMonthDisabled","NavigationEvent","PREV","NEXT","NgbDatepickerConfig","showWeekNumbers","NgbDateAdapter","NgbDateStructAdapter","NGB_DATEPICKER_DATE_ADAPTER_FACTORY","fromModel","toModel","NgbDatepickerNavigationSelect","_month","_year","changeMonth","changeYear","monthSelect","yearSelect","II","FI","$localize","NgbDatepickerNavigation","onClickPrev","currentTarget","onClickNext","NgbDatepickerDayView","isMuted","Key","Tab","Enter","Escape","Space","PageUp","PageDown","End","Home","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","NgbDatepickerKeyboardService","processKey","datepicker","which","NgbDatepickerContent","NgbDatepicker","_service","_ngbDateAdapter","_controlValue","_destroyed$","_publicState","dateSelect","oldDate","navigationPrevented","newSelectedDate","newFocusedDate","oldFocusedDate","asObservable","navigateTo","focusIns$","_contentEl","focusOuts$","hasClassName","dayTemplate","_defaultDayTemplate","onDateSelect","onNavigateDateSelect","onNavigateEvent","UI","JE","NgbDatepickerMonth","_keyboardService","onKeyDown","hostBindings","maxTouchPoints","NgbDateParserFormatter","NgbDateISOParserFormatter","NGB_DATEPICKER_PARSER_FORMATTER_FACTORY","dateParts","format","padNumber","NgbDatepickerModule","LuxonError","InvalidDateTimeError","toMessage","InvalidIntervalError","InvalidDurationError","ConflictingSpecificationError","InvalidUnitError","unit","InvalidArgumentError","ZoneIsAbstractError","l","DATE_SHORT","DATE_MED","DATE_MED_WITH_WEEKDAY","DATE_FULL","DATE_HUGE","TIME_SIMPLE","hour","minute","TIME_WITH_SECONDS","TIME_WITH_SHORT_OFFSET","timeZoneName","TIME_WITH_LONG_OFFSET","TIME_24_SIMPLE","hourCycle","TIME_24_WITH_SECONDS","TIME_24_WITH_SHORT_OFFSET","TIME_24_WITH_LONG_OFFSET","DATETIME_SHORT","DATETIME_SHORT_WITH_SECONDS","DATETIME_MED","DATETIME_MED_WITH_SECONDS","DATETIME_MED_WITH_WEEKDAY","DATETIME_FULL","DATETIME_FULL_WITH_SECONDS","DATETIME_HUGE","DATETIME_HUGE_WITH_SECONDS","RelativeTimeFormat","by","best","pair","thing","padded","padStart","string","isUndefined","fraction","digits","towardZero","factor","trunc","isLeapYear","modMonth","floorMod","UTC","millisecond","setUTCFullYear","getUTCFullYear","weekYear","p1","p2","ts","offsetFormat","timeZone","intlOpts","modified","parsed","DateTimeFormat","formatToParts","offHourStr","offMinuteStr","offHour","offMin","numericValue","normalizer","normalized","u","asNumber","hours","minutes","sign","RangeError","pick","ianaRegex","monthsLong","monthsShort","monthsNarrow","weekdaysLong","weekdaysShort","weekdaysNarrow","meridiems","erasLong","erasShort","erasNarrow","splits","tokenToString","literal","macroTokenToFormatOpts","Formats","DD","DDD","DDDD","tt","ttt","tttt","T","TT","TTT","TTTT","ff","fff","ffff","FF","FFF","FFFF","Formatter","fmt","currentFull","bracketed","formatOpts","loc","systemLoc","formatWithSystemDefault","dt","redefaultToSystem","df","dtFormatter","formatDateTime","formatDateTimeParts","resolvedOptions","num","forceSimple","padTo","numberFormatter","formatDateTimeFromString","knownEnglish","listingMode","useDateTimeFormatter","outputCalendar","formatOffset","isOffsetFixed","allowZ","English","maybeMacro","era","eras","stringifyTokens","parseFormat","offsetName","zoneName","ordinal","quarter","formatDurationFromString","dur","tokenToField","realTokens","found","lildur","mapped","shiftTo","Invalid","explanation","Zone","ianaName","isUniversal","otherZone","singleton","SystemZone","parseZoneInfo","getTimezoneOffset","dtfCache","typeToPos","ianaZoneCache","IANAZone","isValidZone","NaN","dtf","hour12","makeDTF","adOrBc","formatted","filled","partsOffset","exec","fMonth","fDay","fYear","fadOrBc","fHour","fMinute","fSecond","hackyOffset","asTS","over","objToLocalTS","FixedOffsetZone","utcInstance","signedOffset","fixed","InvalidZone","defaultZone","isString","lowered","throwOnInvalid","defaultLocale","defaultNumberingSystem","defaultOutputCalendar","Settings","normalizeZone","numberingSystem","Locale","intlLFCache","intlDTCache","locString","intlNumCache","intlRelCache","sysLocaleCache","defaultOK","englishFn","intlFn","PolyNumberFormatter","intl","otherOpts","useGrouping","minimumIntegerDigits","inf","NumberFormat","getCachedINF","roundTo","PolyDateFormatter","z","gmtOffset","offsetZ","DateTime","getCachedDTF","PolyRelFormatter","isEnglish","hasRelative","rtf","cacheKeyOpts","getCachedRTF","numeric","narrow","quarters","seconds","lastable","isDay","isInPast","fmtValue","singular","lilUnits","fmtUnit","defaultToEN","specifiedLocale","localeR","systemLocale","numbering","parsedLocale","parsedNumberingSystem","parsedOutputCalendar","localeStr","uIndex","smaller","parseLocaleString","intlConfigString","weekdaysCache","monthsCache","meridiemCache","eraCache","fastNumbersCached","fastNumbers","supportsFastNumbers","alts","redefaultToEN","listStuff","formatStr","ms","mapMonths","mapWeekdays","field","matching","relFormatter","listFormatter","ListFormat","getCachedLF","regexes","full","extractors","mergedVals","mergedZone","ex","patterns","extractor","ret","parseInteger","offsetRegex","isoTimeBaseRegex","isoTimeRegex","isoTimeExtensionRegex","extractISOWeekData","simpleParse","extractISOOrdinalData","sqlTimeRegex","sqlTimeExtensionRegex","int","milliseconds","parseMillis","local","fullOffset","isoTimeOnly","isoDuration","yearStr","monthStr","weekStr","dayStr","hourStr","minuteStr","secondStr","millisecondsStr","hasNegativePrefix","negativeSeconds","maybeNegate","parseFloating","obsOffsets","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","weekdayStr","untruncateYear","rfc2822","obsOffset","milOffset","fromStrings","w","rfc1123","rfc850","ascii","isoYmdWithTimeExtensionRegex","combineRegexes","isoWeekWithTimeExtensionRegex","isoOrdinalWithTimeExtensionRegex","isoTimeCombinedRegex","extractISOYmdTimeAndOffset","combineExtractors","extractISOTime","extractISOOffset","extractIANAZone","extractISOWeekTimeAndOffset","extractISOOrdinalDateAndTime","extractISOTimeAndOffset","extractISOTimeOnly","sqlYmdWithTimeExtensionRegex","sqlTimeCombinedRegex","extractISOTimeOffsetAndIANAZone","lowOrderMatrix","casualMatrix","daysInYearAccurate","daysInMonthAccurate","accurateMatrix","orderedUnits","reverseUnits","conf","conversionAccuracy","Duration","matrix","fromMap","fromUnit","toMap","toUnit","conv","raw","added","ceil","antiTrunc","accurate","isLuxonDuration","fromObject","normalizeObject","normalizeUnit","durationLike","fromMillis","isDuration","extractISODuration","parseISODuration","parseISOTimeOnly","toFormat","fmtOpts","toHuman","unitDisplay","listStyle","toObject","toISO","toISOTime","millis","toMillis","suppressMilliseconds","suppressSeconds","includePrefix","toJSON","valueOf","plus","fromDurationLike","minus","negate","mapUnits","reconfigure","normalize","vals","normalizeValues","previous","convert","built","accumulated","lastUnit","own","ak","down","negated","invalidReason","invalidExplanation","v1","v2","eq","Interval","isLuxonInterval","builtStart","friendlyDateTime","builtEnd","validateError","validateStartEnd","fromDateTimes","startIsValid","endIsValid","toDuration","startOf","diff","hasSame","isEmpty","isAfter","dateTime","isBefore","splitAt","dateTimes","sorted","splitBy","divideEqually","numberOfParts","overlaps","abutsStart","abutsEnd","engulfs","intersection","union","intervals","final","sofar","currentCount","ends","difference","xor","toISODate","dateFormat","separator","mapEndpoints","mapFn","Info","proto","setZone","locObj","relative","earlier","later","utcDayStart","toUTC","keepLocalTime","numberingSystems","arab","arabext","bali","beng","deva","fullwide","gujr","hanidec","khmr","knda","laoo","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt","latn","numberingSystemsUTF16","hanidecChars","append","post","deser","charCodeAt","search","parseDigits","spaceOrNBSP","spaceOrNBSPRegExp","strings","fixListRegex","stripInsensitivities","h","partTypeStyleToTokenVal","short","long","dayperiod","dayPeriod","dummyDateTimeCache","getDummyDateTime","tokenForPart","maybeExpandMacroToken","expandMacroTokens","one","digitRegex","two","three","four","six","oneOrTwo","oneToThree","oneToSix","oneToNine","twoToFour","fourToSix","escapeToken","unitate","oneOf","intUnit","simple","unitForToken","disqualifyingUnit","regexString","handlers","buildRegex","rawMatches","all","matchIndex","specificOffset","Z","S","toField","dateTimeFromMatches","nonLeapLadder","leapLadder","js","getUTCDay","table","month0","gregObj","computeOrdinal","weeksInWeekYear","timeObject","weekData","weekdayOfJan4","yearInDays","daysInYear","uncomputeOrdinal","gregData","ordinalData","validYear","validMonth","integerBetween","validDay","daysInMonth","unitOutOfRange","validHour","validMinute","validSecond","validMillisecond","MAX_DATE","gregorianToWeek","inst","old","localTS","tz","utcGuess","o2","o3","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","fixOffset","oPre","millisToAdd","parsedZone","interpretationZone","extended","longFormat","includeOffset","extendedZone","defaultUnitValues","defaultWeekUnitValues","defaultOrdinalUnitValues","orderedWeekUnits","orderedOrdinalUnits","weeknumber","weeksnumber","weeknumbers","weekyear","weekyears","tsNow","hasInvalidGregorianData","hasInvalidTimeData","offsetProvis","objToTS","calendary","formatter","differ","argList","unsupportedZone","ot","tsToObj","isLuxonDateTime","lastOpts","quickDT","isDate","zoneToUse","_i","containsOrdinal","containsGregorYear","containsGregorMD","containsGregor","definiteWeekDef","useWeekData","defaultValues","objNow","gregorianToOrdinal","foundFirst","bt","higherOrderInvalid","validWeek","validWeekday","hasInvalidWeekData","validOrdinal","hasInvalidOrdinalData","gregorian","weekToGregorian","ordinalToGregorian","tsFinal","offsetFinal","parseISODate","parseDataToDateTime","preprocessRFC2822","extractRFC2822","parseRFC2822Date","extractRFC1123Or850","extractASCII","parseHTTPDate","localeToUse","explainFromTokens","parseFromTokens","fromFormat","parseSQL","possiblyCachedWeekData","monthShort","monthLong","weekdayShort","weekdayLong","offsetNameShort","offsetNameLong","isInDST","isInLeapYear","resolvedLocaleOptions","toLocal","keepCalendarTime","newTS","offsetGuess","asObj","setLocale","settingWeekStuff","mixed","adjustTime","normalizedUnit","endOf","toLocaleString","toLocaleParts","ext","toISOWeekDate","toTechFormat","toRFC2822","toHTTP","toSQLDate","toSQLTime","includeZone","includeOffsetSpace","toSQL","toSeconds","toUnixInteger","toBSON","includeConfig","otherDateTime","durOpts","maybeArray","otherIsLater","diffed","highWater","lowestOrder","differs","dayDiff","highOrderDiffs","remainingMillis","lowerOrderUnits","diffNow","until","inputMs","adjustedToZone","toRelative","padding","diffRelative","toRelativeCalendar","isDateTime","bestBy","fromFormatExplain","dateTimeish","MAT_SNACK_BAR_DATA","MatSnackBarConfig","announcementMessage","horizontalPosition","verticalPosition","MAX_TIMEOUT","pow","MatSnackBarRef","_afterDismissed","_onAction","_dismissedByAction","_onExit","_finishDismiss","dismiss","exit","_durationTimeoutId","dismissWithAction","closeWithAction","_dismissAfter","_open","dismissedByAction","afterDismissed","_onEnter","onAction","SimpleSnackBar","snackBarRef","hasAction","matSnackBarAnimations","snackBarState","_MatSnackBarContainerBase","snackBarConfig","_announceDelay","_onAnnounce","_animationState","_assertNotAttached","_afterPortalAttached","_live","_role","onAnimationEnd","fromState","_completeExit","onEnter","enter","_screenReaderAnnounce","_announceTimeoutId","panelClasses","inertElement","liveElement","focusedElement","HTMLElement","viewQuery","MatSnackBarContainer","MatSnackBarModule","MAT_SNACK_BAR_DEFAULT_OPTIONS","_MatSnackBarBase","_parentSnackBar","_defaultConfig","_snackBarRefAtThisLevel","_openedSnackBarRef","openFromComponent","_attach","openFromTemplate","template","simpleSnackBarComponent","_attachSnackBarContainer","snackBarContainerComponent","userConfig","handsetCssClass","_animateSnackBar","isLeft","isRight","i2$1","i3$2","MatSnackBar","live","breakpointObserver","parentSnackBar","defaultConfig","nextUniqueId$2","MAT_ERROR","MatError","ariaLive","matFormFieldAnimations","transitionMessages","MatFormFieldControl","_MAT_HINT","MatLabel","MatPlaceholder","MAT_PREFIX","MatPrefix","MAT_SUFFIX","MatSuffix","_MatFormFieldBase","MAT_FORM_FIELD_DEFAULT_OPTIONS","MAT_FORM_FIELD","MatFormField","_defaults","_outlineGapCalculationNeededImmediately","_outlineGapCalculationNeededOnStable","_hideRequiredMarker","_showAlwaysAnimate","_subscriptAnimationState","_hintLabel","_hintLabelId","floatLabel","_getDefaultFloatLabelState","_animationsEnabled","appearance","Boolean","hideRequiredMarker","_appearance","oldValue","_shouldAlwaysFloat","_canLabelFloat","hintLabel","_processHints","_floatLabel","_control","_explicitFormFieldControl","_controlNonStatic","_controlStatic","getLabelId","_hasFloatingLabel","getConnectedOverlayOrigin","_connectionContainerRef","_validateControlChild","controlType","_validatePlaceholders","_syncDescribedByIds","updateOutlineGap","_prefixChildren","_suffixChildren","_hintChildren","_errorChildren","ngAfterContentChecked","_shouldForward","_hasPlaceholder","placeholder","_placeholderChild","_hasLabel","_labelChildNonStatic","_labelChildStatic","_shouldLabelFloat","shouldLabelFloat","_hideControlPlaceholder","_getDisplayedMessages","_animateAndLockLabel","_label","_validateHints","userAriaDescribedBy","startHint","hint","endHint","setDescribedByIds","labelEl","outlineStartSelector","outlineGapSelector","gapElements","_isAttachedToDOM","startWidth","gapWidth","startEls","gapEls","containerStart","_getStartEnd","labelChildren","labelStart","labelWidth","outlineGapPadding","qG","YG","JG","lV","MatFormFieldModule","listenerOptions","AutofillMonitor","_monitoredElements","isAutofilled","unlisten","TextFieldModule","MAT_INPUT_VALUE_ACCESSOR","MAT_INPUT_INVALID_TYPES","_MatInputBase","mixinErrorState","MatInput","inputValueAccessor","_autofillMonitor","_formField","_uid","autofilled","_type","_readonly","_neverEmptyInputTypes","getSupportedInputTypes","_iOSKeyupListener","selectionStart","selectionEnd","_inputValueAccessor","_previousNativeValue","_isServer","_isNativeSelect","_isTextarea","_isInFormField","_required","_validateType","readonly","ngDoCheck","_dirtyCheckNativeValue","_dirtyCheckPlaceholder","_focusChanged","isFocused","_onInput","formField","_previousPlaceholder","_isNeverEmpty","_isBadInput","validity","badInput","empty","selectElement","firstOption","selectedIndex","label","onContainerClick","_isInlineSelect","MatInputModule","policy","ttWindow","trustedTypes","createPolicy","createHTML","getPolicy","iconName","SvgIconConfig","svgText","MatIconRegistry","_httpClient","_sanitizer","_errorHandler","_svgIconConfigs","_iconSetConfigs","_cachedIconsByUrl","_inProgressUrlFetches","_fontCssClassesByAlias","_resolvers","_defaultFontSetClass","addSvgIcon","addSvgIconInNamespace","addSvgIconLiteral","addSvgIconLiteralInNamespace","_addSvgIconConfig","addSvgIconResolver","cleanLiteral","getMatIconFailedToSanitizeLiteralError","trustedLiteral","trustedHTMLFromString","addSvgIconSet","addSvgIconSetInNamespace","addSvgIconSetLiteral","addSvgIconSetLiteralInNamespace","_addSvgIconSetConfig","registerFontClassAlias","alias","classNames","classNameForFontAlias","setDefaultFontSetClass","getDefaultFontSetClass","getSvgIconFromUrl","safeUrl","getMatIconFailedToSanitizeUrlError","cachedIcon","cloneSvg","_loadSvgIconFromConfig","getNamedSvgIcon","iconKey","_getSvgFromConfig","_getIconConfigFromResolvers","iconSetConfigs","_getSvgFromIconSetConfigs","getMatIconNameNotFoundError","_svgElementFromConfig","namedIcon","_extractIconWithNameFromAnySet","iconSetConfig","_loadSvgIconSetFromConfig","errorMessage","foundIcon","_extractSvgIconFromSet","_fetchIcon","iconSet","iconSource","iconElement","_setSvgAttributes","_toSvgElement","_svgElementFromString","div","innerHTML","viewBox","iconConfig","withCredentials","getMatIconNoHttpProviderError","inProgressFetch","req","responseType","share","configNamespace","svgElement","isSafeUrlWithOptions","_MatIconBase","MAT_ICON_DEFAULT_OPTIONS","MAT_ICON_LOCATION","getPathname","funcIriAttributes","funcIriAttributeSelector","funcIriPattern","MatIcon","_iconRegistry","ariaHidden","defaults","_inline","_previousFontSetClass","_currentIconFetch","fontSet","inline","svgIcon","_svgIcon","_updateSvgIcon","_clearSvgElement","_fontSet","_cleanupFontValue","_updateFontIconClasses","fontIcon","_fontIcon","_splitIconName","cachedElements","_elementsWithExternalReferences","newPath","_previousPath","_prependPathToReferences","_usingFontIcon","_setSvgElement","_cacheChildrenWithExternalReferences","layoutElement","childCount","fontSetClasses","_previousFontIconClass","elementsWithFuncIri","elementWithReference","rawName","_svgNamespace","_svgName","MatIconModule","_typeof","iterator","Constructor","descriptor","enumerable","configurable","writable","protoProps","staticProps","_defineProperties","subClass","superClass","_setPrototypeOf","_getPrototypeOf","setPrototypeOf","__proto__","excluded","sourceKeys","_objectWithoutPropertiesLoose","sourceSymbolKeys","propertyIsEnumerable","self","ReferenceError","_assertThisInitialized","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","_isNativeReflectConstruct","Super","NewTarget","_possibleConstructorReturn","object","_get","receiver","_superPropBase","desc","getOwnPropertyDescriptor","_defineProperty","isStrict","_arrayWithHoles","_s","_e","_arr","_n","_d","done","return","_iterableToArrayLimit","minLen","_arrayLikeToArray","_unsupportedIterableToArray","_nonIterableRest","len","arr2","ChangeDetails","details","_classCallCheck","inserted","rawInserted","tailShift","_createClass","prep","arrA","arrB","objectIncludes","dateA","dateB","regexpA","regexpB","ActionDetails","cursorPos","oldSelection","startChangePos","substr","insertedCount","removedCount","ContinuousTailDetails","stop","tail","masked","aggregate","_appendPlaceholder","beforePos","shiftChar","IMask","InputMask","Masked","_update","DEFAULTS","isInitialized","withValueRefresh","doCommit","doParse","doFormat","extractInput","fromPos","toPos","appendTo","ch","checkTail","consistentState","_normalizePrepare","normalizePrepare","doPrepare","_normalizePrepare2","_slicedToArray","_appendCharRaw","consistentTail","appended","doValidate","beforeTailState","overwrite","tailDetails","appendTail","_beforeTailState","_appendChar","eager","_appendEager","_refreshing","rawInput","rawInputValue","_isolated","prepare","commit","deleteCount","removeDirection","oldRawValue","tailPos","extractTail","FORCE_LEFT","FORCE_RIGHT","forceDirection","nearestInputPos","valLength","mask","Function","MaskedClass","maskedClass","createMask","_excluded","DEFAULT_INPUT_DEFINITIONS","PatternInputDefinition","blockOpts","_objectWithoutProperties","isFilled","isOptional","placeholderChar","unmaskedValue","lazy","_this$masked","_this$masked2","_this$masked3","minPos","maxPos","boundPos","DIRECTION","_this$masked4","_this$parent","PatternFixedDefinition","isFixed","isUnmasking","_isRawInput","char","isResolved","ChunksTailDetails","chunks","tailChunk","lastChunk","extendLast","extend","firstTailChunk","blockIndex","chunk","lastBlockIter","_mapPosToBlock","chunkBlock","_stops","_blocks","remainChars","cstate","chunkShiftPos","PatternCursor","_log","ok","_blockStartPos","pushState","bindBlock","_this$block","_this","_pushLeft","_this2","_this3","_this4","_pushRight","_this5","_this6","_Masked","_inherits","MaskedRegExp","_super","_createSuper","MaskedPattern","_rebuildMask","defs","_maskedBlocks","unmaskingBlock","optionalBlock","blocks","bNames","bName","maskedBlock","isInput","STOP_CHAR","ESCAPE_CHAR","def","maskedState","bi","_set","_this$_mapPosToBlock","startBlockIndex","blockIter","_flags$_beforeTailSta","_block","blockDetails","chunkTail","_forEachBlocksInRange","bFromPos","bToPos","blockChunk","_findStopBefore","stopBefore","si","toBlockIndex","startBlockIter","bDetails","accVal","blockStartPos","fromBlockIter","toBlockIter","isSameBlock","fromBlockStartPos","fromBlockEndPos","removeDetails","pushRightBeforeInput","popState","pushLeftBeforeInput","pushRightBeforeFilled","pushLeftBeforeRequired","pushLeftBeforeFilled","pushRightBeforeRequired","maskedBlocks","indices","gi","InputDefinition","FixedDefinition","MaskedRange","_MaskedPattern","to","fromStr","toStr","sameCharsCount","repeat","minstr","maxstr","_ref2","padEnd","autofix","nextVal","_this$boundaries","boundaries","_this$boundaries2","_get2","firstNonZero","_matchFrom","_this$boundaries3","_this$boundaries4","_len","_key","MaskedDate","GET_DEFAULT_BLOCKS","Y","bk","isDateExist","typedValue","_str$split2","MaskElement","_unsafeSelectionStart","_unsafeSelectionEnd","_unsafeSelect","HTMLMaskElement","_MaskElement","_handlers","_this$input$getRootNo","_this$input$getRootNo2","_this$input","rootElement","_toggleEventHandler","EVENTS_MAP","selectionChange","drop","click","HTMLContenteditableMaskElement","_HTMLMaskElement","selection","getSelection","anchorOffset","focusOffset","createRange","range","setStart","setEnd","lastChild","removeAllRanges","addRange","isContentEditable","_listeners","_unmaskedValue","_saveSelection","_onDrop","_onClick","alignCursor","alignCursorFriendly","_bindEvents","updateValue","maskEquals","updateOptions","bindEvents","unbindEvents","ev","_cursorChanging","_changingCursorPos","_selection","newUnmaskedValue","isChanged","_fireChangeEvents","restOpts","updateMask","updateOpts","_delayUpdateCursor","_abortUpdateCursor","_fireEvent","_inputEvent","hIndex","removed","updateCursor","_unbindEvents","MaskedEnum","enum","MaskedNumber","_updateRegExps","allowNegative","scale","escapeRegExp","radix","_numberRegExpInput","_numberRegExp","_mapToRadixRegExp","mapToRadix","_thousandsSeparatorRegExp","thousandsSeparator","noSepCh","_removeThousandsSeparators","prepCh","extendOnSeparators","_separatorsCount","_this$_adjustRangeWit","_adjustRangeWithSeparators","_this$_adjustRangeWit2","prevBeforeTailValue","prevBeforeTailSeparatorsCount","_separatorsCountFromSlice","appendDetails","_insertThousandsSeparators","beforeTailValue","beforeTailSeparatorsCount","separatorPos","separatorAroundFromPos","_findSeparatorAround","separatorAroundToPos","_this$_adjustRangeWit3","_this$_adjustRangeWit4","valueBeforePos","valueAfterPos","separatorAtLeftPos","separatorAtLeftEndPos","separatorAtRightPos","validnum","normalizeZeros","_normalizeZeros","padFractionalZeros","_padFractionalZeros","zeros","signed","MaskedFunction","MaskedDynamic","currentMask","compiledMasks","_applyDispatch","prevValueBeforeTail","inputValue","insertValue","_rawInputValue","tailValue","prevMask","prevMaskState","doDispatch","_this$currentMask","_this$currentMask2","_this$currentMask3","_this$currentMask4","_this$currentMask5","currentMaskRef","mi","_this$currentMask6","_this$currentMask7","_get3","_len2","_key2","_this$currentMask8","_get4","_len3","_key3","_mask$mi","PIPE_TYPE","MASKED","UNMASKED","TYPED","runIsolated","createPipe","pipeArgs","globalThis","IMaskFactory","ɵngcc0","ngInjectableDef","ɵɵdefineInjectable","MASKEDINPUT_VALUE_ACCESSOR","IMaskDirective","DEFAULT_IMASK_ELEMENT","_factory","imaskElement","_writing","maskValue","maskRef","unmask","imask","initMask","destroyMask","beginWrite","_writingValue","endWrite","_onAccept","_onComplete","rf","outputs","DefaultImaskFactory","IMaskDirectiveModule","IMaskModule","_DisposeViewRepeaterStrategy","applyChanges","itemContextFactory","itemValueResolver","itemViewChanged","forEachOperation","record","adjustedPreviousIndex","currentIndex","view","operation","previousIndex","insertContext","move","SelectionModel","_multiple","initiallySelectedValues","_emitChanges","_deselectedToEmit","_selectedToEmit","changed","_markSelected","_verifyValueAssignment","_hasQueuedChanges","_emitChangeEvent","_unmarkSelected","setSelection","oldValues","newSelectedSet","isSelected","flushEvent","_unmarkAll","otherValue","isMultipleSelection","_VIEW_REPEATER_STRATEGY","matSelectAnimations","transformPanelWrap","transformPanel","MAT_SELECT_SCROLL_STRATEGY","MAT_SELECT_CONFIG","MAT_SELECT_SCROLL_STRATEGY_PROVIDER","MatSelectChange","_MatSelectMixinBase","mixinTabIndex","MAT_SELECT_TRIGGER","_MatSelectBase","_parentFormField","_liveAnnouncer","_panelOpen","o1","_triggerAriaLabelledBy","_destroy","_onTouched","_valueId","_panelDoneAnimatingStream","_overlayPanelClass","_disableOptionCentering","disableOptionCentering","optionSelectionChanges","option","openedChange","_openedStream","_closedStream","valueChange","typeaheadDebounceInterval","_typeaheadDebounceInterval","_placeholder","_selectionModel","_initializeSelection","hasAssigned","_assignValue","_panelDoneAnimating","panelOpen","_initKeyManager","_resetOptions","newAriaLabelledby","_getTriggerAriaLabelledby","_previousControl","_canOpen","_highlightCorrectOption","triggerValue","_handleOpenKeydown","_handleClosedKeydown","isArrowKey","isOpenKey","previouslySelectedOption","selectedOption","hasDeselectedOptions","previouslyFocusedIndex","_onAttached","_overlayDir","_positioningSettled","_getPanelTheme","_setSelectionByValue","_selectOptionByValue","_sortValues","correspondingOption","panel","_scrollOptionIntoView","changedOrDestroyed","_onSelect","wasSelected","_propagateChanges","sortComparator","valueToEmit","_getChangeEvent","_getPanelAriaLabelledby","labelId","ariaLabelledby","_getAriaActiveDescendant","rH","sH","MatSelect","_scrollTop","_triggerFontSize","_transformOrigin","_positions","_calculateOverlayScroll","scrollBuffer","maxScroll","itemHeight","_getItemHeight","_triggerRect","fontSize","_calculateOverlayPosition","labelCount","_countGroupLabelsBeforeOption","optionOffset","optionHeight","currentScrollPosition","panelHeight","_getOptionScrollPosition","_calculateOverlayOffsetX","viewportSize","paddingWidth","SELECT_MULTIPLE_PANEL_PADDING_X","SELECT_PANEL_PADDING_X","leftOverflow","rightOverflow","_calculateOverlayOffsetY","optionHeightAdjustment","maxOptionsDisplayed","optionOffsetFromPanelTop","_getItemCount","_checkOverlayWithinViewport","topSpaceAvailable","bottomSpaceAvailable","panelHeightTop","panelHeightBottom","totalPanelHeight","_adjustPanelUp","_adjustPanelDown","_getOriginBasedOnOption","distanceBelowViewport","distanceAboveViewport","scrollContainerHeight","selectedOptionOffset","hH","i8","MatSelectModule","MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS","MAT_BUTTON_TOGGLE_GROUP","MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR","MatButtonToggleGroup","uniqueIdCounter","MatButtonToggleChange","_changeDetector","_controlValueAccessorChangeFn","_name","_buttonToggles","vertical","checked","_syncButtonToggle","deferEvents","_updateModelValue","_isSelected","_isPrechecked","_rawValue","_clearSelection","_selectValue","MatButtonToggle","_MatButtonToggleBase","toggleGroup","_isSingleSelector","_checked","parsedTabIndex","buttonToggleGroup","buttonId","_buttonElement","_onButtonClick","newChecked","MH","MatButtonToggleModule","MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS","disableToggleValue","MAT_SLIDE_TOGGLE_VALUE_ACCESSOR","MatSlideToggle","MatSlideToggleChange","_MatSlideToggleMixinBase","_MatSlideToggleBase","idPrefix","labelPosition","toggleChange","_noopAnimations","_uniqueId","inputId","_createChangeEvent","isChecked","_onChangeEvent","_inputElement","_onInputClick","_onLabelTextChange","OH","_MatSlideToggleRequiredValidatorModule","MatSlideToggleModule","MAT_CHECKBOX_DEFAULT_OPTIONS","MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY","clickAction","MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR","MatCheckbox","MatCheckboxChange","_MatCheckboxMixinBase","_MatCheckboxBase","indeterminateChange","_currentAnimationClass","_currentCheckState","_indeterminate","_syncIndeterminate","indeterminate","_transitionCheckState","_getAriaChecked","_getAnimationTargetElement","_getAnimationClassForCheckStateTransition","animationClass","_handleInputClick","_onInteractionEvent","_animationClasses","uncheckedToChecked","checkedToIndeterminate","uncheckedToIndeterminate","checkedToUnchecked","indeterminateToChecked","indeterminateToUnchecked","nativeCheckbox","UH","GH","_MatCheckboxRequiredValidatorModule","MatCheckboxModule","_sticky","_hasStickyChanged","sticky","prevValue","hasStickyChanged","resetStickyChanged","CDK_TABLE","CdkCellDef","CdkHeaderCellDef","CdkFooterCellDef","CdkColumnDefBase","_CdkColumnDefBase","mixinHasStickyInput","CdkColumnDef","_table","_stickyEnd","_setNameInput","stickyEnd","_updateColumnCssClassName","_columnCssClassName","cssClassFriendlyName","BaseCdkCell","columnDef","CdkHeaderCell","CdkCell","tableRole","_Schedule","tasks","endTasks","_COALESCED_STYLE_SCHEDULER","_CoalescedStyleScheduler","_currentSchedule","task","_createScheduleIfNeeded","scheduleEnd","_getScheduleObservable","BaseRowDef","_differs","_columnsDiffer","columns","getColumnsDiff","extractCellTemplate","column","CdkHeaderRowDef","headerCell","CdkFooterRowDef","footerCell","cell","CdkHeaderRowDefBase","_CdkHeaderRowDefBase","CdkFooterRowDefBase","_CdkFooterRowDefBase","CdkRowDef","CdkCellOutlet","_viewContainer","mostRecentCellOutlet","CdkHeaderRow","CdkRow","CdkNoDataRow","_contentClassName","STICKY_DIRECTIONS","StickyStyler","_isNativeHtmlTable","_stickCellCss","_coalescedStyleScheduler","_isBrowser","_needsPositionStickyOnElement","_positionListener","_cachedCellWidths","_borderCellCss","clearStickyPositioning","rows","stickyDirections","elementsToClear","row","_removeStickyStyle","updateStickyColumns","stickyStartStates","stickyEndStates","recalculateCellWidths","stickyColumnsUpdated","sizes","stickyEndColumnsUpdated","firstRow","numCells","cellWidths","_getCellWidths","startPositions","_getStickyStartColumnPositions","endPositions","_getStickyEndColumnPositions","lastStickyStart","lastIndexOf","firstStickyEnd","_addStickyStyle","stickRows","rowsToStick","stickyStates","states","stickyOffsets","stickyCellHeights","elementsToStick","rowIndex","stickyOffset","borderedRowIndex","isBorderedRowIndex","stickyHeaderRowsUpdated","offsets","stickyFooterRowsUpdated","updateStickyFooterContainer","tableElement","tfoot","zIndex","_getCalculatedZIndex","dirValue","isBorderElement","cssText","zIndexIncrements","firstRowCells","widths","nextPosition","STICKY_POSITIONING_LISTENER","DataRowOutlet","HeaderRowOutlet","FooterRowOutlet","NoDataRowOutlet","CdkTable","_viewRepeater","_stickyPositioningListener","_columnDefsByName","_customColumnDefs","_customRowDefs","_customHeaderRowDefs","_customFooterRowDefs","_headerRowDefChanged","_footerRowDefChanged","_stickyColumnStylesNeedReset","_forceRecalculateCellWidths","_cachedRenderRowsMap","stickyCssClass","needsPositionStickyOnElement","_isShowingNoDataRow","_multiTemplateDataRows","_fixedLayout","contentChanged","viewChange","MAX_VALUE","trackBy","_trackByFn","dataSource","_dataSource","_switchDataSource","multiTemplateDataRows","_rowOutlet","_forceRenderDataRows","updateStickyColumnStyles","fixedLayout","_setupStickyStyler","_applyNativeTableSections","_dataDiffer","dataRow","dataIndex","_cacheRowDefs","_cacheColumnDefs","rowDefsChanged","columnsChanged","_renderUpdatedColumns","_forceRenderHeaderRows","_forceRenderFooterRows","_rowDefs","_renderChangeSubscription","_observeRenderChanges","_checkStickyStates","_headerRowOutlet","_footerRowOutlet","_headerRowDefs","_footerRowDefs","_defaultRowDef","isDataSource","renderRows","_renderRows","_getAllRenderRows","_updateNoDataRow","_adjustedPreviousIndex","_getEmbeddedViewArgs","_renderCellTemplateForItem","rowDef","_updateRowIndexContext","forEachIdentityChange","addColumnDef","removeColumnDef","addRowDef","removeRowDef","addHeaderRowDef","headerRowDef","removeHeaderRowDef","addFooterRowDef","footerRowDef","removeFooterRowDef","setNoDataRow","noDataRow","_customNoDataRow","updateStickyHeaderRowStyles","headerRows","_getRenderedRows","thead","display","_stickyStyler","updateStickyFooterRowStyles","footerRows","dataRows","headerRow","_addStickyColumnStyles","footerRow","prevCachedRenderRows","_data","renderRowsForData","_getRenderRowsForData","j","renderRow","cache","rowDefs","_getRowDefs","cachedRenderRows","columnDefs","_getOwnDefs","_contentColumnDefs","mergeArrayAndSet","_contentHeaderRowDefs","_contentFooterRowDefs","_contentRowDefs","defaultRowDefs","when","columnsDiffReducer","dataColumnsChanged","headerColumnsChanged","footerColumnsChanged","dataStream","sk","_renderRow","columnName","rowOutlet","renderedRows","cellTemplate","_getCellTemplates","renderIndex","even","odd","columnId","documentFragment","createDocumentFragment","sections","tag","_noDataRowOutlet","section","stickyCheckReducer","_noDataRow","shouldShow","QH","CdkTableModule","MatTable","h4","MatCellDef","MatHeaderCellDef","MatColumnDef","MatHeaderCell","MatCell","MatHeaderRowDef","MatRowDef","MatHeaderRow","MatRow","MatTableModule","MAT_SORT_DEFAULT_OPTIONS","_MatSortBase","mixinInitialized","MatSort","sortables","_direction","sortChange","disableClear","_disableClear","sortable","getNextSortDirection","sortDirectionCycle","sortOrder","getSortDirectionCycle","nextDirectionIndex","SORT_ANIMATION_TRANSITION","matSortAnimations","indicator","leftPointer","rightPointer","arrowOpacity","arrowPosition","keyframes","allowChildren","MatSortHeaderIntl","MAT_SORT_HEADER_INTL_PROVIDER","parentIntl","_MatSortHeaderBase","MatSortHeader","_intl","_sort","_columnDef","_showIndicatorHint","_viewState","_arrowDirection","_disableViewStateAnimation","_sortActionDescription","_handleStateChanges","sortActionDescription","_updateSortActionDescription","_updateArrowDirection","_setAnimationTransitionState","_isSorted","_sortButton","_setIndicatorHintVisible","_rerenderSubscription","visible","_isDisabled","viewState","_toggleOnInteraction","_getArrowDirectionState","_getArrowViewState","_getAriaSortAttribute","_renderArrow","newDescription","MatSortModule","StopPropagationDirective","ctx_r4","ctx_r1","ActionButtonKind","Ti","ActionButtonAlertTone","l1","ActionButtonComponent","PRIMARY","minWidthInPixels","Negative","_largeButton","largeButton","iconAfterText","FILTER","StopPropagationModule","ActionButtonModule","BusyIndicatorComponent","alwaysInFront","dimBehind","maxCircleDiameterInPixels","BusyIndicatorModule","CopyToClipboardButtonComponent","clipboard","onCancel","onThirdButton","onSecondButton","ConfirmationModalComponent","noCancel","copySubtitle","confirmButtonText","secondButtonText","thirdButtonText","CopyToClipboardButtonModule","ConfirmationModalModule","DashboardService","title$","titleEmitter","PermissionUtils","firstMissing","reqItem","VituTooltipComponent","showDelayInMillis","calculatePosition","TextCommonComponent","tooltipDisabled","tooltipMaxLengthInChars","horizAlign","isTooltipRequired","isTooltipDisabled","innerElement","innerContainer","contentInnerContainer","onLinkMouseDown","mouseDownX","mouseDownY","onLinkMouseUp","link","mousePositionTolerance","ctx_r0","ctx_r2","DashboardSidebarMenuItemComponent","subMenuActive","isSubmenuItem","onClickItem","isItemActionable","primaryRouteToActivate","noPrimaryRoute","onNavigateTo","DashboardSidebarComponent","currentUserPermissions","helpItem","permissions","hasSeparatorBefore","faIcon","copyrightInfo","isItemActive","isPrimaryRouteToActivate","isSecondaryRouteToCapture","isItemSubMenuActive","isEqual","subMenuShownForItem","hasPermissions","currentPermissions","retVal","subItems","subItem","onMouseOverItem","menuItem","itemDiv","mouseOverItem","vertPosInPixels","onMouseOutItem","mouseOutItem","mustBeAtEnd","secondaryRouteToCapture","AuthService","authConfig","oauthService","configure","loadDiscoveryDocument","initTokenRefreshListener","setupAutomaticSilentRefresh","discoveryDocumentRequest","validateToken","loginCodeFlowError","tryLoginCodeFlow","hasValidAccessToken","openLoginPageIfNecessary","redirectUri","GetCurrentUrl","initCodeFlow","logout","random","MAX_SAFE_INTEGER","localStorage","setItem","logOut","getUserClaims","getIdentityClaims","getAccessToken","loadUserProfile","VituHttpStatus","td","VituHttpError","baseError","VituHttpErrorUnauthorized","Unauthorized","VituHttpErrorInternalServerError","InternalServerError","VituHttpErrorForbidden","Forbidden","VituHttpErrorNotFound","NotFound","VituHttpErrorServiceUnavailable","ServiceUnavailable","VituHttpErrorUnknown","VituHttpErrorUnableToConnect","VituHttpErrorBadRequest","errorResponse","selectMany","firstOrDefault","detail","BadRequest","VituCommonErrorEntityIdMustBeNumber","Pager","pageSize","page","pageCount","morePagesMode","Environment","onHideSubMenu","DashboardSubmenuComponent","menuShown","subMenuParentItem","subMenuShown","subMenuVertPosInPixels","showSubMenu","triggerHideSubMenu","hideSubMenuTimer","hideSubMenu","onShowSubMenu","showMenu","MultiStageExpansionPanelComponent","isVertical","midStageSizesInPixels","maxSizeInPixels","panelSizeInPixels","stageSizesInPixels","stage","contentWrapper","DashboardCommonComponent","dashboardService","merchantName","userName","brandIconPath","brandIconOffsetInPixelsY","sidebarOpen","sidebarItems","hideDashboardUserName","onClickHamburger","onLogout","onUserMenuShowChange","requiredPermissions","MultiStageExpansionPanelModule","VituTooltipModule","TextCommonModule","TextTableColumnComponent","TextTableColumnModule","TextFieldComponent","ImageFieldComponent","hasFontImage","fontImage","ImageFieldModule","DigitalWalletImageFieldComponent","digitalWalletFontImage","digitalWalletImageFile","DigitalWalletImageFieldModule","DigitalWalletImageTableColumnComponent","DigitalWalletImageTableColumnModule","TextModule","DashboardSidebarMenuItemModule","DashboardSidebarModule","DashboardSubmenuModule","DashboardCommonModule","DateTimeFormatUtils","date1","date2","d1","d2","parsedDate","currentTime","dateUtc","NgbCustomDateAdapter","getDateObjectForDateRangeDate","getSameTimeOnDate","NgbCustomDatePickerConfig","NgbDateCustomParserFormatter","formatDateShort2","DateLabel","Is","LocalTimePoint","timeZoneOffsetFromUtc","timeZoneOffsetShortName","utcValue","localValue","startOfDay","endOfDay","startOfPreviousDay","endOfPreviousDay","startOfWeek","startOfMonth","startOfPreviousMonth","endOfPreviousMonth","asNgbDate","startOfDayMinusDays","numberOfDays","endOfDayPlusDays","endOfNextMonth","setValueForTestingOnly","isoValue","timeZoneLocale","localTimePoint","initialFilterDateRangeLastTwoWeeks","CUSTOM","c1","DateTimeLabelComponent","singleLine","rawDateWithNoTime","dateUtcWithTimeZone","DateTimeLabelUtils","dateTimeWithTimeZone","withoutTimeZone","ensureTimeZone","DateRangeModalContentComponent","activeModalWindow","restrictFuture","restrictPast","restrictToDateOfBirth","restrictToPastMonth","fromDate","toDate","labelToDateMapList","initLabelToDateMapList","setInitialDateRange","initializeDate","dateRange","convertDateRangeDateToNgbDate","TODAY","YESTERDAY","THIS_WEEK","LAST_7_DAYS","LAST_30_DAYS","THIS_MONTH","LAST_MONTH","onDateSelection","singleDateMode","isHovered","hoveredDate","isInside","isToday","isRange","selectDateByLabel","labelToDateItem","chooseSelectedDateAndClose","startOfDayOn","endOfDayOn","matchWithLabel","clearSelectedDateAndClose","clearDate","DateRangeModal","modal","clearDateRange","initialDateRange","modalInstance","DateRangePickerDirective","dateRangeModalService","openModal","clearValue","toPromise","isDefaultClearData","doWriteValue","handleInputChange","renderValue","formattedValue","hasLabel","singleDate","isSameDay","formatDateShort","DateInputsModule","DateTimeModule","LoggerService","messagePrefix","log","ErrorReportingMode","GlobalErrorHandler","environment","loggerService","currentUser","UnhandledErrorsAndHttpErrors","StackdriverErrorReporter","stackDriverErrorReporting","projectId","errorReportingMode","logError","logHttpErrorIfNecessary","isDevelopment","appName","env","userPayload","setUser","report","VituToastTone","sl","onButtonClick","SnackBarContentComponent","Neutral","tone","buttonText","closeFn","alertTone","VituToastService","snackBar","horizPosition","vertPosition","totalChars","messagePart","excess","excessIncrements","closeEmitter","GlobalSpinnerService","showCount","dataEmitter","data$","emitData","ErrorUi","nd","ErrorUiService","toast","globalSpinner","clientErrorUi","Toast","serverErrorUi","Modal","handleNotification","isServerError","displayMessageOnReloadPageModal","displayMessageOnToast","displayMessageOnModal","dismissAll","overrideStart","None","overrideEnd","subtitle","reloadConfig","defaultRoute","reload","help","BlobErrorHttpInterceptor","intercept","HttpErrorResponse","Blob","reader","FileReader","onload","errmsg","headers","statusText","onerror","readAsText","ResponseInterceptor","authService","errorUi","createErrorIfNecessary","errorClone","ErrorHandlerModule","HTTP_INTERCEPTORS","VituFormSubmitButtonComponent","hostElementRef","neverDisable","clicked","handleClick","VituFormAbortButtonComponent","isModal","onAbort","handleAbort","VituFormButtonsComponent","VituFormDirective","extraChangeDetectionRun","formGroup","listenForFormEdits","listenForFormSubmit","subscriptions","setPristineValue","updateDisabledOnSubmitters","areValuesEqual","pristineValue","submitters","submitter","emitInvalidFieldNames","highlightInvalid","submitForm","firstErrorElement","scrollIntoView","behavior","invalidFieldNames","libVituFormSubmitInvalidFieldNames","libVituFormSubmit","cloneDeep","value1","value2","isEqualWith","VituFormModule","ValidatorsVituCustom","allowedValues","allowedVals","fieldValue","vituSelectSingleIntegrity","fieldValues","fieldItem","vituSelectMultiIntegrity","controlValue","URL","protocol","vituValidHttpHttpsUrl","vituValidHttpsUrl","EmailRegex","DisableControlDirective","controlContainer","disableControl","formControlName","TwoDigitDecimalNumberDirective","specialKeys","onBlur","origValue","emptyIsNull","allowZeroNotNegative","VituFormFieldDateComponent","showReset","isUtc","_isFilter","_singleDateMode","_restrictPast","_restrictFuture","_restrictToPastMonth","_restrictToDateOfBirth","isFilter","displayLabel","formatZ","formFieldName","hasRequiredValidator","abstractControl","formControl","onClickIcon","datePicker","handleReset","handleButton","ctx_r5","onClickToggleShowObscured","VituFormFieldInputComponent","errorOverrides","_showObscured","showObscured","inputElement","oldFormControl","trimLeft","changedBlurred","blurred","resolveError","foundOverrides","errorOverride","unmaskInputType","VituInputComponent","animateLabel","SpaceBetweenCapsPipe","capitalizeFirstLetter","outString","charToTest","pure","VituFormFieldSelectComponent","fb","labelEmptyCondition","limitedVerticalSpace","spaceBetweenCapsOnLabels","_groups","formConfig","labelOverlay","optionLabelKey","optionLabels","optionValueKey","optionValues","onSelectionChanged","selectionChanged","optionLabel","groupIdx","optionLabelFn","overallIndex","startIndexForGroupIndex","optionValue","optionValueFn","optionsForGroup","minIdx","maxIdx","groupIndex","SpaceBetweenCapsModule","VituInputModule","VituSlideToggleComponent","onCheckedChange","slider","checkedChange","onToggled","ctx_r3","VituFormFieldSwitchComponent","useSlider","labelBefore","VituSlideToggleModule","VituFormFieldSwitchModule","VituFormFieldModule","GlobalSpinnerComponent","handleKeyboardEvent","GlobalSpinnerModule","ModalErrorMessageComponent","ModalErrorMessageModule","pg_r5","onClickChangeToPage","PagerComponent","calculatePagesInMoreMode","calculatePagesInTotalMode","firstPageButtonVisible","pages","firstPageButtonSeparatorVisible","pageChanged","onClickPrevPage","prevPage","onClickNextPage","nextPage","currentPage","numberOfPages","leftDelta","rightDelta","maxPage","maxDelta","minPage","PagerModule","StatusChipComponent","_status","hostClass","StatusChipModule","ColumnFlexDirective","flex","onPageChanged","onSortChanged","ctx_r13","TableScrollIntoViewMode","w_","TableBaseComponent","rowsDataLoading","rowsDataEmptyMessage","rowsDataErrorMessage","rowsDataShowWhileLoading","selectedRowProperty","selectedRowValue","scrollRowIntoViewIfNecessary","CenterWithinView","didScroll","materialTableElement","materialTable","containerElement","tableVerticalScrollContainer","rowElementRect","containerElementRect","headerElement","headerElementHeight","rowElementScrollTopDelta","BringWithinViewAtNearestSide","yDelta","usesVertScrollbar","resetInternalSorting","rowsData","_rowsData","internalSorting","sorting","pager","moreThanOnePage","propName","scrollTableToTop","calculateIfScrollbarRequired","calculateMinRequiredHeight","rowsDataForDisplay","internalSortingOrderBy","internalSortingDirection","sortedRowsData","sortedColumnCells","internalSortingModel","sortedColumnCell","sortOrderBy","orderBy","sortDirection","orderDirection","tableCells","createInternalSortingModel","sortingChanged","columnIds","calcMinimumTotalColumnWidthInPixels","getTitleForColumn","matchedColumnDef","getInfoTipForColumn","infoTip","getFlexForColumn","flexWidthGrow","flexWidthBasisInPixels","canSortColumn","canSort","isRowSelected","onRowMouseDown","onRowMouseUp","rowSelected","emptyRowsData","minimumTotalColumnWidthInPixels","tableContainer","scrollDeltaY","pagerContainerElement","pagerContainer","minRequiredHeightInPixels","attachInternalSortingModel","columnIndex","columnCount","cells","columnCells","unsortedColumnCells","columnCell","cellKey","columnSortingKey","cellHtml","compareItems","isAsc","valueA","valueB","ViewContainerRef","TableColumnSortComponent","keyValid","TableBaseModule","crumb_r2","otherCrumb_r10","BreadcrumbsComponent","crumbs","crumbsStr","firstCrumb","otherCrumbs","TitleBarComponent","BreadcrumbsModule","TitleBarModule","VituToastModule","FiltersMode","setFilterMode","FilterBase","_initialFilter","FiltersBaseComponent","basicFiltersModeHeightInPixels","_shortLayout","moreFields","_suppressInitialRequest","shortLayout","filterMode","_filterMode","suppressInitialRequest","resetFieldVisible","filterForm","resetField","resetMoreFields","filtersDirty","moreField","resetAllFields","filterChanged","getRequiredFilterMode","ALL","BASIC","onlyMoreFields","FiltersBaseModule","UserStatusIconComponent","UserStatusIconModule","TransactionStatusChipComponent","TransactionStatusChipModule","BinaryStatusIconComponent","BinaryStatusIconModule","FundingItemStatusChipComponent","FundingItemStatusChipModule","VituNumberFormatCommon","clipTrailingZeros","arg1","truncated","bankersRounding","minimumFractionDigits","maximumFractionDigits","decimalPlaces","toFixed","VituNumberFormatCurrencyPipe","VituNumberFormatCurrencyUsdPipe","VituNumberFormatPercentagePipe","VituNumberFormatModule","SwitchArrayModule","onReadCheckboxChanged","onWriteCheckboxChanged","onCheckboxChanged","onSwitchGroupMouseUp","PermissionsSwitchArrayComponent","heading","atLeastOneRequired","errorMessageAtLeastOneRequired","switches","switchGroups","sg","areAllSelected","areNoneSelected","requireAtLeastOneChecked","onClickSelectAll","sw","onClickSelectNone","switchGroup","orderedSwitchesForGroup","switchGroupHasPermissionsWhichRead","readables","switchGroupHasPermissionsWhichWrite","writables","switchGroupReadCheckboxChecked","readOn","switchGroupWriteCheckboxChecked","writeOn","switchGroupReadCheckboxIndeterminate","numOff","numOn","switchGroupWriteCheckboxIndeterminate","filtered","atLeastOneChecked","setSwitchGroupOpen","PermissionsSwitchArrayModule","onGroupCheckboxChanged","GroupedSwitchArrayComponent","switchGroupCheckboxChecked","groupOn","switchGroupCheckboxIndeterminate","GroupedSwitchArrayModule","VituSelectModule","VituDateModule","VituTimeModule","AuthGuard","getCurrentUserState","createSelector","getCurrentUser","currentUserState","getCurrentUserLoading","loading","getCurrentUserPermissions","ActionTypes","GetCurrentUserAction","GetCurrentUser","GetCurrentUserSucceedAction","GetCurrentUserSucceed","AddDetailsToCurrentUserAction","userDetailsDto","AddDetailsToCurrentUser","GetMerchantAction","GetMerchant","GetMerchantSucceedAction","merchant","GetMerchantSucceed","GetMerchantFailAction","GetMerchantFail","PermissionsGuard","currentUserPermissions$","currentUser$","currentUserLoading$","currentUserLoading","resolveCanActivate","ofType","getMerchantState","DashboardComponent","FilterTransactionsAction","FilterTransactions","SortTransactionsAction","SortTransactions","PageChangedTransactionsAction","PageChangedTransactions","GetTransactionsAction","GetTransactions","GetTransactionsSucceedAction","stateExtensions","GetTransactionsSucceed","GetTransactionsFailAction","GetTransactionsFail","ExportTransactionsToCsvAction","ExportTransactionsToCsv","ExportTransactionsToCsvSucceedAction","resource","ExportTransactionsToCsvSucceed","ExportTransactionsToCsvFailAction","ExportTransactionsToCsvFail","getTransactionsState","transactions","CurrentUserPermissions","TransactionOrderBy","TransactionsTableCellContentComponent","getDisplayTextForPayerName","displayText","payer","fullName","getDisplayTextForCardNumber","card","first6","last4","displayTextForTransactionType","suffix","isServiceFee","TransactionsTableComponent","onSortingChanged","onRowSelected","CardBrandEnum","TransactionStatus","GatewayEnum","DigitalWalletEnum","TransactionType","TransactionLogFiltersComponent","localDateInterval","localDateSettledInterval","transactionId","amount","authCode","payerName","cardBrands","types","statuses","gateways","tid","mid","digitalWallets","gatewayList","typeList","digitalWalletList","serviceFeeList","onFilterChanged","TransactionLogComponent","currPerms","rowData","hasTransactionsGetAndPaymentsGetPermissions","exportButtonDisabled","exportLoading","TransactionsComponent","CurrentUserSelectors","rowsData$","sorting$","pager$","loading$","error$","filter$","exportLoading$","exportToCsv","GetTransactionDetailAction","GetTransactionDetailSucceedAction","GetTransactionDetailFailAction","UpdateTransactionDetailAction","DownloadReceiptAction","GetPaymentDetailAction","getRelations","GetPaymentDetail","GetPaymentDetailSucceedAction","GetPaymentDetailSucceed","GetPaymentDetailFailAction","GetPaymentDetailFail","RefundPaymentTransactionAction","refund","RefundPaymentTransaction","GetPaymentFeesAction","GetPaymentFees","GetPaymentFeesSucceedAction","fees","GetPaymentFeesSucceed","GetPaymentFeesFailAction","GetPaymentFeesFail","getNextPaymentActionsState","nextPaymentActions","getPaymentState","payment","getTransactionState","transaction","getTransactionSiblingsState","transactionSiblings","AdditionalAmountType","DisputeTypeEnum","DisputeOrderBy","_MAT_INK_BAR_POSITIONER","offsetLeft","MatInkBar","_inkBarPositioner","alignToElement","inkBar","MAT_TAB_CONTENT","MAT_TAB_LABEL","MAT_TAB","_MatTabBase","MAT_TAB_GROUP","MatTab","_closestTabGroup","textLabel","_contentPortal","templateLabel","_templateLabel","_setTemplateLabelInput","_explicitContent","_implicitContent","_closestTab","matTabsAnimations","translateTab","MatTabBodyPortal","_centeringSub","_leavingSub","_beforeCentering","_isCenterPosition","isCentering","_content","_afterLeavingCenter","MatTabBody","_MatTabBodyBase","_dirChangeSubscription","_translateTabComplete","_onCentering","_onCentered","animationDuration","_computePositionAnimationState","_positionIndex","_computePositionFromOrigin","_onTranslateTabStarted","_getLayoutDirection","MAT_TABS_CONFIG","_MatTabLabelWrapperBase","MatTabLabelWrapper","getOffsetLeft","getOffsetWidth","MatPaginatedTabHeader","_scrollDistance","_selectedIndexChanged","_showPaginationControls","_disableScrollAfter","_disableScrollBefore","_stopScrolling","_disablePagination","_selectedIndex","selectFocusedIndex","indexFocused","_stopInterval","disablePagination","_previousPaginator","_handlePaginatorPress","_nextPaginator","dirChange","resize","realign","updatePagination","_alignInkBarToSelectedTab","_itemsResized","_getMaxScrollDistance","newFocusIndex","_setTabFocus","ResizeObserver","tabItems","resizeObserver","_tabLabelCount","_scrollToLabel","_checkScrollingControls","_scrollDistanceChanged","_updateTabScrollPosition","ENTER","focusIndex","_itemSelected","_onContentChanges","_currentTextContent","_checkPaginationEnabled","_isValidIndex","tab","containerEl","_tabListContainer","scrollDistance","translateX","_tabList","_scrollTo","_scrollHeader","_handlePaginatorClick","labelIndex","selectedLabel","viewLength","labelBeforePos","labelAfterPos","_tabListInner","beforeVisiblePos","afterVisiblePos","selectedItem","selectedLabelWrapper","_inkBar","mouseEvent","maxScrollDistance","distance","_MatTabHeaderBase","viewportRuler","MatTabHeader","pz","gz","mz","_z","bz","MatTabChangeEvent","_MatTabGroupMixinBase","_MatTabGroupBase","_tabs","_indexToSelect","_lastFocusedTabIndex","_tabBodyWrapperHeight","_tabsSubscription","_tabLabelSubscription","_dynamicHeight","headerPosition","_preserveContent","selectedIndexChange","focusChange","animationDone","selectedTabChange","_groupId","dynamicHeight","contentTabIndex","_animationDuration","_contentTabIndex","_backgroundColor","indexToSelect","_clampTabIndex","isFirstRun","wrapper","_tabBodyWrapper","_subscribeToAllTabChanges","_subscribeToTabLabels","tabs","selectedTab","_allTabs","realignInkBar","_tabHeader","focusTab","header","_getTabLabelId","_getTabContentId","_setTabBodyWrapperHeight","tabHeight","_removeTabBodyWrapperHeight","tabHeader","_tabFocusChanged","MatTabGroup","vz","yz","i1$2","MatTabsModule","DisputesTableCellContentComponent","sortingKeyForRaiseDate","raiseDateUtc","sortingKeyForDueDate","dueDateUtc","sortingKeyForStatusDate","statusDateUtc","FeesTableCellContentComponent","feePerc","paymentAmount","feeValue","LoadContext","TransactionDetailComponent","History","_payment","calculateServiceFeeInfo","calculateServiceFeeRefundInfo","paymentFees","_paymentFees","feeParts","feeTotal","feePartsMap","fee","feeCategory","feePartCategories","feePartCategory","category","relatedPaymentLoading","transactionLoading","paymentLoading","paymentToken","initComplete","seedTab","onTransactionSelected","transactionSuccessful","getHistoryTabLabel","appendCountIfNecessary","chargebacks","disputes","dispute","disputeType","getChargebacksTabLabel","retrievals","getRetrievalsTabLabel","getFeesTabLabel","getCardNumber","getAdditionalInformationTabLabel","getCountOfAdditionalInformation","getAvsDetailFieldValue","resultDescription","getCvvDetailFieldValue","hasRefundActionAvailable","hasPaymentsRefundPermissions","nextPaymentActionsLoading","nextPaymentAction","transactionType","onClickRefund","refundPayment","serviceFeeAmount","onChargebackRowSelected","onRetrievalRowSelected","routeSnapshot","lastPartOfUrl","loadContext","Chargebacks","Retrievals","Fees","AdditionalInformation","serviceFeeItems","flatMap","additionalAmounts","transactionItem","sum","serviceFeePercent","platformFeeItem","percent","serviceFeeRefundAmount","TransactionComponent","feesLoading","feesError","voidPayment","capturePayment","downloadReceipt","GetUserAction","GetUser","GetNewUserAction","GetNewUser","GetUserSucceedAction","user","roleList","GetUserSucceed","GetUserFailAction","GetUserFail","UpdateUserAction","UpdateUser","DeleteUserAction","userId","DeleteUser","CreateUserAction","CreateUser","ResetUserPasswordAction","ResetUserPassword","getUserState","getUserInfo","userState","getUserRoleList","getUserLoading","NavigateAction","GoBackAction","GoForwardAction","PageLoadFailAction","UserDetailsComponent","firstName","lastName","roleIds","isLockedOut","userFormConfig","formControls","userForm","aVal","bVal","submitButtonText","isCreate","firstPart","hasUpdateUserPermission","viewOnly","validateFormControls","onClickDelete","deleteUser","onClickResetPassword","resetUserPassword","onClickBack","back","createUser","resetPasswordReturnUrl","updateUser","globalRoleList","isCustom","compareRole","customRoleList","groupedRoleList","roleGroups","currentMinIdx","hasDeleteUserPermission","hasResetPasswordPermission","UserComponent","UserSelectors","UserActions","onBack","getUsersState","users","getUsers","usersState","getUsersLoading","getUsersError","UsersTableCellContentComponent","sortingKeyForLockedStatus","UserLogComponent","onClickCreateUser","hasCreatePermission","hasGetPermission","UsersComponent","ForbiddenComponent","PageUnavailableComponent","GetRoleAction","GetRole","GetNewRoleAction","GetNewRole","GetRoleSucceedAction","permissionList","GetRoleSucceed","GetRoleFailAction","GetRoleFail","UpdateRoleAction","UpdateRole","DeleteRoleAction","DeleteRole","CreateRoleAction","CreateRole","getRoleState","getRoleInfo","roleState","getRolePermissionList","getRoleLoading","RoleDetailsComponent","permissionIds","roleForm","hasUpdateRolePermission","permission","deleteRole","createRole","updateRole","concurrencyToken","hasDeleteRolePermission","RoleComponent","RoleSelectors","RoleActions","getRolesState","roles","getRoles","rolesState","getRolesLoading","getRolesError","RolesTableCellContentComponent","RoleLogComponent","onClickCreateRole","hasCreateRolePermission","roleDto","hasGetRolePermission","RolesComponent","GetWebhookAction","GetWebhook","GetNewWebhookAction","GetNewWebhook","GetWebhookSucceedAction","webhook","lookups","GetWebhookSucceed","GetWebhookFailAction","GetWebhookFail","UpdateWebhookAction","UpdateWebhook","DeleteWebhookAction","DeleteWebhook","CreateWebhookAction","CreateWebhook","ToggleWebhookAction","undo","ToggleWebhook","ToggleWebhookSucceedAction","ToggleWebhookSucceed","ToggleWebhookFailAction","ToggleWebhookFail","GetWebhookLookupsAction","GetWebhookLookups","GetWebhookLookupsSucceedAction","GetWebhookLookupsSucceed","getWebhooksState","webhooks","getWebhooks","webhookState","getWebhooksLoading","getWebhooksError","getWebhooksSecret","secret","getWebhooksSecretLoading","secretLoading","getWebhookState","getWebhookInfo","getWebhookLookups","getWebhookLoading","getToggleWebhooksLoading","toggleWebhooksLoading","WebhooksTableCellContentComponent","isActiveToggled","updatedWebhook","activeToggled","WebhookLogComponent","webhookColumnDefs","hasTogglePermission","onIsActiveToggled","onClickCreate","WebhooksComponent","WebhookActions","GetWebhooksAction","GetWebhooks","GetWebhooksSucceedAction","GetWebhooksSucceed","GetWebhooksFailAction","GetWebhooksFail","GenerateWebhooksSecretAction","GenerateWebhooksSecret","GenerateWebhooksSecretSucceedAction","GenerateWebhooksSecretSucceed","GenerateWebhooksSecretFailAction","GenerateWebhooksSecretFail","ResetWebhooksSecretAction","ResetWebhooksSecret","WebhookDetailsComponent","webhookForm","hasUpdateWebhookPermission","onClickGenerateSecret","generateSecret","onClickToggleShowSecret","showSecret","generatedSecret","eventType","deleteWebhook","createWebhook","updateWebhook","hasDeleteWebhookPermission","hasGenerateSecretPermission","WebhookComponent","WebhookSelectors","WebhooksSelectors","WebhooksActions","webhookId","ReportType","DownloadReportAction","reportType","DownloadReport","ReportsTableCellContentComponent","onClickDownload","downloadReport","ReportsLogComponent","onDownloadReport","ReportsComponent","reports","description","getClientsState","clients","getClients","clientState","getClientsLoading","getClientsError","ClientsTableCellContentComponent","ClientLogComponent","ClientsComponent","ClientsSelectors","GetClientAction","GetClient","GetNewClientAction","GetNewClient","GetClientSucceedAction","client","GetClientSucceed","GetClientFailAction","GetClientFail","UpdateClientAction","UpdateClient","DeleteClientAction","DeleteClient","CreateClientAction","CreateClient","AddClientSecretAction","AddClientSecret","DeleteClientSecretAction","secretId","DeleteClientSecret","getClientState","getClientInfo","getClientRoles","getClientLoading","ResetClientSecretsAction","ResetClientSecrets","GetClientSecretsAction","clientId","GetClientSecrets","GetClientSecretsSucceedAction","clientSecrets","GetClientSecretsSucceed","GetClientSecretsFailAction","GetClientSecretsFail","getClientSecretsState","getClientSecrets","clientSecretsState","getClientSecretsLoading","getClientSecretsError","ClientSecretsTableCellContentComponent","onClickDeleteSecret","deleteClientSecret","sortingKeyForExpirationDate","expirationUtc","ClientDetailsComponent","rolesLookup","secretsColumnDefs","hasDeleteSecretPermission","clientForm","hasUpdateClientPermission","onClickDeleteClient","deleteClient","onClickCreateSecret","createClientSecret","onDeleteClientSecret","getSecretsTabLabel","secrets","onSecretRowSelected","createClient","updateClient","hasDeleteClientPermission","hasCreateSecretPermission","ClientComponent","ClientSelectors","ClientSecretsSelectors","ClientActions","ClientSecretsActions","onUpdateClient","onCreateClient","onDeleteClient","onCreateClientSecret","GetTidsAction","GetTids","GetTidsSucceedAction","GetTidsSucceed","GetTidsFailAction","GetTidsFail","PageChangedTidsAction","PageChangedTids","getTidsState","tids","getTids","tidsState","getTidsLoading","getTidsError","getTidsPager","ConfigurationsTableCellContentComponent","cloverPosConfig","$type","ConfigurationLogComponent","ConfigurationsComponent","TidsSelectors","TidsActions","GetFundingAction","GetFunding","GetFundingSucceedAction","GetFundingSucceed","GetFundingFailAction","GetFundingFail","SortFundingAction","SortFunding","PageChangedFundingAction","PageChangedFunding","FilterFundingAction","FilterFunding","getFundingState","funding","getFunding","fundingState","getFundingLoading","getFundingError","getFundingSorting","getFundingPager","getFundingFilter","FundingInstructionsOrderBy","FundingTableCellContentComponent","FundingStatus","ProcessorEnum","FundingLogFiltersComponent","fundingStatuses","dba","localFundedDateInterval","processors","fundingStatusList","processingIndex","processorList","wipeField","fieldName","FundingLogComponent","FundingComponent","FundingSelectors","FundingActions","ResetFundingItemAction","ResetFundingItem","GetFundingItemAction","GetFundingItem","GetFundingItemSucceedAction","fundingItem","GetFundingItemSucceed","GetFundingItemFailAction","GetFundingItemFail","PageChangedFundingItemTransactionsAction","PageChangedFundingItemTransactions","SortFundingItemTransactionsAction","SortFundingItemTransactions","FilterFundingItemTransactionsAction","FilterFundingItemTransactions","GetFundingItemTransactionsAction","GetFundingItemTransactions","GetFundingItemTransactionsSucceedAction","GetFundingItemTransactionsSucceed","GetFundingItemTransactionsFailAction","GetFundingItemTransactionsFail","GetFundingItemMidFeesAction","GetFundingItemMidFees","GetFundingItemMidFeesSucceedAction","GetFundingItemMidFeesSucceed","GetFundingItemMidFeesFailAction","GetFundingItemMidFeesFail","GetFundingItemAdjustmentsAction","GetFundingItemAdjustments","GetFundingItemAdjustmentsSucceedAction","GetFundingItemAdjustmentsSucceed","GetFundingItemAdjustmentsFailAction","GetFundingItemAdjustmentsFail","getFundingItemState","getFundingItem","getFundingItemLoading","getFundingItemTransactions","getFundingItemTransactionsLoading","transactionsLoading","getFundingItemTransactionsError","transactionsError","getFundingItemTransactionsPager","transactionsPager","getFundingItemTransactionsSorting","transactionsSorting","getFundingItemTransactionsFilter","transactionsFilter","getFundingItemExportLoading","getFundingItemMidFees","midFees","getFundingItemMidFeesLoading","midFeesLoading","getFundingItemMidFeesError","midFeesError","getFundingItemAdjustments","adjustments","getFundingItemAdjustmentsLoading","adjustmentsLoading","getFundingItemAdjustmentsError","adjustmentsError","FundingTransactionOrderBy","FundingItemTransactionsTableCellContentComponent","FundingItemMidFeesTableCellContentComponent","FundingItemAdjustmentsTableCellContentComponent","FundingItemTransactionFiltersComponent","localFeesOnly","onTransactionsFilterChanged","transactionsFilterChanged","FundingItemDetailsComponent","transactionsColumnDefs","midFeesColumnDefs","adjustmentsColumnDefs","vituPayDepositAmountInfoTip","netTransactionAmountInfoTip","merchantDepositAmountInfoTip","onTransactionsPageChanged","transactionsPageChanged","onTransactionsSortingChanged","transactionsSortingChanged","onExportTransactionsToCsv","exportTransactionsToCsv","getTransactionsTabLabel","getMidFeesTabLabel","fundingItemMidFees","getAdjustmentsTabLabel","fundingItemAdjustments","exportTransactionsButtonDisabled","fundingItemTransactionsLoading","fundingItemExportLoading","hasGetTransactionsReportPermission","FundingItemComponent","FundingItemSelectors","FundingItemActions","onFundingItemTransactionsPageChanged","onFundingItemTransactionsSortingChanged","onFundingItemTransactionsFilterChanged","HelpDetailsComponent","HelpComponent","DynamicDefaultRouteGuard","getEventState","getEvent","eventState","getEventLoading","getEventDeliveriesState","eventDeliveries","getEventDeliveries","eventDeliveriesState","getEventDeliveriesLoading","getEventDeliveriesError","getEventDeliveriesPager","getEventDeliveriesSorting","ResendEventDeliveryAction","eventDeliveryId","isDelivered","ResendEventDelivery","SortEventDeliveriesAction","SortEventDeliveries","PageChangedEventDeliveriesAction","PageChangedEventDeliveries","ResetEventDeliveriesAction","ResetEventDeliveries","GetEventDeliveriesAction","GetEventDeliveries","GetEventDeliveriesSucceedAction","GetEventDeliveriesSucceed","GetEventDeliveriesFailAction","GetEventDeliveriesFail","FlatTreeControl","BaseTreeControl","expansionModel","dataNode","_trackByValue","expand","collapse","isExpanded","toggleDescendants","collapseDescendants","expandDescendants","collapseAll","toBeProcessed","getDescendants","getLevel","isExpandable","dataNodes","expandAll","CDK_TREE_NODE_OUTLET_NODE","CdkTreeNodeOutlet","_node","CdkTreeNodeOutletContext","CdkTreeNodeDef","CdkTree","_levels","_nodeOutlet","_dataSubscription","defaultNodeDefs","_nodeDefs","_defaultNodeDef","renderNodeChanges","dataDiffer","parentData","insertNode","_getNodeDef","nodeData","level","treeControl","CdkTreeNode","mostRecentTreeNode","_tree","_dataChanges","_setRoleFromData","_parentNodeAriaLevel","nodeElement","isNodeElement","getParentNodeAriaLevel","CdkTreeNodePadding","_treeNode","indentUnits","_indent","_setPadding","_level","_setLevelInput","indent","_setIndentInput","_paddingIndent","nodeLevel","forceChange","_currentPadding","paddingProp","resetProp","CdkTreeNodeToggle","_recursive","recursive","_toggle","CdkTreeModule","_MatTreeNodeBase","MatTreeNode","MatTreeNodeDef","MatTreeNodePadding","MatTreeNodeOutlet","MatTree","MatTreeNodeToggle","MatTreeModule","MatTreeFlattener","transformFunction","getChildren","_flattenNode","resultNodes","parentMap","flatNode","childrenNodes","_flattenChildren","childParentMap","flattenNodes","structuredData","expandFlattenedNodes","currentExpand","MatTreeFlatDataSource","DataSource","_treeControl","_treeFlattener","initialData","_flattenedData","_expandedData","collectionViewer","EventDeliveryStatusEnum","EventDeliveriesTableCellContentComponent","onClickResend","resend","EventDetailsComponent","expandable","_transformer","treeFlattener","createTreeData","onResend","traverse","jsonKey","jsonValue","EventComponent","EventSelectors","EventDeliveriesSelectors","getEventsState","getEvents","eventsState","getEventsLoading","getEventsError","FilterEventsAction","FilterEvents","SortEventsAction","SortEvents","PageChangedEventsAction","PageChangedEvents","GetEventsAction","GetEvents","GetEventsSucceedAction","GetEventsSucceed","GetEventsFailAction","GetEventsFail","EventOrderByEnum","MerchantEventOrderByEnum","EventHistoryTableCellContentComponent","EventHistoryLogFiltersComponent","fundingInstructionRef","EventHistoryLogComponent","EventHistoryComponent","GetDisputesAction","GetDisputes","GetDisputesSucceedAction","GetDisputesSucceed","GetDisputesFailAction","GetDisputesFail","SortDisputesAction","SortDisputes","PageChangedDisputesAction","PageChangedDisputes","FilterDisputesAction","FilterDisputes","getDisputesState","getDisputes","disputesState","getDisputesLoading","getDisputesError","getDisputesPager","getDisputesSorting","getDisputesFilter","DisputesLogFiltersComponent","caseNumber","processor","disputeAmount","disputeOutcome","localRaiseDateInterval","localStatusDateInterval","localDueDateInterval","publicTransactionId","disputeTypeList","DisputesLogComponent","DisputesComponent","DisputesSelectors","DisputesActions","getDisputeState","getDispute","disputeState","getDisputeLoading","DisputeDetailsComponent","DisputeComponent","DisputeSelectors","FilterPaymentsAction","FilterPayments","SortPaymentsAction","SortPayments","PageChangedPaymentsAction","PageChangedPayments","GetPaymentsAction","GetPayments","GetPaymentsSucceedAction","GetPaymentsSucceed","GetPaymentsFailAction","GetPaymentsFail","ExportPaymentsToCsvAction","ExportPaymentsToCsv","ExportPaymentsToCsvSucceedAction","ExportPaymentsToCsvSucceed","ExportPaymentsToCsvFailAction","ExportPaymentsToCsvFail","getPaymentsState","payments","PaymentOrderBy","GroupTransactionsTableCellContentComponent","onMouseDownDisputeType","recentTransaction","PaymentStatus","GroupTransactionLogFiltersComponent","disputeTypes","PaymentLogComponent","paymentsColumnDefs","PaymentsComponent","DummyComponent","AppRoutingModule","ApiConfiguration","BaseService","http","rootUrl","_rootUrl","ParameterCodecInstance","ParameterCodec","encodeKey","encodeValue","decodeKey","decodeValue","Parameter","defaultStyle","defaultExplode","explode","serializeValue","propVal","PathParameter","prefix","alreadySerialized","QueryParameter","HeaderParameter","RequestBuilder","operationPath","method","_path","_query","_header","contentType","_bodyContentType","pairs","formValue","formDataValue","_bodyContent","formData","FormData","toAppend","pathParam","httpParams","HttpParams","encoder","queryParam","httpHeaders","HttpHeaders","headerParam","HttpRequest","reportProgress","EventsService","eventDeliveriesSearch$Response","rb","EventDeliveriesSearchPath","OrderBy","Status","StartDate","EndDate","OrderDirection","HttpResponse","eventDeliveriesSearch","eventDeliveriesSend$Response","EventDeliveriesSendPath","eventDeliveriesSend","eventsSearch$Response","EventsSearchPath","EventTypes","Mid","Tid","FundingInstructionRef","TransactionId","eventsSearch","eventsGet$Response","EventsGetPath","eventsGet","MerchantService","merchantGet$Response","MerchantGetPath","merchantGet","merchantGetTids$Response","MerchantGetTidsPath","merchantGetTids","merchantGetTid$Response","MerchantGetTidPath","merchantGetTid","merchantGetMids$Response","MerchantGetMidsPath","Processor","DeletedItems","merchantGetMids","PaymentMethodsService","paymentMethodsSearch$Response","PaymentMethodsSearchPath","TID","MID","Token","Last4","First6","CardBrands","IsExpired","IsDisabled","PayerName","paymentMethodsSearch","paymentMethodsGet$Response","PaymentMethodsGetPath","paymentMethodsGet","paymentMethodsGetHistory$Response","PaymentMethodsGetHistoryPath","paymentMethodsGetHistory","DisputesService","disputesSearch$Response","DisputesSearchPath","CaseNumber","DisputeType","PaymentToken","PublicTransactionId","CurrentStatus","DisputeAmount","StatusDateStartUtc","StatusDateEndUtc","RaiseDateStartUtc","RaiseDateEndUtc","DueDateStartUtc","DueDateEndUtc","DisputeOutcome","disputesSearch","disputesGet$Response","DisputesGetPath","disputesGet","PaymentFormService","paymentFormPaymentIframeLink$Response","PaymentFormPaymentIframeLinkPath","paymentFormPaymentIframeLink","paymentFormTokenizeIframeLink$Response","PaymentFormTokenizeIframeLinkPath","paymentFormTokenizeIframeLink","PaymentsService","paymentsSearch$Response","PaymentsSearchPath","Amount","Description","CustomerName","DisputeTypes","Cardholder","Statuses","Gateways","DigitalWallets","SettlementStartDate","SettlementEndDate","paymentsSearch","paymentsCreatePayment$Response","PaymentsCreatePaymentPath","paymentsCreatePayment","paymentsCapture$Response","PaymentsCapturePath","paymentsCapture","paymentsRefund$Response","PaymentsRefundPath","paymentsRefund","paymentsGet$Response","PaymentsGetPath","paymentsGet","paymentsExport$Response","PaymentsExportPath","paymentsExport","paymentsFees$Response","PaymentsFeesPath","paymentsFees","paymentsGetNextPaymentActions$Response","PaymentsGetNextPaymentActionsPath","paymentsGetNextPaymentActions","paymentsGooglePay$Response","PaymentsGooglePayPath","paymentsGooglePay","paymentsGooglePaySurchargeVerify$Response","PaymentsGooglePaySurchargeVerifyPath","paymentsGooglePaySurchargeVerify","paymentsStartApplePaySession$Response","PaymentsStartApplePaySessionPath","paymentsStartApplePaySession","paymentsApplePay$Response","PaymentsApplePayPath","paymentsApplePay","paymentsCreatePayPalOrder$Response","PaymentsCreatePayPalOrderPath","paymentsCreatePayPalOrder","paymentsCapturePayPalOrder$Response","PaymentsCapturePayPalOrderPath","paymentsCapturePayPalOrder","paymentsProcessPayPalOrder$Response","PaymentsProcessPayPalOrderPath","paymentsProcessPayPalOrder","refundsVoid$Response","RefundsVoidPath","refundsVoid","transactionsSearch$Response","TransactionsSearchPath","PaymentMethod","Types","Customer","AuthCode","IsServiceFee","transactionsSearch","transactionsGet$Response","TransactionsGetPath","transactionsGet","transactionsExport$Response","TransactionsExportPath","transactionsExport","transactionsGetFees$Response","TransactionsGetFeesPath","transactionsGetFees","transactionsAccrueCustomFees$Response","TransactionsAccrueCustomFeesPath","transactionsAccrueCustomFees","transactionsReceipt$Response","TransactionsReceiptPath","transactionsReceipt","CloverPosService","cloverSalesBeginSale$Response","CloverSalesBeginSalePath","cloverSalesBeginSale","cloverSalesCancel$Response","CloverSalesCancelPath","cloverSalesCancel","surchargeFee$Response","SurchargeFeePath","surchargeFee","surchargeVerifyTidSurcharge$Response","SurchargeVerifyTidSurchargePath","surchargeVerifyTidSurcharge","ClientsService","clientsSearch$Response","ClientsSearchPath","PageSize","PageIndex","clientsSearch","clientsPost$Response","ClientsPostPath","clientsPost","clientsGet$Response","ClientsGetPath","clientsGet","clientsPut$Response","ClientsPutPath","clientsPut","clientsDelete$Response","ClientsDeletePath","clientsDelete","ClientSecretsService","clientSecretsSearch$Response","ClientSecretsSearchPath","ClientId","clientSecretsSearch","clientSecretsPost$Response","ClientSecretsPostPath","clientSecretsPost","clientSecretsLookups$Response","ClientSecretsLookupsPath","clientSecretsLookups","clientSecretsDelete$Response","ClientSecretsDeletePath","clientSecretsDelete","PermissionsService","permissionsSearch$Response","PermissionsSearchPath","permissionsSearch","permissionsSearchForCurrentUser$Response","PermissionsSearchForCurrentUserPath","permissionsSearchForCurrentUser","RolesService","rolesSearch$Response","RolesSearchPath","rolesSearch","rolesPost$Response","RolesPostPath","rolesPost","rolesGet$Response","RolesGetPath","rolesGet","rolesPut$Response","RolesPutPath","rolesPut","rolesDelete$Response","RolesDeletePath","rolesDelete","UsersService","usersSearch$Response","UsersSearchPath","usersSearch","usersPost$Response","UsersPostPath","usersPost","usersGet$Response","UsersGetPath","usersGet","usersPut$Response","UsersPutPath","usersPut","usersDelete$Response","UsersDeletePath","usersDelete","usersUpdatePassword$Response","UsersUpdatePasswordPath","usersUpdatePassword","usersResetPassword$Response","UsersResetPasswordPath","usersResetPassword","WebhooksService","webhooksSearch$Response","WebhooksSearchPath","webhooksSearch","webhooksPost$Response","WebhooksPostPath","webhooksPost","webhooksGet$Response","WebhooksGetPath","webhooksGet","webhooksPut$Response","WebhooksPutPath","webhooksPut","webhooksDelete$Response","WebhooksDeletePath","webhooksDelete","webhooksGenerateSecret$Response","WebhooksGenerateSecretPath","webhooksGenerateSecret","webhooksEventTypes$Response","WebhooksEventTypesPath","webhooksEventTypes","BillingService","fundingInstructionsSearchInstructions$Response","FundingInstructionsSearchInstructionsPath","DBA","FundingStatuses","FundedStartDate","FundedEndDate","Processors","fundingInstructionsSearchInstructions","fundingInstructionsGetInstructionDetails$Response","FundingInstructionsGetInstructionDetailsPath","fundingInstructionsGetInstructionDetails","fundingInstructionsSearchFundingTransactions$Response","FundingInstructionsSearchFundingTransactionsPath","FeesOnly","fundingInstructionsSearchFundingTransactions","fundingInstructionsExportFundingTransactions$Response","FundingInstructionsExportFundingTransactionsPath","feesOnly","fundingInstructionsExportFundingTransactions","fundingInstructionsGetMidFees$Response","FundingInstructionsGetMidFeesPath","fundingInstructionsGetMidFees","fundingInstructionsGetAdjustments$Response","FundingInstructionsGetAdjustmentsPath","fundingInstructionsGetAdjustments","fundingInstructionsGetTransactionFees$Response","FundingInstructionsGetTransactionFeesPath","fundingInstructionsGetTransactionFees","fundingInstructionsGetDisputes$Response","FundingInstructionsGetDisputesPath","fundingInstructionsGetDisputes","ReportsService","reportTransactionReport$Response","ReportTransactionReportPath","MerchantProcessorIds","reportTransactionReport","reportFundingReport$Response","ReportFundingReportPath","reportFundingReport","reportStatementReports$Response","ReportStatementReportsPath","reportStatementReports","reportStatementReportsAll$Response","ReportStatementReportsAllPath","reportStatementReportsAll","ApiModule","parentModule","MerchantStyleService","merchantStyleMergedCreditCardHtml$Response","MerchantStyleMergedCreditCardHtmlPath","cssStyle","merchantStyleMergedCreditCardHtml","merchantStylePutCreditCardSettings$Response","MerchantStylePutCreditCardSettingsPath","merchantStylePutCreditCardSettings","merchantStyleGetCreditCardSettings$Response","MerchantStyleGetCreditCardSettingsPath","merchantStyleGetCreditCardSettings","exp","process","ɵAnimationGroupPlayer","driver","preStyles","postStyles","normalizedKeyframes","previousOffset","previousKeyframe","kf","isSameOffset","normalizedKeyframe","normalizedProp","normalizedValue","normalizePropertyName","normalizeStyleValue","animationFailed","copyAnimationEvent","makeAnimationEvent","triggerName","_contains","elm1","elm2","_documentElement","isNode","getParentElement","_CACHED_BODY","_IS_WEBKIT","containsElement","invokeQuery","NoopAnimationDriver","validateStyleProperty","getBodyNode","containsVendorPrefix","camelProp","matchesElement","_selector","computeStyle","easing","previousPlayers","scrubberAccessRequested","AnimationDriver","NOOP","ENTER_CLASSNAME","LEAVE_CLASSNAME","NG_TRIGGER_CLASSNAME","NG_TRIGGER_SELECTOR","NG_ANIMATING_CLASSNAME","NG_ANIMATING_SELECTOR","_convertTimeValueToMS","allowNegativeValues","invalidTimingValue","delayMatch","easingVal","containsErrors","negativeStepValue","negativeDelayValue","parseTimeExpression","styleMap","backfill","styleAttrValue","getStyleAttributeString","camelCaseToDashCase","formerStyles","dashCaseToCamelCase","writeStyleAttribute","sequence","PARAM_REGEX","lastIndex","original","varName","localVal","invalidParamValue","DASH_CASE_REGEXP","visitor","visitTrigger","visitState","visitTransition","visitSequence","visitGroup","visitAnimate","visitKeyframes","visitStyle","visitReference","visitAnimateChild","visitAnimateRef","visitQuery","visitStagger","invalidNodeType","transitionValue","expressions","eventStr","invalidTransitionAlias","parseAnimationAlias","invalidExpression","makeLambdaFromStates","parseInnerTransitionStr","TRUE_BOOLEAN_VALUES","FALSE_BOOLEAN_VALUES","lhs","rhs","LHS_MATCH_BOOLEAN","RHS_MATCH_BOOLEAN","lhsMatch","rhsMatch","SELF_TOKEN_REGEX","metadata","warnings","AnimationAstBuilderVisitor","_driver","AnimationAstBuilderContext","_resetContextStyleTimingState","visitDslNode","normalizeAnimationEntry","currentQuerySelector","collectedStyles","queryCount","depCount","invalidTrigger","stateDef","invalidDefinition","styleAst","astParams","containsDynamicStyles","missingSubs","extractStyleParams","sub","iteratorToArray","metadataName","invalidState","matchers","parseTransitionExpr","normalizeAnimationOptions","furthestTime","step","innerAst","timingAst","makeTimingAst","resolveTiming","strValue","ast","dynamic","constructTimingAst","currentAnimateTimings","styleMetadata","newStyleData","_styleAst","isEmptyStep","_makeStyleAst","_validateStyleAst","metadataStyles","styleTuple","convertToMap","collectedEasing","styleData","endTime","startTime","tuple","collectedEntry","updateCollectedStyle","firstStart","firstEnd","secondStart","secondEnd","invalidParallelAnimation","invalidStyleParams","validateStyleParams","invalidKeyframes","totalKeyframesWithOffsets","offsetsOutOfOrder","keyframesOutOfRange","offsetVal","consumeOffset","invalidOffset","keyframeOffsetsOutOfOrder","generatedOffset","keyframesMissingOffsets","limit","animateDuration","durationUpToThisFrame","parentSelector","currentQuery","includeSelf","hasAmpersand","normalizeSelector","getOrSetDefaultValue","originalSelector","invalidStagger","currentTransition","unsupportedCSSPropertiesFound","copyObj","normalizeParams","preStyleProps","postStyleProps","subTimeline","ElementInstructionMap","_map","instructions","existingInstructions","ENTER_TOKEN_REGEX","LEAVE_TOKEN_REGEX","enterClassName","leaveClassName","startingStyles","finalStyles","subInstructions","AnimationTimelineBuilderVisitor","buildKeyframes","AnimationTimelineContext","resolveTimingValue","currentTimeline","delayNextStep","setStyles","timelines","timeline","containsAnimation","lastRootTimeline","allowOnlyTimelineStyles","createTimelineInstruction","elementInstructions","innerContext","createSubContext","_visitSubInstructions","transformIntoNewTimeline","previousNode","instruction","instructionTimings","appendInstructionToTimeline","subContextCount","snapshotCurrentStyles","DEFAULT_NOOP_PREVIOUS_NODE","applyStylesToKeyframe","innerTimelines","mergeTimelineCollectedStyles","_visitTiming","interpolateParams","incrementTime","hasCurrentStyleProperties","forwardFrame","applyEmptyStep","innerTimeline","forwardTime","elms","currentQueryTotal","sameElementTimeline","currentQueryIndex","tl","maxTime","currentStaggerTime","startingTime","_enterClassName","_leaveClassName","initialTimeline","TimelineBuilder","skipIfExists","optionsToUpdate","newParams","paramsToUpdate","_copyOptions","oldParams","newTime","fork","updatedTimings","builder","SubTimelineBuilder","stretchStartingKeyframe","invalidQuery","_elementTimelineStylesLookup","_previousKeyframe","_currentKeyframe","_keyframes","_styleSummary","_localTimelineStyles","_pendingStyles","_backFill","_currentEmptyStepKeyframe","_globalTimelineStyles","_loadKeyframe","hasPreStyleStep","_updateStyle","allStyles","allProperties","copyStyles","getFinalKeyframe","properties","details1","details0","finalKeyframes","keyframe","finalKeyframe","preProps","postProps","kf0","kf1","_stretchStartingKeyframe","newKeyframes","startingGap","newFirstKeyframe","oldFirstKeyframe","roundOffset","oldOffset","decimalPoints","mult","AnimationStyleNormalizer","DIMENSIONAL_PROP_SET","WebAnimationsStyleNormalizer","userProvidedProperty","normalizedProperty","strVal","valAndSuffixMatch","invalidCssUnitValue","isRemovalTransition","fromStyles","toStyles","queriedElements","EMPTY_OBJECT","AnimationTransitionFactory","_triggerName","_stateStyles","currentState","nextState","matchFns","oneOrMoreTransitionsMatch","buildStyles","stateName","styler","currentOptions","nextOptions","skipAstBuild","transitionAnimationParams","currentStateStyles","nextAnimationParams","nextStateStyles","preStyleMap","postStyleMap","isRemoval","animationOptions","applyParamDefaults","buildAnimationTimelines","createTransitionInstruction","elm","queriedElementsList","userParams","AnimationStateStyles","combinedParams","AnimationTrigger","_normalizer","transitionFactories","balanceProperties","fallbackTransition","createFallbackTransition","containsQueries","matchTransition","entry","matchStyles","stateMap","key1","key2","EMPTY_INSTRUCTION_MAP","TimelineAnimationEngine","bodyNode","_animations","_playersById","buildAnimationAst","registerFailed","_buildPlayer","normalizeKeyframes$1","autoStylesMap","missingOrDestroyedAnimation","createAnimationFailed","optimizeGroupPlayer","_getPlayer","missingPlayer","baseEvent","listenOnPlayer","QUEUED_CLASSNAME","DISABLED_CLASSNAME","EMPTY_PLAYER_ARRAY","NULL_REMOVAL_STATE","namespaceId","setForRemoval","setForMove","hasAnimation","removedBeforeQueried","NULL_REMOVED_QUERIED_STATE","REMOVAL_FLAG","StateValue","isObj","normalizeTriggerValue","absorbOptions","VOID_VALUE","DEFAULT_STATE_VALUE","AnimationTransitionNamespace","_engine","_triggers","_queue","_elementListeners","_hostClassName","phase","missingTrigger","missingEvent","isTriggerEventValid","unsupportedTriggerEvent","triggersWithStates","statesByElement","afterFlush","_getTrigger","unregisteredTrigger","defaultToFallback","TransitionAnimationPlayer","objEquals","reportError","eraseStyles","playersOnElement","playersByElement","queued","isFallbackTransition","totalQueuedPlayers","clearElementCache","elementPlayers","_signalRemovalForInnerTriggers","namespaces","fetchNamespacesByElement","ns","triggerLeaveAnimation","afterFlushAnimationsDone","destroyAfterComplete","triggerStates","previousTriggersValues","markElementAsRemoved","processLeaveNode","prepareLeaveAnimationListeners","elementStates","visitedTriggers","removeNode","engine","childElementCount","containsPotentialParentTransition","totalAnimations","currentPlayers","playersByQueriedElement","removalFlag","destroyInnerAnimations","_onRemovalComplete","drainQueuedTransitions","microtaskId","destroyed","markedForDestroy","d0","elementContainsData","containsData","TransitionAnimationEngine","newHostElements","disabledNodes","_namespaceLookup","_namespaceList","_flushFns","_whenQuietFns","namespacesByHostElement","collectedEnterElements","collectedLeaveElements","onRemovalComplete","queuedPlayers","createNamespace","_balanceNamespaceList","collectEnterElement","namespaceList","ancestor","ancestorNs","registerTrigger","_fetchNamespace","stateValue","markElementAsDisabled","isHostElement","hostNS","_buildInstruction","subTimelines","skipBuildAst","destroyActiveAnimationsForElement","finishActiveQueriedAnimationOnElement","whenRenderingDone","cleanupFns","_flushAnimations","quietFns","triggerTransitionsFailed","skippedPlayers","skippedPlayersMap","queuedInstructions","allPreStyleElements","allPostStyleElements","disabledElementsSet","nodesThatAreDisabled","allTriggerElements","enterNodeMap","buildRootMap","enterNodeMapIds","allLeaveNodes","mergedLeaveNodes","leaveNodesWithoutAnimations","leaveNodeMapIds","leaveNodeMap","allPlayers","erroneousTransitions","nodeIsOrphaned","stringMap","setVal","transitionFailed","allPreviousPlayersMap","animationElementMap","_beforeAnimationBuild","_getPreviousPlayers","prevPlayer","replaceNodes","replacePostStylesAsPre","postStylesMap","cloakAndComputeStyles","preStylesMap","pre","rootPlayers","subPlayers","NO_PARENT_ANIMATION_ELEMENT_DETECTED","overrideTotalTime","parentWithAnimation","parentsToAdd","detectedParent","innerPlayer","_buildAnimation","setRealPlayer","parentPlayers","playersForElement","syncPlayerEvents","queriedPlayerResults","queriedInnerElements","queriedPlayers","activePlayers","removeNodesAfterAnimationDone","isQueriedElement","toStateValue","queriedElementPlayers","isRemovalAnimation","targetNameSpaceId","targetTriggerName","timelineInstruction","realPlayer","getRealPlayer","allQueriedPlayers","allConsumedElements","allSubElements","allNewPlayers","finalPlayers","_flattenGroupPlayersRecur","flattenGroupPlayers","wrappedPlayer","currentValues","deleteOrUnsetInMap","_player","_containsRealPlayer","_queuedCallbacks","callbacks","_queueEvent","valuesMap","elementPropsMap","cloakVals","cloakElement","failedElements","roots","rootMap","nodeSet","localRootMap","getRoot","postEntry","preEntry","AnimationEngine","_triggerCache","_transitionEngine","_timelineEngine","componentId","cacheKey","triggerBuildFailed","buildTrigger","onInsert","onRemove","disableAnimations","parseTimelineCommand","eventPhase","SpecialCasedStyles","_startStyles","_endStyles","initialStyles","initialStylesByElement","_initialStyles","isNonAnimatableStyle","WebAnimationsPlayer","_specialStyles","_initialized","_duration","_delay","_preparePlayerBeforeStart","domPlayer","_triggerWebAnimation","_finalKeyframe","_resetDomPlayerState","_convertKeyframesToObject","kfs","frame","fromEntries","WebAnimationsDriver","validateAnimatableStyleProperty","playerOptions","fill","previousStyles","previousWebAnimationPlayers","allowPreviousPlayerStylesMerge","normalizeKeyframes","startingKeyframe","missingStyleProps","balancePreviousStylesIntoKeyframes","specialStyles","startStyles","endStyles","filterNonAnimatableStyles","packageNonAnimatableStyles","BrowserAnimationBuilder","rootRenderer","_nextAnimationId","issueAnimationCommand","BrowserAnimationFactory","AnimationFactory","RendererAnimationPlayer","_command","_listen","DISABLE_ANIMATIONS_FLAG","AnimationRendererFactory","_currentId","_microtaskId","_animationCallbacksBuffer","_rendererCache","_cdRecurDepth","BaseAnimationRenderer","animationTriggers","AnimationRenderer","_scheduleCountTask","scheduleListenerCallback","isMove","resolveElementFromTarget","dotIndex","parseTriggerCallbackName","SHARED_ANIMATION_PROVIDERS","ɵAnimationStyleNormalizer","ɵWebAnimationsStyleNormalizer","ɵAnimationEngine","InjectableAnimationEngine","appRef","ɵDomRendererFactory2","BROWSER_ANIMATIONS_PROVIDERS","ɵWebAnimationsDriver","BROWSER_NOOP_ANIMATIONS_PROVIDERS","ɵNoopAnimationDriver","BrowserAnimationsModule","MatDividerModule","matFormFieldDefaultOptions","materialModules","MaterialModule","PaymentMethodType","ModalActionType","ModalAction","RefundToggleValue","RefundPaymentModalComponent","currencyPipe","refundForm","refundAmount","refundAtLeastOneAmountValidator","refundAmountValidator","refundDescription","serviceFeeRefundAmountValidator","refundToggleValue","Custom","serviceFeeRefundToggleValue","refundData","refundTransaction","amountAvailable","serviceFeeAmountAvailable","isPayPal","paymentMethod","setRefundToggleValue","setServiceFeeRefundToggleValue","_refundToggleValue","All","refundAmountInputFieldComponent","_serviceFeeRefundToggleValue","serviceFeeRefundAmountInputFieldComponent","limitExceeded","serviceFeeLimitExceeded","amountRequired","onMouseDown","errorMessageSubject","modalActionSubject","atLeastOne","refundAmountValue","serviceFeeRefundAmountValue","refundAtLeastOneInvalid","refundLimitExceeded","portalApiRootUrl","coreApiRootUrl","authRootUrl","exportableModules","HttpClientModule","SharedModule","MerchantEffects","merchantService","createEffect","getMerchant","TransactionsEffects","paymentsService","filterOperator","getParams","GenericNoOpAction","NoOp","TransactionEffects","TransactionActions","rS","PaymentsEffects","GetTransactionSiblingsDetailAction","GetTransactionSiblingsDetail","GetTransactionSiblingsDetailSucceedAction","GetTransactionSiblingsDetailSucceed","GetTransactionSiblingsDetailFailAction","GetTransactionSiblingsDetailFail","GetNextPaymentActionsAction","GetNextPaymentActions","GetNextPaymentActionsSucceedAction","GetNextPaymentActionsSucceed","GetNextPaymentActionsFailAction","GetNextPaymentActionsFail","PaymentEffects","refundAction","GetUsersAction","GetUsers","GetUsersSucceedAction","GetUsersSucceed","GetUsersFailAction","GetUsersFail","UsersEffects","actions$","usersService","rolesService","RouterEffects","routeInfo","forward","TransactionSiblingsEffects","transactionQueries","transactionSibling","UserEffects","waitOnGetCurrentUser","deleteConfirmed","resetConfirmed","returnUrl","CurrentUserActionTypes","NextPaymentActionsEffects","CurrentUserEffects","permissionsService","userProfile","currentUserDto","currentUserPermission","getDefaultRoute","currentUserHasPermissions","AppEffects","events$","kickstartInactivityWatcher","allEvents$","inactivityInterval","GetRolesAction","GetRoles","GetRolesSucceedAction","GetRolesSucceed","GetRolesFailAction","GetRolesFail","RolesEffects","RoleEffects","WebhooksEffects","webhooksService","WebhookEffects","ResetStatementsAction","ResetStatements","GetStatementsAction","merchantId","GetStatements","GetStatementsSucceedAction","statements","GetStatementsSucceed","getStatementsState","getStatements","statementsState","getStatementsLoading","DownloadReportModalAction","getMidsState","mids","getMids","merchantsState","getMidsLoading","ResetMidsAction","ResetMids","GetMidsAction","GetMids","GetMidsSucceedAction","GetMidsSucceed","GetMidsFailAction","GetMidsFail","DownloadReportModalComponent","idField","dateSingleField","dateRangeField","midField","statementField","monthField","yearField","calculateMaxMonthAndYear","reportForm","hasYear","maxYear","maxMonth","yearToAdd","minYear","hasMonth","getFormControl","optionsForMonths","disableFormFieldsForOtherReportTypes","mids$","midsLoading$","midsLoading","resetMidField","statements$","statementsLoading$","statementsLoading","resetStatementField","onMonthChanged","getStatementsIfRequired","onYearChanged","noStatements","noMids","merchantProcessorIds","getSubmitValueForField","endDate","statementId","getMonthForMonthVal","monthVal","ReportEffects","reportsService","downloadReportAction","reportRequest","fileName","getDownloadFileName","openFile","doClose","fileNameMatches","blob","fileUrl","createObjectURL","tempAnchorElement","download","revokeObjectURL","StatementsEffects","GetClientsAction","GetClients","GetClientsSucceedAction","GetClientsSucceed","GetClientsFailAction","GetClientsFail","ClientsEffects","clientsService","CreateClientSecretModalAction","CreateClientSecretModalComponent","hashType","localExpirationDate","createClientSecretForm","secretValue","ClientEffects","clientSecretService","ClientSecretsEffects","TidsEffects","MidsEffects","FundingEffects","billingService","FundingItemEffects","getExportParams","GetEventAction","GetEvent","GetEventSucceedAction","GetEventSucceed","GetEventFailAction","GetEventFail","EventEffects","eventsService","EventsEffects","EventDeliveryEffects","confirmed","EventDeliveriesEffects","DisputesEffects","disputesService","fitlerOp","GetDisputeAction","GetDispute","GetDisputeSucceedAction","GetDisputeSucceed","GetDisputeFailAction","GetDisputeFail","EffectsConfiguration","DisputeEffects","MerchantState","OrderDirectionEnum","Sorting","Filter","getInitialLocalFilterDateRangeLastTwoWeeks","TransactionsState","createFilter","TransactionReducer","createReducer","TransactionState","TransactionSiblingsState","PaymentsState","PaymentState","UserState","UsersState","NextPaymentActionsState","CurrentUserState","RoleState","RolesState","WebhooksState","WebhookState","ReportState","StatementsState","ClientsState","ClientState","ClientSecretsState","TidsState","MidsState","fundingStatus","FundingState","TransactionsSorting","TransactionsFilter","FundingItemState","EventState","EventsState","EventDeliveryState","EventDeliveryOrderByEnum","EventDeliveriesState","DisputesState","DisputeState","ReducerMap","routerAction","totalPages","morePages","exportError","toggleWebhookError","secretError","eventDelivery","ReducerConfiguration","runtimeChecks","strictStateImmutability","strictActionImmutability","AppComponent","issuer","showDebugInformation","scope","DashboardModule","AppModule","bootstrap","It","AuthConfig","StoreModule","StoreDevtoolsModule","maxAge","logOnly","CoreApiModule","PortalApiModule","OAuthModule","resourceServer","allowedUrls","sendAccessToken","enableProdMode","__NgCli_bootstrap_1","bootstrapModule","define","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","stacktrace","parseOpera","stack","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","line","sanitizedLine","locationParts","lineNumber","columnNumber","functionNameRegex","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","argsRaw","functionCall","exports","__esModule","digestLength","blockSize","Uint32Array","t1","t2","Hash","Int32Array","temp","Uint8Array","bufferLength","bytesHashed","finished","clean","dataLength","dataPos","hashBlocks","out","bitLenHi","bitLenLo","padLength","digest","_saveState","_restoreState","HMAC","inner","outer","pad","istate","ostate","hmac","counter","hash","default","hkdfSalt","hkdf","salt","okm","hmac_","bufpos","fillBuffer","pbkdf2","password","iterations","dkLen","prf","ctr","dk","sha256","module","Functions","Identity","True","Blank","funcCache","Utils","createLambda","expression","regexp","paramNumber","argArray","dollar","isIEnumerable","Enumerator","defineProperties","hasNativeIteratorSupport","IEnumerator","initialize","tryGetNext","yielder","Yielder","moveNext","yieldReturn","yieldBreak","Enumerable","getEnumerator","createEnumerable","createEnumerator","extendTo","enumerableProto","typeProto","ArrayEnumerable","func","recallFrom","getSource","choice","cycle","enumerator","isFirst","atEnd","Windows","hasCurrent","make","ignoreCase","multiline","rangeDown","rangeTo","repeatWithFinalize","initializer","finalizer","generate","toInfinity","toNegativeInfinity","unfold","seed","enumerableFactory","traverseBreadthFirst","nestLevel","any","traverseDepthFirst","enumeratorStack","middleEnumerator","pairwise","isUseSeed","WhereSelectEnumerable","collectionSelector","middleSeq","where","WhereEnumerable","choose","typeName","zip","firstEnumerator","secondEnumerator","enumerators","takeExceptLast","outerKeySelector","innerKeySelector","compareSelector","outerEnumerator","lookup","innerElements","innerCount","toLookup","groupJoin","isEnumerated","alternate","alternateValueOrSequence","alternateSequence","alternateEnumerator","distinct","except","compareKey","initial","Dictionary","intersect","outs","sequenceEqual","comparer","OrderedEnumerable","orderByDescending","shuffle","weightedSample","weightSelector","sortedByBound","totalWeight","draw","lower","upper","elementSelector","toEnumerable","partitionBy","hasResultSelector","Grouping","hasNext","average","maxBy","minBy","elementAt","elementAtOrDefault","te","lastOrDefault","single","singleOrDefault","skipWhile","isSkipEnd","takeFromLast","sourceEnumerator","cast","asEnumerable","dict","Lookup","toDictionary","toJSONString","replacer","space","toJoinedString","doAction","write","writeLine","writeln","letBind","sharedEnumerator","DisposableEnumerable","memoize","finallyAction","trace","descending","createOrderedEnumerable","thenBy","thenByDescending","indexes","sortContext","SortContext","GenerateKeys","orderedEnumerable","currentContext","index1","index2","comparison","prevSource","prevPredicate","prevSelector","callHasOwnProperty","computeHashCode","HashEntry","EntryList","addLast","newEntry","Me","countField","entryList","buckets","currentEntry","dictionary","kvp","groupKey","FUNC_ERROR_TEXT","HASH_UNDEFINED","PLACEHOLDER","WRAP_ARY_FLAG","INFINITY","MAX_ARRAY_LENGTH","wrapFlags","argsTag","arrayTag","boolTag","dateTag","errorTag","funcTag","genTag","mapTag","numberTag","objectTag","promiseTag","regexpTag","setTag","stringTag","symbolTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","reEmptyStringLeading","reEmptyStringMiddle","reEmptyStringTrailing","reEscapedHtml","reUnescapedHtml","reHasEscapedHtml","reHasUnescapedHtml","reEscape","reEvaluate","reInterpolate","reIsDeepProp","reIsPlainProp","rePropName","reRegExpChar","reHasRegExpChar","reTrimStart","reWhitespace","reWrapComment","reWrapDetails","reSplitDetails","reAsciiWord","reForbiddenIdentifierChars","reEscapeChar","reEsTemplate","reFlags","reIsBadHex","reIsBinary","reIsHostCtor","reIsOctal","reIsUint","reLatin","reNoMatch","reUnescapedString","rsAstralRange","rsComboRange","rsComboMarksRange","rsDingbatRange","rsLowerRange","rsUpperRange","rsVarRange","rsBreakRange","rsMathOpRange","rsAstral","rsBreak","rsCombo","rsDigits","rsDingbat","rsLower","rsMisc","rsFitz","rsNonAstral","rsRegional","rsSurrPair","rsUpper","rsMiscLower","rsMiscUpper","rsOptContrLower","rsOptContrUpper","reOptMod","rsModifier","rsOptVar","rsSeq","rsEmoji","rsSymbol","reApos","reComboMark","reUnicode","reUnicodeWord","reHasUnicode","reHasUnicodeWord","contextProps","templateCounter","typedArrayTags","cloneableTags","stringEscapes","freeParseFloat","freeParseInt","freeGlobal","freeSelf","freeExports","freeModule","moduleExports","freeProcess","nodeUtil","require","binding","nodeIsArrayBuffer","isArrayBuffer","nodeIsDate","nodeIsMap","isMap","nodeIsRegExp","isRegExp","nodeIsSet","isSet","nodeIsTypedArray","isTypedArray","thisArg","setter","iteratee","accumulator","resIndex","baseIndexOf","comparator","initAccum","asciiSize","baseProperty","collection","eachFunc","fromIndex","fromRight","strictIndexOf","baseFindIndex","baseIsNaN","baseSum","trimmedEndIndex","arrayMap","strSymbols","chrSymbols","deburrLetter","basePropertyOf","escapeHtmlChar","chr","arg","hasUnicode","unicodeSize","unicodeToArray","asciiToArray","unescapeHtmlChar","uid","arrayProto","objectProto","coreJsData","funcToString","idCounter","maskSrcKey","IE_PROTO","nativeObjectToString","objectCtorString","oldDash","reIsNative","Buffer","allocUnsafe","getPrototype","overArg","objectCreate","spreadableSymbol","isConcatSpreadable","symIterator","symToStringTag","toStringTag","getNative","ctxClearTimeout","ctxNow","ctxSetTimeout","nativeCeil","nativeFloor","nativeGetSymbols","nativeIsBuffer","isBuffer","nativeIsFinite","nativeJoin","nativeKeys","nativeMax","nativeMin","nativeNow","nativeParseInt","nativeRandom","nativeReverse","DataView","nativeCreate","metaMap","realNames","dataViewCtorString","toSource","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","symbolValueOf","symbolToString","isObjectLike","LazyWrapper","LodashWrapper","wrapperClone","baseCreate","isObject","chainAll","__wrapped__","__actions__","__chain__","__index__","__values__","__dir__","__filtered__","__iteratees__","__takeCount__","__views__","__data__","MapCache","ListCache","inherited","isArr","isArg","isArguments","isBuff","isType","skipIndexes","baseTimes","isIndex","baseRandom","shuffleSelf","copyArray","baseClamp","baseAssignValue","objValue","baseEach","copyObject","bitmask","customizer","isDeep","isFlat","isFull","initCloneArray","getTag","isFunc","cloneBuffer","initCloneObject","getSymbolsIn","copySymbolsIn","keysIn","baseAssignIn","getSymbols","copySymbols","baseAssign","Ctor","cloneArrayBuffer","dataView","byteOffset","byteLength","cloneDataView","cloneTypedArray","cloneRegExp","symbol","cloneSymbol","initCloneByTag","Stack","stacked","Fu","subValue","baseClone","getAllKeysIn","getAllKeys","arrayEach","assignValue","wait","arrayIncludes","isCommon","valuesLength","baseUnary","arrayIncludesWith","cacheHas","SetCache","computed","valuesIndex","lodash","templateSettings","escape","evaluate","interpolate","variable","baseLodash","assocIndexOf","getMapData","LARGE_ARRAY_SIZE","createBaseEach","baseForOwn","baseEachRight","baseForOwnRight","isSymbol","isFlattenable","baseFlatten","arrayPush","baseFor","createBaseFor","baseForRight","arrayFilter","castPath","toKey","keysFunc","symbolsFunc","isOwn","unmasked","getRawTag","objectToString","arrays","othLength","othIndex","caches","Infinity","seen","baseGetTag","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","mapToArray","setToArray","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","isPartial","objProps","objLength","objStacked","othStacked","skipCtor","othValue","compared","objCtor","othCtor","equalObjects","baseIsEqualDeep","baseIsEqual","matchData","noCustomizer","srcValue","COMPARE_PARTIAL_FLAG","isMasked","baseMatchesProperty","baseMatches","isPrototype","getMatchData","matchesStrictComparable","baseIsMatch","isKey","isStrictComparable","hasIn","srcIndex","mergeFunc","safeGet","assignMergeValue","isTyped","Ft","dn","Zi","Jt","ln","ih","Qs","toPlainObject","baseMergeDeep","baseMerge","iteratees","orders","baseGet","getIteratee","baseSortBy","baseMap","criteria","objCriteria","othCriteria","ordersLength","compareAscending","compareMultiple","baseSet","baseIndexOfWith","baseUnset","setToString","overRest","arraySample","nested","baseSetData","$r","baseSetToString","Ga","constant","retHighest","low","high","baseSortedIndexBy","valIsNaN","valIsNull","valIsSymbol","valIsUndefined","othIsDefined","othIsNull","othIsReflexive","othIsSymbol","setLow","Ee","Le","baseToString","createSet","seenIndex","updater","isDrop","baseSlice","arrayReduce","baseUniq","baseDifference","assignFunc","valsLength","isArrayLikeObject","stringToPath","castRest","baseRest","arrayBuffer","typedArray","valIsDefined","valIsReflexive","partials","holders","isCurried","argsIndex","argsLength","holdersLength","leftIndex","leftLength","rangeLength","isUncurried","holdersIndex","rightIndex","rightLength","isNew","arrayAggregator","baseAggregator","assigner","isIterateeCall","iterable","stringToArray","trailing","castSlice","words","deburr","thisBinding","findIndexFunc","flatRest","funcs","prereq","thru","getFuncName","funcName","isLaziable","plant","partialsRight","holdersRight","argPos","ary","arity","isAry","isBind","isBindKey","WRAP_CURRY_FLAG","isFlip","createCtor","getHolder","holdersCount","countHolders","composeArgs","composeArgsRight","newHolders","replaceHolders","createRecurry","createHybrid","reorder","toIteratee","baseInverter","baseToNumber","arrayFunc","chars","charsLength","baseRepeat","stringSize","toFinite","baseRange","toNumber","wrapFunc","isCurry","newData","setData","setWrapToString","precision","bl","setToPairs","baseToPairs","srcBitmask","newBitmask","WRAP_BIND_FLAG","mergeData","createCurry","createPartial","createBind","customDefaultsMerge","isPlainObject","arrLength","arrStacked","arrValue","arraySome","baseGetAllKeys","otherFunc","baseIteratee","isKeyable","baseIsNative","au","stubArray","hasFunc","isLength","ArrayBuffer","ctorString","isMaskable","stubFalse","otherArgs","oldArray","shortOut","reference","insertWrapDetails","updateWrapDetails","getWrapDetails","lastCalled","stamp","rand","memoizeCapped","quote","subString","differenceBy","differenceWith","castArrayLikeObject","baseIntersection","intersectionBy","intersectionWith","pull","pullAll","basePullAll","pullAt","baseAt","basePullAt","unionBy","unionWith","unzip","without","baseXor","xorBy","xorWith","zipWith","unzipWith","interceptor","wrapperAt","countBy","createAggregator","createFind","findLast","findLastIndex","arrayEachRight","invokeMap","baseInvoke","keyBy","partition","sortBy","baseOrderBy","createWrap","bindKey","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","timerExpired","invokeFunc","timeSinceLastCall","shouldInvoke","trailingEdge","timeWaiting","remainingWait","isInvoking","leadingEdge","debounced","baseDelay","memoized","Cache","overArgs","transforms","funcsLength","partial","partialRight","rearg","gt","createRelationalOperation","baseGt","gte","baseIsArguments","lt","baseLt","lte","remainder","baseTrim","isBinary","createAssigner","assignIn","assignInWith","assignWith","propsIndex","propsLength","defaultsDeep","mergeWith","hasPath","baseHasIn","invert","createInverter","invertBy","Mi","invoke","arrayLikeKeys","baseKeys","nativeKeysIn","isProto","baseKeysIn","omit","CLONE_DEEP_FLAG","customOmitClone","basePickBy","basePick","toPairs","createToPairs","toPairsIn","baseValues","camelCase","createCompounder","word","capitalize","upperFirst","kebabCase","lowerCase","lowerFirst","createCaseFirst","snakeCase","startCase","upperCase","hasUnicodeWord","unicodeWords","asciiWords","attempt","isError","bindAll","methodNames","flow","createFlow","flowRight","methodOf","baseFunctions","chain","createOver","overEvery","arrayEvery","overSome","basePropertyDeep","rangeRight","createMathOperation","augend","addend","createRound","divide","dividend","divisor","multiply","multiplier","multiplicand","subtract","minuend","subtrahend","castArray","compact","cond","conforms","baseConformsTo","baseConforms","curry","curryRight","dropRight","dropRightWhile","baseWhile","dropWhile","toLength","baseFill","baseFilter","flatMapDeep","flatMapDepth","flattenDeep","flattenDepth","flip","fromPairs","functions","functionsIn","mapKeys","mapValues","matchesProperty","mixin","nthArg","baseNth","omitBy","pickBy","once","propertyOf","pullAllBy","pullAllWith","rest","sampleSize","arraySampleSize","baseSampleSize","setWith","arrayShuffle","baseShuffle","sortedUniq","baseSortedUniq","sortedUniqBy","spread","takeRight","takeRightWhile","throttle","toPath","isArrLike","$i","unary","uniq","uniqBy","uniqWith","unset","baseUpdate","castFunction","updateWith","valuesIn","wrap","zipObject","baseZipObject","zipObjectDeep","entriesIn","extendWith","clamp","cloneDeepWith","cloneWith","conformsTo","defaultTo","endsWith","baseEvery","findKey","baseFindKey","findLastKey","forEachRight","forIn","forInRight","forOwn","forOwnRight","baseHas","inRange","baseInRange","isElement","isMatch","isMatchWith","isNative","isNil","isNull","isSafeInteger","isWeakMap","isWeakSet","strictLastIndexOf","baseExtremum","mean","baseMean","meanBy","stubObject","stubString","stubTrue","nth","noConflict","strLength","createPadding","floating","baseReduce","reduceRight","arrayReduceRight","runInContext","sample","baseSample","baseSome","sortedIndex","baseSortedIndex","sortedIndexBy","sortedIndexOf","sortedLastIndex","sortedLastIndexBy","sortedLastIndexOf","sumBy","settings","customDefaultsAssignIn","isEscaping","isEvaluating","importsKeys","importsValues","reDelimiters","sourceURL","escapeValue","interpolateValue","esTemplateValue","evaluateValue","escapeStringChar","times","toLower","toSafeInteger","toUpper","charsStartIndex","charsEndIndex","trimEnd","trimStart","truncate","omission","newEnd","unescape","each","eachRight","VERSION","takeName","dropName","checkIteratee","isTaker","lodashFunc","retUnwrapped","isLazy","useLazy","isHybrid","isUnwrapped","onlyLazy","chainName","getView","iterLength","takeCount","baseWrapperValue","iterIndex","wrapped","thrownError","_throwIfClosed","observerOrNext","Subscriber","isObserver","isSubscription","isSubscriber","SafeSubscriber","errorContext","_trySubscribe","sink","promiseCtor","getPromiseCtor","Symbol_observable","operations","pipeFromArray","ReplaySubject","_bufferSize","_windowTime","_timestampProvider","dateTimestampProvider","_buffer","_infiniteTimeWindow","_trimBuffer","_innerSubscribe","_checkFinalizedStatuses","adjustedBufferSize","ObjectUnsubscribedError","createErrorClass","currentObservers","AnonymousSubject","observed","EMPTY_SUBSCRIPTION","arrRemove","COMPLETE_NOTIFICATION","createNotification","EMPTY_OBSERVER","handleStoppedNotification","nextNotification","_next","errorNotification","_error","_complete","_bind","ConsumerObserver","partialObserver","handleUnhandledError","captureError","reportUnhandledError","onStoppedNotification","timeoutProvider","UnsubscriptionError","initialTeardown","_parentage","_finalizers","initialFinalizer","execFinalizer","teardown","_hasParent","_addParent","_removeParent","onUnhandledError","useDeprecatedSynchronousErrorHandling","useDeprecatedNextContext","valueTransform","maybeSchedule","remainingFirstValues","hasFirstValue","combineLatestInit","executeSchedule","concatAll","asyncIterator","isInteropObservable","subscribeOn","observeOn","scheduleObservable","scheduleArray","isPromise","schedulePromise","isAsyncIterable","scheduleAsyncIterable","isIterable","Symbol_iterator","scheduleIterable","isReadableStreamLike","readableStreamLikeToAsyncGenerator","scheduleReadableStreamLike","createInvalidObservableTypeError","scheduled","fromInteropObservable","fromArrayLike","fromPromise","fromAsyncIterable","fromIterable","readableStream","fromReadableStreamLike","asyncIterable","asyncIterable_1","asyncIterable_1_1","e_1","__awaiter","__asyncValues","e_1_1","concurrent","popNumber","argsOrArgArray","raceInit","errorOrErrorFactory","errorFactory","dueTime","intervalOrScheduler","intervalDuration","isScheduler","due","isValidDate","onNext","onComplete","onError","onFinalize","shouldUnsubscribe","handledResult","syncUnsub","activeTask","lastTime","targetTime","emitWhenIdle","delayDurationSelector","subscriptionDelay","delayWhen","defaultCompare","previousKey","currentKey","onBeforeNext","innerSubScheduler","additionalFinalizer","checkComplete","outerNext","doInnerSub","innerComplete","innerValue","$","bufferedValue","mergeInternals","hasSeed","emitOnNext","emitBeforeComplete","hasState","scanInternals","resetOnError","resetOnComplete","resetOnRefCountZero","wrapperSource","resetConnection","hasCompleted","hasErrored","cancelReset","resetAndUnsubscribe","dest","onSubscriber","innerSubscriber","innerIndex","outerIndex","notifier","tapObserver","isUnsub","defaultErrorFactory","TimeoutError","schedulerArg","with","_with","timeoutErrorFactory","originalSourceSubscription","timerSubscription","startTimer","otherValues","ready","Action","intervalProvider","setInterval","timeout","clearInterval","_scheduler","_execute","errorValue","Scheduler","schedulerActionCtor","SchedulerAction","async","queueScheduler","QueueScheduler","QueueAction","getSymbolIterator","getKeys","isPOJO","createImpl","ctorFunc","isRoot","errorThrown","parentSubscription","scheduleSubscription","V","__asyncGenerator","getReader","__await","read","releaseLock","liftedSource","callOrApply","fns","backtrace","maxStackSize","callee","$1","caller","StackTrace","targetUrl","customReportingFunction","apiKey","serviceContext","service","version","reportUncaughtExceptions","reportUnhandledPromiseRejections","oldErrorHandler","lineno","colno","oldPromiseRejectionHandler","onunhandledrejection","promiseRejectionEvent","registerHandlers","httpRequest","firstFrameIndex","skipLocalFrames","reportUrl","customFunc","fromError","getFunctionName","getFileName","getLineNumber","getColumnNumber","file","xhr","setRequestHeader","onreadystatechange","readyState","send","sendErrorPayload","booleanProps","numericProps","stringProps","_capitalize","getArgs","setArgs","getEvalOrigin","evalOrigin","setEvalOrigin","getIsEval","fromString","argsStartIndex","argsEndIndex","locationString","_getter","_isNumber","util","_array","ArraySet","fromArray","aArray","aAllowDuplicates","aStr","sStr","toSetString","isDuplicate","aIdx","base64","aValue","digit","encoded","vlq","toVLQSigned","VLQ_BASE","encode","aIndex","aOutParam","continuation","strLen","shifted","fromVLQSigned","intToCharMap","charCode","aLow","aHigh","aNeedle","aHaystack","aCompare","aBias","recursiveSearch","LEAST_UPPER_BOUND","GREATEST_LOWER_BOUND","_sorted","_last","generatedLine","generatedColumn","MappingList","unsortedForEach","aCallback","aThisArg","aMapping","mappingA","mappingB","lineA","lineB","compareByGeneratedPositionsInflated","generatedPositionAfter","pivotIndex","randomIntInRange","swap","pivot","doQuickSort","binarySearch","base64VLQ","quickSort","aSourceMap","sourceMap","IndexedSourceMapConsumer","BasicSourceMapConsumer","getArg","names","sourceRoot","sourcesContent","mappings","_version","_names","_sources","_mappings","originalLine","originalColumn","lastOffset","_sections","offsetLine","offsetColumn","SourceMapConsumer","fromSourceMap","__generatedMappings","_parseMappings","__originalMappings","_charIsMappingSeparator","aSourceRoot","GENERATED_ORDER","ORIGINAL_ORDER","eachMapping","aContext","aOrder","order","_generatedMappings","_originalMappings","mapping","allGeneratedPositionsFor","aArgs","needle","_findMapping","compareByOriginalPositions","lastColumn","smc","_sourceRoot","_generateSourcesContent","_file","generatedMappings","destGeneratedMappings","destOriginalMappings","srcMapping","destMapping","Mapping","previousGeneratedColumn","previousOriginalLine","previousOriginalColumn","previousSource","previousName","cachedSegments","originalMappings","compareByGeneratedPositionsDeflated","aMappings","aLineName","aColumnName","aComparator","computeColumnSpans","nextMapping","lastGeneratedColumn","originalPositionFor","hasContentsOfAllSources","sc","sourceContentFor","aSource","nullOnMissing","urlParse","fileUriAbsPath","scheme","generatedPositionFor","sectionIndex","bias","generatedPosition","sectionMappings","adjustedMapping","_skipValidation","_sourcesContents","SourceMapGenerator","aSourceMapConsumer","generator","newMapping","generated","addMapping","sourceFile","setSourceContent","_validateMapping","aSourceFile","aSourceContent","applySourceMap","aSourceMapPath","newSources","newNames","aGenerated","aOriginal","aName","_serializeMappings","nameIdx","sourceIdx","previousGeneratedLine","aSources","REGEX_NEWLINE","isSourceNode","aLine","aColumn","aChunks","sourceContents","SourceNode","fromStringWithSourceMap","aGeneratedCode","aRelativePath","remainingLines","shiftNextLine","lastGeneratedLine","lastMapping","nextLine","addMappingWithCode","aChunk","prepend","walk","aFn","aSep","replaceRight","aPattern","aReplacement","walkSourceContents","fromSetString","toStringWithSourceMap","sourceMappingActive","lastOriginalSource","lastOriginalLine","lastOriginalColumn","lastOriginalName","sourceContent","aDefaultValue","urlRegexp","dataUrlRegexp","aUrl","auth","port","aParsedUrl","aPath","up","urlGenerate","aRoot","aPathUrl","aRootUrl","joined","supportsNullProto","aStr1","aStr2","isProtoString","onlyCompareOriginal","onlyCompareGenerated","strcmp","SourceMap","responseText","b64str","atob","stackframe","StackTraceGPS","sourceCache","sourceMapConsumerCache","ajax","_xdr","_atob","isDataUrl","offline","encodedSource","xhrPromise","_getSourceMapConsumer","sourceMappingURL","defaultSourceRoot","sourceMapConsumerPromise","sourceMapSource","_parseJson","pinpoint","getMappedLocation","mappedStackFrame","findFunctionName","resolveMappedStackFrame","_ensureStackFrameIsLegit","guessedFunctionName","syntaxes","maxLines","commentPos","_findFunctionName","_ensureSupportedEnvironment","lastSourceMappingUrl","matchSourceMappingUrl","sourceMappingUrlRegExp","_findSourceMappingURL","sourceMapConsumer","mappedSource","_extractLocationInfoFromSourceMapSource","ErrorStackParser","StackGenerator","_generateError","stackframes","_isShapedLikeParsableError","generateArtificially","getSync","_merge","_filtered","gps","sf","resolveOriginal","stackFrames","instrument","errback","__stacktraceOriginalFn","instrumented","deinstrument","errorMsg","requestOptions","reportPayload","__spreadArray","performance","mark","measure","__Zone_symbol_prefix","__symbol__","_properties","_zoneDelegate","assertZonePatched","ZoneAwarePromise","__load_patch","getZoneWith","runTask","_transitionTo","runCount","isPeriodic","cancelFn","invokeTask","_updateTaskCount","scheduleTask","_zoneDelegates","P","scheduleMacroTask","scheduleEventTask","cancelTask","onHasTask","hasTask","onScheduleTask","onInvokeTask","onCancelTask","_taskCounts","microTask","macroTask","eventTask","_parentDelegate","_forkZS","onFork","_forkDlgt","_forkCurrZone","_interceptZS","onIntercept","_interceptDlgt","_interceptCurrZone","_invokeZS","onInvoke","_invokeDlgt","_invokeCurrZone","_handleErrorZS","onHandleError","_handleErrorDlgt","_handleErrorCurrZone","_scheduleTaskZS","_scheduleTaskDlgt","_scheduleTaskCurrZone","_invokeTaskZS","_invokeTaskDlgt","_invokeTaskCurrZone","_cancelTaskZS","_cancelTaskDlgt","_cancelTaskCurrZone","_hasTaskZS","_hasTaskDlgt","_hasTaskDlgtOwner","_hasTaskCurrZone","scheduleFn","useG","cancelScheduleRequest","handleId","microtaskDrainDone","currentZoneFrame","R","showUncaughtError","patchEventTarget","patchOnProperties","patchMethod","bindArguments","patchThen","patchMacroTask","patchEventPrototype","isIEOrEdge","getGlobalObjects","ObjectDefineProperty","ObjectGetOwnPropertyDescriptor","ObjectCreate","ArraySlice","patchClass","wrapWithCurrentZone","filterProperties","attachOriginToPatched","_redefineProperty","patchCallbacks","nativeScheduleMicroTask","WorkerGlobalScope","filename","cbIdx","rejection","throwOriginal","currentTask","__creationTrace__","AggregateError","race","allWithCallback","allSettled","thenCallback","errorCallback","species","finally","L","W","U","false","true","rm","rmAll","isRemoved","originalDelegate","vh","chkDup","rt","eventNameToString","isExisting","allRemoved","transferEventName","X","taskData","prependListener","Event","ignoreProperties","ce","ie","isFrozen","Q","globalSources","zoneSymbolEventNames","eventNames","isMix","TRUE_STR","FALSE_STR","ZONE_SYMBOL_PREFIX","ADD_EVENT_LISTENER_STR","REMOVE_EVENT_LISTENER_STR","le","ae","re","wtf","EventTarget","__Zone_disable_IE_check","__Zone_enable_cross_context_check","MSPointerCancel","MSPointerDown","MSPointerEnter","MSPointerHover","MSPointerLeave","MSPointerMove","MSPointerOut","MSPointerOver","MSPointerUp","se","onclick","WebSocket","ue","fe","unref","pe","he","XMLHttpRequestEventTarget","__Zone_ignore_on_properties","ne","customElements","aborted","DONE","geolocation","PromiseRejectionEvent","vt","Cr","Yt","Vi","je","ze","In","Ie","_DOM","adapter","DomAdapter","PlatformLocation","relativePosition","BrowserPlatformLocation","useBrowserPlatformLocation","_init","_history","history","getBaseHrefFromDOM","getDOM","onPopState","onHashChange","hostname","supportsState","createBrowserPlatformLocation","slashes","pathEndIdx","provideLocationStrategy","APP_BASE_HREF","_platformLocation","_removeListenerFns","_baseHref","prepareExternalUrl","internal","joinWithSlash","includeHash","normalizeQueryParams","externalUrl","locationStrategy","_urlChangeListeners","_urlChangeSubscription","_locationStrategy","browserBaseHref","_stripIndexHtml","baseHref","_stripBaseHref","_notifyUrlChangeListeners","onUrlChange","fnIndex","onThrow","onReturn","createLocation","Format","Standalone","Narrow","Abbreviated","Wide","Short","FormatWidth","Medium","Long","Full","NumberSymbol","Decimal","Group","List","PercentSign","PlusSign","MinusSign","Exponential","SuperscriptingExponent","PerMille","TimeSeparator","CurrencyDecimal","CurrencyGroup","formStyle","ɵfindLocaleData","getLastDefinedValue","ɵLocaleDataIndex","ISO8601_DATE_REGEX","NAMED_FORMATS","DATE_FORMATS_SPLIT","ZoneWidth","ShortGMT","Extended","DateType","FullYear","Month","Hours","Minutes","Seconds","FractionalSeconds","Day","TranslationType","DayPeriods","Days","Months","Eras","timezone","createDate","parsedNb","tzHour","tzMin","dateSetter","timeSetter","setUTCHours","setHours","isoStringToDate","namedFormat","dateTimezoneOffset","timezoneToOffset","reverseValue","setMinutes","getMinutes","addDateMinutes","convertTimezoneToLocal","dateFormatter","DATE_FORMATS","dateStrGetter","dateGetter","weekNumberingYearGetter","weekGetter","timeZoneGetter","getDateFormatter","localeId","getLocaleId","formatValue","getLocaleDateFormat","getLocaleTimeFormat","shortTime","getNamedFormat","shortDate","getLocaleDateTimeFormat","mediumTime","mediumDate","longTime","longDate","fullTime","fullDate","opt_values","minusSign","negWrap","neg","strNum","getHours","getSeconds","getMilliseconds","getDatePart","strMs","formatFractionalSeconds","localeMinus","getLocaleNumberSymbol","currentHours","currentMinutes","rules","checkFullData","rule","extractTime","getLocaleExtraDayPeriodRules","dayPeriods","getLocaleExtraDayPeriods","afterFrom","beforeTo","amPm","getLocaleDayPeriods","getLocaleEraNames","getDateTranslation","datetime","monthBased","nbDaysBefore1stDayOfMonth","thisThurs","getThursdayThisWeek","firstThurs","firstDayOfYear","THURSDAY","getFirstThursdayOfYear","requestedTimezoneOffset","cookieStr","eqIndex","cookieName","cookieValue","NgClass","_iterableDiffers","_keyValueDiffers","_ngEl","_iterableDiffer","_keyValueDiffer","_initialClasses","_rawClass","klass","_removeClasses","_applyClasses","ngClass","ɵisListLikeIterable","iterableChanges","_applyIterableChanges","keyValueChanges","_applyKeyValueChanges","forEachAddedItem","_toggleClass","forEachChangedItem","forEachRemovedItem","ɵstringify","rawClassVal","NgForOfContext","ngForOf","NgForOf","_template","_ngForOf","_ngForOfDirty","_differ","ngForTrackBy","ngForTemplate","_applyChanges","applyViewChange","ilen","NgIf","_context","NgIfContext","_thenTemplateRef","_elseTemplateRef","_thenViewRef","_elseViewRef","ngIf","_updateView","ngIfThen","assertTemplate","ngIfElse","SwitchView","_templateRef","_created","enforceState","created","NgSwitch","_defaultUsed","_caseCount","_lastCaseCheckIndex","_lastCasesMatched","ngSwitch","_ngSwitch","_updateDefaultCases","_addCase","_addDefault","_defaultViews","_matchCase","useDefault","NgSwitchCase","_view","ngSwitchCase","NgSwitchDefault","NgStyle","_ngStyle","ngStyle","_setStyle","nameAndUnit","NgTemplateOutlet","_viewRef","ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector","SubscribableStrategy","createSubscription","updateLatestValue","PromiseStrategy","_promiseStrategy","_subscribableStrategy","AsyncPipe","_latestValue","_obj","_strategy","_dispose","_selectStrategy","_updateLatestValue","ɵisSubscribable","invalidPipeArgumentError","ɵpipe","UpperCasePipe","DATE_PIPE_DEFAULT_TIMEZONE","DatePipe","defaultTimezone","KeyValuePipe","keyValues","compareFn","defaultComparator","differChanges","compareFnChanged","forEachItem","makeKeyValuePair","keyValueA","keyValueB","aString","bString","PLATFORM_BROWSER_ID","platformId","BrowserViewportScroller","supportsScrolling","pageXOffset","pageYOffset","elSelected","documentResult","getElementById","getElementsByName","createTreeWalker","treeWalker","NodeFilter","SHOW_ELEMENT","currentNode","nextNode","findAnchorFromDocument","scrollToElement","scrollRestoration","supportScrollRestoration","scrollRestorationDescriptor","getScrollRestorationProperty","HttpHandler","HttpBackend","normalizedNames","lazyUpdate","Ae","lazyInit","maybeSetNormalizedName","op","lcName","copyFrom","applyUpdate","toDelete","existing","Sn","HttpUrlEncodingCodec","standardEncoding","STANDARD_ENCODING_REGEX","STANDARD_ENCODING_REPLACEMENTS","updates","cloneFrom","rawParams","codec","param","eqIdx","paramParser","valueToString","De","appendAll","eKey","He","HttpContext","third","fourth","Pe","urlWithParams","qIdx","serializeBody","isBlob","isFormData","URLSearchParams","isUrlSearchParams","detectContentTypeHeader","setHeaders","setParams","HttpEventType","Sent","UploadProgress","ResponseHeader","DownloadProgress","Response","User","HttpResponseBase","defaultStatus","defaultStatusText","HttpHeaderResponse","HttpClient","res$","jsonp","callbackParam","addBody","put","HttpInterceptorHandler","NoopInterceptor","XSSI_PREFIX","HttpXhrBackend","xhrFactory","detectedType","reqBody","headerResponse","partialFromXhr","getAllResponseHeaders","responseURL","getResponseHeader","getResponseUrl","onLoad","originalBody","sentHeaders","onDownProgress","progressEvent","loaded","lengthComputable","partialText","onUpProgress","progress","upload","abort","XSRF_COOKIE_NAME","XSRF_HEADER_NAME","HttpXsrfTokenExtractor","HttpXsrfCookieExtractor","lastCookieString","lastToken","parseCount","cookieString","HttpXsrfInterceptor","tokenService","headerName","lcUrl","HttpInterceptingHandler","backend","interceptors","HttpClientXsrfModule","withOptions","XhrFactory$1","objWithPropertyToExtract","getClosureSafeProperty","overriddenName","newLineIndex","__forward_ref__","forwardRefFn","isForwardRef","RuntimeError","formatRuntimeError","injectorName","msg","expected","getOwnDefinition","NG_PROV_DEF","NG_INJECTABLE_DEF","NG_INJ_DEF","NG_INJECTOR_DEF","ngInjectorDef","Default","Host","_injectImplementation","impl","injectableDef","getInjectableDef","throwProviderNotFoundError","ChangeDetectionStrategy","OnPush","ViewEncapsulation$1","Emulated","ShadowDom","_global","EMPTY_OBJ","EMPTY_ARRAY","NG_COMP_DEF","NG_DIR_DEF","NG_PIPE_DEF","NG_MOD_DEF","NG_FACTORY_DEF","NG_ELEMENT_ID","__NG_ELEMENT_ID__","componentDefCount","componentDefinition","noSideEffects","declaredInputs","providersResolver","vars","consts","hostAttrs","exportAs","onPush","directiveDefs","pipeDefs","dependencies","getStandaloneInjector","setInput","schemas","tView","feature","invertObject","extractDirectiveDef","nonNull","getPipeDef$1","getComponentDef","getDirectiveDef","autoRegisterModuleById","declarations","transitiveCompileScopes","ngModuleDef","getNgModuleDef","secondary","newLookup","minifiedKey","publicName","declaredName","ɵɵdefineDirective","ɵɵdefineComponent","pipeDef","throwNotFound","tNode","SimpleChange","firstChange","NgOnChangesFeatureImpl","definition","ngOnChangesSetInput","rememberChangeHistoryAndInvokeOnChangesHook","simpleChangesStore","getSimpleChangesStore","privateName","SIMPLE_CHANGES_STORE","setSimpleChangesStore","previousChange","ɵɵNgOnChangesFeature","ngInherit","lView","unwrapRNode","nodeIndex","slotValue","isLView","lContainer","viewOrContainer","instructionState","lFrame","createLFrame","bindingsEnabled","viewToRestore","contextLView","currentTNode","getCurrentTNodePlaceholderOk","isParent","bindingRootIndex","bindingStartIndex","bindingIndex","isInI18nBlock","inI18n","currentDirectiveIndex","setCurrentDirectiveIndex","tData","declTNode","parentTNode","parentLView","getDeclarationTNode","allocLFrame","newView","newLFrame","currentLFrame","childLFrame","elementDepthCount","currentNamespace","oldLFrame","leaveDI","leaveViewLight","getTNode","namespaceHTMLInternal","directiveStart","directiveEnd","lifecycleHooks","directiveDef","contentHooks","contentCheckHooks","viewHooks","viewCheckHooks","destroyHooks","hooks","callHooks","initPhase","currentView","currentNodeIndex","nodeIndexLimit","lastNodeIndexFound","isInitHook","callHook","hook","directive","indexWithintInitPhase","NodeInjectorFactory","isViewProvider","injectImplementation","resolving","canSeeViewProviders","injectImpl","native","namespaceURI","attrName","attrVal","isAnimationProp","marker","dst","src","srcMarker","mergeHostAttribute","markerInsertPosition","dstValue","parentLocation","startView","viewOffset","getParentInjectorViewOffset","parentView","includeViewProviders","nextNgElementId","NOT_FOUND","existingInjectorIndex","getInjectorIndex","firstCreatePass","injectorIndex","insertBloom","blueprint","parentLoc","getParentInjectorLocation","hasParentInjector","parentIndex","getParentInjectorIndex","getParentInjectorView","footer","declarationViewOffset","lViewCursor","getTNodeFromLView","bloomHash","BLOOM_SIZE","bloomAdd","previousInjectImplementation","setInjectImplementation","injectRootLimpMode","notFoundValueOrThrow","embeddedInjectorValue","currentLView","nodeInjectorValue","lookupTokenUsingNodeInjector","embeddedViewInjector","embeddedViewInjectorValue","lookupTokenUsingEmbeddedInjector","lookupTokenUsingModuleInjector","tokenId","createNodeInjector","bloomHashBitOrFactory","enterDI","previousTView","hostTElementNode","shouldSearchParent","bloomHasToken","searchTokensOnInjector","currentTView","injectableIdx","locateDirectiveOrProvider","isComponentHost","getNodeInjectable","canAccessViewProviders","isHostSpecialCase","nodeProviderIndexes","providerIndexes","tInjectables","injectablesStart","directivesStart","cptViewProvidersCount","endIndex","providerTokenOrDef","dirDef","isComponentDef","isFactory","depPath","throwCyclicDependencyError","renderStringify","stringifyForError","previousIncludeViewProviders","setIncludeViewProviders","directiveIndex","wrappedOnChanges","preOrderHooks","preOrderCheckHooks","registerPreOrderHooks","injectorView","isFirstHostTNode","NodeInjector","_tNode","_lView","getOrCreateInjectable","getCurrentTNode","getLView","ownConstructor","ownFactory","getFactoryOf","objectPrototype","resolveForwardRef","getFactoryDef","tViewType","attrNameToInject","attrsLength","isNameOnlyAttributeMarker","injectAttributeImpl","PARAMETERS","parentClass","metaCtor","makeMetadataCtor","ParamDecoratorFactory","annotationInstance","ParamDecorator","annotation","cls","unusedKey","ngMetadataName","annotationCls","_desc","deepForEach","keyValueArray","keyValueArrayIndexOf","arrayInsert2","middle","_arrayIndexOfSorted","THROW_IF_NOT_FOUND","DI_DECORATOR_FLAG","NG_TEMP_TOKEN_PATH","NEW_LINE","SOURCE","_currentInjector","former","getInjectImplementation","injectInjectorOnly","skipSelf","flag","getInjectFlag","decorator","Inject","attachInjectFlag","makeParamDecorator","policy$1","createScript","createScriptURL","getPolicy$1","SafeValueImpl","changingThisBreaksApplicationSecurity","SafeHtmlImpl","getTypeName","SafeStyleImpl","SafeScriptImpl","SafeUrlImpl","SafeResourceUrlImpl","actualType","getSanitizationBypassType","trustedHtml","trustedStyle","trustedScript","trustedUrl","trustedResourceUrl","defaultDoc","inertDocumentHelper","InertDocumentHelper","DOMParser","parseFromString","isDOMParserAvailable","DOMParserHelper","getInertBodyElement","inertDocument","inertHtml","inertBodyElement","templateEl","inertBody","documentMode","stripCustomNsAttrs","elAttrs","attrib","childNode","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","URI_ATTRS","SRCSET_ATTRS","VALID_ATTRS","SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS","SanitizingHtmlSerializer","sanitizedSomething","buf","sanitizeChildren","traverseContent","startElement","TEXT_NODE","endElement","checkClobberedElement","elAttr","sanitizeSrcset","encodeEntities","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","outerHTML","SURROGATE_PAIR_REGEXP","NON_ALPHANUMERIC_REGEXP","inertBodyHelper","unsafeHtmlInput","getInertBodyHelper","unsafeHtml","mXSSAttempts","parsedHtml","sanitizer","getTemplateContent","isTemplateElement","HTML","STYLE","SCRIPT","RESOURCE_URL","unsafeUrl","getSanitizer","allowSanitizationBypassAndThrow","unwrapSafeValue","ENVIRONMENT_INITIALIZER","INJECTOR","INJECTOR_DEF_TYPES","NullInjector","ɵproviders","internalImportProvidersFrom","checkForStandaloneCmp","providersOut","dedup","injectorTypesWithProviders","internalSource","walkProviderTree","processInjectorTypesWithProviders","typesWithProviders","provider","parents","defType","injDef","getInjectorDef","cmpDef","dep","importTypesWithProviders","imported","defProviders","USE_VALUE$1","INJECTOR_SCOPE","NOT_YET","CIRCULAR","NULL_INJECTOR$1","EnvironmentInjector","R3Injector","scopes","records","_ngOnDestroyHooks","_onDestroyHooks","forEachSingleProvider","processProvider","makeRecord","injectorDefTypes","assertNotDestroyed","previousInjector","setCurrentInjector","couldBeInjectableType","injectableDefInScope","injectableDefOrInjectorDefFactory","hydrate","getNullInjector","injectorErrorName","tokenPath","formatError","NG_TOKEN_PATH","catchInjectorError","resolveInjectorInitializers","initializers","isTypeProvider","isValueProvider","providerToFactory","providerToRecord","multiRecord","injectArgs","hasOnDestroy","paramLength","newArray","inheritedInjectableDef","getInheritedInjectableDef","getUndecoratedInjectableFactory","ngModuleType","unwrappedProvider","isFactoryProvider","isExistingProvider","classRef","hasDeps","xg","ComponentFactory$1","_NullComponentFactoryResolver","ERROR_COMPONENT","noComponentFactoryError","ComponentFactoryResolver$1","NULL","createElementRef","getNativeByTNode","injectElementRef","Renderer2","nodeAtIndex","getComponentLViewByIndex","injectRenderer2","Sanitizer","Version","major","minor","NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","ERROR_ORIGINAL_ERROR","_console","originalError","_findOriginalError","getOriginalError","COMMENT_DISALLOWED","COMMENT_DELIMITER","TRACKED_LVIEWS","MONKEY_PATCH_KEY_NAME","registerLView","getLViewById","readPatchedData","defaultScheduler","Important","DashCase","_icuContainerIterate","tIcuContainerNode","isLContainer","getNearestLContainer","lNodeToHandle","beforeNode","isComponent","rNode","nativeAppendChild","nativeInsertBefore","nativeRemoveNode","parentRElement","applyToElementOrContainer","applyView","applyContainer","escapeCommentText","declarationContainer","movedViews","declarationViewIndex","insertionLContainer","updateTransplantedViewCount","removeIndex","indexInContainer","viewToDetach","declarationLContainer","detachMovedView","removedLView","removeFromArray","removeViewFromContainer","lQueries","rootView","lViewOrLContainer","cleanUpView","firstView","destroyViewTree","toCall","callContext","executeOnDestroys","tCleanup","cleanup","lCleanup","lastLCleanupIndex","idxOrTargetGetter","useCaptureOrSubIdx","instanceCleanupFn","processCleanups","unregisterLView","getClosestRElement","_getInsertInFrontOfRNodeWithI18n","_processI18nInsertBefore","getInsertInFrontOfRNodeWithNoI18n","getInsertInFrontOfRNodeWithI18n","processI18nInsertBefore","childRNode","childTNode","parentRNode","getParentRElement","getInsertInFrontOfRNode","nativeAppendOrInsertBefore","tNodeType","getBeforeNodeForView","elIcuContainerChild","getFirstNativeNode","rNodeOrLContainer","projectionNodes","getProjectionNodes","getLViewParent","componentView","projection","viewIndexInContainer","nextViewIndex","firstTNodeOfView","nativeParent","nativeParentNode","nativeRemoveChild","isProjection","rawSlotValue","attachPatchData","applyNodes","nextRNode","icuContainerIterate","applyProjectionRecursive","projectionNext","tProjectionNode","componentLView","nodeToProjectOrRNodes","componentNode","classToSearch","startingIndex","foundIndex","NG_TEMPLATE_SELECTOR","cssClassToMatch","isProjectionMode","classIndexOf","currentSelector","nodeAttrs","nameOnlyMarkerIdx","getNameOnlyMarkerIndex","skipToNextSelector","hasTagAndTypeMatch","isPositive","selectorAttrValue","isCssClassMatching","attrIndexInNode","findAttrIndexInNode","isInlineTemplate","nodeAttrValue","compareAgainstClassName","bindingsMode","maybeAttrName","matchTemplateAttribute","isNodeMatchingSelector","selectorListLoop","currentSelectorInList","isNegativeMode","currentChunk","valueOrMarker","attrValue","maybeWrapInNotSelector","NO_CHANGE","selectIndexInternal","getTView","getSelectedIndex","checkNoChangesMode","executeCheckHooks","executeInitAndCheckHooks","setSelectedIndex","additionalProviders","createInjectorWithoutInjectorInstances","importProvidersFrom","createInjector","tStylingRange","queryStartIdx","directiveDefIdx","setCurrentQueryIndex","tHostNode","rendererFactory","resetPreOrderHookFlags","getUniqueLViewId","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","hostLView","renderComponent","renderChildComponents","incompleteFirstPass","leaveView","setBindingIndex","hooksInitPhaseCompleted","incrementInitPhaseFlags","getFirstLContainer","getNextLContainer","movedLView","markTransplantedViewsForRefresh","embeddedLView","embeddedTView","viewAttachedToChangeDetector","refreshView","refreshEmbeddedViews","hostBindingOpCodes","opCode","directiveIdx","bindingRootIndx","hostBindingFn","setBindingRootForHostBindings","processHostBindingOpCodes","refreshComponent","refreshChildComponents","firstUpdatePass","creationModeIsActive","isCreationMode","renderView","prevSelectedIndex","isUpdatePhase","isContentQueryHost","getBindingsEnabled","getOrCreateNodeInjectorForNode","addComponentLogic","setInputsFromAttrs","instantiateAllDirectives","elementIndex","getCurrentDirectiveIndex","dirIndex","invokeHostBindingsInCreationMode","invokeDirectivesHostBindings","viewData","localRefExtractor","localIndex","createTView","pipes","constsOrFactory","initialViewLength","createViewBlueprint","expandoStartIndex","directiveRegistry","pipeRegistry","cleanupFn","getOrCreateLViewCleanup","getOrCreateTViewCleanup","inputAliasMap","propStore","internalName","tViewData","tNodeAttrs","inputsFromAttrs","inputsStore","outputsStore","directiveInputs","generateInitialInputs","generatePropertyAliases","nativeOnly","dataValue","inputData","setInputsForProperty","markDirtyIfOnPush","mapPropName","viewIndex","childComponentLView","localRefs","hasDirectives","isNodeMatchingSelectorList","diPublicInInjector","Ln","markAsComponentHost","findDirectiveDefMatches","exportsMap","initTNodeFlags","preOrderHooksFound","preOrderCheckHooksFound","allocExpando","mergeHostAttrs","configureViewWithDirective","saveNameToExportMap","lifeCycleHooks","initializeInputAndOutputAliases","cacheMatchingLocalNames","directiveVarsIdx","elementIndx","lastSelectedElementIdx","hostTNode","numberOfDirectives","directiveFactory","nodeInjectorFactory","ɵɵdirectiveInject","registerHostBindingOpCodes","getOrCreateTComponentView","addToViewTree","createLView","initialInputData","inputsToStore","hostNative","componentHostIdx","refreshContainsDirtyView","componentTView","syncViewWithBlueprint","isRootView","rootContext","readPatchedLView","renderComponentOrTemplate","tickRootContext","viewQueryFn","CLEAN_PROMISE","currentDef","unwrapLView","getNativeByIndex","updateTextNode","writeToHost","concatStringsWithSpace","lNode","lViewInAContainer","lViewFirstChildTNode","collectNativeNodes","nodesInSlot","ViewRef$1","_cdRefInjectingView","_attachedToViewContainer","viewRefs","destroyLView","storeCleanupWithContext","markViewDirty","reattach","detectChangesInternal","checkNoChanges","attachToViewContainerRef","detachFromAppRef","renderDetachView","attachToAppRef","RootViewRef","detectChangesInRootView","componentDef","ComponentFactory","nonMinified","templateName","ChainedInjector","componentType","selectorList","stringifyCSSSelector","stringifyCSSSelectorList","isBoundToModule","toRefArray","projectableNodes","rootSelectorOrNode","realEnvironmentInjector","rootViewInjector","hostRenderer","elementName","hostRNode","elementOrSelector","locateHostElement","createElementNode","getNamespace","rootFlags","playerHandler","createRootContext","rootTView","rootLView","tElementNode","getOrCreateTNode","computeStaticStyling","setUpAttributes","writeDirectClass","writeDirectStyle","viewRenderer","createRootComponentView","extractAttrsAndClassesFromSelector","nodesforSlot","hostFeatures","rootTNode","instantiateRootComponent","createRootComponent","LifecycleHooksFeature","ComponentRef","ComponentRef$1","_rootLView","registerPostOrderHooks","superType","getSuperType","shouldInheritFields","inheritanceChain","superDef","writeableDef","maybeUnwrapEmpty","superHostBindings","inheritHostBindings","superViewQuery","superContentQueries","inheritViewQuery","inheritContentQueries","fillProperties","defData","ɵɵInheritDefinitionFeature","mergeHostAttrsAcrossInheritance","prevViewQuery","prevContentQueries","prevHostBindings","_symbolIterator","isJsObject","exp1","exp2","different","bindingUpdated","nextBindingIndex","setElementAttribute","elementAttributeInternal","getSelectedTNode","ɵɵattribute","v0","attrsIndex","localRefsIndex","tViewConsts","getConstant","resolveDirectives","templateFirstCreatePass","comment","createLContainer","isDirectiveHost","createDirectivesInstances","saveResolvedLocalsInData","load","getContextLView","elementPropertyInternal","ɵɵproperty","isClassBased","getNamespace$1","elementStart","elementStartFirstCreatePass","getElementDepthCount","increaseElementDepthCount","executeContentQueries","ɵɵelementStart","setCurrentTNodeAsNotParent","decreaseElementDepthCount","elementEnd","hasClassInput","setDirectiveInputsWhichShadowsStyling","hasStyleInput","ɵɵelementEnd","ɵɵelement","elementContainerStartFirstCreatePass","ɵɵelementContainerStart","ɵɵelementContainerEnd","ɵɵelementContainer","isObservable","isSubscribable","listenerFn","useCapture","eventTargetResolver","listenerInternal","ɵɵlistener","loadComponentRenderer","getCurrentDirectiveDef","ɵɵsyntheticHostListener","isTNodeDirectiveHost","processOutputs","lCleanupIndex","existingListener","tNodeIdx","cleanupEventName","listenerIdxInLCleanup","findExistingListener","__ngLastListenerFn__","__ngNextListenerFn__","wrapListener","profiler","wrapWithPreventDefault","executeListenerWithErrorHandling","nextListenerFn","wrapListenerIn_markDirtyAndPreventDefault","nestingLevel","walkUpViews","nextContextImpl","projectionSlots","wildcardNgContentIndex","ngProjectAsAttrVal","ngProjectAsAttrIdx","getProjectAsAttrValue","isSelectorInSelectorList","projectionHeads","tails","componentChild","slotIndex","matchingProjectionSlotIndex","selectorIndex","applyProjection","ɵɵpropertyInterpolate1","ɵɵpropertyInterpolate","interpolatedValue","interpolation1","tStylingKey","isPrevDir","isClassBinding","tStylingAtIndex","getTStylingRangePrev","getTStylingRangeNext","foundDuplicate","tStyleRangeAtCursor","isStylingMatch","setTStylingRangeNextDuplicate","setTStylingRangePrevDuplicate","tStylingKeyCursor","parserState","textEnd","keyEnd","valueEnd","consumeClassToken","consumeWhitespace","consumeStyleKey","consumeSeparator","ch1","ch2","ch3","lastChIndex","consumeQuotedText","consumeStyleValue","quoteCharCode","checkStylingProperty","ɵɵstyleProp","ɵɵclassProp","checkStylingMap","styleKeyValueArraySet","styleStringParser","resetParserState","parseStyleNext","parseStyle","getLastParsedKey","getLastParsedValue","keyValueArraySet","classStringParser","parseClassNameNext","parseClassName","incrementBindingIndex","stylingFirstUpdatePass","updateStyling","normalizeSuffix","stringParser","hasStylingInputShadow","isInHostBindings","staticPrefix","oldKeyValueArray","newKeyValueArray","oldIndex","oldKey","newKey","setKey","updateStylingMap","styleKeyValueArray","unwrappedValue","toStylingKeyValueArray","isHostBindings","stylingKey","hostDirectiveDef","residual","collectStylingFromTAttrs","collectStylingFromDirectives","templateStylingKey","bindings","getTemplateHeadTStylingKey","setTemplateHeadTStylingKey","collectResidual","wrapInStaticStylingKey","tStylingKeyWithStatic","isHostBinding","tBindings","tmplHead","tmplTail","isKeyDuplicateOfStatic","staticKeyValueArray","toTStylingRange","setTStylingRangeNext","setTStylingRangePrev","markDuplicates","markDuplicateOfResidualStyling","insertTStylingBinding","currentDirective","desiredMarker","currentMarker","tRange","isStylingValuePresent","getTStylingRangeNextDuplicate","findStylingValue","getTStylingRangePrevDuplicate","applyStyling","isPrevDirection","rawKey","containsStatics","isStylingMap","valueAtLViewIndex","keyValueArrayGet","textNative","ɵɵtextInterpolate1","ɵɵtextInterpolate","interpolated","textBindingInternal","bindingUpdated2","getBindingIndex","interpolation2","ɵɵtextInterpolate2","ɵɵhostProperty","ɵɵsyntheticHostProperty","localeEn","LOCALE_DATA","normalizedLocale","normalizeLocale","getLocaleData","parentLocale","LocaleDataIndex","PluralCase","ng","common","locales","LocaleId","DayPeriodsFormat","DayPeriodsStandalone","DaysFormat","DaysStandalone","MonthsFormat","MonthsStandalone","FirstDayOfWeek","WeekendRange","DateFormat","TimeFormat","NumberSymbols","NumberFormats","CurrencyCode","CurrencySymbol","CurrencyName","Currencies","ExtraData","pluralMapping","DEFAULT_LOCALE_ID","ELEMENT_MARKER","ICU_MARKER","I18nCreateOpCode","SHIFT","APPEND_EAGERLY","COMMENT","LOCALE_ID$1","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","refIdx","getRefFromIcuCreateOpCode","getTIcu","caseIndex","getCurrentICUCaseIndex","applyMutableOpCodes","anchorIdx","commentValue","commentNodeIndex","createCommentNode","elementNodeIndex","updateOpCodes","bindingsStartIndex","checkBit","skipCodes","sanitizeFn","tNodeOrTagName","rText","applyIcuSwitchCase","applyIcuUpdateCase","activeCaseIndex","applyUpdateOpCodes","icuExpression","bindingValue","cases","resolvedCase","plural","getLocalePluralCase","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","existingTNodes","createOpCodes","isICU","i18nNodeIdx","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","prevPos","braceStack","braces","parseICUBlock","caseName","unsafeCaseHtml","getDocument","inertRootNode","walkIcuTree","sharedUpdateOpCodes","addCreateNodeAndAppend","lowerAttrName","$d","addCreateAttribute","addRemoveNode","COMMENT_NODE","isNestedIcu","icuStart","addRemoveNestedIcu","appendToParentIdx","createAtIdx","icuCreateOpCode","messageIndex","subTemplateIndex","parentTNodeIndex","existingTNodeStack","isRootTemplateMessage","removeInnerTemplateTranslation","getTranslationForTemplate","msgParts","replaceNgsp","i18nStartFirstCreatePassProcessTextNode","icuContainerTNode","isClosing","createTNodePlaceholder","i18nStartFirstCreatePass","tI18n","isComment","appendNow","applyCreateOpCodes","setInI18nBlock","ɵɵi18nStart","ɵɵi18nEnd","setMaskBit","hasChange","ɵɵi18nExp","applyI18n","lInjectablesBlueprint","resolveProvider","providerFactory","beginIndex","existingFactoryIndex","registerDestroyHooksIfSupported","existingProvidersFactoryIndex","existingViewProvidersFactoryIndex","doesProvidersFactoryExist","doesViewProvidersFactoryExist","factoryFn","componentProviders","multiFactoryAdd","multiFactory","multiViewProvidersFactoryResolver","multiProvidersFactoryResolver","contextIndex","indexInFactory","providerIsTypeProvider","providerIsClassProvider","isClassProvider","existingCallbacksIndex","isComponentProvider","lData","multiResolve","factories","componentCount","multiProviders","viewProviders","processProvidersFn","NgModuleRef$1","NgModuleFactory$1","_bootstrapComponents","destroyCbs","maybeUnwrapFn","_r3Injector","moduleType","EnvironmentNgModuleRefAdapter","debugName","slotOffset","pureFn","getBindingRoot","updateBinding","getBinding","pureFunction1Internal","bindingRoot","getPureFunctionReturnValue","pureFunction2Internal","exp3","pureFunction3Internal","exp4","bindingUpdated4","pureFunction4Internal","exps","pureFunctionVInternal","returnValueIndex","lastReturnValue","bindingUpdated3","pipeName","getPipeDef","pipeFactory","pipeInstance","isPure","v3","EventEmitter_","isAsync","__isAsync","nextFn","errorFn","completeFn","_wrapInTimeout","_results","_emitDistinctChangesOnly","_changesDetected","_changes","symbolIterator","resultsTree","identityAccessor","newResultFlat","arrayEquals","setDirty","injectTemplateRef","ViewEngineTemplateRef","R3TemplateRef","_declarationLView","_declarationTContainer","declarationViewLQueries","createTemplateRef","injectViewContainerRef","createContainerRef","VE_ViewContainerRef","R3ViewContainerRef","_lContainer","_hostTNode","_hostLView","getViewRefs","indexOrOptions","componentFactoryOrType","isComponentFactory","ngModuleRef","contextInjector","viewAttachedToContainer","prevIdx","prevLContainer","prevVCRef","adjustedIdx","containerLength","addToArray","declaredComponentLView","insertedLContainer","trackMovedView","insertView","parentNativeNode","addViewToContainer","getOrCreateViewRefs","viewRefsArr","detachedView","wasDetached","commentNode","nativeNextSibling","LQuery_","queryList","LQueries_","tQueries","noOfInheritedQueries","viewLQueries","tQuery","getByIndex","indexInDeclarationView","dirtyQueriesWithMatches","getTQuery","TQueryMetadata_","TQueries_","queriesForTemplateRef","childQueryIndex","tqueryClone","track","tquery","TQuery_","crossesNgTemplate","_appliesToNextNode","_declarationNodeIndex","isApplyingToNode","matchTNode","addMatch","declarationNodeIdx","matchTNodeWithReadOption","getIdxOfMatchingSelector","nodeMatchIdx","directiveOrProviderIdx","matchIdx","matchingIdx","createResultByTNodeType","createSpecialToken","queryIndex","lQuery","tQueryMatches","matchedNodeIdx","createResultForNode","lViewResults","materializeViewResults","collectQueryResults","embeddedLViews","getCurrentQueryIndex","unwrapElementRef","createTQuery","createLQuery","tViewContentQueries","saveContentQueryAndDirectiveIndex","loadQueryInternal","appInits","runInitializers","asyncInitPromises","initResult","observableAsPromise","_randomChar","Console","getGlobalLocale","DEFAULT_CURRENCY_CODE","ModuleWithComponentFactories","ngModuleFactory","componentFactories","compileModuleSync","compileModuleAndAllComponentsSync","declaration","compileModuleAndAllComponentsAsync","clearCache","clearCacheFor","getModuleId","enableLongStackTrace","shouldCoalesceEventChangeDetection","shouldCoalesceRunChangeDetection","hasPendingMacrotasks","hasPendingMicrotasks","onUnstable","_nesting","_outer","_inner","AsyncStackTaggingZoneSpec","TaskTrackingZoneSpec","longStackTraceZoneSpec","lastRequestAnimationFrameId","nativeRequestAnimationFrame","nativeCancelAnimationFrame","unpatchedRequestAnimationFrame","unpatchedCancelAnimationFrame","getNativeRequestAnimationFrame","delayChangeDetectionForEventsDelegate","isCheckStableRunning","fakeTopEventTask","updateMicroTaskStatus","checkStable","delayChangeDetectionForEvents","isAngularZone","applyThis","applyArgs","onLeave","hasTaskState","_hasPendingMicrotasks","forkInnerZoneWithAngularBehavior","isInAngularZone","EMPTY_PAYLOAD","NoopNgZone","TESTABILITY","TESTABILITY_GETTER","_testabilityGetter","testabilityGetter","_pendingCount","_isZoneStable","_didWork","_callbacks","taskTrackingZone","getter","setTestabilityGetter","_watchAngularEvents","assertNotInAngularZone","_runCallbacksIfReady","increasePendingRequestCount","decreasePendingRequestCount","timeoutId","doneCb","getPendingTasks","updateCb","macroTasks","creationLocation","addCallback","getPendingRequestCount","registerApplication","unregisterApplication","findProviders","using","exactMatch","_applications","unregisterAllApplications","_platformInjector","ALLOW_MULTIPLE_PLATFORMS","PLATFORM_DESTROY_LISTENERS","parentPlatformFactory","extraProviders","getPlatform","platformProviders","PlatformRef","inits","runPlatformInitializers","createPlatform","createPlatformInjector","requiredToken","assertPlatform","_modules","_destroyListeners","bootstrapModuleFactory","moduleFactory","ngZoneToUse","getNgZone","ngZoneEventCoalescing","ngZoneRunCoalescing","getNgZoneOptions","ngZoneInjector","moduleRef","exceptionHandler","_callAndReportToErrorHandler","initStatus","setLocaleId","_moduleDoBootstrap","compilerOptions","optionsReducer","compileNgModuleFactory","ngDoBootstrap","destroyListeners","objs","_exceptionHandler","_bootstrapListeners","_views","_runningTick","_stable","_onMicrotaskEmptySubscription","tick","isCurrentlyStable","stableSub","unstableSub","assertInAngularZone","merge$1","componentOrFactory","isStandalone","cf","compRef","_loadComponent","NG_DEV_MODE","warnIfDestroyed","_devMode","_runModeLocked","injectChangeDetectorRef","isPipe","createViewRef","DefaultIterableDifferFactory","isListLikeIterable","trackByFn","DefaultIterableDiffer","trackByIdentity","_linkedRecords","_unlinkedRecords","_previousItHead","_itHead","_itTail","_additionsHead","_additionsTail","_movesHead","_movesTail","_removalsHead","_removalsTail","_identityChangesHead","_identityChangesTail","nextIt","nextRemove","addRemoveOffset","moveOffsets","getPreviousIndex","adjPreviousIndex","_nextRemoved","localMovePreviousIndex","localCurrentIndex","forEachPreviousItem","_nextPrevious","_nextAdded","forEachMovedItem","_nextMoved","_nextIdentityChange","_reset","itemTrackBy","mayBeDirty","trackById","_verifyReinsertion","_addIdentityChange","_mismatch","iterateListLike","_truncate","previousRecord","_prev","_remove","_reinsertAfter","_moveAfter","_addAfter","IterableChangeRecord_","reinsertRecord","_addToMoves","nextRecord","_addToRemovals","_unlink","prevRecord","_prevRemoved","_insertAfter","_DuplicateMap","toIndex","_prevDup","_nextDup","_DuplicateItemRecordList","_head","_tail","atOrAfterIndex","duplicates","recordList","moveOffset","DefaultKeyValueDifferFactory","DefaultKeyValueDiffer","_records","_mapHead","_appendAfter","_previousMapHead","_changesHead","_changesTail","_nextChanged","_forEach","_maybeAddToChanges","_getOrCreateRecordForKey","_insertBeforeOrAppend","KeyValueChangeRecord_","_addToAdditions","_addToChanges","IterableDiffers","copied","defaultIterableDiffersFactory","KeyValueDiffers","defaultKeyValueDiffersFactory","kv","ɵɵdefineNgModule","ɵɵdefineInjector","elementInjector","StoreDevtoolsConfig","STORE_DEVTOOLS_CONFIG","INITIAL_OPTIONS","DEFAULT_NAME","optionsInput","DEFAULT_OPTIONS","noMonitor","actionSanitizer","stateSanitizer","autoPause","lock","persist","export","import","jump","PERFORM_ACTION","REFRESH","RESET","ROLLBACK","COMMIT","SWEEP","TOGGLE_ACTION","SET_ACTIONS_ACTIVE","JUMP_TO_STATE","JUMP_TO_ACTION","IMPORT_STATE","LOCK_CHANGES","PAUSE_RECORDING","PerformAction","Refresh","Reset","Rollback","Commit","Sweep","ToggleAction","SetActionsActive","JumpToState","JumpToAction","actionId","ImportState","nextLiftedState","LockChanges","PauseRecording","liftedState","computedStates","currentStateIndex","actionsById","nextActionId","sanitizedActions","actionIdx","sanitizeAction","computedState","sanitizeState","stateIdx","actionsSafelist","actionsBlocklist","safelist","blocklist","filteredStagedActionIds","filteredActionsById","filteredComputedStates","stagedActionIds","liftedAction","isActionFiltered","blockedlist","predicateMatch","safelistMatch","blocklistMatch","INIT_ACTION","INIT","RECOMPUTE","RECOMPUTE_ACTION","reducer","nextError","minInvalidatedStateIndex","committedState","skippedActionIds","isPaused","nextComputedStates","lastIncludedActionId","previousEntry","previousState","previousError","shouldSkip","computeNextEntry","initialCommittedState","monitorReducer","monitorState","liftAction","initialLiftedState","idsToDelete","commitChanges","actionIds","lastState","commitExcessActions","recomputeStates","UPDATE","DevtoolsDispatcher","ActionsSubject","ExtensionActionTypes","START","DISPATCH","STOP","ACTION","REDUX_DEVTOOLS_EXTENSION","DevtoolsExtension","devtoolsExtension","dispatcher","createActionStreams","unliftState","shouldFilterActions","sanitizedState","sanitizedAction","sendToReduxDevtools","extensionConnection","sanitizedLiftedState","sanitizeActions","sanitizeStates","getExtensionConfig","createChangesObservable","changes$","start$","stop$","liftedActions$","unwrapAction","actionsUntilStop$","liftedUntilStop$","eval","extensionOptions","StoreDevtools","reducers$","extension","scannedActions","initialState","liftedInitialState","liftInitialState","liftReducer","liftReducerWith","liftedAction$","liftedReducer$","liftedStateSubject","liftedStateSubscription","reducedLiftedState","filterLiftedState","extensionStartSubscription","refresh","liftedState$","state$","stateSubscription","performAction","rollback","sweep","toggleAction","jumpToAction","jumpToState","importState","lockChanges","pauseRecording","INITIAL_STATE","IS_EXTENSION_OR_MONITOR_PRESENT","extensionKey","devtools","createIsExtensionOrMonitorPresent","createReduxDevtoolsExtension","createConfig","StateObservable","createStateObservable","ReducerManagerDispatcher","REGISTERED_ACTION_TYPES","defineType","_as","_p","creator","ACTIONS_SUBJECT_PROVIDERS","_ROOT_STORE_GUARD","_INITIAL_STATE","REDUCER_FACTORY","_REDUCER_FACTORY","INITIAL_REDUCERS","_INITIAL_REDUCERS","STORE_FEATURES","_STORE_REDUCERS","_FEATURE_REDUCERS","_FEATURE_CONFIGS","_STORE_FEATURES","_FEATURE_REDUCERS_TOKEN","FEATURE_REDUCERS","USER_PROVIDED_META_REDUCERS","META_REDUCERS","_RESOLVED_META_REDUCERS","USER_RUNTIME_CHECKS","_USER_RUNTIME_CHECKS","_ACTION_TYPE_UNIQUENESS_CHECK","reducers","reducerKeys","finalReducers","finalReducerKeys","hasChanged","previousStateForKey","nextStateForKey","composed","reducerFactory","metaReducers","ReducerObservable","ReducerManager","currentReducers","addFeature","addFeatures","reducerDict","createFeatureReducerFactory","createReducerFactory","addReducers","removeFeature","removeFeatures","removeReducers","addReducer","updateReducers","removeReducer","featureKey","featureKeys","keyToRemove","Ue","REDUCER_MANAGER_PROVIDERS","SCANNED_ACTIONS_SUBJECT_PROVIDERS","State","reducer$","stateAndAction$","actionsOnQueue$","reduceState","stateActionPair","STATE_PROVIDERS","Store","actionsObserver","reducerManager","pathOrMapFn","STORE_PROVIDERS","propsOrPath","pathSlices","currentProp","pluck","RUNTIME_CHECK_URL","lastArguments","projectionFn","isArgumentsEqual","isEqualCheck","isResultEqual","overrideResult","lastResult","isArgumentsChanged","newResult","setResult","clearResult","stateFn","defaultStateFn","projector","memoizedSelectors","release","memoizedProjector","memoizedState","defaultMemoize","createSelectorFactory","targetIsFunction","propValue","targetPrototype","getUnserializable","unserializable","unserializablePath","strictActionWithinNgZone","strictActionTypeUniqueness","throwIfUnserializable","serializationCheckMetaReducer","ignoreNgrxAction","act","immutabilityCheckMetaReducer","inNgZoneAssertMetaReducer","_runtimeChecksFactory","createActiveRuntimeChecks","createImmutabilityCheckMetaReducer","createSerializationCheckMetaReducer","createInNgZoneCheckMetaReducer","_actionTypeUniquenessCheck","registrations","StoreRootModule","scannedActions$","actionCheck","StoreFeatureModule","featureReducers","feats","featureReducerCollection","_initialStateFactory","_createStoreReducers","_concatMetaReducers","combineReducers","provideRuntimeChecks","checkForActionTypeUniqueness","featureNameOrSlice","_createFeatureStore","_createFeatureReducers","configs","featureStores","feat","reducerCollection","userProvidedMetaReducers","ons","existingReducer","DateTimeProvider","SystemDateTimeProvider","new","LoginOptions","disableNonceCheck","preventClearHashAfterLogin","OAuthLogger","OAuthStorage","MemoryStorage","getItem","ReceivedTokens","OAuthEvent","OAuthSuccessEvent","OAuthInfoEvent","OAuthErrorEvent","json","postLogoutRedirectUri","redirectUriAsPostLogoutRedirectUriFallback","loginUrl","rngUrl","oidc","requestAccessToken","logoutUrl","clearHashAfterLogin","tokenEndpoint","revocationEndpoint","customTokenParameters","userinfoEndpoint","silentRefreshRedirectUri","silentRefreshMessagePrefix","silentRefreshShowIFrame","siletRefreshTimeout","silentRefreshTimeout","dummyClientSecret","requireHttps","strictDiscoveryDocumentValidation","jwks","customQueryParams","silentRefreshIFrameName","timeoutFactor","sessionChecksEnabled","sessionCheckIntervall","sessionCheckIFrameUrl","sessionCheckIFrameName","disableAtHashCheck","skipSubjectCheck","useIdTokenHintForSilentRefresh","skipIssuerCheck","nonceStateSeparator","useHttpBasicAuth","waitForTokenInMsec","disablePKCE","preserveRequestedRoute","openUri","uri","WebHttpUrlEncodingCodec","ValidationHandler","AbstractValidationHandler","validateAtHash","hashAlg","inferHashAlgorithm","idTokenHeader","tokenHash","calcHash","accessToken","atHash","base64UrlEncode","claimsAtHash","idTokenClaims","at_hash","jwtHeader","alg","UrlHelperService","getHashFragmentParams","customHashFragment","questionMarkPosition","parseQueryString","queryString","separatorIndex","escapedKey","escapedValue","ERROR","WINDOW","JS_SHA256_NO_WINDOW","WEB_WORKER","NODE_JS","JS_SHA256_NO_NODE_JS","versions","COMMON_JS","JS_SHA256_NO_COMMON_JS","AMD","amd","ARRAY_BUFFER","JS_SHA256_NO_ARRAY_BUFFER","HEX_CHARS","EXTRA","OUTPUT_TYPES","JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW","isView","createOutputMethod","outputType","is224","Sha256","createMethod","nodeWrap","crypto","algorithm","nodeMethod","createHash","createHmacOutputMethod","HmacSha256","createHmacMethod","sharedMemory","h0","h1","h2","h3","h5","h6","h7","bytes","hBytes","finalized","hashed","oKeyPad","iKeyPad","notString","lastByteIndex","ab","da","bc","hex","setUint32","innerHash","sha224","HashHandler","DefaultHashHandler","valueToHash","encodeUTF8","fsha256","decodeUTF8","toHashString2","byteArray","toHashString","OAuthService","storage","tokenValidationHandler","urlHelper","logger","dateTimeService","discoveryDocumentLoaded","discoveryDocumentLoadedSubject","grantTypesSupported","inImplicitFlow","saveNoncesInLocalStorage","debug","discoveryDocumentLoaded$","setStorage","sessionStorage","checkLocalStorageAccessable","ua","setupRefreshTimer","setupSessionCheck","configChanged","restartSessionChecksIfStillLoggedIn","hasValidIdToken","initSessionCheck","restartRefreshTimerIfStillLoggedIn","setupExpirationTimers","listenTo","noPrompt","shouldRunSilentRefresh","clearAutomaticRefreshTimer","automaticRefreshSubscription","refreshInternal","useSilentRefresh","silentRefresh","refreshToken","loadDiscoveryDocumentAndTryLogin","tryLogin","loadDiscoveryDocumentAndLogin","initLoginFlow","validateUrlFromDiscoveryDocument","httpsCheck","validateUrlForHttps","issuerCheck","validateUrlAgainstIssuer","assertUrlNotNullAndCorrectProtocol","clearAccessTokenTimer","clearIdTokenTimer","tokenReceivedSubscription","setupAccessTokenTimer","setupIdTokenTimer","expiration","getAccessTokenExpiration","storedAt","getAccessTokenStoredAt","calcTimeout","accessTokenTimeoutSubscription","getIdTokenExpiration","getIdTokenStoredAt","idTokenTimeoutSubscription","stopAutomaticRefresh","_storage","fullUrl","validateDiscoveryDocument","authorization_endpoint","end_session_endpoint","grant_types_supported","token_endpoint","userinfo_endpoint","jwksUri","jwks_uri","check_session_iframe","revocation_endpoint","loadJwks","discoveryDocument","fetchTokenUsingPasswordFlowAndLoadUserProfile","fetchTokenUsingPasswordFlow","existingClaims","fetchTokenUsingGrant","username","grantType","btoa","tokenResponse","storeAccessTokenResponse","access_token","refresh_token","expires_in","fallbackAccessTokenExpirationTimeInSec","extractRecognizedCustomParameters","id_token","processIdToken","storeIdToken","removeSilentRefreshEventListener","silentRefreshPostMessageEventListener","setupSilentRefreshEventListener","processMessageEventMessage","customRedirectUri","claims","id_token_hint","getIdToken","existingIframe","silentRefreshSubject","iframe","createLoginUrl","success","initImplicitFlowInPopup","initLoginFlowInPopup","checkForPopupClosedTimer","windowRef","calculatePopupFeatures","checkForPopupClosedInterval","storageListener","screenLeft","outerWidth","screenTop","outerHeight","expectedPrefix","prefixedMessage","canPerformSessionCheck","getSessionState","setupSessionCheckEventListener","removeSessionCheckEventListener","sessionCheckEventListener","handleSessionUnchanged","handleSessionChange","handleSessionError","stopSessionCheckTimer","waitForSilentRefreshAfterSessionChange","startSessionCheckTimer","sessionCheckTimer","checkSession","sessionState","contentWindow","postMessage","loginHint","that","nonce","createAndSaveNonce","seperationChar","challenge","verifier","createChallangeVerifierPairForPKCE","initImplicitFlowInternal","additionalState","addParams","initImplicitFlow","resetImplicitFlow","callOnTokenReceivedIfExists","onTokenReceived","tokenParams","idClaims","idToken","expiresIn","grantedScopes","customParameters","expiresInMilliSeconds","expiresAt","tryLoginImplicitFlow","querySource","getCodePartsFromUrl","session_state","nonceInState","parseState","handleLoginError","saveRequestedRoute","disableOAuth2StateCheck","validateNonce","storeSessionState","getTokenFromCode","restoreRequestedRoute","requestedRoute","PKCEVerifier","fetchAndProcessToken","validationHandler","clearLocationHash","savedNonce","idTokenClaimsJson","idTokenExpiresAt","onLoginError","getClockSkewInMsec","defaultSkewMsc","clockSkewInSec","skipNonceCheck","tokenParts","headerJson","b64DecodeUnicode","padBase64","claimsJson","aud","iat","iss","issuedAtMSec","expiresAtMSec","clockSkewInMSec","validationParams","loadKeys","checkSignature","idTokenHeaderJson","checkAtHash","atHashValid","getGrantedScopes","base64data","getRefreshToken","getCustomTokenResponseProperty","requestedProperty","authorizationHeader","noRedirectToLogoutUrl","customParam","postLogoutUrl","createNonce","silentRefreshFrame","sessionCheckFrame","unreserved","msCrypto","getRandomValues","validateSignature","initCodeFlowInternal","foundParameters","recognizedParameter","revokeTokenAndLogout","ignoreCorsIssues","revokeEndpoint","revokeAccessToken","revokeRefreshToken","revokationParams","OAuthModuleConfig","OAuthResourceServerConfig","OAuthResourceServerErrorHandler","OAuthNoopResourceServerErrorHandler","DefaultOAuthInterceptor","oAuthService","moduleConfig","checkUrl","customUrlValidation","NullValidationHandler","validationHandlerClass","createDefaultLogger","createDefaultStorage","JwksValidationHandler","AUTH_CONFIG"],"sourceRoot":"webpack:///","sources":["./node_modules/@angular/platform-browser/fesm2020/platform-browser.mjs","./node_modules/rxjs/dist/esm/internal/Notification.js","./node_modules/rxjs/dist/esm/internal/operators/groupBy.js","./node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js","./node_modules/@ngrx/effects/fesm2020/ngrx-effects.mjs","./node_modules/rxjs/dist/esm/internal/operators/materialize.js","./node_modules/rxjs/dist/esm/internal/operators/dematerialize.js","./node_modules/rxjs/dist/esm/internal/observable/defer.js","./node_modules/rxjs/dist/esm/internal/operators/refCount.js","./node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js","./node_modules/rxjs/dist/esm/internal/operators/startWith.js","./node_modules/rxjs/dist/esm/internal/operators/takeLast.js","./node_modules/rxjs/dist/esm/internal/operators/last.js","./node_modules/rxjs/dist/esm/internal/operators/takeWhile.js","./node_modules/rxjs/dist/esm/internal/operators/finalize.js","./node_modules/@angular/router/fesm2020/router.mjs","./node_modules/@ngrx/router-store/fesm2020/ngrx-router-store.mjs","./node_modules/@angular/cdk/fesm2020/platform.mjs","./node_modules/@angular/cdk/fesm2020/keycodes.mjs","./node_modules/@angular/cdk/fesm2020/coercion.mjs","./node_modules/@angular/cdk/fesm2020/observers.mjs","./node_modules/@angular/cdk/fesm2020/layout.mjs","./node_modules/@angular/cdk/fesm2020/a11y.mjs","./node_modules/@angular/cdk/fesm2020/bidi.mjs","./node_modules/@angular/cdk/fesm2020/cdk.mjs","./node_modules/@angular/material/fesm2020/core.mjs","./node_modules/@angular/material/fesm2020/button.mjs","./node_modules/rxjs/dist/esm/internal/observable/fromEvent.js","./node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js","./node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js","./node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js","./node_modules/rxjs/dist/esm/internal/util/Immediate.js","./node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js","./node_modules/rxjs/dist/esm/internal/scheduler/asap.js","./node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js","./node_modules/rxjs/dist/esm/internal/operators/auditTime.js","./node_modules/rxjs/dist/esm/internal/operators/audit.js","./node_modules/@angular/cdk/fesm2020/scrolling.mjs","./node_modules/@angular/cdk/fesm2020/portal.mjs","./node_modules/@angular/cdk/fesm2020/overlay.mjs","./node_modules/@angular/cdk/fesm2020/dialog.mjs","./node_modules/@angular/animations/fesm2020/animations.mjs","./node_modules/@angular/material/fesm2020/dialog.mjs","./node_modules/@angular/cdk/fesm2020/clipboard.mjs","./node_modules/@angular/material/fesm2020/menu.mjs","./node_modules/@angular/material/fesm2020/tooltip.mjs","./node_modules/rxjs/dist/esm/internal/observable/never.js","./node_modules/rxjs/dist/esm/internal/observable/forkJoin.js","./node_modules/@angular/forms/fesm2020/forms.mjs","./node_modules/@popperjs/core/lib/utils/math.js","./node_modules/@ng-bootstrap/ng-bootstrap/fesm2020/ng-bootstrap.mjs","./node_modules/luxon/src/errors.js","./node_modules/luxon/src/impl/formats.js","./node_modules/luxon/src/impl/util.js","./node_modules/luxon/src/impl/english.js","./node_modules/luxon/src/impl/formatter.js","./node_modules/luxon/src/impl/invalid.js","./node_modules/luxon/src/zone.js","./node_modules/luxon/src/zones/systemZone.js","./node_modules/luxon/src/zones/IANAZone.js","./node_modules/luxon/src/zones/fixedOffsetZone.js","./node_modules/luxon/src/zones/invalidZone.js","./node_modules/luxon/src/impl/zoneUtil.js","./node_modules/luxon/src/settings.js","./node_modules/luxon/src/impl/locale.js","./node_modules/luxon/src/impl/regexParser.js","./node_modules/luxon/src/duration.js","./node_modules/luxon/src/interval.js","./node_modules/luxon/src/info.js","./node_modules/luxon/src/impl/diff.js","./node_modules/luxon/src/impl/digits.js","./node_modules/luxon/src/impl/tokenParser.js","./node_modules/luxon/src/impl/conversions.js","./node_modules/luxon/src/datetime.js","./node_modules/@angular/material/fesm2020/snack-bar.mjs","./node_modules/@angular/material/fesm2020/form-field.mjs","./node_modules/@angular/cdk/fesm2020/text-field.mjs","./node_modules/@angular/material/fesm2020/input.mjs","./node_modules/@angular/material/fesm2020/icon.mjs","./node_modules/imask/esm/_rollupPluginBabelHelpers-b054ecd2.js","./node_modules/imask/esm/core/change-details.js","./node_modules/imask/esm/core/utils.js","./node_modules/imask/esm/core/action-details.js","./node_modules/imask/esm/core/continuous-tail-details.js","./node_modules/imask/esm/core/holder.js","./node_modules/imask/esm/masked/base.js","./node_modules/imask/esm/masked/factory.js","./node_modules/imask/esm/masked/pattern/input-definition.js","./node_modules/imask/esm/masked/pattern/fixed-definition.js","./node_modules/imask/esm/masked/pattern/chunk-tail-details.js","./node_modules/imask/esm/masked/pattern/cursor.js","./node_modules/imask/esm/masked/regexp.js","./node_modules/imask/esm/masked/pattern.js","./node_modules/imask/esm/masked/range.js","./node_modules/imask/esm/masked/date.js","./node_modules/imask/esm/controls/mask-element.js","./node_modules/imask/esm/controls/html-mask-element.js","./node_modules/imask/esm/controls/html-contenteditable-mask-element.js","./node_modules/imask/esm/controls/input.js","./node_modules/imask/esm/masked/enum.js","./node_modules/imask/esm/masked/number.js","./node_modules/imask/esm/masked/function.js","./node_modules/imask/esm/masked/dynamic.js","./node_modules/imask/esm/masked/pipe.js","./node_modules/imask/esm/index.js","./node_modules/angular-imask/__ivy_ngcc__/fesm2015/angular-imask.js","./node_modules/@angular/cdk/fesm2020/collections.mjs","./node_modules/@angular/material/fesm2020/select.mjs","./node_modules/@angular/material/fesm2020/button-toggle.mjs","./node_modules/@angular/material/fesm2020/slide-toggle.mjs","./node_modules/@angular/material/fesm2020/checkbox.mjs","./node_modules/rxjs/dist/esm/internal/util/isObservable.js","./node_modules/@angular/cdk/fesm2020/table.mjs","./node_modules/@angular/material/fesm2020/table.mjs","./node_modules/@angular/material/fesm2020/sort.mjs","./projects/shared-lib/src/lib/stop-propagation/stop-propagation.directive.ts","./projects/shared-lib/src/lib/action-button/action-button.component.html","./projects/shared-lib/src/lib/action-button/action-button.component.ts","./projects/shared-lib/src/lib/stop-propagation/stop-propagation.module.ts","./projects/shared-lib/src/lib/action-button/action-button.module.ts","./projects/shared-lib/src/lib/busy-indicator/busy-indicator.component.html","./projects/shared-lib/src/lib/busy-indicator/busy-indicator.component.ts","./projects/shared-lib/src/lib/busy-indicator/busy-indicator.module.ts","./projects/shared-lib/src/lib/copy-to-clipboard-button/copy-to-clipboard-button.component.ts","./projects/shared-lib/src/lib/copy-to-clipboard-button/copy-to-clipboard-button.component.html","./projects/shared-lib/src/lib/confirmation-modal/confirmation-modal.component.html","./projects/shared-lib/src/lib/confirmation-modal/confirmation-modal.component.ts","./projects/shared-lib/src/lib/copy-to-clipboard-button/copy-to-clipboard-button.module.ts","./projects/shared-lib/src/lib/confirmation-modal/confirmation-modal.module.ts","./projects/shared-lib/src/lib/dashboard-common/dashboard.service.ts","./projects/shared-lib/src/lib/misc/permission-utils.ts","./projects/shared-lib/src/lib/tooltip/vitu-tooltip.component.ts","./projects/shared-lib/src/lib/tooltip/vitu-tooltip.component.html","./projects/shared-lib/src/lib/text/text-common/text-common.component.html","./projects/shared-lib/src/lib/text/text-common/text-common.component.ts","./projects/shared-lib/src/lib/dashboard-common/dashboard-sidebar-menu-item/dashboard-sidebar-menu-item.component.html","./projects/shared-lib/src/lib/dashboard-common/dashboard-sidebar-menu-item/dashboard-sidebar-menu-item.component.ts","./projects/shared-lib/src/lib/dashboard-common/dashboard-sidebar/dashboard-sidebar.component.html","./projects/shared-lib/src/lib/dashboard-common/dashboard-sidebar/dashboard-sidebar.component.ts","./projects/shared-lib/src/lib/misc/urls.ts","./projects/shared-lib/src/lib/misc/auth.service.ts","./projects/shared-lib/src/lib/misc/vitu-http-errors.ts","./projects/shared-lib/src/lib/misc/vitu-common-errors.ts","./projects/shared-lib/src/lib/misc/pager.ts","./projects/shared-lib/src/lib/misc/env-model.ts","./projects/shared-lib/src/lib/dashboard-common/dashboard-submenu/dashboard-submenu.component.html","./projects/shared-lib/src/lib/dashboard-common/dashboard-submenu/dashboard-submenu.component.ts","./projects/shared-lib/src/lib/multi-stage-expansion-panel/multi-stage-expansion-panel.component.ts","./projects/shared-lib/src/lib/multi-stage-expansion-panel/multi-stage-expansion-panel.component.html","./projects/shared-lib/src/lib/dashboard-common/dashboard-common.component.html","./projects/shared-lib/src/lib/dashboard-common/dashboard-common.component.ts","./projects/shared-lib/src/lib/multi-stage-expansion-panel/multi-stage-expansion-panel.module.ts","./projects/shared-lib/src/lib/tooltip/vitu-tooltip.module.ts","./projects/shared-lib/src/lib/text/text-common/text-common.module.ts","./projects/shared-lib/src/lib/text/text-table-column/text-table-column.component.ts","./projects/shared-lib/src/lib/text/text-table-column/text-table-column.component.html","./projects/shared-lib/src/lib/text/text-table-column/text-table-column.module.ts","./projects/shared-lib/src/lib/text/text-field/text-field.component.ts","./projects/shared-lib/src/lib/text/text-field/text-field.component.html","./projects/shared-lib/src/lib/text/text-field/text-field.module.ts","./projects/shared-lib/src/lib/text/image-field/image-field.component.html","./projects/shared-lib/src/lib/text/image-field/image-field.component.ts","./projects/shared-lib/src/lib/text/image-field/image-field.module.ts","./projects/shared-lib/src/lib/text/digital-wallet-image-field/digital-wallet-image-field.component.html","./projects/shared-lib/src/lib/text/digital-wallet-image-field/digital-wallet-image-field.component.ts","./projects/shared-lib/src/lib/text/digital-wallet-image-field/digital-wallet-image-field.module.ts","./projects/shared-lib/src/lib/text/digital-wallet-image-table-column/digital-wallet-image-table-column.component.html","./projects/shared-lib/src/lib/text/digital-wallet-image-table-column/digital-wallet-image-table-column.component.ts","./projects/shared-lib/src/lib/text/digital-wallet-image-table-column/digital-wallet-image-table-column.module.ts","./projects/shared-lib/src/lib/text/text.module.ts","./projects/shared-lib/src/lib/dashboard-common/dashboard-sidebar-menu-item/dashboard-sidebar-menu-item.module.ts","./projects/shared-lib/src/lib/dashboard-common/dashboard-sidebar/dashboard-sidebar.module.ts","./projects/shared-lib/src/lib/dashboard-common/dashboard-submenu/dashboard-submenu.module.ts","./projects/shared-lib/src/lib/dashboard-common/dashboard-common.module.ts","./projects/shared-lib/src/lib/date-time/date-time-format-utils.ts","./projects/shared-lib/src/lib/date-time/ngb-custom-date-adapter.ts","./projects/shared-lib/src/lib/date-time/ngb-custom-datepicker-config.ts","./projects/shared-lib/src/lib/date-time/ngb-date-custom-parser-formatter.ts","./projects/shared-lib/src/lib/date-time/date-inputs/date-range-picker/date-range-modal/date-label.ts","./projects/shared-lib/src/lib/date-time/local-time-point.ts","./projects/shared-lib/src/lib/date-time/date-time-label/date-time-label.component.html","./projects/shared-lib/src/lib/date-time/date-time-label/date-time-label.component.ts","./projects/shared-lib/src/lib/date-time/date-time-label/date-time-label-utils.ts","./projects/shared-lib/src/lib/date-time/date-inputs/date-range-picker/date-range-modal/date-range-modal-content.component.html","./projects/shared-lib/src/lib/date-time/date-inputs/date-range-picker/date-range-modal/date-range-modal-content.component.ts","./projects/shared-lib/src/lib/date-time/date-inputs/date-range-picker/date-range-modal/date-range-modal.service.ts","./projects/shared-lib/src/lib/date-time/date-inputs/date-range-picker/date-range-picker.directive.ts","./projects/shared-lib/src/lib/date-time/date-inputs/date-inputs.module.ts","./projects/shared-lib/src/lib/date-time/date-time.module.ts","./projects/shared-lib/src/lib/error-handler/logger.service.ts","./projects/shared-lib/src/lib/error-handler/global-error-handler.service.ts","./projects/shared-lib/src/lib/toast/vitu-toast-tone.ts","./projects/shared-lib/src/lib/toast/snackbar-content.component/snackbar-content.component.html","./projects/shared-lib/src/lib/toast/snackbar-content.component/snackbar-content.component.ts","./projects/shared-lib/src/lib/toast/vitu-toast.service.ts","./projects/shared-lib/src/lib/global-spinner/global-spinner.service.ts","./projects/shared-lib/src/lib/error-handler/error-ui.service.ts","./projects/shared-lib/src/lib/error-handler/blob-error-response-interceptor.ts","./projects/shared-lib/src/lib/error-handler/response-interceptor.ts","./projects/shared-lib/src/lib/error-handler/error-handler.module.ts","./projects/shared-lib/src/lib/form/vitu-form/vitu-form-submit-button/vitu-form-submit-button.component.ts","./projects/shared-lib/src/lib/form/vitu-form/vitu-form-submit-button/vitu-form-submit-button.component.html","./projects/shared-lib/src/lib/form/vitu-form/vitu-form-abort-button/vitu-form-abort-button.component.ts","./projects/shared-lib/src/lib/form/vitu-form/vitu-form-abort-button/vitu-form-abort-button.component.html","./projects/shared-lib/src/lib/form/vitu-form/vitu-form-buttons/vitu-form-buttons.component.ts","./projects/shared-lib/src/lib/form/vitu-form/vitu-form-buttons/vitu-form-buttons.component.html","./projects/shared-lib/src/lib/form/vitu-form/vitu-form.directive.ts","./projects/shared-lib/src/lib/form/vitu-form/vitu-form.module.ts","./projects/shared-lib/src/lib/form/vitu-form/validators-vitu-custom.ts","./projects/shared-lib/src/lib/form/vitu-form/validators-config.ts","./projects/shared-lib/src/lib/form/vitu-form-field/disable-control.directive.ts","./projects/shared-lib/src/lib/form/vitu-form-field/two-digit-decimal-number-directive.ts","./projects/shared-lib/src/lib/form/vitu-form-field/vitu-form-field-date/vitu-form-field-date.component.html","./projects/shared-lib/src/lib/form/vitu-form-field/vitu-form-field-date/vitu-form-field-date.component.ts","./projects/shared-lib/src/lib/form/vitu-form-field/vitu-form-field-input/vitu-form-field-input.component.html","./projects/shared-lib/src/lib/form/vitu-form-field/vitu-form-field-input/vitu-form-field-input.component.ts","./projects/shared-lib/src/lib/vitu-input/vitu-input.component.ts","./projects/shared-lib/src/lib/vitu-input/vitu-input.component.html","./projects/shared-lib/src/lib/space-between-caps/space-between-caps.pipe.ts","./projects/shared-lib/src/lib/form/vitu-form-field/vitu-form-field-select/vitu-form-field-select.component.html","./projects/shared-lib/src/lib/form/vitu-form-field/vitu-form-field-select/vitu-form-field-select.component.ts","./projects/shared-lib/src/lib/space-between-caps/space-between-caps.module.ts","./projects/shared-lib/src/lib/vitu-input/vitu-input.module.ts","./projects/shared-lib/src/lib/vitu-slide-toggle/vitu-slide-toggle.component.ts","./projects/shared-lib/src/lib/vitu-slide-toggle/vitu-slide-toggle.component.html","./projects/shared-lib/src/lib/form/vitu-form-field/vitu-form-field-switch/vitu-form-field-switch.component.html","./projects/shared-lib/src/lib/form/vitu-form-field/vitu-form-field-switch/vitu-form-field-switch.component.ts","./projects/shared-lib/src/lib/vitu-slide-toggle/vitu-slide-toggle.module.ts","./projects/shared-lib/src/lib/form/vitu-form-field/vitu-form-field-switch/vitu-form-field-switch.module.ts","./projects/shared-lib/src/lib/form/vitu-form-field/vitu-form-field.module.ts","./projects/shared-lib/src/lib/global-spinner/global-spinner.component.html","./projects/shared-lib/src/lib/global-spinner/global-spinner.component.ts","./projects/shared-lib/src/lib/global-spinner/global-spinner.module.ts","./projects/shared-lib/src/lib/modal-error-message/modal-error-message.component.ts","./projects/shared-lib/src/lib/modal-error-message/modal-error-message.component.html","./projects/shared-lib/src/lib/modal-error-message/modal-error-message.module.ts","./projects/shared-lib/src/lib/pager/pager.component.html","./projects/shared-lib/src/lib/pager/pager.component.ts","./projects/shared-lib/src/lib/pager/pager.module.ts","./projects/shared-lib/src/lib/status-chip/status-chip.component.html","./projects/shared-lib/src/lib/status-chip/status-chip.component.ts","./projects/shared-lib/src/lib/status-chip/status-chip.module.ts","./projects/shared-lib/src/lib/table-base/column-flex-directive.ts","./projects/shared-lib/src/lib/table-base/table-base.component.html","./projects/shared-lib/src/lib/table-base/table-base.component.ts","./projects/shared-lib/src/lib/table-base/table-column-sort/table-column-sort.component.html","./projects/shared-lib/src/lib/table-base/table-column-sort/table-column-sort.component.ts","./projects/shared-lib/src/lib/table-base/table-base.module.ts","./projects/shared-lib/src/lib/breadcrumbs/breadcrumbs.component.html","./projects/shared-lib/src/lib/breadcrumbs/breadcrumbs.component.ts","./projects/shared-lib/src/lib/title-bar/title-bar.component.ts","./projects/shared-lib/src/lib/title-bar/title-bar.component.html","./projects/shared-lib/src/lib/breadcrumbs/breadcrumbs.module.ts","./projects/shared-lib/src/lib/title-bar/title-bar.module.ts","./projects/shared-lib/src/lib/toast/vitu-toast.module.ts","./projects/shared-lib/src/lib/filters-base/filters-mode.ts","./projects/shared-lib/src/lib/filters-base/filters-base.component.html","./projects/shared-lib/src/lib/filters-base/filters-base.component.ts","./projects/shared-lib/src/lib/filters-base/filters-base.module.ts","./projects/shared-lib/src/lib/user-status-icon/user-status-icon.component.html","./projects/shared-lib/src/lib/user-status-icon/user-status-icon.component.ts","./projects/shared-lib/src/lib/user-status-icon/user-status-icon.module.ts","./projects/shared-lib/src/lib/transaction-status-chip/transaction-status-chip.component.ts","./projects/shared-lib/src/lib/transaction-status-chip/transaction-status-chip.component.html","./projects/shared-lib/src/lib/transaction-status-chip/transaction-status-chip.module.ts","./projects/shared-lib/src/lib/binary-status-icon/binary-status-icon.component.html","./projects/shared-lib/src/lib/binary-status-icon/binary-status-icon.component.ts","./projects/shared-lib/src/lib/binary-status-icon/binary-status-icon.module.ts","./projects/shared-lib/src/lib/funding-item-status-chip/funding-item-status-chip.component.ts","./projects/shared-lib/src/lib/funding-item-status-chip/funding-item-status-chip.component.html","./projects/shared-lib/src/lib/funding-item-status-chip/funding-item-status-chip.module.ts","./projects/shared-lib/src/lib/vitu-number-format/vitu-number-format-common.ts","./projects/shared-lib/src/lib/vitu-number-format/vitu-number-format-currency.pipe.ts","./projects/shared-lib/src/lib/vitu-number-format/vitu-number-format-currency-usd.pipe.ts","./projects/shared-lib/src/lib/vitu-number-format/vitu-number-format-percentage.pipe.ts","./projects/shared-lib/src/lib/vitu-number-format/vitu-number-format.module.ts","./projects/shared-lib/src/lib/switch-array/switch-array.module.ts","./projects/shared-lib/src/lib/permissions-switch-array/permissions-switch-array.component.html","./projects/shared-lib/src/lib/permissions-switch-array/permissions-switch-array.component.ts","./projects/shared-lib/src/lib/permissions-switch-array/permissions-switch-array.module.ts","./projects/shared-lib/src/lib/grouped-switch-array/grouped-switch-array.component.html","./projects/shared-lib/src/lib/grouped-switch-array/grouped-switch-array.component.ts","./projects/shared-lib/src/lib/grouped-switch-array/grouped-switch-array.module.ts","./projects/shared-lib/src/lib/vitu-select/vitu-select.module.ts","./projects/shared-lib/src/lib/vitu-date/vitu-date.module.ts","./projects/shared-lib/src/lib/vitu-time/vitu-time.module.ts","./projects/merchant-app/src/app/shared/router-guards/auth.guard.ts","./projects/merchant-app/src/app/storage/current-user/current-user.selectors.ts","./projects/merchant-app/src/app/storage/current-user/current-user.actions.ts","./projects/merchant-app/src/app/storage/merchant/merchant.actions.ts","./projects/merchant-app/src/app/shared/router-guards/permissions.guard.ts","./projects/merchant-app/src/app/storage/merchant/merchant.selectors.ts","./projects/merchant-app/src/app/pages/dashboard/dashboard.component.ts","./projects/merchant-app/src/app/pages/dashboard/dashboard.component.html","./projects/merchant-app/src/app/storage/transactions/transactions.actions.ts","./projects/merchant-app/src/app/storage/transactions/transactions.selectors.ts","./projects/merchant-app/src/app/shared/current-user-permissions.ts","./Portal/CoreApi/models/transaction-order-by.ts","./projects/merchant-app/src/app/shared/transactions-table/transactions-table-cell-content/transactions-table-cell-content.component.html","./projects/merchant-app/src/app/shared/transactions-table/transactions-table-cell-content/transactions-table-cell-content.component.ts","./projects/merchant-app/src/app/shared/transactions-table/transactions-table.component.html","./projects/merchant-app/src/app/shared/transactions-table/transactions-table.component.ts","./Portal/CoreApi/models/card-brand-enum.ts","./Portal/CoreApi/models/transaction-status.ts","./Portal/CoreApi/models/gateway-enum.ts","./Portal/CoreApi/models/digital-wallet-enum.ts","./Portal/CoreApi/models/transaction-type.ts","./projects/merchant-app/src/app/pages/transactions/transaction-log/transaction-log-filters/transaction-log-filters.component.html","./projects/merchant-app/src/app/pages/transactions/transaction-log/transaction-log-filters/transaction-log-filters.component.ts","./projects/merchant-app/src/app/pages/transactions/transaction-log/transaction-log.component.html","./projects/merchant-app/src/app/pages/transactions/transaction-log/transaction-log.component.ts","./projects/merchant-app/src/app/pages/transactions/transactions.component.ts","./projects/merchant-app/src/app/pages/transactions/transactions.component.html","./projects/merchant-app/src/app/storage/transaction/transaction.actions.ts","./projects/merchant-app/src/app/storage/payment/payment.actions.ts","./projects/merchant-app/src/app/storage/next-payment-actions/next-payment-actions.selectors.ts","./projects/merchant-app/src/app/storage/payment/payment.selectors.ts","./projects/merchant-app/src/app/storage/transaction/transaction.selectors.ts","./projects/merchant-app/src/app/storage/transaction-siblings/transaction-siblings.selectors.ts","./Portal/CoreApi/models/additional-amount-type.ts","./Portal/CoreApi/models/dispute-type-enum.ts","./Portal/CoreApi/models/dispute-order-by.ts","./node_modules/@angular/material/fesm2020/tabs.mjs","./projects/merchant-app/src/app/pages/transaction/transaction-detail/disputes-table-cell-content/disputes-table-cell-content.component.html","./projects/merchant-app/src/app/pages/transaction/transaction-detail/disputes-table-cell-content/disputes-table-cell-content.component.ts","./projects/merchant-app/src/app/pages/transaction/transaction-detail/fees-table-cell-content/fees-table-cell-content.component.html","./projects/merchant-app/src/app/pages/transaction/transaction-detail/fees-table-cell-content/fees-table-cell-content.component.ts","./projects/merchant-app/src/app/pages/transaction/transaction-detail/transaction-detail.component.html","./projects/merchant-app/src/app/pages/transaction/transaction-detail/transaction-detail.component.ts","./projects/merchant-app/src/app/pages/transaction/transaction.component.ts","./projects/merchant-app/src/app/pages/transaction/transaction.component.html","./projects/merchant-app/src/app/storage/user/user.actions.ts","./projects/merchant-app/src/app/storage/user/user.selectors.ts","./projects/merchant-app/src/app/storage/router/router.actions.ts","./projects/merchant-app/src/app/pages/user/user-details/user-details.component.html","./projects/merchant-app/src/app/pages/user/user-details/user-details.component.ts","./projects/merchant-app/src/app/pages/user/user.component.ts","./projects/merchant-app/src/app/pages/user/user.component.html","./projects/merchant-app/src/app/storage/users/users.selectors.ts","./projects/merchant-app/src/app/pages/users/user-log/users-table-cell-content/users-table-cell-content.component.html","./projects/merchant-app/src/app/pages/users/user-log/users-table-cell-content/users-table-cell-content.component.ts","./projects/merchant-app/src/app/pages/users/user-log/user-log.component.html","./projects/merchant-app/src/app/pages/users/user-log/user-log.component.ts","./projects/merchant-app/src/app/pages/users/users.component.ts","./projects/merchant-app/src/app/pages/users/users.component.html","./projects/merchant-app/src/app/pages/forbidden/forbidden.component.ts","./projects/merchant-app/src/app/pages/forbidden/forbidden.component.html","./projects/merchant-app/src/app/pages/page-unavailable/page-unavailable.component.ts","./projects/merchant-app/src/app/pages/page-unavailable/page-unavailable.component.html","./projects/merchant-app/src/app/storage/role/role.actions.ts","./projects/merchant-app/src/app/storage/role/role.selectors.ts","./projects/merchant-app/src/app/pages/role/role-details/role-details.component.html","./projects/merchant-app/src/app/pages/role/role-details/role-details.component.ts","./projects/merchant-app/src/app/pages/role/role.component.ts","./projects/merchant-app/src/app/pages/role/role.component.html","./projects/merchant-app/src/app/storage/roles/roles.selectors.ts","./projects/merchant-app/src/app/pages/roles/role-log/roles-table-cell-content/roles-table-cell-content.component.html","./projects/merchant-app/src/app/pages/roles/role-log/roles-table-cell-content/roles-table-cell-content.component.ts","./projects/merchant-app/src/app/pages/roles/role-log/role-log.component.html","./projects/merchant-app/src/app/pages/roles/role-log/role-log.component.ts","./projects/merchant-app/src/app/pages/roles/roles.component.ts","./projects/merchant-app/src/app/pages/roles/roles.component.html","./projects/merchant-app/src/app/storage/webhook/webhook.actions.ts","./projects/merchant-app/src/app/storage/webhooks/webhooks.selectors.ts","./projects/merchant-app/src/app/storage/webhook/webhook.selectors.ts","./projects/merchant-app/src/app/pages/webhooks/webhook-log/webhooks-table-cell-content/webhooks-table-cell-content.component.html","./projects/merchant-app/src/app/pages/webhooks/webhook-log/webhooks-table-cell-content/webhooks-table-cell-content.component.ts","./projects/merchant-app/src/app/pages/webhooks/webhook-log/webhook-log.component.html","./projects/merchant-app/src/app/pages/webhooks/webhook-log/webhook-log.component.ts","./projects/merchant-app/src/app/pages/webhooks/webhooks.component.ts","./projects/merchant-app/src/app/pages/webhooks/webhooks.component.html","./projects/merchant-app/src/app/storage/webhooks/webhooks.actions.ts","./projects/merchant-app/src/app/pages/webhook/webhook-details/webhook-details.component.html","./projects/merchant-app/src/app/pages/webhook/webhook-details/webhook-details.component.ts","./projects/merchant-app/src/app/pages/webhook/webhook.component.ts","./projects/merchant-app/src/app/pages/webhook/webhook.component.html","./projects/merchant-app/src/app/shared/download-report-modal/report-type.ts","./projects/merchant-app/src/app/storage/report/report.actions.ts","./projects/merchant-app/src/app/pages/reports/reports-log/reports-table-cell-content/reports-table-cell-content.component.html","./projects/merchant-app/src/app/pages/reports/reports-log/reports-table-cell-content/reports-table-cell-content.component.ts","./projects/merchant-app/src/app/pages/reports/reports-log/reports-log.component.html","./projects/merchant-app/src/app/pages/reports/reports-log/reports-log.component.ts","./projects/merchant-app/src/app/pages/reports/reports.component.ts","./projects/merchant-app/src/app/pages/reports/reports.component.html","./projects/merchant-app/src/app/storage/clients/clients.selectors.ts","./projects/merchant-app/src/app/pages/clients/client-log/clients-table-cell-content/clients-table-cell-content.component.html","./projects/merchant-app/src/app/pages/clients/client-log/clients-table-cell-content/clients-table-cell-content.component.ts","./projects/merchant-app/src/app/pages/clients/client-log/client-log.component.html","./projects/merchant-app/src/app/pages/clients/client-log/client-log.component.ts","./projects/merchant-app/src/app/pages/clients/clients.component.ts","./projects/merchant-app/src/app/pages/clients/clients.component.html","./projects/merchant-app/src/app/storage/client/client.actions.ts","./projects/merchant-app/src/app/storage/client/client.selectors.ts","./projects/merchant-app/src/app/storage/client-secrets/client-secrets.actions.ts","./projects/merchant-app/src/app/storage/client-secrets/client-secrets.selectors.ts","./projects/merchant-app/src/app/pages/client/client-details/client-secrets-table-cell-content/client-secrets-table-cell-content.component.html","./projects/merchant-app/src/app/pages/client/client-details/client-secrets-table-cell-content/client-secrets-table-cell-content.component.ts","./projects/merchant-app/src/app/pages/client/client-details/client-details.component.html","./projects/merchant-app/src/app/pages/client/client-details/client-details.component.ts","./projects/merchant-app/src/app/pages/client/client.component.ts","./projects/merchant-app/src/app/pages/client/client.component.html","./projects/merchant-app/src/app/storage/tids/tids.actions.ts","./projects/merchant-app/src/app/storage/tids/tids.selectors.ts","./projects/merchant-app/src/app/pages/configurations/configuration-log/configurations-table-cell-content/configurations-table-cell-content.component.html","./projects/merchant-app/src/app/pages/configurations/configuration-log/configurations-table-cell-content/configurations-table-cell-content.component.ts","./projects/merchant-app/src/app/pages/configurations/configuration-log/configuration-log.component.html","./projects/merchant-app/src/app/pages/configurations/configuration-log/configuration-log.component.ts","./projects/merchant-app/src/app/pages/configurations/configurations.component.ts","./projects/merchant-app/src/app/pages/configurations/configurations.component.html","./projects/merchant-app/src/app/storage/funding/funding.actions.ts","./projects/merchant-app/src/app/storage/funding/funding.selectors.ts","./Portal/CoreApi/models/funding-instructions-order-by.ts","./projects/merchant-app/src/app/pages/funding/funding-log/funding-table-cell-content/funding-table-cell-content.component.html","./projects/merchant-app/src/app/pages/funding/funding-log/funding-table-cell-content/funding-table-cell-content.component.ts","./Portal/CoreApi/models/funding-status.ts","./Portal/CoreApi/models/processor-enum.ts","./projects/merchant-app/src/app/pages/funding/funding-log/funding-log-filters/funding-log-filters.component.html","./projects/merchant-app/src/app/pages/funding/funding-log/funding-log-filters/funding-log-filters.component.ts","./projects/merchant-app/src/app/pages/funding/funding-log/funding-log.component.html","./projects/merchant-app/src/app/pages/funding/funding-log/funding-log.component.ts","./projects/merchant-app/src/app/pages/funding/funding.component.ts","./projects/merchant-app/src/app/pages/funding/funding.component.html","./projects/merchant-app/src/app/storage/funding-item/funding-item.actions.ts","./projects/merchant-app/src/app/storage/funding-item/funding-item.selectors.ts","./Portal/CoreApi/models/funding-transaction-order-by.ts","./projects/merchant-app/src/app/pages/funding-item/funding-item-details/funding-item-transactions-table-cell-content/funding-item-transactions-table-cell-content.component.html","./projects/merchant-app/src/app/pages/funding-item/funding-item-details/funding-item-transactions-table-cell-content/funding-item-transactions-table-cell-content.component.ts","./projects/merchant-app/src/app/pages/funding-item/funding-item-details/funding-item-mid-fees-table-cell-content/funding-item-mid-fees-table-cell-content.component.html","./projects/merchant-app/src/app/pages/funding-item/funding-item-details/funding-item-mid-fees-table-cell-content/funding-item-mid-fees-table-cell-content.component.ts","./projects/merchant-app/src/app/pages/funding-item/funding-item-details/funding-item-adjustments-table-cell-content/funding-item-adjustments-table-cell-content.component.html","./projects/merchant-app/src/app/pages/funding-item/funding-item-details/funding-item-adjustments-table-cell-content/funding-item-adjustments-table-cell-content.component.ts","./projects/merchant-app/src/app/pages/funding-item/funding-item-details/funding-item-transaction-filters/funding-item-transaction-filters.component.html","./projects/merchant-app/src/app/pages/funding-item/funding-item-details/funding-item-transaction-filters/funding-item-transaction-filters.component.ts","./projects/merchant-app/src/app/pages/funding-item/funding-item-details/funding-item-details.component.html","./projects/merchant-app/src/app/pages/funding-item/funding-item-details/funding-item-details.component.ts","./projects/merchant-app/src/app/pages/funding-item/funding-item.component.ts","./projects/merchant-app/src/app/pages/funding-item/funding-item.component.html","./projects/merchant-app/src/app/pages/help/help-details/help-details.component.ts","./projects/merchant-app/src/app/pages/help/help-details/help-details.component.html","./projects/merchant-app/src/app/pages/help/help.component.ts","./projects/merchant-app/src/app/pages/help/help.component.html","./projects/merchant-app/src/app/shared/router-guards/default-dynamic-route.guard.ts","./projects/merchant-app/src/app/storage/event/event.selectors.ts","./projects/merchant-app/src/app/storage/event-deliveries/event-deliveries.selectors.ts","./projects/merchant-app/src/app/storage/event-delivery/event-delivery.actions.ts","./projects/merchant-app/src/app/storage/event-deliveries/event-deliveries.actions.ts","./node_modules/@angular/cdk/fesm2020/tree.mjs","./node_modules/@angular/material/fesm2020/tree.mjs","./Portal/CoreApi/models/event-delivery-status-enum.ts","./projects/merchant-app/src/app/pages/event/event-details/event-deliveries-table-cell-content/event-deliveries-table-cell-content.component.html","./projects/merchant-app/src/app/pages/event/event-details/event-deliveries-table-cell-content/event-deliveries-table-cell-content.component.ts","./projects/merchant-app/src/app/pages/event/event-details/event-details.component.html","./projects/merchant-app/src/app/pages/event/event-details/event-details.component.ts","./projects/merchant-app/src/app/pages/event/event.component.ts","./projects/merchant-app/src/app/pages/event/event.component.html","./projects/merchant-app/src/app/storage/events/events.selectors.ts","./projects/merchant-app/src/app/storage/events/events.actions.ts","./Portal/CoreApi/models/event-order-by-enum.ts","./Portal/CoreAdminApi/models/merchant-event-order-by-enum.ts","./projects/merchant-app/src/app/pages/event-history/event-history-log/event-history-table-cell-content/event-history-table-cell-content.component.html","./projects/merchant-app/src/app/pages/event-history/event-history-log/event-history-table-cell-content/event-history-table-cell-content.component.ts","./projects/merchant-app/src/app/pages/event-history/event-history-log/event-history-log-filters/event-history-log-filters.component.html","./projects/merchant-app/src/app/pages/event-history/event-history-log/event-history-log-filters/event-history-log-filters.component.ts","./projects/merchant-app/src/app/pages/event-history/event-history-log/event-history-log.component.html","./projects/merchant-app/src/app/pages/event-history/event-history-log/event-history-log.component.ts","./projects/merchant-app/src/app/pages/event-history/event-history.component.ts","./projects/merchant-app/src/app/pages/event-history/event-history.component.html","./projects/merchant-app/src/app/storage/disputes/disputes.actions.ts","./projects/merchant-app/src/app/storage/disputes/disputes.selectors.ts","./projects/merchant-app/src/app/pages/disputes/disputes-log/disputes-log-filters/disputes-log-filters.component.html","./projects/merchant-app/src/app/pages/disputes/disputes-log/disputes-log-filters/disputes-log-filters.component.ts","./projects/merchant-app/src/app/pages/disputes/disputes-log/disputes-log.component.html","./projects/merchant-app/src/app/pages/disputes/disputes-log/disputes-log.component.ts","./projects/merchant-app/src/app/pages/disputes/disputes.component.ts","./projects/merchant-app/src/app/pages/disputes/disputes.component.html","./projects/merchant-app/src/app/storage/dispute/dispute.selectors.ts","./projects/merchant-app/src/app/pages/dispute/dispute-details/dispute-details.component.html","./projects/merchant-app/src/app/pages/dispute/dispute-details/dispute-details.component.ts","./projects/merchant-app/src/app/pages/dispute/dispute.component.ts","./projects/merchant-app/src/app/pages/dispute/dispute.component.html","./projects/merchant-app/src/app/storage/payments/payments.actions.ts","./projects/merchant-app/src/app/storage/payments/payments.selectors.ts","./Portal/CoreApi/models/payment-order-by.ts","./projects/merchant-app/src/app/pages/payments/payment-log/group-transactions-table-cell-content/group-transactions-table-cell-content.component.html","./projects/merchant-app/src/app/pages/payments/payment-log/group-transactions-table-cell-content/group-transactions-table-cell-content.component.ts","./Portal/CoreApi/models/payment-status.ts","./projects/merchant-app/src/app/pages/payments/payment-log/group-transaction-log-filters/group-transaction-log-filters.component.html","./projects/merchant-app/src/app/pages/payments/payment-log/group-transaction-log-filters/group-transaction-log-filters.component.ts","./projects/merchant-app/src/app/pages/payments/payment-log/payment-log.component.html","./projects/merchant-app/src/app/pages/payments/payment-log/payment-log.component.ts","./projects/merchant-app/src/app/app-routing.module.ts","./projects/merchant-app/src/app/pages/payments/payments.component.ts","./projects/merchant-app/src/app/pages/payments/payments.component.html","./Portal/CoreApi/api-configuration.ts","./Portal/CoreApi/base-service.ts","./Portal/CoreApi/request-builder.ts","./Portal/CoreApi/services/events.service.ts","./Portal/CoreApi/services/merchant.service.ts","./Portal/CoreApi/services/payment-methods.service.ts","./Portal/CoreApi/services/disputes.service.ts","./Portal/CoreApi/services/payment-form.service.ts","./Portal/CoreApi/services/payments.service.ts","./Portal/CoreApi/services/clover-pos.service.ts","./Portal/CoreApi/services/clients.service.ts","./Portal/CoreApi/services/client-secrets.service.ts","./Portal/CoreApi/services/permissions.service.ts","./Portal/CoreApi/services/roles.service.ts","./Portal/CoreApi/services/users.service.ts","./Portal/CoreApi/services/webhooks.service.ts","./Portal/CoreApi/services/billing.service.ts","./Portal/CoreApi/services/reports.service.ts","./Portal/CoreApi/api.module.ts","./Portal/VituPayApi/api-configuration.ts","./Portal/VituPayApi/base-service.ts","./Portal/VituPayApi/request-builder.ts","./Portal/VituPayApi/services/merchant-style.service.ts","./Portal/VituPayApi/api.module.ts","./node_modules/@angular/animations/fesm2020/browser.mjs","./node_modules/@angular/platform-browser/fesm2020/animations.mjs","./node_modules/@angular/material/fesm2020/divider.mjs","./projects/merchant-app/src/app/shared/material.module.ts","./Portal/CoreApi/models/payment-method-type.ts","./projects/merchant-app/src/app/shared/modal-action.ts","./projects/merchant-app/src/app/shared/refund-payment-modal/refund-payment-modal.component.html","./projects/merchant-app/src/app/shared/refund-payment-modal/refund-payment-modal.component.ts","./projects/merchant-app/src/environments/environment.stage.ts","./projects/merchant-app/src/app/shared/shared.module.ts","./projects/merchant-app/src/app/storage/merchant/merchant.effects.ts","./projects/merchant-app/src/app/storage/transactions/transactions.effects.ts","./projects/merchant-app/src/app/storage/generic.actions.ts","./projects/merchant-app/src/app/storage/transaction/transaction.effects.ts","./projects/merchant-app/src/app/storage/payments/payments.effects.ts","./projects/merchant-app/src/app/storage/transaction-siblings/transaction-siblings.actions.ts","./projects/merchant-app/src/app/storage/next-payment-actions/next-payment-actions.actions.ts","./projects/merchant-app/src/app/storage/payment/payment.effects.ts","./projects/merchant-app/src/app/storage/users/users.actions.ts","./projects/merchant-app/src/app/storage/users/users.effects.ts","./projects/merchant-app/src/app/storage/common.ts","./projects/merchant-app/src/app/storage/router/router.effects.ts","./projects/merchant-app/src/app/storage/transaction-siblings/transaction-siblings.effects.ts","./projects/merchant-app/src/app/storage/user/user.effects.ts","./projects/merchant-app/src/app/storage/next-payment-actions/next-payment-actions.effects.ts","./projects/merchant-app/src/app/storage/current-user/current-user.effects.ts","./projects/merchant-app/src/app/storage/app/app.effects.ts","./projects/merchant-app/src/app/storage/roles/roles.actions.ts","./projects/merchant-app/src/app/storage/roles/roles.effects.ts","./projects/merchant-app/src/app/storage/role/role.effects.ts","./projects/merchant-app/src/app/storage/webhooks/webhooks.effects.ts","./projects/merchant-app/src/app/storage/webhook/webhook.effects.ts","./projects/merchant-app/src/app/storage/statements/statements.actions.ts","./projects/merchant-app/src/app/storage/statements/statements.selectors.ts","./projects/merchant-app/src/app/shared/download-report-modal/download-report-modal-action.ts","./projects/merchant-app/src/app/storage/mids/mids.selectors.ts","./projects/merchant-app/src/app/storage/mids/mids.actions.ts","./projects/merchant-app/src/app/shared/download-report-modal/download-report-modal.component.html","./projects/merchant-app/src/app/shared/download-report-modal/download-report-modal.component.ts","./projects/merchant-app/src/app/storage/report/report.effects.ts","./projects/merchant-app/src/app/storage/statements/statements.effects.ts","./projects/merchant-app/src/app/storage/clients/clients.actions.ts","./projects/merchant-app/src/app/storage/clients/clients.effects.ts","./projects/admin-app/src/app/shared/modal-action.ts","./projects/merchant-app/src/app/shared/create-client-secret-modal/create-client-secret-modal-action.ts","./projects/merchant-app/src/app/shared/create-client-secret-modal/create-client-secret-modal.component.html","./projects/merchant-app/src/app/shared/create-client-secret-modal/create-client-secret-modal.component.ts","./projects/merchant-app/src/app/storage/client/client.effects.ts","./projects/merchant-app/src/app/storage/client-secrets/client-secrets.effects.ts","./projects/merchant-app/src/app/storage/tids/tids.effects.ts","./projects/merchant-app/src/app/storage/mids/mids.effects.ts","./projects/merchant-app/src/app/storage/funding/funding.effects.ts","./projects/merchant-app/src/app/storage/funding-item/funding-item.effects.ts","./projects/merchant-app/src/app/storage/event/event.actions.ts","./projects/merchant-app/src/app/storage/event/event.effects.ts","./projects/merchant-app/src/app/storage/events/events.effects.ts","./projects/merchant-app/src/app/storage/event-delivery/event-delivery.effects.ts","./projects/merchant-app/src/app/storage/event-deliveries/event-deliveries.effects.ts","./projects/merchant-app/src/app/storage/disputes/disputes.effects.ts","./projects/merchant-app/src/app/storage/dispute/dispute.actions.ts","./projects/merchant-app/src/app/storage/effects-configuration.ts","./projects/merchant-app/src/app/storage/dispute/dispute.effects.ts","./projects/merchant-app/src/app/storage/merchant/merchant.state.ts","./Portal/CoreApi/models/order-direction-enum.ts","./projects/merchant-app/src/app/storage/transactions/transactions.state.ts","./projects/merchant-app/src/app/storage/transaction/transaction.reducers.ts","./projects/merchant-app/src/app/storage/transaction/transaction.state.ts","./projects/merchant-app/src/app/storage/transaction-siblings/transaction-siblings.state.ts","./projects/merchant-app/src/app/storage/payments/payments.state.ts","./projects/merchant-app/src/app/storage/payment/payment.state.ts","./projects/merchant-app/src/app/storage/user/user.state.ts","./projects/merchant-app/src/app/storage/users/users.state.ts","./projects/merchant-app/src/app/storage/next-payment-actions/next-payment-actions.state.ts","./projects/merchant-app/src/app/storage/current-user/current-user.state.ts","./projects/merchant-app/src/app/storage/role/role.state.ts","./projects/merchant-app/src/app/storage/roles/roles.state.ts","./projects/merchant-app/src/app/storage/webhooks/webhooks.state.ts","./projects/merchant-app/src/app/storage/webhook/webhook.state.ts","./projects/merchant-app/src/app/storage/report/report.state.ts","./projects/merchant-app/src/app/storage/statements/statements.state.ts","./projects/merchant-app/src/app/storage/clients/clients.state.ts","./projects/merchant-app/src/app/storage/client/client.state.ts","./projects/merchant-app/src/app/storage/client-secrets/client-secrets.state.ts","./projects/merchant-app/src/app/storage/tids/tids.state.ts","./projects/merchant-app/src/app/storage/mids/mids.state.ts","./projects/merchant-app/src/app/storage/funding/funding.state.ts","./projects/merchant-app/src/app/storage/funding-item/funding-item.state.ts","./projects/merchant-app/src/app/storage/event/event.state.ts","./projects/merchant-app/src/app/storage/events/events.state.ts","./projects/merchant-app/src/app/storage/event-delivery/event-delivery.state.ts","./Portal/CoreApi/models/event-delivery-order-by-enum.ts","./projects/merchant-app/src/app/storage/event-deliveries/event-deliveries.state.ts","./projects/merchant-app/src/app/storage/disputes/disputes.state.ts","./projects/merchant-app/src/app/storage/dispute/dispute.state.ts","./projects/merchant-app/src/app/storage/reducer-configuration.ts","./projects/merchant-app/src/app/storage/merchant/merchant.reducers.ts","./projects/merchant-app/src/app/storage/transactions/transactions.reducers.ts","./projects/merchant-app/src/app/storage/transaction-siblings/transaction-siblings.reducers.ts","./projects/merchant-app/src/app/storage/webhook/webhook.reducer.ts","./projects/merchant-app/src/app/storage/webhooks/webhooks.reducers.ts","./projects/merchant-app/src/app/storage/payments/payments.reducers.ts","./projects/merchant-app/src/app/storage/payment/payment.reducers.ts","./projects/merchant-app/src/app/storage/next-payment-actions/next-payment-actions.reducers.ts","./projects/merchant-app/src/app/storage/user/user.reducer.ts","./projects/merchant-app/src/app/storage/users/users.reducers.ts","./projects/merchant-app/src/app/storage/role/role.reducer.ts","./projects/merchant-app/src/app/storage/roles/roles.reducers.ts","./projects/merchant-app/src/app/storage/clients/clients.reducers.ts","./projects/merchant-app/src/app/storage/client/client.reducer.ts","./projects/merchant-app/src/app/storage/current-user/current-user.reducer.ts","./projects/merchant-app/src/app/storage/report/report.reducers.ts","./projects/merchant-app/src/app/storage/statements/statements.reducers.ts","./projects/merchant-app/src/app/storage/client-secrets/client-secrets.reducers.ts","./projects/merchant-app/src/app/storage/tids/tids.reducers.ts","./projects/merchant-app/src/app/storage/mids/mids.reducers.ts","./projects/merchant-app/src/app/storage/funding/funding.reducers.ts","./projects/merchant-app/src/app/storage/funding-item/funding-item.reducers.ts","./projects/merchant-app/src/app/storage/event/event.reducers.ts","./projects/merchant-app/src/app/storage/events/events.reducers.ts","./projects/merchant-app/src/app/storage/event-delivery/event-delivery.reducers.ts","./projects/merchant-app/src/app/storage/event-deliveries/event-deliveries.reducers.ts","./projects/merchant-app/src/app/storage/disputes/disputes.reducers.ts","./projects/merchant-app/src/app/storage/dispute/dispute.reducers.ts","./projects/merchant-app/src/app/app.component.ts","./projects/merchant-app/src/app/app.component.html","./projects/merchant-app/src/app/auth-config.ts","./projects/merchant-app/src/app/pages/dashboard/dashboard.module.ts","./projects/merchant-app/src/app/app.module.ts","./projects/merchant-app/src/main.ts","./node_modules/error-stack-parser/error-stack-parser.js","./node_modules/fast-sha256/sha256.js","./node_modules/linq/linq.js","./node_modules/lodash/lodash.js","./node_modules/rxjs/dist/esm/internal/BehaviorSubject.js","./node_modules/rxjs/dist/esm/internal/Observable.js","./node_modules/rxjs/dist/esm/internal/ReplaySubject.js","./node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js","./node_modules/rxjs/dist/esm/internal/Subject.js","./node_modules/rxjs/dist/esm/internal/NotificationFactories.js","./node_modules/rxjs/dist/esm/internal/Subscriber.js","./node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js","./node_modules/rxjs/dist/esm/internal/Subscription.js","./node_modules/rxjs/dist/esm/internal/config.js","./node_modules/rxjs/dist/esm/internal/observable/combineLatest.js","./node_modules/rxjs/dist/esm/internal/observable/concat.js","./node_modules/rxjs/dist/esm/internal/operators/concatAll.js","./node_modules/rxjs/dist/esm/internal/observable/empty.js","./node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js","./node_modules/rxjs/dist/esm/internal/observable/from.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js","./node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js","./node_modules/rxjs/dist/esm/internal/observable/innerFrom.js","./node_modules/rxjs/dist/esm/internal/observable/merge.js","./node_modules/rxjs/dist/esm/internal/observable/of.js","./node_modules/rxjs/dist/esm/internal/observable/race.js","./node_modules/rxjs/dist/esm/internal/observable/throwError.js","./node_modules/rxjs/dist/esm/internal/observable/timer.js","./node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js","./node_modules/rxjs/dist/esm/internal/operators/catchError.js","./node_modules/rxjs/dist/esm/internal/operators/concatMap.js","./node_modules/rxjs/dist/esm/internal/operators/debounceTime.js","./node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js","./node_modules/rxjs/dist/esm/internal/operators/delayWhen.js","./node_modules/rxjs/dist/esm/internal/operators/delay.js","./node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js","./node_modules/rxjs/dist/esm/internal/operators/filter.js","./node_modules/rxjs/dist/esm/internal/operators/first.js","./node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js","./node_modules/rxjs/dist/esm/internal/operators/map.js","./node_modules/rxjs/dist/esm/internal/operators/mapTo.js","./node_modules/rxjs/dist/esm/internal/operators/mergeAll.js","./node_modules/rxjs/dist/esm/internal/operators/mergeMap.js","./node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js","./node_modules/rxjs/dist/esm/internal/operators/observeOn.js","./node_modules/rxjs/dist/esm/internal/operators/scanInternals.js","./node_modules/rxjs/dist/esm/internal/operators/scan.js","./node_modules/rxjs/dist/esm/internal/operators/share.js","./node_modules/rxjs/dist/esm/internal/operators/skip.js","./node_modules/rxjs/dist/esm/internal/operators/switchMap.js","./node_modules/rxjs/dist/esm/internal/operators/take.js","./node_modules/rxjs/dist/esm/internal/operators/takeUntil.js","./node_modules/rxjs/dist/esm/internal/operators/tap.js","./node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js","./node_modules/rxjs/dist/esm/internal/operators/timeout.js","./node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js","./node_modules/rxjs/dist/esm/internal/scheduler/Action.js","./node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js","./node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js","./node_modules/rxjs/dist/esm/internal/Scheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/async.js","./node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js","./node_modules/rxjs/dist/esm/internal/scheduler/queue.js","./node_modules/rxjs/dist/esm/internal/scheduler/QueueScheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/QueueAction.js","./node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js","./node_modules/rxjs/dist/esm/internal/symbol/iterator.js","./node_modules/rxjs/dist/esm/internal/symbol/observable.js","./node_modules/rxjs/dist/esm/internal/util/EmptyError.js","./node_modules/rxjs/dist/esm/internal/util/args.js","./node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js","./node_modules/rxjs/dist/esm/internal/util/argsOrArgArray.js","./node_modules/rxjs/dist/esm/internal/util/arrRemove.js","./node_modules/rxjs/dist/esm/internal/util/createErrorClass.js","./node_modules/rxjs/dist/esm/internal/util/createObject.js","./node_modules/rxjs/dist/esm/internal/util/errorContext.js","./node_modules/rxjs/dist/esm/internal/util/executeSchedule.js","./node_modules/rxjs/dist/esm/internal/util/identity.js","./node_modules/rxjs/dist/esm/internal/util/isArrayLike.js","./node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js","./node_modules/rxjs/dist/esm/internal/util/isDate.js","./node_modules/rxjs/dist/esm/internal/util/isFunction.js","./node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js","./node_modules/rxjs/dist/esm/internal/util/isIterable.js","./node_modules/rxjs/dist/esm/internal/util/isPromise.js","./node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js","./node_modules/rxjs/dist/esm/internal/util/isScheduler.js","./node_modules/rxjs/dist/esm/internal/util/lift.js","./node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js","./node_modules/rxjs/dist/esm/internal/util/noop.js","./node_modules/rxjs/dist/esm/internal/util/pipe.js","./node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js","./node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js","./node_modules/stack-generator/stack-generator.js","./node_modules/stackdriver-errors-js/stackdriver-errors.js","./node_modules/stackframe/stackframe.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/array-set.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/base64-vlq.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/base64.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/binary-search.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/mapping-list.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/quick-sort.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/source-map-consumer.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/source-map-generator.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/source-node.js","./node_modules/stacktrace-gps/node_modules/source-map/lib/util.js","./node_modules/stacktrace-gps/node_modules/source-map/source-map.js","./node_modules/stacktrace-gps/stacktrace-gps.js","./node_modules/stacktrace-js/stacktrace.js","./node_modules/zone.js/dist/zone.min.js","./node_modules/tslib/tslib.es6.js","./node_modules/@angular/common/fesm2020/common.mjs","./node_modules/@angular/common/fesm2020/http.mjs","./node_modules/@angular/core/fesm2020/core.mjs","./node_modules/@ngrx/store-devtools/fesm2020/ngrx-store-devtools.mjs","./node_modules/@ngrx/store/fesm2020/ngrx-store.mjs","./node_modules/rxjs/dist/esm/internal/operators/pluck.js","./node_modules/angular-oauth2-oidc/fesm2020/angular-oauth2-oidc.mjs","./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"],"sourcesContent":["/**\n * @license Angular v14.1.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { ɵDomAdapter, ɵsetRootDomAdapter, ɵparseCookieValue, ɵgetDOM, DOCUMENT, ɵPLATFORM_BROWSER_ID, XhrFactory, CommonModule } from '@angular/common';\nexport { ɵgetDOM } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, ApplicationInitStatus, APP_INITIALIZER, Injector, ɵglobal, Injectable, Inject, ViewEncapsulation, APP_ID, RendererStyleFlags2, ɵinternalBootstrapApplication, ErrorHandler, ɵsetDocument, PLATFORM_ID, PLATFORM_INITIALIZER, createPlatformFactory, platformCore, ɵTESTABILITY_GETTER, ɵTESTABILITY, Testability, NgZone, TestabilityRegistry, ɵINJECTOR_SCOPE, RendererFactory2, ApplicationModule, NgModule, Optional, SkipSelf, ɵɵinject, ApplicationRef, ɵConsole, forwardRef, SecurityContext, ɵallowSanitizationBypassAndThrow, ɵunwrapSafeValue, ɵ_sanitizeUrl, ɵ_sanitizeHtml, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustUrl, ɵbypassSanitizationTrustResourceUrl, 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 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 * A factory for `HttpXhrBackend` that uses the `XMLHttpRequest` browser API.\n */\nclass BrowserXhr {\n build() {\n return new XMLHttpRequest();\n }\n}\nBrowserXhr.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nBrowserXhr.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserXhr });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserXhr, decorators: [{\n type: Injectable\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: EventManager, deps: [{ token: EVENT_MANAGER_PLUGINS }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });\nEventManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: EventManager });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: EventManager, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [EVENT_MANAGER_PLUGINS]\n }] }, { type: i0.NgZone }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: SharedStylesHost, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nSharedStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: SharedStylesHost });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: SharedStylesHost, decorators: [{\n type: Injectable\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DomSharedStylesHost, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nDomSharedStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DomSharedStylesHost });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DomSharedStylesHost, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\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 'math': 'http://www.w3.org/1998/MathML/',\n};\nconst COMPONENT_REGEX = /%COMP%/g;\nconst NG_DEV_MODE$1 = 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DomRendererFactory2, deps: [{ token: EventManager }, { token: DomSharedStylesHost }, { token: APP_ID }], target: i0.ɵɵFactoryTarget.Injectable });\nDomRendererFactory2.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DomRendererFactory2 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DomRendererFactory2, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: EventManager }, { type: DomSharedStylesHost }, { type: undefined, decorators: [{\n type: Inject,\n args: [APP_ID]\n }] }]; } });\nclass DefaultDomRenderer2 {\n constructor(eventManager) {\n this.eventManager = eventManager;\n this.data = Object.create(null);\n this.destroyNode = null;\n }\n destroy() { }\n createElement(name, namespace) {\n if (namespace) {\n // TODO: `|| namespace` was added in\n // https://github.com/angular/angular/commit/2b9cc8503d48173492c29f5a271b61126104fbdb to\n // support how Ivy passed around the namespace URI rather than short name at the time. It did\n // not, however extend the support to other parts of the system (setAttribute, setAttribute,\n // and the ServerRenderer). We should decide what exactly the semantics for dealing with\n // namespaces should be and make it consistent.\n // Related issues:\n // https://github.com/angular/angular/issues/44028\n // https://github.com/angular/angular/issues/44883\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 const targetParent = isTemplateNode(parent) ? parent.content : parent;\n targetParent.appendChild(newChild);\n }\n insertBefore(parent, newChild, refChild) {\n if (parent) {\n const targetParent = isTemplateNode(parent) ? parent.content : parent;\n targetParent.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 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 const namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.removeAttributeNS(namespaceUri, name);\n }\n else {\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$1 && 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$1 && 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 AT_CHARCODE = (() => '@'.charCodeAt(0))();\nfunction checkNoSyntheticProp(name, nameKind) {\n if (name.charCodeAt(0) === AT_CHARCODE) {\n throw new Error(`Unexpected synthetic ${nameKind} ${name} found. Please make sure that:\n - Either \\`BrowserAnimationsModule\\` or \\`NoopAnimationsModule\\` are imported in your application.\n - There is corresponding configuration for the animation named \\`${name}\\` defined in the \\`animations\\` field of the \\`@Component\\` decorator (see https://angular.io/api/core/Component#animations).`);\n }\n}\nfunction isTemplateNode(node) {\n return node.tagName === 'TEMPLATE' && node.content !== undefined;\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DomEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nDomEventsPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DomEventsPlugin });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DomEventsPlugin, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [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 * 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};\n/**\n * Retrieves modifiers from key-event objects.\n */\nconst MODIFIER_KEY_GETTERS = {\n 'alt': (event) => event.altKey,\n 'control': (event) => event.ctrlKey,\n 'meta': (event) => event.metaKey,\n 'shift': (event) => event.shiftKey\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: KeyEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nKeyEventsPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: KeyEventsPlugin });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: KeyEventsPlugin, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\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 */\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * Bootstraps an instance of an Angular application and renders a standalone component as the\n * application's root component. More information about standalone components can be found in [this\n * guide](guide/standalone-components).\n *\n * @usageNotes\n * The root component passed into this function *must* be a standalone one (should have the\n * `standalone: true` flag in the `@Component` decorator config).\n *\n * ```typescript\n * @Component({\n * standalone: true,\n * template: 'Hello world!'\n * })\n * class RootComponent {}\n *\n * const appRef: ApplicationRef = await bootstrapApplication(RootComponent);\n * ```\n *\n * You can add the list of providers that should be available in the application injector by\n * specifying the `providers` field in an object passed as the second argument:\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * {provide: BACKEND_URL, useValue: 'https://yourdomain.com/api'}\n * ]\n * });\n * ```\n *\n * The `importProvidersFrom` helper method can be used to collect all providers from any\n * existing NgModule (and transitively from all NgModules that it imports):\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * importProvidersFrom(SomeNgModule)\n * ]\n * });\n * ```\n *\n * Note: the `bootstrapApplication` method doesn't include [Testability](api/core/Testability) by\n * default. You can add [Testability](api/core/Testability) by getting the list of necessary\n * providers using `provideProtractorTestingSupport()` function and adding them into the `providers`\n * array, for example:\n *\n * ```typescript\n * import {provideProtractorTestingSupport} from '@angular/platform-browser';\n *\n * await bootstrapApplication(RootComponent, {providers: [provideProtractorTestingSupport()]});\n * ```\n *\n * @param rootComponent A reference to a standalone component that should be rendered.\n * @param options Extra configuration for the bootstrap operation, see `ApplicationConfig` for\n * additional info.\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n *\n * @publicApi\n * @developerPreview\n */\nfunction bootstrapApplication(rootComponent, options) {\n return ɵinternalBootstrapApplication({\n rootComponent,\n appProviders: [\n ...BROWSER_MODULE_PROVIDERS,\n ...(options?.providers ?? []),\n ],\n platformProviders: INTERNAL_BROWSER_PLATFORM_PROVIDERS,\n });\n}\n/**\n * Returns a set of providers required to setup [Testability](api/core/Testability) for an\n * application bootstrapped using the `bootstrapApplication` function. The set of providers is\n * needed to support testing an application with Protractor (which relies on the Testability APIs\n * to be present).\n *\n * @returns An array of providers required to setup Testability for an application and make it\n * available for testing using Protractor.\n *\n * @developerPreview\n * @publicApi\n */\nfunction provideProtractorTestingSupport() {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideProtractorTestingSupport` call results in app code.\n return [...TESTABILITY_PROVIDERS];\n}\nfunction initDomAdapter() {\n BrowserDomAdapter.makeCurrent();\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 INTERNAL_BROWSER_PLATFORM_PROVIDERS = [\n { provide: PLATFORM_ID, useValue: ɵPLATFORM_BROWSER_ID },\n { provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true },\n { provide: DOCUMENT, useFactory: _document, deps: [] },\n];\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);\n/**\n * Internal marker to signal whether providers from the `BrowserModule` are already present in DI.\n * This is needed to avoid loading `BrowserModule` providers twice. We can't rely on the\n * `BrowserModule` presence itself, since the standalone-based bootstrap just imports\n * `BrowserModule` providers without referencing the module itself.\n */\nconst BROWSER_MODULE_PROVIDERS_MARKER = new InjectionToken(NG_DEV_MODE ? 'BrowserModule Providers Marker' : '');\nconst TESTABILITY_PROVIDERS = [\n {\n provide: ɵTESTABILITY_GETTER,\n useClass: BrowserGetTestability,\n deps: [],\n },\n {\n provide: ɵTESTABILITY,\n useClass: Testability,\n deps: [NgZone, TestabilityRegistry, ɵTESTABILITY_GETTER]\n },\n {\n provide: Testability,\n useClass: Testability,\n deps: [NgZone, TestabilityRegistry, ɵTESTABILITY_GETTER]\n }\n];\nconst BROWSER_MODULE_PROVIDERS = [\n { provide: ɵINJECTOR_SCOPE, useValue: 'root' },\n { provide: ErrorHandler, useFactory: errorHandler, deps: [] }, {\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 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: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, NgZone] },\n { provide: XhrFactory, useClass: BrowserXhr, deps: [] },\n NG_DEV_MODE ? { provide: BROWSER_MODULE_PROVIDERS_MARKER, useValue: true } : []\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(providersAlreadyPresent) {\n if (NG_DEV_MODE && providersAlreadyPresent) {\n throw new Error(`Providers from the \\`BrowserModule\\` have already been loaded. If you need access ` +\n `to common directives such as NgIf and NgFor, import the \\`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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserModule, deps: [{ token: BROWSER_MODULE_PROVIDERS_MARKER, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule });\nBrowserModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserModule, exports: [CommonModule, ApplicationModule] });\nBrowserModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserModule, providers: [\n ...BROWSER_MODULE_PROVIDERS,\n ...TESTABILITY_PROVIDERS\n ], imports: [CommonModule, ApplicationModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserModule, decorators: [{\n type: NgModule,\n args: [{\n providers: [\n ...BROWSER_MODULE_PROVIDERS,\n ...TESTABILITY_PROVIDERS\n ],\n exports: [CommonModule, ApplicationModule],\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }, {\n type: Inject,\n args: [BROWSER_MODULE_PROVIDERS_MARKER]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 `` tags.\n *\n * Properties of the `MetaDefinition` object match the attributes of the\n * HTML `` 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 `` 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 `` 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 `` 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 `` 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 `` 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 `` 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 `` 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 `` 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 `` 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: Meta, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nMeta.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: Meta, providedIn: 'root', useFactory: createMeta, deps: [] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: Meta, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: createMeta, deps: [] }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\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 (`` tag)\n * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements\n * (representing the `` 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: Title, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nTitle.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: Title, providedIn: 'root', useFactory: createTitle, deps: [] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: Title, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: createTitle, deps: [] }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [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 */\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 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: TransferState, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nTransferState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: TransferState });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: TransferState, decorators: [{\n type: Injectable\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserTransferStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nBrowserTransferStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserTransferStateModule });\nBrowserTransferStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserTransferStateModule, providers: [{ provide: TransferState, useFactory: initTransferState, deps: [DOCUMENT, APP_ID] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserTransferStateModule, decorators: [{\n type: NgModule,\n args: [{\n providers: [{ provide: TransferState, useFactory: initTransferState, deps: [DOCUMENT, APP_ID] }],\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 * 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 * 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HammerGestureConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nHammerGestureConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HammerGestureConfig });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HammerGestureConfig, decorators: [{\n type: Injectable\n }] });\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 || zone.runOutsideAngular(() => 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 zone.runOutsideAngular(() => 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\n // 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HammerGesturesPlugin, deps: [{ token: DOCUMENT }, { token: HAMMER_GESTURE_CONFIG }, { token: i0.ɵConsole }, { token: HAMMER_LOADER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nHammerGesturesPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HammerGesturesPlugin });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HammerGesturesPlugin, decorators: [{\n type: Injectable\n }], ctorParameters: 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: i0.ɵConsole }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [HAMMER_LOADER]\n }] }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HammerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHammerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: HammerModule });\nHammerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HammerModule, providers: [\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 ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HammerModule, decorators: [{\n type: NgModule,\n args: [{\n providers: [\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 ]\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 * 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DomSanitizer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nDomSanitizer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DomSanitizer, providedIn: 'root', useExisting: i0.forwardRef(function () { return DomSanitizerImpl; }) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DomSanitizer, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useExisting: forwardRef(() => DomSanitizerImpl) }]\n }] });\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\" /* BypassType.Html */)) {\n return ɵunwrapSafeValue(value);\n }\n return ɵ_sanitizeHtml(this._doc, String(value)).toString();\n case SecurityContext.STYLE:\n if (ɵallowSanitizationBypassAndThrow(value, \"Style\" /* BypassType.Style */)) {\n return ɵunwrapSafeValue(value);\n }\n return value;\n case SecurityContext.SCRIPT:\n if (ɵallowSanitizationBypassAndThrow(value, \"Script\" /* BypassType.Script */)) {\n return ɵunwrapSafeValue(value);\n }\n throw new Error('unsafe value used in a script context');\n case SecurityContext.URL:\n if (ɵallowSanitizationBypassAndThrow(value, \"URL\" /* BypassType.Url */)) {\n return ɵunwrapSafeValue(value);\n }\n return ɵ_sanitizeUrl(String(value));\n case SecurityContext.RESOURCE_URL:\n if (ɵallowSanitizationBypassAndThrow(value, \"ResourceURL\" /* BypassType.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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DomSanitizerImpl, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nDomSanitizerImpl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DomSanitizerImpl, providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [{ token: Injector }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DomSanitizerImpl, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [Injector] }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [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 * @publicApi\n */\nconst VERSION = new Version('14.1.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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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, bootstrapApplication, disableDebugTools, enableDebugTools, makeStateKey, platformBrowser, provideProtractorTestingSupport, BrowserDomAdapter as ɵBrowserDomAdapter, BrowserGetTestability as ɵBrowserGetTestability, DomEventsPlugin as ɵDomEventsPlugin, DomRendererFactory2 as ɵDomRendererFactory2, DomSanitizerImpl as ɵDomSanitizerImpl, DomSharedStylesHost as ɵDomSharedStylesHost, 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, escapeHtml as ɵescapeHtml, flattenStyles as ɵflattenStyles, initDomAdapter as ɵinitDomAdapter, shimContentAttribute as ɵshimContentAttribute, shimHostAttribute as ɵshimHostAttribute };\n","import { EMPTY } from './observable/empty';\nimport { of } from './observable/of';\nimport { throwError } from './observable/throwError';\nimport { isFunction } from './util/isFunction';\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 return observeNotification(this, observer);\n }\n do(nextHandler, errorHandler, completeHandler) {\n const { kind, value, error } = this;\n return kind === 'N' ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === 'E' ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler();\n }\n accept(nextOrObserver, error, complete) {\n var _a;\n return isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next)\n ? this.observe(nextOrObserver)\n : this.do(nextOrObserver, error, complete);\n }\n toObservable() {\n const { kind, value, error } = this;\n const result = kind === 'N'\n ?\n of(value)\n :\n kind === 'E'\n ?\n throwError(() => error)\n :\n kind === 'C'\n ?\n EMPTY\n :\n 0;\n if (!result) {\n throw new TypeError(`Unexpected notification kind ${kind}`);\n }\n return result;\n }\n static createNext(value) {\n return new Notification('N', value);\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');\nexport function observeNotification(notification, observer) {\n var _a, _b, _c;\n const { kind, value, error } = notification;\n if (typeof kind !== 'string') {\n throw new TypeError('Invalid notification, missing \"kind\"');\n }\n kind === 'N' ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === 'E' ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer);\n}\n","import { Observable } from '../Observable';\nimport { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber, OperatorSubscriber } from './OperatorSubscriber';\nexport function groupBy(keySelector, elementOrOptions, duration, connector) {\n return operate((source, subscriber) => {\n let element;\n if (!elementOrOptions || typeof elementOrOptions === 'function') {\n element = elementOrOptions;\n }\n else {\n ({ duration, element, connector } = elementOrOptions);\n }\n const groups = new Map();\n const notify = (cb) => {\n groups.forEach(cb);\n cb(subscriber);\n };\n const handleError = (err) => notify((consumer) => consumer.error(err));\n let activeGroups = 0;\n let teardownAttempted = false;\n const groupBySourceSubscriber = new OperatorSubscriber(subscriber, (value) => {\n try {\n const key = keySelector(value);\n let group = groups.get(key);\n if (!group) {\n groups.set(key, (group = connector ? connector() : new Subject()));\n const grouped = createGroupedObservable(key, group);\n subscriber.next(grouped);\n if (duration) {\n const durationSubscriber = createOperatorSubscriber(group, () => {\n group.complete();\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n }, undefined, undefined, () => groups.delete(key));\n groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber));\n }\n }\n group.next(element ? element(value) : value);\n }\n catch (err) {\n handleError(err);\n }\n }, () => notify((consumer) => consumer.complete()), handleError, () => groups.clear(), () => {\n teardownAttempted = true;\n return activeGroups === 0;\n });\n source.subscribe(groupBySourceSubscriber);\n function createGroupedObservable(key, groupSubject) {\n const result = new Observable((groupSubscriber) => {\n activeGroups++;\n const innerSub = groupSubject.subscribe(groupSubscriber);\n return () => {\n innerSub.unsubscribe();\n --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe();\n };\n });\n result.key = key;\n return result;\n }\n });\n}\n","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function exhaustMap(project, resultSelector) {\n if (resultSelector) {\n return (source) => source.pipe(exhaustMap((a, i) => innerFrom(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii)))));\n }\n return operate((source, subscriber) => {\n let index = 0;\n let innerSub = null;\n let isComplete = false;\n source.subscribe(createOperatorSubscriber(subscriber, (outerValue) => {\n if (!innerSub) {\n innerSub = createOperatorSubscriber(subscriber, undefined, () => {\n innerSub = null;\n isComplete && subscriber.complete();\n });\n innerFrom(project(outerValue, index++)).subscribe(innerSub);\n }\n }, () => {\n isComplete = true;\n !innerSub && subscriber.complete();\n }));\n });\n}\n","import * as i3 from '@ngrx/store';\nimport { compose, ScannedActionsSubject, createAction } from '@ngrx/store';\nimport * as i1 from 'rxjs';\nimport { merge, Observable, Subject, defer, pipe, of } from 'rxjs';\nimport { ignoreElements, materialize, map, catchError, filter, groupBy, mergeMap, exhaustMap, dematerialize, take, concatMap, finalize, withLatestFrom } from 'rxjs/operators';\nimport * as i0 from '@angular/core';\nimport { Injectable, Inject, InjectionToken, NgModule, Optional, Injector, SkipSelf, Self } from '@angular/core';\n\nconst DEFAULT_EFFECT_CONFIG = {\n dispatch: true,\n useEffectsErrorHandler: true,\n};\nconst CREATE_EFFECT_METADATA_KEY = '__@ngrx/effects_create__';\n\n/**\n * @description\n * Creates an effect from an `Observable` and an `EffectConfig`.\n *\n * @param source A function which returns an `Observable`.\n * @param config A `Partial<EffectConfig>` to configure the effect. By default, `dispatch` is true and `useEffectsErrorHandler` is true.\n * @returns If `EffectConfig`#`dispatch` is true, returns `Observable<Action>`. Else, returns `Observable<unknown>`.\n *\n * @usageNotes\n *\n * ** Mapping to a different action **\n * ```ts\n * effectName$ = createEffect(\n * () => this.actions$.pipe(\n * ofType(FeatureActions.actionOne),\n * map(() => FeatureActions.actionTwo())\n * )\n * );\n * ```\n *\n * ** Non-dispatching effects **\n * ```ts\n * effectName$ = createEffect(\n * () => this.actions$.pipe(\n * ofType(FeatureActions.actionOne),\n * tap(() => console.log('Action One Dispatched'))\n * ),\n * { dispatch: false }\n * // FeatureActions.actionOne is not dispatched\n * );\n * ```\n */\nfunction createEffect(source, config) {\n const effect = source();\n const value = {\n ...DEFAULT_EFFECT_CONFIG,\n ...config, // Overrides any defaults if values are provided\n };\n Object.defineProperty(effect, CREATE_EFFECT_METADATA_KEY, {\n value,\n });\n return effect;\n}\nfunction getCreateEffectMetadata(instance) {\n const propertyNames = Object.getOwnPropertyNames(instance);\n const metadata = propertyNames\n .filter((propertyName) => {\n if (instance[propertyName] &&\n instance[propertyName].hasOwnProperty(CREATE_EFFECT_METADATA_KEY)) {\n // If the property type has overridden `hasOwnProperty` we need to ensure\n // that the metadata is valid (containing a `dispatch`property)\n // https://github.com/ngrx/platform/issues/2975\n const property = instance[propertyName];\n return property[CREATE_EFFECT_METADATA_KEY].hasOwnProperty('dispatch');\n }\n return false;\n })\n .map((propertyName) => {\n const metaData = instance[propertyName][CREATE_EFFECT_METADATA_KEY];\n return {\n propertyName,\n ...metaData,\n };\n });\n return metadata;\n}\n\nfunction getSourceForInstance(instance) {\n return Object.getPrototypeOf(instance);\n}\n\nconst METADATA_KEY = '__@ngrx/effects__';\n/**\n * @deprecated The Effect decorator (`@Effect`) is deprecated in favor for the `createEffect` method.\n * See the docs for more info {@link https://ngrx.io/guide/migration/v11#the-effect-decorator}\n */\nfunction Effect(config = {}) {\n return function (target, propertyName) {\n const metadata = {\n ...DEFAULT_EFFECT_CONFIG,\n ...config,\n propertyName,\n };\n addEffectMetadataEntry(target, metadata);\n };\n}\nfunction getEffectDecoratorMetadata(instance) {\n const effectsDecorators = compose(getEffectMetadataEntries, getSourceForInstance)(instance);\n return effectsDecorators;\n}\n/**\n * Type guard to detemine whether METADATA_KEY is already present on the Class\n * constructor\n */\nfunction hasMetadataEntries(sourceProto) {\n return sourceProto.constructor.hasOwnProperty(METADATA_KEY);\n}\n/** Add Effect Metadata to the Effect Class constructor under specific key */\nfunction addEffectMetadataEntry(sourceProto, metadata) {\n if (hasMetadataEntries(sourceProto)) {\n sourceProto.constructor[METADATA_KEY].push(metadata);\n }\n else {\n Object.defineProperty(sourceProto.constructor, METADATA_KEY, {\n value: [metadata],\n });\n }\n}\nfunction getEffectMetadataEntries(sourceProto) {\n return hasMetadataEntries(sourceProto)\n ? sourceProto.constructor[METADATA_KEY]\n : [];\n}\n\nfunction getEffectsMetadata(instance) {\n return getSourceMetadata(instance).reduce((acc, { propertyName, dispatch, useEffectsErrorHandler }) => {\n acc[propertyName] = { dispatch, useEffectsErrorHandler };\n return acc;\n }, {});\n}\nfunction getSourceMetadata(instance) {\n const effects = [\n getEffectDecoratorMetadata,\n getCreateEffectMetadata,\n ];\n return effects.reduce((sources, source) => sources.concat(source(instance)), []);\n}\n\nfunction mergeEffects(sourceInstance, globalErrorHandler, effectsErrorHandler) {\n const sourceName = getSourceForInstance(sourceInstance).constructor.name;\n const observables$ = getSourceMetadata(sourceInstance).map(({ propertyName, dispatch, useEffectsErrorHandler, }) => {\n const observable$ = typeof sourceInstance[propertyName] === 'function'\n ? sourceInstance[propertyName]()\n : sourceInstance[propertyName];\n const effectAction$ = useEffectsErrorHandler\n ? effectsErrorHandler(observable$, globalErrorHandler)\n : observable$;\n if (dispatch === false) {\n return effectAction$.pipe(ignoreElements());\n }\n const materialized$ = effectAction$.pipe(materialize());\n return materialized$.pipe(map((notification) => ({\n effect: sourceInstance[propertyName],\n notification,\n propertyName,\n sourceName,\n sourceInstance,\n })));\n });\n return merge(...observables$);\n}\n\nconst MAX_NUMBER_OF_RETRY_ATTEMPTS = 10;\nfunction defaultEffectsErrorHandler(observable$, errorHandler, retryAttemptLeft = MAX_NUMBER_OF_RETRY_ATTEMPTS) {\n return observable$.pipe(catchError((error) => {\n if (errorHandler)\n errorHandler.handleError(error);\n if (retryAttemptLeft <= 1) {\n return observable$; // last attempt\n }\n // Return observable that produces this particular effect\n return defaultEffectsErrorHandler(observable$, errorHandler, retryAttemptLeft - 1);\n }));\n}\n\nclass Actions extends Observable {\n constructor(source) {\n super();\n if (source) {\n this.source = source;\n }\n }\n lift(operator) {\n const observable = new Actions();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n}\n/** @nocollapse */ Actions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: Actions, deps: [{ token: ScannedActionsSubject }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ Actions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: Actions });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: Actions, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i1.Observable, decorators: [{\n type: Inject,\n args: [ScannedActionsSubject]\n }] }]; } });\n/**\n * `ofType` filters an Observable of `Actions` into an Observable of the actions\n * whose type strings are passed to it.\n *\n * For example, if `actions` has type `Actions<AdditionAction|SubstractionAction>`, and\n * the type of the `Addition` action is `add`, then\n * `actions.pipe(ofType('add'))` returns an `Observable<AdditionAction>`.\n *\n * Properly typing this function is hard and requires some advanced TS tricks\n * below.\n *\n * Type narrowing automatically works, as long as your `actions` object\n * starts with a `Actions<SomeUnionOfActions>` instead of generic `Actions`.\n *\n * For backwards compatibility, when one passes a single type argument\n * `ofType<T>('something')` the result is an `Observable<T>`. Note, that `T`\n * completely overrides any possible inference from 'something'.\n *\n * Unfortunately, for unknown 'actions: Actions' these types will produce\n * 'Observable<never>'. In such cases one has to manually set the generic type\n * like `actions.ofType<AdditionAction>('add')`.\n *\n * @usageNotes\n *\n * Filter the Actions stream on the \"customers page loaded\" action\n *\n * ```ts\n * import { ofType } from '@ngrx/effects';\n * import * fromCustomers from '../customers';\n *\n * this.actions$.pipe(\n * ofType(fromCustomers.pageLoaded)\n * )\n * ```\n */\nfunction ofType(...allowedTypes) {\n return filter((action) => allowedTypes.some((typeOrActionCreator) => {\n if (typeof typeOrActionCreator === 'string') {\n // Comparing the string to type\n return typeOrActionCreator === action.type;\n }\n // We are filtering by ActionCreator\n return typeOrActionCreator.type === action.type;\n }));\n}\n\nfunction reportInvalidActions(output, reporter) {\n if (output.notification.kind === 'N') {\n const action = output.notification.value;\n const isInvalidAction = !isAction(action);\n if (isInvalidAction) {\n reporter.handleError(new Error(`Effect ${getEffectName(output)} dispatched an invalid action: ${stringify(action)}`));\n }\n }\n}\nfunction isAction(action) {\n return (typeof action !== 'function' &&\n action &&\n action.type &&\n typeof action.type === 'string');\n}\nfunction getEffectName({ propertyName, sourceInstance, sourceName, }) {\n const isMethod = typeof sourceInstance[propertyName] === 'function';\n return `\"${sourceName}.${String(propertyName)}${isMethod ? '()' : ''}\"`;\n}\nfunction stringify(action) {\n try {\n return JSON.stringify(action);\n }\n catch {\n return action;\n }\n}\n\nconst onIdentifyEffectsKey = 'ngrxOnIdentifyEffects';\nfunction isOnIdentifyEffects(instance) {\n return isFunction(instance, onIdentifyEffectsKey);\n}\nconst onRunEffectsKey = 'ngrxOnRunEffects';\nfunction isOnRunEffects(instance) {\n return isFunction(instance, onRunEffectsKey);\n}\nconst onInitEffects = 'ngrxOnInitEffects';\nfunction isOnInitEffects(instance) {\n return isFunction(instance, onInitEffects);\n}\nfunction isFunction(instance, functionName) {\n return (instance &&\n functionName in instance &&\n typeof instance[functionName] === 'function');\n}\n\nconst _ROOT_EFFECTS_GUARD = new InjectionToken('@ngrx/effects Internal Root Guard');\nconst USER_PROVIDED_EFFECTS = new InjectionToken('@ngrx/effects User Provided Effects');\nconst _ROOT_EFFECTS = new InjectionToken('@ngrx/effects Internal Root Effects');\nconst ROOT_EFFECTS = new InjectionToken('@ngrx/effects Root Effects');\nconst _FEATURE_EFFECTS = new InjectionToken('@ngrx/effects Internal Feature Effects');\nconst FEATURE_EFFECTS = new InjectionToken('@ngrx/effects Feature Effects');\nconst EFFECTS_ERROR_HANDLER = new InjectionToken('@ngrx/effects Effects Error Handler');\n\nclass EffectSources extends Subject {\n constructor(errorHandler, effectsErrorHandler) {\n super();\n this.errorHandler = errorHandler;\n this.effectsErrorHandler = effectsErrorHandler;\n }\n addEffects(effectSourceInstance) {\n this.next(effectSourceInstance);\n }\n /**\n * @internal\n */\n toActions() {\n return this.pipe(groupBy(getSourceForInstance), mergeMap((source$) => {\n return source$.pipe(groupBy(effectsInstance));\n }), mergeMap((source$) => {\n const effect$ = source$.pipe(exhaustMap((sourceInstance) => {\n return resolveEffectSource(this.errorHandler, this.effectsErrorHandler)(sourceInstance);\n }), map((output) => {\n reportInvalidActions(output, this.errorHandler);\n return output.notification;\n }), filter((notification) => notification.kind === 'N' && notification.value != null), dematerialize());\n // start the stream with an INIT action\n // do this only for the first Effect instance\n const init$ = source$.pipe(take(1), filter(isOnInitEffects), map((instance) => instance.ngrxOnInitEffects()));\n return merge(effect$, init$);\n }));\n }\n}\n/** @nocollapse */ EffectSources.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectSources, deps: [{ token: i0.ErrorHandler }, { token: EFFECTS_ERROR_HANDLER }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ EffectSources.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectSources });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectSources, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.ErrorHandler }, { type: undefined, decorators: [{\n type: Inject,\n args: [EFFECTS_ERROR_HANDLER]\n }] }]; } });\nfunction effectsInstance(sourceInstance) {\n if (isOnIdentifyEffects(sourceInstance)) {\n return sourceInstance.ngrxOnIdentifyEffects();\n }\n return '';\n}\nfunction resolveEffectSource(errorHandler, effectsErrorHandler) {\n return (sourceInstance) => {\n const mergedEffects$ = mergeEffects(sourceInstance, errorHandler, effectsErrorHandler);\n if (isOnRunEffects(sourceInstance)) {\n return sourceInstance.ngrxOnRunEffects(mergedEffects$);\n }\n return mergedEffects$;\n };\n}\n\nclass EffectsRunner {\n constructor(effectSources, store) {\n this.effectSources = effectSources;\n this.store = store;\n this.effectsSubscription = null;\n }\n start() {\n if (!this.effectsSubscription) {\n this.effectsSubscription = this.effectSources\n .toActions()\n .subscribe(this.store);\n }\n }\n ngOnDestroy() {\n if (this.effectsSubscription) {\n this.effectsSubscription.unsubscribe();\n this.effectsSubscription = null;\n }\n }\n}\n/** @nocollapse */ EffectsRunner.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectsRunner, deps: [{ token: EffectSources }, { token: i3.Store }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ EffectsRunner.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectsRunner });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectsRunner, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: EffectSources }, { type: i3.Store }]; } });\n\nconst ROOT_EFFECTS_INIT = '@ngrx/effects/init';\nconst rootEffectsInit = createAction(ROOT_EFFECTS_INIT);\nclass EffectsRootModule {\n constructor(sources, runner, store, rootEffects, storeRootModule, storeFeatureModule, guard) {\n this.sources = sources;\n runner.start();\n rootEffects.forEach((effectSourceInstance) => sources.addEffects(effectSourceInstance));\n store.dispatch({ type: ROOT_EFFECTS_INIT });\n }\n addEffects(effectSourceInstance) {\n this.sources.addEffects(effectSourceInstance);\n }\n}\n/** @nocollapse */ EffectsRootModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectsRootModule, deps: [{ token: EffectSources }, { token: EffectsRunner }, { token: i3.Store }, { token: ROOT_EFFECTS }, { token: i3.StoreRootModule, optional: true }, { token: i3.StoreFeatureModule, optional: true }, { token: _ROOT_EFFECTS_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ EffectsRootModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectsRootModule });\n/** @nocollapse */ EffectsRootModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectsRootModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectsRootModule, decorators: [{\n type: NgModule,\n args: [{}]\n }], ctorParameters: function () { return [{ type: EffectSources }, { type: EffectsRunner }, { type: i3.Store }, { type: undefined, decorators: [{\n type: Inject,\n args: [ROOT_EFFECTS]\n }] }, { type: i3.StoreRootModule, decorators: [{\n type: Optional\n }] }, { type: i3.StoreFeatureModule, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [_ROOT_EFFECTS_GUARD]\n }] }]; } });\n\nclass EffectsFeatureModule {\n constructor(root, effectSourceGroups, storeRootModule, storeFeatureModule) {\n effectSourceGroups.forEach((group) => group.forEach((effectSourceInstance) => root.addEffects(effectSourceInstance)));\n }\n}\n/** @nocollapse */ EffectsFeatureModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectsFeatureModule, deps: [{ token: EffectsRootModule }, { token: FEATURE_EFFECTS }, { token: i3.StoreRootModule, optional: true }, { token: i3.StoreFeatureModule, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ EffectsFeatureModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectsFeatureModule });\n/** @nocollapse */ EffectsFeatureModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectsFeatureModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectsFeatureModule, decorators: [{\n type: NgModule,\n args: [{}]\n }], ctorParameters: function () { return [{ type: EffectsRootModule }, { type: undefined, decorators: [{\n type: Inject,\n args: [FEATURE_EFFECTS]\n }] }, { type: i3.StoreRootModule, decorators: [{\n type: Optional\n }] }, { type: i3.StoreFeatureModule, decorators: [{\n type: Optional\n }] }]; } });\n\nclass EffectsModule {\n static forFeature(featureEffects = []) {\n return {\n ngModule: EffectsFeatureModule,\n providers: [\n featureEffects,\n {\n provide: _FEATURE_EFFECTS,\n multi: true,\n useValue: featureEffects,\n },\n {\n provide: USER_PROVIDED_EFFECTS,\n multi: true,\n useValue: [],\n },\n {\n provide: FEATURE_EFFECTS,\n multi: true,\n useFactory: createEffects,\n deps: [Injector, _FEATURE_EFFECTS, USER_PROVIDED_EFFECTS],\n },\n ],\n };\n }\n static forRoot(rootEffects = []) {\n return {\n ngModule: EffectsRootModule,\n providers: [\n {\n provide: EFFECTS_ERROR_HANDLER,\n useValue: defaultEffectsErrorHandler,\n },\n EffectsRunner,\n EffectSources,\n Actions,\n rootEffects,\n {\n provide: _ROOT_EFFECTS,\n useValue: [rootEffects],\n },\n {\n provide: _ROOT_EFFECTS_GUARD,\n useFactory: _provideForRootGuard,\n deps: [\n [EffectsRunner, new Optional(), new SkipSelf()],\n [_ROOT_EFFECTS, new Self()],\n ],\n },\n {\n provide: USER_PROVIDED_EFFECTS,\n multi: true,\n useValue: [],\n },\n {\n provide: ROOT_EFFECTS,\n useFactory: createEffects,\n deps: [Injector, _ROOT_EFFECTS, USER_PROVIDED_EFFECTS],\n },\n ],\n };\n }\n}\n/** @nocollapse */ EffectsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ EffectsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectsModule });\n/** @nocollapse */ EffectsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectsModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: EffectsModule, decorators: [{\n type: NgModule,\n args: [{}]\n }] });\nfunction createEffects(injector, effectGroups, userProvidedEffectGroups) {\n const mergedEffects = [];\n for (const effectGroup of effectGroups) {\n mergedEffects.push(...effectGroup);\n }\n for (const userProvidedEffectGroup of userProvidedEffectGroups) {\n mergedEffects.push(...userProvidedEffectGroup);\n }\n return createEffectInstances(injector, mergedEffects);\n}\nfunction createEffectInstances(injector, effects) {\n return effects.map((effect) => injector.get(effect));\n}\nfunction _provideForRootGuard(runner, rootEffects) {\n // check whether any effects are actually passed\n const hasEffects = !(rootEffects.length === 1 && rootEffects[0].length === 0);\n if (hasEffects && runner) {\n throw new TypeError(`EffectsModule.forRoot() called twice. Feature modules should use EffectsModule.forFeature() instead.`);\n }\n return 'guarded';\n}\n\n/**\n * Wraps project fn with error handling making it safe to use in Effects.\n * Takes either a config with named properties that represent different possible\n * callbacks or project/error callbacks that are required.\n */\nfunction act(\n/** Allow to take either config object or project/error functions */\nconfigOrProject, errorFn) {\n const { project, error, complete, operator, unsubscribe } = typeof configOrProject === 'function'\n ? {\n project: configOrProject,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n error: errorFn,\n operator: concatMap,\n complete: undefined,\n unsubscribe: undefined,\n }\n : { ...configOrProject, operator: configOrProject.operator || concatMap };\n return (source) => defer(() => {\n const subject = new Subject();\n return merge(source.pipe(operator((input, index) => defer(() => {\n let completed = false;\n let errored = false;\n let projectedCount = 0;\n return project(input, index).pipe(materialize(), map((notification) => {\n switch (notification.kind) {\n case 'E':\n errored = true;\n return {\n kind: 'N',\n value: error(notification.error, input),\n };\n case 'C':\n completed = true;\n return complete\n ? {\n kind: 'N',\n value: complete(projectedCount, input),\n }\n : undefined;\n default:\n ++projectedCount;\n return notification;\n }\n }), filter((n) => n != null), dematerialize(), finalize(() => {\n if (!completed && !errored && unsubscribe) {\n subject.next(unsubscribe(projectedCount, input));\n }\n }));\n }))), subject);\n });\n}\n\n/**\n * `concatLatestFrom` combines the source value\n * and the last available value from a lazily evaluated Observable\n * in a new array\n *\n * @usageNotes\n *\n * Select the active customer from the NgRx Store\n *\n * ```ts\n * import { concatLatestFrom } from '@ngrx/effects';\n * import * as fromCustomers from '../customers';\n *\n * this.actions$.pipe(\n * concatLatestFrom(() => this.store.select(fromCustomers.selectActiveCustomer))\n * )\n * ```\n *\n * Select a customer from the NgRx Store by its id that is available on the action\n *\n * ```ts\n * import { concatLatestFrom } from '@ngrx/effects';\n * import * fromCustomers from '../customers';\n *\n * this.actions$.pipe(\n * concatLatestFrom((action) => this.store.select(fromCustomers.selectCustomer(action.customerId)))\n * )\n * ```\n */\nfunction concatLatestFrom(observablesFactory) {\n return pipe(concatMap((value) => {\n const observables = observablesFactory(value);\n const observablesAsArray = Array.isArray(observables)\n ? observables\n : [observables];\n return of(value).pipe(withLatestFrom(...observablesAsArray));\n }));\n}\n\n/**\n * DO NOT EDIT\n *\n * This file is automatically generated at build\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Actions, EFFECTS_ERROR_HANDLER, Effect, EffectSources, EffectsFeatureModule, EffectsModule, EffectsRootModule, EffectsRunner, ROOT_EFFECTS_INIT, USER_PROVIDED_EFFECTS, act, concatLatestFrom, createEffect, defaultEffectsErrorHandler, getEffectsMetadata, mergeEffects, ofType, rootEffectsInit };\n","import { Notification } from '../Notification';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function materialize() {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n subscriber.next(Notification.createNext(value));\n }, () => {\n subscriber.next(Notification.createComplete());\n subscriber.complete();\n }, (err) => {\n subscriber.next(Notification.createError(err));\n subscriber.complete();\n }));\n });\n}\n","import { observeNotification } from '../Notification';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function dematerialize() {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, (notification) => observeNotification(notification, subscriber)));\n });\n}\n","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nexport function defer(observableFactory) {\n return new Observable((subscriber) => {\n innerFrom(observableFactory()).subscribe(subscriber);\n });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function refCount() {\n return operate((source, subscriber) => {\n let connection = null;\n source._refCount++;\n const refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, () => {\n if (!source || source._refCount <= 0 || 0 < --source._refCount) {\n connection = null;\n return;\n }\n const sharedConnection = source._connection;\n const conn = connection;\n connection = null;\n if (sharedConnection && (!conn || sharedConnection === conn)) {\n sharedConnection.unsubscribe();\n }\n subscriber.unsubscribe();\n });\n source.subscribe(refCounter);\n if (!refCounter.closed) {\n connection = source.connect();\n }\n });\n}\n","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { hasLift } from '../util/lift';\nexport class ConnectableObservable extends Observable {\n constructor(source, subjectFactory) {\n super();\n this.source = source;\n this.subjectFactory = subjectFactory;\n this._subject = null;\n this._refCount = 0;\n this._connection = null;\n if (hasLift(source)) {\n this.lift = source.lift;\n }\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 _teardown() {\n this._refCount = 0;\n const { _connection } = this;\n this._subject = this._connection = null;\n _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe();\n }\n connect() {\n let connection = this._connection;\n if (!connection) {\n connection = this._connection = new Subscription();\n const subject = this.getSubject();\n connection.add(this.source.subscribe(createOperatorSubscriber(subject, undefined, () => {\n this._teardown();\n subject.complete();\n }, (err) => {\n this._teardown();\n subject.error(err);\n }, () => this._teardown())));\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}\n","import { concat } from '../observable/concat';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\nexport function startWith(...values) {\n const scheduler = popScheduler(values);\n return operate((source, subscriber) => {\n (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n });\n}\n","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeLast(count) {\n return count <= 0\n ? () => EMPTY\n : operate((source, subscriber) => {\n let buffer = [];\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n buffer.push(value);\n count < buffer.length && buffer.shift();\n }, () => {\n for (const value of buffer) {\n subscriber.next(value);\n }\n subscriber.complete();\n }, undefined, () => {\n buffer = null;\n }));\n });\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","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeWhile(predicate, inclusive = false) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const result = predicate(value, index++);\n (result || inclusive) && subscriber.next(value);\n !result && subscriber.complete();\n }));\n });\n}\n","import { operate } from '../util/lift';\nexport function finalize(callback) {\n return operate((source, subscriber) => {\n try {\n source.subscribe(subscriber);\n }\n finally {\n subscriber.add(callback);\n }\n });\n}\n","/**\n * @license Angular v14.1.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { ɵisObservable, ɵisPromise, ɵRuntimeError, EventEmitter, Directive, Attribute, Output, Component, createEnvironmentInjector, ɵisStandalone, ComponentFactoryResolver, InjectionToken, InjectFlags, NgModuleFactory, Injectable, NgModuleRef, ɵConsole, NgZone, ɵcoerceToBoolean, Input, HostListener, HostBinding, Optional, ContentChildren, inject, Injector, Compiler, NgProbeToken, ANALYZE_FOR_ENTRY_COMPONENTS, SkipSelf, APP_INITIALIZER, APP_BOOTSTRAP_LISTENER, NgModule, Inject, ApplicationRef, ENVIRONMENT_INITIALIZER, Version } from '@angular/core';\nimport { from, of, BehaviorSubject, combineLatest, concat, defer, pipe, throwError, EmptyError, Observable, EMPTY, ConnectableObservable, Subject } from 'rxjs';\nimport * as i3 from '@angular/common';\nimport { Location, LocationStrategy, HashLocationStrategy, PathLocationStrategy, ViewportScroller, LOCATION_INITIALIZED } from '@angular/common';\nimport { map, switchMap, take, startWith, filter, mergeMap, first, concatMap, tap, catchError, scan, last as last$1, takeWhile, defaultIfEmpty, takeLast, mapTo, finalize, refCount, mergeAll } from 'rxjs/operators';\nimport * as i1 from '@angular/platform-browser';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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}\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 */\nconst NG_DEV_MODE$7 = typeof ngDevMode === 'undefined' || ngDevMode;\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 ɵRuntimeError(4009 /* RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS */, NG_DEV_MODE$7 && `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 ɵRuntimeError(4010 /* RuntimeErrorCode.UNPARSABLE_URL */, NG_DEV_MODE$7 && `Cannot parse url '${this.url}'`);\n }\n let outletName = undefined;\n if (path.indexOf(':') > -1) {\n outletName = path.slice(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 ɵRuntimeError(4011 /* RuntimeErrorCode.UNEXPECTED_VALUE_IN_URL */, NG_DEV_MODE$7 && `Expected \"${str}\".`);\n }\n }\n}\nfunction createRoot(rootCandidate) {\n return rootCandidate.segments.length > 0 ?\n new UrlSegmentGroup([], { [PRIMARY_OUTLET]: rootCandidate }) :\n rootCandidate;\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 * 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}\nfunction isUrlTree(v) {\n return v instanceof UrlTree;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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$6 = typeof ngDevMode === 'undefined' || ngDevMode;\n/**\n * Creates a `UrlTree` relative to an `ActivatedRouteSnapshot`.\n *\n * @publicApi\n *\n *\n * @param relativeTo The `ActivatedRouteSnapshot` to apply the commands to\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 one provided in the `relativeTo` parameter.\n * @param queryParams The query parameters for the `UrlTree`. `null` if the `UrlTree` does not have\n * any query parameters.\n * @param fragment The fragment for the `UrlTree`. `null` if the `UrlTree` does not have a fragment.\n *\n * @usageNotes\n *\n * ```\n * // create /team/33/user/11\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * createUrlTreeFromSnapshot(snapshot, ['/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 * createUrlTreeFromSnapshot(snapshot, ['/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 * createUrlTreeFromSnapshot(snapshot, [{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right:\n * 'chat'}}], null, null);\n *\n * // remove the right secondary node\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // For the examples below, assume the current URL is for the `/team/33/user/11` and the\n * `ActivatedRouteSnapshot` points to `user/11`:\n *\n * // navigate to /team/33/user/11/details\n * createUrlTreeFromSnapshot(snapshot, ['details']);\n *\n * // navigate to /team/33/user/22\n * createUrlTreeFromSnapshot(snapshot, ['../22']);\n *\n * // navigate to /team/44/user/22\n * createUrlTreeFromSnapshot(snapshot, ['../../team/44/user/22']);\n * ```\n */\nfunction createUrlTreeFromSnapshot(relativeTo, commands, queryParams = null, fragment = null) {\n const relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeTo);\n return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);\n}\nfunction createSegmentGroupFromRoute(route) {\n let targetGroup;\n function createSegmentGroupFromRouteRecursive(currentRoute) {\n const childOutlets = {};\n for (const childSnapshot of currentRoute.children) {\n const root = createSegmentGroupFromRouteRecursive(childSnapshot);\n childOutlets[childSnapshot.outlet] = root;\n }\n const segmentGroup = new UrlSegmentGroup(currentRoute.url, childOutlets);\n if (currentRoute === route) {\n targetGroup = segmentGroup;\n }\n return segmentGroup;\n }\n const rootCandidate = createSegmentGroupFromRouteRecursive(route.root);\n const rootSegmentGroup = createRoot(rootCandidate);\n return targetGroup ?? rootSegmentGroup;\n}\nfunction createUrlTreeFromSegmentGroup(relativeTo, commands, queryParams, fragment) {\n let root = relativeTo;\n while (root.parent) {\n root = root.parent;\n }\n // There are no commands so the `UrlTree` goes to the same path as the one created from the\n // `UrlSegmentGroup`. All we need to do is update the `queryParams` and `fragment` without\n // applying any other logic.\n if (commands.length === 0) {\n return tree(root, root, root, queryParams, fragment);\n }\n const nav = computeNavigation(commands);\n if (nav.toRoot()) {\n return tree(root, root, new UrlSegmentGroup([], {}), queryParams, fragment);\n }\n const position = findStartingPositionForTargetGroup(nav, root, relativeTo);\n const newSegmentGroup = position.processChildren ?\n updateSegmentGroupChildren(position.segmentGroup, position.index, nav.commands) :\n updateSegmentGroup(position.segmentGroup, position.index, nav.commands);\n return tree(root, position.segmentGroup, newSegmentGroup, queryParams, fragment);\n}\nfunction createUrlTree(route, urlTree, commands, queryParams, fragment) {\n if (commands.length === 0) {\n return tree(urlTree.root, urlTree.root, urlTree.root, queryParams, fragment);\n }\n const nav = computeNavigation(commands);\n if (nav.toRoot()) {\n return tree(urlTree.root, urlTree.root, new UrlSegmentGroup([], {}), queryParams, fragment);\n }\n function createTreeUsingPathIndex(lastPathIndex) {\n const startingPosition = findStartingPosition(nav, urlTree, route.snapshot?._urlSegment, lastPathIndex);\n const segmentGroup = startingPosition.processChildren ?\n updateSegmentGroupChildren(startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n return tree(urlTree.root, startingPosition.segmentGroup, segmentGroup, queryParams, fragment);\n }\n // Note: The types should disallow `snapshot` from being `undefined` but due to test mocks, this\n // may be the case. Since we try to access it at an earlier point before the refactor to add the\n // warning for `relativeLinkResolution: 'legacy'`, this may cause failures in tests where it\n // didn't before.\n const result = createTreeUsingPathIndex(route.snapshot?._lastPathIndex);\n // Check if application is relying on `relativeLinkResolution: 'legacy'`\n if (typeof ngDevMode === 'undefined' || !!ngDevMode) {\n const correctedResult = createTreeUsingPathIndex(route.snapshot?._correctedLastPathIndex);\n if (correctedResult.toString() !== result.toString()) {\n console.warn(`relativeLinkResolution: 'legacy' is deprecated and will be removed in a future version of Angular. The link to ${result.toString()} will change to ${correctedResult.toString()} if the code is not updated before then.`);\n }\n }\n return result;\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(oldRoot, oldSegmentGroup, newSegmentGroup, 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 let rootCandidate;\n if (oldRoot === oldSegmentGroup) {\n rootCandidate = newSegmentGroup;\n }\n else {\n rootCandidate = replaceSegment(oldRoot, oldSegmentGroup, newSegmentGroup);\n }\n const newRoot = createRoot(squashSegmentGroup(rootCandidate));\n return new UrlTree(newRoot, qp, fragment);\n}\n/**\n * Replaces the `oldSegment` which is located in some child of the `current` with the `newSegment`.\n * This also has the effect of creating new `UrlSegmentGroup` copies to update references. This\n * shouldn't be necessary but the fallback logic for an invalid ActivatedRoute in the creation uses\n * the Router's current url tree. If we don't create new segment groups, we end up modifying that\n * value.\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 ɵRuntimeError(4003 /* RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS */, NG_DEV_MODE$6 && 'Root segment cannot have matrix parameters');\n }\n const cmdWithOutlet = commands.find(isCommandWithOutlets);\n if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n throw new ɵRuntimeError(4004 /* RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND */, NG_DEV_MODE$6 && '{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 findStartingPositionForTargetGroup(nav, root, target) {\n if (nav.isAbsolute) {\n return new Position(root, true, 0);\n }\n if (!target) {\n // `NaN` is used only to maintain backwards compatibility with incorrectly mocked\n // `ActivatedRouteSnapshot` in tests. In prior versions of this code, the position here was\n // determined based on an internal property that was rarely mocked, resulting in `NaN`. In\n // reality, this code path should _never_ be touched since `target` is not allowed to be falsey.\n return new Position(root, false, NaN);\n }\n if (target.parent === null) {\n return new Position(target, true, 0);\n }\n const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n const index = target.segments.length - 1 + modifier;\n return createPositionApplyingDoubleDots(target, index, nav.numberOfDoubleDots);\n}\nfunction findStartingPosition(nav, tree, segmentGroup, lastPathIndex) {\n if (nav.isAbsolute) {\n return new Position(tree.root, true, 0);\n }\n if (lastPathIndex === -1) {\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 = lastPathIndex + modifier;\n return createPositionApplyingDoubleDots(segmentGroup, 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 ɵRuntimeError(4005 /* RuntimeErrorCode.INVALID_DOUBLE_DOTS */, NG_DEV_MODE$6 && '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 */\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 */\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.type = 0 /* EventType.NavigationStart */;\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 this.type = 1 /* EventType.NavigationEnd */;\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 /**\n * A description of why the navigation was cancelled. For debug purposes only. Use `code`\n * instead for a stable cancellation reason that can be used in production.\n */\n reason, \n /**\n * A code to indicate why the navigation was canceled. This cancellation code is stable for\n * the reason and can be relied on whereas the `reason` string could change and should not be\n * used in production.\n */\n code) {\n super(id, url);\n this.reason = reason;\n this.code = code;\n this.type = 2 /* EventType.NavigationCancel */;\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 /**\n * The target of the navigation when the error occurred.\n *\n * Note that this can be `undefined` because an error could have occurred before the\n * `RouterStateSnapshot` was created for the navigation.\n */\n target) {\n super(id, url);\n this.error = error;\n this.target = target;\n this.type = 3 /* EventType.NavigationError */;\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 this.type = 4 /* EventType.RoutesRecognized */;\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 this.type = 7 /* EventType.GuardsCheckStart */;\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 this.type = 8 /* EventType.GuardsCheckEnd */;\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 this.type = 5 /* EventType.ResolveStart */;\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 this.type = 6 /* EventType.ResolveEnd */;\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 this.type = 9 /* EventType.RouteConfigLoadStart */;\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 this.type = 10 /* EventType.RouteConfigLoadEnd */;\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 this.type = 11 /* EventType.ChildActivationStart */;\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 this.type = 12 /* EventType.ChildActivationEnd */;\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 this.type = 13 /* EventType.ActivationStart */;\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 this.type = 14 /* EventType.ActivationEnd */;\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 this.type = 15 /* EventType.Scroll */;\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}\nfunction stringifyEvent(routerEvent) {\n if (!('type' in routerEvent)) {\n return `Unknown Router Event: ${routerEvent.constructor.name}`;\n }\n switch (routerEvent.type) {\n case 14 /* EventType.ActivationEnd */:\n return `ActivationEnd(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case 13 /* EventType.ActivationStart */:\n return `ActivationStart(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case 12 /* EventType.ChildActivationEnd */:\n return `ChildActivationEnd(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case 11 /* EventType.ChildActivationStart */:\n return `ChildActivationStart(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case 8 /* EventType.GuardsCheckEnd */:\n return `GuardsCheckEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state}, shouldActivate: ${routerEvent.shouldActivate})`;\n case 7 /* EventType.GuardsCheckStart */:\n return `GuardsCheckStart(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case 2 /* EventType.NavigationCancel */:\n return `NavigationCancel(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n case 1 /* EventType.NavigationEnd */:\n return `NavigationEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}')`;\n case 3 /* EventType.NavigationError */:\n return `NavigationError(id: ${routerEvent.id}, url: '${routerEvent.url}', error: ${routerEvent.error})`;\n case 0 /* EventType.NavigationStart */:\n return `NavigationStart(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n case 6 /* EventType.ResolveEnd */:\n return `ResolveEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case 5 /* EventType.ResolveStart */:\n return `ResolveStart(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case 10 /* EventType.RouteConfigLoadEnd */:\n return `RouteConfigLoadEnd(path: ${routerEvent.route.path})`;\n case 9 /* EventType.RouteConfigLoadStart */:\n return `RouteConfigLoadStart(path: ${routerEvent.route.path})`;\n case 4 /* EventType.RoutesRecognized */:\n return `RoutesRecognized(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case 15 /* EventType.Scroll */:\n const pos = routerEvent.position ? `${routerEvent.position[0]}, ${routerEvent.position[1]}` : null;\n return `Scroll(anchor: '${routerEvent.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 */\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 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 = { ...res.params, ...curr.params };\n const data = { ...res.data, ...curr.data };\n const resolve = { ...curr.data, ...res.resolve, ...curr.routeConfig?.data, ...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, correctedLastPathIndex) {\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._correctedLastPathIndex = correctedLastPathIndex ?? 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 tree.value._futureSnapshot = curr.value;\n tree.children = curr.children.map(c => createNode(routeReuseStrategy, c));\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 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 */\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\nfunction redirectingNavigationError(urlSerializer, redirect) {\n const { redirectTo, navigationBehaviorOptions } = isUrlTree(redirect) ? { redirectTo: redirect, navigationBehaviorOptions: undefined } : redirect;\n const error = navigationCancelingError(ngDevMode && `Redirecting to \"${urlSerializer.serialize(redirectTo)}\"`, 0 /* NavigationCancellationCode.Redirect */, redirect);\n error.url = redirectTo;\n error.navigationBehaviorOptions = navigationBehaviorOptions;\n return error;\n}\nfunction navigationCancelingError(message, code, redirectUrl) {\n const error = new Error('NavigationCancelingError: ' + (message || ''));\n error[NAVIGATION_CANCELING_ERROR] = true;\n error.cancellationCode = code;\n if (redirectUrl) {\n error.url = redirectUrl;\n }\n return error;\n}\nfunction isRedirectingNavigationCancelingError$1(error) {\n return isNavigationCancelingError$1(error) && isUrlTree(error.url);\n}\nfunction isNavigationCancelingError$1(error) {\n return error && error[NAVIGATION_CANCELING_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 */\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 /**\n * @deprecated Passing a resolver to retrieve a component factory is not required and is\n * deprecated since v14.\n */\n this.resolver = null;\n this.injector = 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 context.attachRef = 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 */\nconst NG_DEV_MODE$5 = typeof ngDevMode === 'undefined' || ngDevMode;\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 * deactivate event when a component is destroyed.\n * An attached event emits when the `RouteReuseStrategy` instructs the outlet to reattach the\n * subtree, and the detached event emits when the `RouteReuseStrategy` instructs the outlet to\n * detach the subtree.\n *\n * ```\n * <router-outlet\n * (activate)='onActivate($event)'\n * (deactivate)='onDeactivate($event)'\n * (attach)='onAttach($event)'\n * (detach)='onDetach($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, name, changeDetector, environmentInjector) {\n this.parentContexts = parentContexts;\n this.location = location;\n this.changeDetector = changeDetector;\n this.environmentInjector = environmentInjector;\n this.activated = null;\n this._activatedRoute = null;\n this.activateEvents = new EventEmitter();\n this.deactivateEvents = new EventEmitter();\n /**\n * Emits an attached component instance when the `RouteReuseStrategy` instructs to re-attach a\n * previously detached subtree.\n **/\n this.attachEvents = new EventEmitter();\n /**\n * Emits a detached component instance when the `RouteReuseStrategy` instructs to detach the\n * subtree.\n */\n this.detachEvents = new EventEmitter();\n this.name = name || PRIMARY_OUTLET;\n parentContexts.onChildOutletCreated(this.name, this);\n }\n /** @nodoc */\n ngOnDestroy() {\n // Ensure that the registered outlet is this one before removing it on the context.\n if (this.parentContexts.getContext(this.name)?.outlet === this) {\n this.parentContexts.onChildOutletDestroyed(this.name);\n }\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.injector);\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 ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$5 && 'Outlet is not activated');\n return this.activated.instance;\n }\n get activatedRoute() {\n if (!this.activated)\n throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$5 && '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 ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, NG_DEV_MODE$5 && 'Outlet is not activated');\n this.location.detach();\n const cmp = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n this.detachEvents.emit(cmp.instance);\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 this.attachEvents.emit(ref.instance);\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, resolverOrInjector) {\n if (this.isActivated) {\n throw new ɵRuntimeError(4013 /* RuntimeErrorCode.OUTLET_ALREADY_ACTIVATED */, NG_DEV_MODE$5 && 'Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n const location = this.location;\n const snapshot = activatedRoute._futureSnapshot;\n const component = snapshot.component;\n const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n const injector = new OutletInjector(activatedRoute, childContexts, location.injector);\n if (resolverOrInjector && isComponentFactoryResolver(resolverOrInjector)) {\n const factory = resolverOrInjector.resolveComponentFactory(component);\n this.activated = location.createComponent(factory, location.length, injector);\n }\n else {\n const environmentInjector = resolverOrInjector ?? this.environmentInjector;\n this.activated = location.createComponent(component, { index: location.length, injector, environmentInjector });\n }\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterOutlet, deps: [{ token: ChildrenOutletContexts }, { token: i0.ViewContainerRef }, { token: 'name', attribute: true }, { token: i0.ChangeDetectorRef }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Directive });\nRouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: RouterOutlet, selector: \"router-outlet\", outputs: { activateEvents: \"activate\", deactivateEvents: \"deactivate\", attachEvents: \"attach\", detachEvents: \"detach\" }, exportAs: [\"outlet\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterOutlet, decorators: [{\n type: Directive,\n args: [{ selector: 'router-outlet', exportAs: 'outlet' }]\n }], ctorParameters: function () { return [{ type: ChildrenOutletContexts }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['name']\n }] }, { type: i0.ChangeDetectorRef }, { type: i0.EnvironmentInjector }]; }, propDecorators: { activateEvents: [{\n type: Output,\n args: ['activate']\n }], deactivateEvents: [{\n type: Output,\n args: ['deactivate']\n }], attachEvents: [{\n type: Output,\n args: ['attach']\n }], detachEvents: [{\n type: Output,\n args: ['detach']\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}\nfunction isComponentFactoryResolver(item) {\n return !!item.resolveComponentFactory;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\nɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: ɵEmptyOutletComponent, selector: \"ng-component\", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, dependencies: [{ kind: \"directive\", type: RouterOutlet, selector: \"router-outlet\", outputs: [\"activate\", \"deactivate\", \"attach\", \"detach\"], exportAs: [\"outlet\"] }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{\n type: Component,\n args: [{ template: `<router-outlet></router-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 */\n/**\n * Creates an `EnvironmentInjector` if the `Route` has providers and one does not already exist\n * and returns the injector. Otherwise, if the `Route` does not have `providers`, returns the\n * `currentInjector`.\n *\n * @param route The route that might have providers\n * @param currentInjector The parent injector of the `Route`\n */\nfunction getOrCreateRouteInjectorIfNeeded(route, currentInjector) {\n if (route.providers && !route._injector) {\n route._injector =\n createEnvironmentInjector(route.providers, currentInjector, `Route: ${route.path}`);\n }\n return route._injector ?? currentInjector;\n}\nfunction getLoadedRoutes(route) {\n return route._loadedRoutes;\n}\nfunction getLoadedInjector(route) {\n return route._loadedInjector;\n}\nfunction getLoadedComponent(route) {\n return route._loadedComponent;\n}\nfunction getProvidersInjector(route) {\n return route._injector;\n}\nfunction validateConfig(config, parentPath = '', requireStandaloneComponents = false) {\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, requireStandaloneComponents);\n }\n}\nfunction assertStandalone(fullPath, component) {\n if (component && !ɵisStandalone(component)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. The component must be standalone.`);\n }\n}\nfunction validateNode(route, fullPath, requireStandaloneComponents) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!route) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `\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 ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': Array cannot be specified`);\n }\n if (!route.component && !route.loadComponent && !route.children && !route.loadChildren &&\n (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `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 ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);\n }\n if (route.redirectTo && route.loadChildren) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);\n }\n if (route.children && route.loadChildren) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);\n }\n if (route.redirectTo && (route.component || route.loadComponent)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and component/loadComponent cannot be used together`);\n }\n if (route.component && route.loadComponent) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': component and loadComponent cannot be used together`);\n }\n if (route.redirectTo && route.canActivate) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `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 ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n }\n if (route.redirectTo === void 0 && !route.component && !route.loadComponent &&\n !route.children && !route.loadChildren) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. One of the following must be provided: component, loadComponent, redirectTo, children or loadChildren`);\n }\n if (route.path === void 0 && route.matcher === void 0) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `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 ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `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 ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n }\n if (requireStandaloneComponents) {\n assertStandalone(fullPath, route.component);\n }\n }\n if (route.children) {\n validateConfig(route.children, fullPath, requireStandaloneComponents);\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 ? { ...r, children } : { ...r };\n if ((!c.component && !c.loadComponent) && (children || c.loadChildren) &&\n (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 * Gets the first injector in the snapshot's parent tree.\n *\n * If the `Route` has a static list of providers, the returned injector will be the one created from\n * those. If it does not exist, the returned injector may come from the parents, which may be from a\n * loaded config or their static providers.\n *\n * Returns `null` if there is neither this nor any parents have a stored injector.\n *\n * Generally used for retrieving the injector to use for getting tokens for guards/resolvers and\n * also used for getting the correct injector to use for creating components.\n */\nfunction getClosestRouteInjector(snapshot) {\n if (!snapshot)\n return null;\n // If the current route has its own injector, which is created from the static providers on the\n // route itself, we should use that. Otherwise, we start at the parent since we do not want to\n // include the lazy loaded injector from this route.\n if (snapshot.routeConfig?._injector) {\n return snapshot.routeConfig._injector;\n }\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n // Note that the order here is important. `_loadedInjector` stored on the route with\n // `loadChildren: () => NgModule` so it applies to child routes with priority. The `_injector`\n // is created from the static providers on that parent route, so it applies to the children as\n // well, but only if there is no lazy loaded NgModuleRef injector.\n if (route?._loadedInjector)\n return route._loadedInjector;\n if (route?._injector)\n return route._injector;\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 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 there is no component, the Route is never attached to an outlet (because there is no\n // component to attach).\n if (route.value.component && 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 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 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 advanceActivatedRoute(stored.route.value);\n this.activateChildRoutes(futureNode, null, context.children);\n }\n else {\n const injector = getClosestRouteInjector(future.snapshot);\n const cmpFactoryResolver = injector?.get(ComponentFactoryResolver) ?? null;\n context.attachRef = null;\n context.route = future;\n context.resolver = cmpFactoryResolver;\n context.injector = injector;\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, context.injector);\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}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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, fallbackInjector) {\n const routeInjector = getClosestRouteInjector(snapshot);\n const injector = routeInjector ?? fallbackInjector;\n return injector.get(token);\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 */\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 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}\nfunction isCanMatch(guard) {\n return guard && isFunction(guard.canMatch);\n}\nfunction isRedirectingNavigationCancelingError(error) {\n return isNavigationCancelingError(error) && isUrlTree(error.url);\n}\nfunction isNavigationCancelingError(error) {\n return error && error[NAVIGATION_CANCELING_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 */\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(map((results) => {\n for (const result of results) {\n if (result === true) {\n // If result is true, check the next one\n continue;\n }\n else if (result === INITIAL_VALUE) {\n // If guard has not finished, we need to stop processing.\n return INITIAL_VALUE;\n }\n else if (result === false || result instanceof UrlTree) {\n // Result finished and was not true. Return the result.\n // Note that we only allow false/UrlTree. Other values are considered invalid and\n // ignored.\n return result;\n }\n }\n // Everything resolved to true. Return true.\n return true;\n }), filter((item) => item !== INITIAL_VALUE), 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 */\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({ ...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 => ({ ...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 const guardVal = isCanActivate(guard) ? guard.canActivate(futureARS, futureRSS) :\n guard(futureARS, futureRSS);\n return wrapIntoObservable(guardVal).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 const guardVal = isCanActivateChild(guard) ? guard.canActivateChild(futureARS, futureRSS) :\n guard(futureARS, futureRSS);\n return wrapIntoObservable(guardVal).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 const guardVal = isCanDeactivate(guard) ?\n guard.canDeactivate(component, currARS, currRSS, futureRSS) :\n guard(component, currARS, currRSS, futureRSS);\n return wrapIntoObservable(guardVal).pipe(first());\n });\n return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\nfunction runCanLoadGuards(injector, route, segments, urlSerializer) {\n const canLoad = route.canLoad;\n if (canLoad === undefined || canLoad.length === 0) {\n return of(true);\n }\n const canLoadObservables = canLoad.map((injectionToken) => {\n const guard = injector.get(injectionToken);\n const guardVal = isCanLoad(guard) ? guard.canLoad(route, segments) : guard(route, segments);\n return wrapIntoObservable(guardVal);\n });\n return of(canLoadObservables)\n .pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));\n}\nfunction redirectIfUrlTree(urlSerializer) {\n return pipe(tap((result) => {\n if (!isUrlTree(result))\n return;\n throw redirectingNavigationError(urlSerializer, result);\n }), map(result => result === true));\n}\nfunction runCanMatchGuards(injector, route, segments, urlSerializer) {\n const canMatch = route.canMatch;\n if (!canMatch || canMatch.length === 0)\n return of(true);\n const canMatchObservables = canMatch.map(injectionToken => {\n const guard = injector.get(injectionToken);\n const guardVal = isCanMatch(guard) ? guard.canMatch(route, segments) : guard(route, segments);\n return wrapIntoObservable(guardVal);\n });\n return of(canMatchObservables)\n .pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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$1 = {\n matched: false,\n consumedSegments: [],\n remainingSegments: [],\n parameters: {},\n positionalParamSegments: {}\n};\nfunction matchWithChecks(segmentGroup, route, segments, injector, urlSerializer) {\n const result = match(segmentGroup, route, segments);\n if (!result.matched) {\n return of(result);\n }\n // Only create the Route's `EnvironmentInjector` if it matches the attempted\n // navigation\n injector = getOrCreateRouteInjectorIfNeeded(route, injector);\n return runCanMatchGuards(injector, route, segments, urlSerializer)\n .pipe(map((v) => v === true ? result : { ...noMatch$1 }));\n}\nfunction match(segmentGroup, route, segments) {\n if (route.path === '') {\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n return { ...noMatch$1 };\n }\n return {\n matched: true,\n consumedSegments: [],\n remainingSegments: segments,\n parameters: {},\n positionalParamSegments: {}\n };\n }\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n if (!res)\n return { ...noMatch$1 };\n const posParams = {};\n forEach(res.posParams, (v, k) => {\n posParams[k] = v.path;\n });\n const parameters = res.consumed.length > 0 ?\n { ...posParams, ...res.consumed[res.consumed.length - 1].parameters } :\n posParams;\n return {\n matched: true,\n consumedSegments: res.consumed,\n remainingSegments: segments.slice(res.consumed.length),\n // TODO(atscott): investigate combining parameters and positionalParamSegments\n parameters,\n positionalParamSegments: res.posParams ?? {}\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 if (typeof ngDevMode === 'undefined' || !!ngDevMode) {\n s._segmentIndexShiftCorrected = consumedSegments.length;\n }\n }\n else {\n s._segmentIndexShift = consumedSegments.length;\n }\n res[getOutlet(r)] = s;\n }\n }\n return { ...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 */\nconst NG_DEV_MODE$4 = typeof ngDevMode === 'undefined' || ngDevMode;\nclass NoMatch$1 {\n constructor(segmentGroup) {\n this.segmentGroup = segmentGroup || null;\n }\n}\nclass AbsoluteRedirect {\n constructor(urlTree) {\n this.urlTree = urlTree;\n }\n}\nfunction noMatch(segmentGroup) {\n return throwError(new NoMatch$1(segmentGroup));\n}\nfunction absoluteRedirect(newTree) {\n return throwError(new AbsoluteRedirect(newTree));\n}\nfunction namedOutletsRedirect(redirectTo) {\n return throwError(new ɵRuntimeError(4000 /* RuntimeErrorCode.NAMED_OUTLET_REDIRECT */, NG_DEV_MODE$4 &&\n `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`));\n}\nfunction canLoadFails(route) {\n return throwError(navigationCancelingError(NG_DEV_MODE$4 &&\n `Cannot load children because the guard of the route \"path: '${route.path}'\" returned false`, 3 /* NavigationCancellationCode.GuardRejected */));\n}\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nfunction applyRedirects$1(injector, configLoader, urlSerializer, urlTree, config) {\n return new ApplyRedirects(injector, configLoader, urlSerializer, urlTree, config).apply();\n}\nclass ApplyRedirects {\n constructor(injector, configLoader, urlSerializer, urlTree, config) {\n this.injector = injector;\n this.configLoader = configLoader;\n this.urlSerializer = urlSerializer;\n this.urlTree = urlTree;\n this.config = config;\n this.allowRedirects = true;\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.injector, 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$1) {\n throw this.noMatchError(e);\n }\n throw e;\n }));\n }\n match(tree) {\n const expanded$ = this.expandSegmentGroup(this.injector, 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$1) {\n throw this.noMatchError(e);\n }\n throw e;\n }));\n }\n noMatchError(e) {\n return new ɵRuntimeError(4002 /* RuntimeErrorCode.NO_MATCH */, NG_DEV_MODE$4 && `Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n }\n createUrlTree(rootCandidate, queryParams, fragment) {\n const root = createRoot(rootCandidate);\n return new UrlTree(root, queryParams, fragment);\n }\n expandSegmentGroup(injector, routes, segmentGroup, outlet) {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.expandChildren(injector, routes, segmentGroup)\n .pipe(map((children) => new UrlSegmentGroup([], children)));\n }\n return this.expandSegment(injector, segmentGroup, routes, segmentGroup.segments, outlet, true);\n }\n // Recursively expand segment groups for all the child outlets\n expandChildren(injector, 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(injector, 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(injector, segmentGroup, routes, segments, outlet, allowRedirects) {\n return from(routes).pipe(concatMap(r => {\n const expanded$ = this.expandSegmentAgainstRoute(injector, segmentGroup, routes, r, segments, outlet, allowRedirects);\n return expanded$.pipe(catchError((e) => {\n if (e instanceof NoMatch$1) {\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 return noMatch(segmentGroup);\n }\n throw e;\n }));\n }\n expandSegmentAgainstRoute(injector, segmentGroup, routes, route, paths, outlet, allowRedirects) {\n if (!isImmediateMatch(route, segmentGroup, paths, outlet)) {\n return noMatch(segmentGroup);\n }\n if (route.redirectTo === undefined) {\n return this.matchSegmentAgainstRoute(injector, segmentGroup, route, paths, outlet);\n }\n if (allowRedirects && this.allowRedirects) {\n return this.expandSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, paths, outlet);\n }\n return noMatch(segmentGroup);\n }\n expandSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, segments, outlet) {\n if (route.path === '**') {\n return this.expandWildCardWithParamsAgainstRouteUsingRedirect(injector, routes, route, outlet);\n }\n return this.expandRegularSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, segments, outlet);\n }\n expandWildCardWithParamsAgainstRouteUsingRedirect(injector, 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(injector, group, routes, newSegments, outlet, false);\n }));\n }\n expandRegularSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, segments, outlet) {\n const { matched, consumedSegments, remainingSegments, positionalParamSegments } = match(segmentGroup, route, segments);\n if (!matched)\n return noMatch(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(injector, segmentGroup, routes, newSegments.concat(remainingSegments), outlet, false);\n }));\n }\n matchSegmentAgainstRoute(injector, rawSegmentGroup, route, segments, outlet) {\n if (route.path === '**') {\n // Only create the Route's `EnvironmentInjector` if it matches the attempted navigation\n injector = getOrCreateRouteInjectorIfNeeded(route, injector);\n if (route.loadChildren) {\n const loaded$ = route._loadedRoutes ?\n of({ routes: route._loadedRoutes, injector: route._loadedInjector }) :\n this.configLoader.loadChildren(injector, route);\n return loaded$.pipe(map((cfg) => {\n route._loadedRoutes = cfg.routes;\n route._loadedInjector = cfg.injector;\n return new UrlSegmentGroup(segments, {});\n }));\n }\n return of(new UrlSegmentGroup(segments, {}));\n }\n return matchWithChecks(rawSegmentGroup, route, segments, injector, this.urlSerializer)\n .pipe(switchMap(({ matched, consumedSegments, remainingSegments }) => {\n if (!matched)\n return noMatch(rawSegmentGroup);\n // If the route has an injector created from providers, we should start using that.\n injector = route._injector ?? injector;\n const childConfig$ = this.getChildConfig(injector, route, segments);\n return childConfig$.pipe(mergeMap((routerConfig) => {\n const childInjector = routerConfig.injector ?? injector;\n const childConfig = routerConfig.routes;\n const { segmentGroup: splitSegmentGroup, slicedSegments } = split(rawSegmentGroup, consumedSegments, remainingSegments, 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(childInjector, 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(childInjector, 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 }\n getChildConfig(injector, route, segments) {\n if (route.children) {\n // The children belong to the same module\n return of({ routes: route.children, injector });\n }\n if (route.loadChildren) {\n // lazy children belong to the loaded module\n if (route._loadedRoutes !== undefined) {\n return of({ routes: route._loadedRoutes, injector: route._loadedInjector });\n }\n return runCanLoadGuards(injector, route, segments, this.urlSerializer)\n .pipe(mergeMap((shouldLoadResult) => {\n if (shouldLoadResult) {\n return this.configLoader.loadChildren(injector, route)\n .pipe(tap((cfg) => {\n route._loadedRoutes = cfg.routes;\n route._loadedInjector = cfg.injector;\n }));\n }\n return canLoadFails(route);\n }));\n }\n return of({ routes: [], injector });\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.applyRedirectCreateUrlTree(redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n }\n applyRedirectCreateUrlTree(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 ɵRuntimeError(4001 /* RuntimeErrorCode.MISSING_REDIRECT */, NG_DEV_MODE$4 &&\n `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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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(environmentInjector, configLoader, urlSerializer, config) {\n return switchMap(t => applyRedirects$1(environmentInjector, configLoader, urlSerializer, t.extractedUrl, config)\n .pipe(map(urlAfterRedirects => ({ ...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 */\nconst NG_DEV_MODE$3 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nclass NoMatch {\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$1(injector, rootComponentType, config, urlTree, url, urlSerializer, paramsInheritanceStrategy = 'emptyOnly', relativeLinkResolution = 'legacy') {\n return new Recognizer(injector, rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution, urlSerializer)\n .recognize()\n .pipe(switchMap(result => {\n if (result === null) {\n return newObservableError(new NoMatch());\n }\n else {\n return of(result);\n }\n }));\n}\nclass Recognizer {\n constructor(injector, rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution, urlSerializer) {\n this.injector = injector;\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 this.urlSerializer = urlSerializer;\n }\n recognize() {\n const rootSegmentGroup = split(this.urlTree.root, [], [], this.config.filter(c => c.redirectTo === undefined), this.relativeLinkResolution)\n .segmentGroup;\n return this.processSegmentGroup(this.injector, this.config, rootSegmentGroup, PRIMARY_OUTLET)\n .pipe(map(children => {\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({ ...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 }\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(injector, config, segmentGroup, outlet) {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(injector, config, segmentGroup);\n }\n return this.processSegment(injector, 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(injector, config, segmentGroup) {\n return from(Object.keys(segmentGroup.children))\n .pipe(concatMap(childOutlet => {\n const child = segmentGroup.children[childOutlet];\n // Sort the config so that routes with outlets that match the one being activated\n // appear first, followed by routes for other outlets, which might match if they have\n // an empty path.\n const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n return this.processSegmentGroup(injector, sortedConfig, child, childOutlet);\n }), scan((children, outletChildren) => {\n if (!children || !outletChildren)\n return null;\n children.push(...outletChildren);\n return children;\n }), takeWhile(children => children !== null), defaultIfEmpty(null), last$1(), map(children => {\n if (children === null)\n return null;\n // Because we may have matched two outlets to the same empty path segment, we can have\n // multiple activated results for the same outlet. We should merge the children of\n // these results so the final return value is only one `TreeNode` per outlet.\n const mergedChildren = mergeEmptyPathMatches(children);\n if (NG_DEV_MODE$3) {\n // This should really never happen - we are only taking the first match for each\n // outlet and merge the empty path matches.\n checkOutletNameUniqueness(mergedChildren);\n }\n sortActivatedRouteSnapshots(mergedChildren);\n return mergedChildren;\n }));\n }\n processSegment(injector, routes, segmentGroup, segments, outlet) {\n return from(routes).pipe(concatMap(r => {\n return this.processSegmentAgainstRoute(r._injector ?? injector, r, segmentGroup, segments, outlet);\n }), first((x) => !!x), catchError(e => {\n if (e instanceof EmptyError) {\n if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return of([]);\n }\n return of(null);\n }\n throw e;\n }));\n }\n processSegmentAgainstRoute(injector, route, rawSegment, segments, outlet) {\n if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet))\n return of(null);\n let matchResult;\n if (route.path === '**') {\n const params = segments.length > 0 ? last(segments).parameters : {};\n const pathIndexShift = getPathIndexShift(rawSegment) + segments.length;\n const snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze({ ...this.urlTree.queryParams }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getSourceSegmentGroup(rawSegment), pathIndexShift, getResolve(route), \n // NG_DEV_MODE is used to prevent the getCorrectedPathIndexShift function from affecting\n // production bundle size. This value is intended only to surface a warning to users\n // depending on `relativeLinkResolution: 'legacy'` in dev mode.\n (NG_DEV_MODE$3 ? getCorrectedPathIndexShift(rawSegment) + segments.length :\n pathIndexShift));\n matchResult = of({\n snapshot,\n consumedSegments: [],\n remainingSegments: [],\n });\n }\n else {\n matchResult =\n matchWithChecks(rawSegment, route, segments, injector, this.urlSerializer)\n .pipe(map(({ matched, consumedSegments, remainingSegments, parameters }) => {\n if (!matched) {\n return null;\n }\n const pathIndexShift = getPathIndexShift(rawSegment) + consumedSegments.length;\n const snapshot = new ActivatedRouteSnapshot(consumedSegments, parameters, Object.freeze({ ...this.urlTree.queryParams }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getSourceSegmentGroup(rawSegment), pathIndexShift, getResolve(route), (NG_DEV_MODE$3 ?\n getCorrectedPathIndexShift(rawSegment) + consumedSegments.length :\n pathIndexShift));\n return { snapshot, consumedSegments, remainingSegments };\n }));\n }\n return matchResult.pipe(switchMap((result) => {\n if (result === null) {\n return of(null);\n }\n const { snapshot, consumedSegments, remainingSegments } = result;\n // If the route has an injector created from providers, we should start using that.\n injector = route._injector ?? injector;\n const childInjector = route._loadedInjector ?? injector;\n const childConfig = getChildConfig(route);\n const { segmentGroup, slicedSegments } = split(rawSegment, consumedSegments, remainingSegments, \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 return this.processChildren(childInjector, childConfig, segmentGroup).pipe(map(children => {\n if (children === null) {\n return null;\n }\n return [new TreeNode(snapshot, children)];\n }));\n }\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return of([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\n // continue 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\n // this: {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 return this\n .processSegment(childInjector, childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet)\n .pipe(map(children => {\n if (children === null) {\n return null;\n }\n return [new TreeNode(snapshot, children)];\n }));\n }));\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._loadedRoutes;\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\n * the children from each duplicate. This is necessary because different outlets can match a\n * single 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\n // in a row. Put another way: whenever we combine children of two nodes, we need to also check\n // if any 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 ɵRuntimeError(4006 /* RuntimeErrorCode.TWO_SEGMENTS_WITH_SAME_OUTLET */, NG_DEV_MODE$3 && `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 ?? 0;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n res += s._segmentIndexShift ?? 0;\n }\n return res - 1;\n}\nfunction getCorrectedPathIndexShift(segmentGroup) {\n let s = segmentGroup;\n let res = s._segmentIndexShiftCorrected ?? s._segmentIndexShift ?? 0;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n res += s._segmentIndexShiftCorrected ?? 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(injector, rootComponentType, config, serializer, paramsInheritanceStrategy, relativeLinkResolution) {\n return mergeMap(t => recognize$1(injector, rootComponentType, config, t.urlAfterRedirects, serializer.serialize(t.urlAfterRedirects), serializer, paramsInheritanceStrategy, relativeLinkResolution)\n .pipe(map(targetSnapshot => ({ ...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 */\n/**\n * A private symbol used to store the value of `Route.title` inside the `Route.data` if it is a\n * static string or `Route.resolve` if anything else. This allows us to reuse the existing route\n * data/resolvers to support the title feature without new instrumentation in the `Router` pipeline.\n */\nconst RouteTitle = Symbol('RouteTitle');\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 config = futureARS.routeConfig;\n const resolve = futureARS._resolve;\n if (config?.title !== undefined && !hasStaticTitle(config)) {\n resolve[RouteTitle] = config.title;\n }\n return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n .pipe(map((resolvedData) => {\n futureARS._resolvedData = resolvedData;\n futureARS.data = inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve;\n if (config && hasStaticTitle(config)) {\n futureARS.data[RouteTitle] = config.title;\n }\n return null;\n }));\n}\nfunction resolveNode(resolve, futureARS, futureRSS, moduleInjector) {\n const keys = getDataKeys(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(first(), tap((value) => {\n data[key] = value;\n }))), takeLast(1), mapTo(data), catchError((e) => e instanceof EmptyError ? EMPTY : throwError(e)));\n}\nfunction getDataKeys(obj) {\n return [...Object.keys(obj), ...Object.getOwnPropertySymbols(obj)];\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}\nfunction hasStaticTitle(config) {\n return typeof config.title === 'string' || config.title === 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 * 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 */\nconst NG_DEV_MODE$2 = typeof ngDevMode === 'undefined' || !!ngDevMode;\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(injector, compiler) {\n this.injector = injector;\n this.compiler = compiler;\n this.componentLoaders = new WeakMap();\n this.childrenLoaders = new WeakMap();\n }\n loadComponent(route) {\n if (this.componentLoaders.get(route)) {\n return this.componentLoaders.get(route);\n }\n else if (route._loadedComponent) {\n return of(route._loadedComponent);\n }\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n const loadRunner = wrapIntoObservable(route.loadComponent())\n .pipe(tap(component => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n NG_DEV_MODE$2 && assertStandalone(route.path ?? '', component);\n route._loadedComponent = component;\n }), finalize(() => {\n this.componentLoaders.delete(route);\n }));\n // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n const loader = new ConnectableObservable(loadRunner, () => new Subject()).pipe(refCount());\n this.componentLoaders.set(route, loader);\n return loader;\n }\n loadChildren(parentInjector, route) {\n if (this.childrenLoaders.get(route)) {\n return this.childrenLoaders.get(route);\n }\n else if (route._loadedRoutes) {\n return of({ routes: route._loadedRoutes, injector: route._loadedInjector });\n }\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n const moduleFactoryOrRoutes$ = this.loadModuleFactoryOrRoutes(route.loadChildren);\n const loadRunner = moduleFactoryOrRoutes$.pipe(map((factoryOrRoutes) => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n // This injector comes from the `NgModuleRef` when lazy loading an `NgModule`. There is no\n // injector associated with lazy loading a `Route` array.\n let injector;\n let rawRoutes;\n let requireStandaloneComponents = false;\n if (Array.isArray(factoryOrRoutes)) {\n rawRoutes = factoryOrRoutes;\n requireStandaloneComponents = true;\n }\n else {\n injector = factoryOrRoutes.create(parentInjector).injector;\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 rawRoutes = flatten(injector.get(ROUTES, [], InjectFlags.Self | InjectFlags.Optional));\n }\n const routes = rawRoutes.map(standardizeConfig);\n NG_DEV_MODE$2 && validateConfig(routes, route.path, requireStandaloneComponents);\n return { routes, injector };\n }), finalize(() => {\n this.childrenLoaders.delete(route);\n }));\n // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n const loader = new ConnectableObservable(loadRunner, () => new Subject())\n .pipe(refCount());\n this.childrenLoaders.set(route, loader);\n return loader;\n }\n loadModuleFactoryOrRoutes(loadChildren) {\n return wrapIntoObservable(loadChildren()).pipe(mergeMap((t) => {\n if (t instanceof NgModuleFactory || Array.isArray(t)) {\n return of(t);\n }\n else {\n return from(this.compiler.compileModuleAsync(t));\n }\n }));\n }\n}\nRouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });\nRouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterConfigLoader });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterConfigLoader, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 */\nconst NG_DEV_MODE$1 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nfunction defaultErrorHandler(error) {\n throw error;\n}\nfunction defaultMalformedUriErrorHandler(error, urlSerializer, url) {\n return urlSerializer.parse('/');\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, 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 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 * Hook that enables you to pause navigation after the preactivation phase.\n * Used by `RouterModule`.\n *\n * @internal\n */\n this.afterPreactivation = () => of(void 0);\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, resolved data, and title 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 * @deprecated\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. This means that if the URL of the browser is updated\n * _before_ the navigation is canceled, the Router will simply replace the item in history rather\n * than trying to restore to the previous location in the session history. This happens most\n * frequently with `urlUpdateStrategy: 'eager'` and navigations with the browser back/forward\n * buttons.\n *\n * 'computed' - Will attempt to return to the same index in the session history that corresponds\n * to the Angular route when the navigation gets cancelled. For example, if the browser back\n * button is clicked and the navigation is cancelled, the Router will trigger a forward navigation\n * and vice versa.\n *\n * Note: the 'computed' option is incompatible with any `UrlHandlingStrategy` which only\n * handles a portion of the URL because the history restoration navigates to the previous place in\n * the browser history rather than simply resetting a portion of the URL.\n *\n * The default value is `replace`.\n *\n */\n this.canceledNavigationResolution = 'replace';\n const onLoadStart = (r) => this.triggerEvent(new RouteConfigLoadStart(r));\n const onLoadEnd = (r) => this.triggerEvent(new RouteConfigLoadEnd(r));\n this.configLoader = injector.get(RouterConfigLoader);\n this.configLoader.onLoadEndListener = onLoadEnd;\n this.configLoader.onLoadStartListener = onLoadStart;\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.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 return this.location.getState()?.ɵ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 => ({ ...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl) })), \n // Using switchMap so we cancel executing navigations when a new one comes in\n switchMap(overallTransitionState => {\n let completed = false;\n let errored = false;\n return of(overallTransitionState)\n .pipe(\n // Store the Navigation object\n tap(t => {\n this.currentNavigation = {\n id: t.id,\n initialUrl: t.rawUrl,\n extractedUrl: t.extractedUrl,\n trigger: t.source,\n extras: t.extras,\n previousNavigation: this.lastSuccessfulNavigation ?\n { ...this.lastSuccessfulNavigation, previousNavigation: null } :\n null\n };\n }), switchMap(t => {\n const browserUrlTree = this.browserUrlTree.toString();\n const urlTransition = !this.navigated ||\n t.extractedUrl.toString() !== browserUrlTree ||\n // Navigations which succeed or ones which fail and are cleaned up\n // correctly should result in `browserUrlTree` and `currentUrlTree`\n // matching. If this is not the case, assume something went wrong and\n // try processing the URL again.\n browserUrlTree !== this.currentUrlTree.toString();\n const processCurrentUrl = (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n if (processCurrentUrl) {\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.extractedUrl;\n }\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(this.ngModule.injector, this.configLoader, this.urlSerializer, this.config), \n // Update the currentNavigation\n // `urlAfterRedirects` is guaranteed to be set after this point\n tap(t => {\n this.currentNavigation = {\n ...this.currentNavigation,\n finalUrl: t.urlAfterRedirects\n };\n overallTransitionState.urlAfterRedirects = t.urlAfterRedirects;\n }), \n // Recognize\n recognize(this.ngModule.injector, this.rootComponentType, this.config, this.urlSerializer, this.paramsInheritanceStrategy, this.relativeLinkResolution), \n // Update URL if in `eager` update mode\n tap(t => {\n overallTransitionState.targetSnapshot = t.targetSnapshot;\n if (this.urlUpdateStrategy === 'eager') {\n if (!t.extras.skipLocationChange) {\n const rawUrl = this.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);\n this.setBrowserUrl(rawUrl, 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\n * was, we handle this \"error condition\" by navigating to the\n * previously 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 overallTransitionState = {\n ...t,\n targetSnapshot,\n urlAfterRedirects: extractedUrl,\n extras: { ...extras, skipLocationChange: false, replaceUrl: false },\n };\n return of(overallTransitionState);\n }\n else {\n /* When neither the current or previous URL can be processed, do\n * nothing other than update router's internal reference to the\n * current \"settled\" URL. This way the next navigation will be coming\n * from the current URL in the browser.\n */\n this.rawUrlTree = t.rawUrl;\n t.resolve(null);\n return EMPTY;\n }\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 => {\n overallTransitionState = {\n ...t,\n guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.rootContexts)\n };\n return overallTransitionState;\n }), checkGuards(this.ngModule.injector, (evt) => this.triggerEvent(evt)), tap(t => {\n overallTransitionState.guardsResult = t.guardsResult;\n if (isUrlTree(t.guardsResult)) {\n throw redirectingNavigationError(this.urlSerializer, t.guardsResult);\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, '', 3 /* NavigationCancellationCode.GuardRejected */);\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, NG_DEV_MODE$1 ?\n `At least one route resolver didn't emit any value.` :\n '', 2 /* NavigationCancellationCode.NoDataFromResolver */);\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 // --- LOAD COMPONENTS ---\n switchTap((t) => {\n const loadComponents = (route) => {\n const loaders = [];\n if (route.routeConfig?.loadComponent &&\n !route.routeConfig._loadedComponent) {\n loaders.push(this.configLoader.loadComponent(route.routeConfig)\n .pipe(tap(loadedComponent => {\n route.component = loadedComponent;\n }), map(() => void 0)));\n }\n for (const child of route.children) {\n loaders.push(...loadComponents(child));\n }\n return loaders;\n };\n return combineLatest(loadComponents(t.targetSnapshot.root))\n .pipe(defaultIfEmpty(), take(1));\n }), switchTap(() => this.afterPreactivation()), map((t) => {\n const targetRouterState = createRouterState(this.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);\n overallTransitionState = { ...t, targetRouterState };\n return (overallTransitionState);\n }), \n /* Once here, we are about to activate synchronously. The assumption is\n this will succeed, and user code may read from the Router service.\n Therefore before activation, we need to update router properties storing\n the current URL and the RouterState, as well as updated the browser URL.\n All this should happen *before* activating. */\n tap((t) => {\n this.currentUrlTree = t.urlAfterRedirects;\n this.rawUrlTree =\n this.urlHandlingStrategy.merge(t.urlAfterRedirects, 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,\n * we set the `completed` or `errored` flag. However, there are some\n * situations where we could get here without either of those being set.\n * For instance, a redirect during NavigationStart. Therefore, this is a\n * catch-all to make sure the NavigationCancel event is fired when a\n * navigation gets cancelled but not caught by other means. */\n if (!completed && !errored) {\n const cancelationReason = NG_DEV_MODE$1 ?\n `Navigation ID ${overallTransitionState\n .id} is not equal to the current navigation id ${this.navigationId}` :\n '';\n this.cancelNavigationTransition(overallTransitionState, cancelationReason, 1 /* NavigationCancellationCode.SupersededByNewNavigation */);\n }\n // Only clear current navigation if it is still set to the one that\n // finalized.\n if (this.currentNavigation?.id === overallTransitionState.id) {\n this.currentNavigation = null;\n }\n }), catchError((e) => {\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$1(e)) {\n if (!isRedirectingNavigationCancelingError$1(e)) {\n // Set property only if we're not redirecting. If we landed on a page\n // and redirect to `/` route, the new navigation is going to see the\n // `/` isn't a change from the default currentUrlTree and won't\n // navigate. This is only applicable with initial navigation, so\n // setting `navigated` only when not redirecting resolves this\n // scenario.\n this.navigated = true;\n this.restoreHistory(overallTransitionState, true);\n }\n const navCancel = new NavigationCancel(overallTransitionState.id, this.serializeUrl(overallTransitionState.extractedUrl), e.message, e.cancellationCode);\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 (!isRedirectingNavigationCancelingError$1(e)) {\n overallTransitionState.resolve(false);\n }\n else {\n const mergedTree = this.urlHandlingStrategy.merge(e.url, this.rawUrlTree);\n const extras = {\n skipLocationChange: overallTransitionState.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\n // if the navigation is rejected.\n replaceUrl: this.urlUpdateStrategy === 'eager' ||\n isBrowserTriggeredNavigation(overallTransitionState.source)\n };\n this.scheduleNavigation(mergedTree, 'imperative', null, extras, {\n resolve: overallTransitionState.resolve,\n reject: overallTransitionState.reject,\n promise: overallTransitionState.promise\n });\n }\n /* All other errors should reset to the router's internal URL reference\n * to the pre-error state. */\n }\n else {\n this.restoreHistory(overallTransitionState, true);\n const navError = new NavigationError(overallTransitionState.id, this.serializeUrl(overallTransitionState.extractedUrl), e, overallTransitionState.targetSnapshot ?? undefined);\n eventsSubject.next(navError);\n try {\n overallTransitionState.resolve(this.errorHandler(e));\n }\n catch (ee) {\n overallTransitionState.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 setTransition(t) {\n this.transitions.next({ ...this.transitions.value, ...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 source = event['type'] === 'popstate' ? 'popstate' : 'hashchange';\n if (source === 'popstate') {\n // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n // hybrid apps.\n setTimeout(() => {\n const extras = { replaceUrl: true };\n // Navigations coming from Angular router have a navigationId state\n // property. When this exists, restore the state.\n const state = event.state?.navigationId ? event.state : null;\n if (state) {\n const stateCopy = { ...state };\n delete stateCopy.navigationId;\n delete stateCopy.ɵrouterPageId;\n if (Object.keys(stateCopy).length !== 0) {\n extras.state = stateCopy;\n }\n }\n const urlTree = this.parseUrl(event['url']);\n this.scheduleNavigation(urlTree, source, state, extras);\n }, 0);\n }\n });\n }\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 NG_DEV_MODE$1 && 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 = { ...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);\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 = { ...exactMatchOptions };\n }\n else if (matchOptions === false) {\n options = { ...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 this.titleStrategy?.updateTitle(this.routerState.snapshot);\n t.resolve(true);\n }, e => {\n this.console.warn(`Unhandled Navigation Error: ${e}`);\n });\n }\n scheduleNavigation(rawUrl, source, restoredState, extras, priorPromise) {\n if (this.disposed) {\n return Promise.resolve(false);\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 = this.browserPageId ?? 0;\n }\n else {\n targetPageId = (this.browserPageId ?? 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 = { ...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 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 `urlUpdateStrategy` is `eager`; `setBrowserUrl` method is called\n // before any verification.\n const browserUrlUpdateOccurred = (t.source === 'popstate' || this.urlUpdateStrategy === 'eager' ||\n this.currentUrlTree === this.currentNavigation?.finalUrl);\n if (browserUrlUpdateOccurred && targetPagePosition !== 0) {\n this.location.historyGo(targetPagePosition);\n }\n else if (this.currentUrlTree === this.currentNavigation?.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 // Note here that we use the urlHandlingStrategy to get the reset `rawUrlTree` because it may be\n // configured to handle only part of the navigation URL. This means we would only want to reset\n // the part of the navigation handled by the Angular router rather than the whole URL. In\n // addition, the URLHandlingStrategy may be configured to specifically preserve parts of the URL\n // when merging, such as the query params so they are not lost on a refresh.\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, code) {\n const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), reason, code);\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: Router, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Injectable });\nRouter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: Router });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: Router, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.Type }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: i3.Location }, { type: i0.Injector }, { type: i0.Compiler }, { type: undefined }]; } });\nfunction validateCommands(commands) {\n for (let i = 0; i < commands.length; i++) {\n const cmd = commands[i];\n if (cmd == null) {\n throw new ɵRuntimeError(4008 /* RuntimeErrorCode.NULLISH_COMMAND */, NG_DEV_MODE$1 && `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 segments.\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, tabIndexAttribute, renderer, el) {\n this.router = router;\n this.route = route;\n this.tabIndexAttribute = tabIndexAttribute;\n this.renderer = renderer;\n this.el = el;\n this.commands = null;\n /** @internal */\n this.onChanges = new Subject();\n this.setTabIndexIfNotOnNativeEl('0');\n }\n /**\n * Modifies the tab index if there was not a tabindex attribute on the element during\n * instantiation.\n */\n setTabIndexIfNotOnNativeEl(newTabIndex) {\n if (this.tabIndexAttribute != null /* both `null` and `undefined` */) {\n return;\n }\n const renderer = this.renderer;\n const nativeElement = this.el.nativeElement;\n if (newTabIndex !== null) {\n renderer.setAttribute(nativeElement, 'tabindex', newTabIndex);\n }\n else {\n renderer.removeAttribute(nativeElement, 'tabindex');\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**: effectively disables the `routerLink`\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 this.setTabIndexIfNotOnNativeEl('0');\n }\n else {\n this.commands = null;\n this.setTabIndexIfNotOnNativeEl(null);\n }\n }\n /** @nodoc */\n onClick() {\n if (this.urlTree === null) {\n return true;\n }\n const extras = {\n skipLocationChange: ɵcoerceToBoolean(this.skipLocationChange),\n replaceUrl: ɵcoerceToBoolean(this.replaceUrl),\n state: this.state,\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return true;\n }\n get urlTree() {\n if (this.commands === null) {\n return null;\n }\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: ɵcoerceToBoolean(this.preserveFragment),\n });\n }\n}\nRouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nRouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: RouterLink, selector: \":not(a):not(area)[routerLink]\", inputs: { queryParams: \"queryParams\", fragment: \"fragment\", queryParamsHandling: \"queryParamsHandling\", preserveFragment: \"preserveFragment\", skipLocationChange: \"skipLocationChange\", replaceUrl: \"replaceUrl\", state: \"state\", relativeTo: \"relativeTo\", routerLink: \"routerLink\" }, host: { listeners: { \"click\": \"onClick()\" } }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterLink, decorators: [{\n type: Directive,\n args: [{ selector: ':not(a):not(area)[routerLink]' }]\n }], ctorParameters: function () { return [{ type: Router }, { type: ActivatedRoute }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { 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 }], routerLink: [{\n type: Input\n }], onClick: [{\n type: HostListener,\n args: ['click']\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 = null;\n // the url displayed on the anchor element.\n // @HostBinding('attr.href') is used rather than @HostBinding() because it removes the\n // href attribute when it becomes `null`.\n this.href = null;\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**: Disables the link by removing the `href`\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 = null;\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' || this.urlTree === null) {\n return true;\n }\n const extras = {\n skipLocationChange: ɵcoerceToBoolean(this.skipLocationChange),\n replaceUrl: ɵcoerceToBoolean(this.replaceUrl),\n state: this.state\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return false;\n }\n updateTargetUrlAndHref() {\n this.href = this.urlTree !== null ?\n this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree)) :\n null;\n }\n get urlTree() {\n if (this.commands === null) {\n return null;\n }\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: ɵcoerceToBoolean(this.preserveFragment),\n });\n }\n}\nRouterLinkWithHref.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterLinkWithHref, deps: [{ token: Router }, { token: ActivatedRoute }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });\nRouterLinkWithHref.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: RouterLinkWithHref, selector: \"a[routerLink],area[routerLink]\", inputs: { target: \"target\", queryParams: \"queryParams\", fragment: \"fragment\", queryParamsHandling: \"queryParamsHandling\", preserveFragment: \"preserveFragment\", skipLocationChange: \"skipLocationChange\", replaceUrl: \"replaceUrl\", state: \"state\", relativeTo: \"relativeTo\", routerLink: \"routerLink\" }, host: { listeners: { \"click\": \"onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)\" }, properties: { \"attr.target\": \"this.target\", \"attr.href\": \"this.href\" } }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterLinkWithHref, decorators: [{\n type: Directive,\n args: [{ selector: 'a[routerLink],area[routerLink]' }]\n }], ctorParameters: function () { return [{ type: Router }, { type: ActivatedRoute }, { type: i3.LocationStrategy }]; }, propDecorators: { 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 }], href: [{\n type: HostBinding,\n args: ['attr.href']\n }], routerLink: [{\n type: Input\n }], onClick: [{\n type: HostListener,\n args: ['click',\n ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey']]\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * The `RouterLinkActive` directive can also be used to set the aria-current attribute\n * to provide an alternative distinction for active elements to visually impaired users.\n *\n * For example, the following code adds the 'active' class to the Home Page link when it is\n * indeed active and in such case also sets its aria-current attribute to 'page':\n *\n * ```\n * <a routerLink=\"/\" routerLinkActive=\"active\" ariaCurrentWhenActive=\"page\">Home Page</a>\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 /**\n *\n * You can use the output `isActiveChange` to get notified each time the link becomes\n * active or inactive.\n *\n * Emits:\n * true -> Route is active\n * false -> Route is inactive\n *\n * ```\n * <a\n * routerLink=\"/user/bob\"\n * routerLinkActive=\"active-link\"\n * (isActiveChange)=\"this.onRouterLinkActive($event)\">Bob</a>\n * ```\n */\n this.isActiveChange = new EventEmitter();\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 this.linkInputChangesSubscription?.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 this.routerEventsSubscription.unsubscribe();\n this.linkInputChangesSubscription?.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 if (hasActiveLinks && this.ariaCurrentWhenActive !== undefined) {\n this.renderer.setAttribute(this.element.nativeElement, 'aria-current', this.ariaCurrentWhenActive.toString());\n }\n else {\n this.renderer.removeAttribute(this.element.nativeElement, 'aria-current');\n }\n // Emit on isActiveChange after classes are updated\n this.isActiveChange.emit(hasActiveLinks);\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) => link.urlTree ? router.isActive(link.urlTree, options) : false;\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }, { token: RouterLinkWithHref, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nRouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: RouterLinkActive, selector: \"[routerLinkActive]\", inputs: { routerLinkActiveOptions: \"routerLinkActiveOptions\", ariaCurrentWhenActive: \"ariaCurrentWhenActive\", routerLinkActive: \"routerLinkActive\" }, outputs: { isActiveChange: \"isActiveChange\" }, queries: [{ propertyName: \"links\", predicate: RouterLink, descendants: true }, { propertyName: \"linksWithHrefs\", predicate: RouterLinkWithHref, descendants: true }], exportAs: [\"routerLinkActive\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterLinkActive, decorators: [{\n type: Directive,\n args: [{\n selector: '[routerLinkActive]',\n exportAs: 'routerLinkActive',\n }]\n }], ctorParameters: function () { return [{ type: Router }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: RouterLink, decorators: [{\n type: Optional\n }] }, { type: RouterLinkWithHref, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { links: [{\n type: ContentChildren,\n args: [RouterLink, { descendants: true }]\n }], linksWithHrefs: [{\n type: ContentChildren,\n args: [RouterLinkWithHref, { descendants: true }]\n }], routerLinkActiveOptions: [{\n type: Input\n }], ariaCurrentWhenActive: [{\n type: Input\n }], isActiveChange: [{\n type: Output\n }], routerLinkActive: [{\n type: Input\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 * Provides a strategy for setting the page title after a router navigation.\n *\n * The built-in implementation traverses the router state snapshot and finds the deepest primary\n * outlet with `title` property. Given the `Routes` below, navigating to\n * `/base/child(popup:aux)` would result in the document title being set to \"child\".\n * ```\n * [\n * {path: 'base', title: 'base', children: [\n * {path: 'child', title: 'child'},\n * ],\n * {path: 'aux', outlet: 'popup', title: 'popupTitle'}\n * ]\n * ```\n *\n * This class can be used as a base class for custom title strategies. That is, you can create your\n * own class that extends the `TitleStrategy`. Note that in the above example, the `title`\n * from the named outlet is never used. However, a custom strategy might be implemented to\n * incorporate titles in named outlets.\n *\n * @publicApi\n * @see [Page title guide](guide/router#setting-the-page-title)\n */\nclass TitleStrategy {\n /**\n * @returns The `title` of the deepest primary route.\n */\n buildTitle(snapshot) {\n let pageTitle;\n let route = snapshot.root;\n while (route !== undefined) {\n pageTitle = this.getResolvedTitleForRoute(route) ?? pageTitle;\n route = route.children.find(child => child.outlet === PRIMARY_OUTLET);\n }\n return pageTitle;\n }\n /**\n * Given an `ActivatedRouteSnapshot`, returns the final value of the\n * `Route.title` property, which can either be a static string or a resolved value.\n */\n getResolvedTitleForRoute(snapshot) {\n return snapshot.data[RouteTitle];\n }\n}\nTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: TitleStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]\n }] });\n/**\n * The default `TitleStrategy` used by the router that updates the title using the `Title` service.\n */\nclass DefaultTitleStrategy extends TitleStrategy {\n constructor(title) {\n super();\n this.title = title;\n }\n /**\n * Sets the title of the browser to the given value.\n *\n * @param title The `pageTitle` from the deepest primary route.\n */\n updateTitle(snapshot) {\n const title = this.buildTitle(snapshot);\n if (title !== undefined) {\n this.title.setTitle(title);\n }\n }\n}\nDefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });\nDefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DefaultTitleStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.Title }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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}\nPreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: PreloadAllModules, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\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}\nNoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NoPreloading, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NoPreloading, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\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, compiler, injector, preloadingStrategy, loader) {\n this.router = router;\n this.injector = injector;\n this.preloadingStrategy = preloadingStrategy;\n this.loader = loader;\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 return this.processRoutes(this.injector, this.router.config);\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n processRoutes(injector, routes) {\n const res = [];\n for (const route of routes) {\n if (route.providers && !route._injector) {\n route._injector =\n createEnvironmentInjector(route.providers, injector, `Route: ${route.path}`);\n }\n const injectorForCurrentRoute = route._injector ?? injector;\n const injectorForChildren = route._loadedInjector ?? injectorForCurrentRoute;\n if ((route.loadChildren && !route._loadedRoutes) ||\n (route.loadComponent && !route._loadedComponent)) {\n res.push(this.preloadConfig(injectorForCurrentRoute, route));\n }\n else if (route.children || route._loadedRoutes) {\n res.push(this.processRoutes(injectorForChildren, (route.children ?? route._loadedRoutes)));\n }\n }\n return from(res).pipe(mergeAll());\n }\n preloadConfig(injector, route) {\n return this.preloadingStrategy.preload(route, () => {\n let loadedChildren$;\n if (route.loadChildren && route.canLoad === undefined) {\n loadedChildren$ = this.loader.loadChildren(injector, route);\n }\n else {\n loadedChildren$ = of(null);\n }\n const recursiveLoadChildren$ = loadedChildren$.pipe(mergeMap((config) => {\n if (config === null) {\n return of(void 0);\n }\n route._loadedRoutes = config.routes;\n route._loadedInjector = config.injector;\n // If the loaded config was a module, use that as the module/module injector going\n // forward. Otherwise, continue using the current module/module injector.\n return this.processRoutes(config.injector ?? injector, config.routes);\n }));\n if (route.loadComponent && !route._loadedComponent) {\n const loadComponent$ = this.loader.loadComponent(route);\n return from([recursiveLoadChildren$, loadComponent$]).pipe(mergeAll());\n }\n else {\n return recursiveLoadChildren$;\n }\n });\n }\n}\nRouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });\nRouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterPreloader });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterPreloader, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 ROUTER_SCROLLER = new InjectionToken('');\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterScroller, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Injectable });\nRouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterScroller });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterScroller, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: Router }, { type: i3.ViewportScroller }, { type: undefined }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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;\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(NG_DEV_MODE ? 'router config' : 'ROUTER_CONFIGURATION', {\n providedIn: 'root',\n factory: () => ({}),\n});\n/**\n * @docsNotRequired\n */\nconst ROUTER_FORROOT_GUARD = new InjectionToken(NG_DEV_MODE ? 'router duplicate forRoot guard' : 'ROUTER_FORROOT_GUARD');\nconst ROUTER_PRELOADER = new InjectionToken(NG_DEV_MODE ? 'router preloader' : '');\nconst ROUTER_PROVIDERS = [\n Location,\n { provide: UrlSerializer, useClass: DefaultUrlSerializer },\n {\n provide: Router,\n useFactory: setupRouter,\n deps: [\n UrlSerializer, ChildrenOutletContexts, Location, Injector, Compiler, ROUTES, TitleStrategy,\n ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],\n [RouteReuseStrategy, new Optional()]\n ]\n },\n ChildrenOutletContexts,\n { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },\n RouterConfigLoader,\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 NG_DEV_MODE ? (config?.enableTracing ? provideTracing() : []) : [],\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 config?.useHash ? provideHashLocationStrategy() : providePathLocationStrategy(),\n provideRouterScroller(),\n config?.preloadingStrategy ? providePreloading(config.preloadingStrategy) : [],\n { provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken },\n config?.initialNavigation ? provideInitialNavigation(config) : [],\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }, { token: Router, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });\nRouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterModule, declarations: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent] });\nRouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RouterModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: ROUTER_DIRECTIVES,\n exports: ROUTER_DIRECTIVES,\n }]\n }], ctorParameters: 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 }] }]; } });\nfunction provideRouterScroller() {\n return {\n provide: ROUTER_SCROLLER,\n useFactory: () => {\n const router = inject(Router);\n const viewportScroller = inject(ViewportScroller);\n const config = inject(ROUTER_CONFIGURATION);\n if (config.scrollOffset) {\n viewportScroller.setOffset(config.scrollOffset);\n }\n return new RouterScroller(router, viewportScroller, config);\n },\n };\n}\nfunction provideHashLocationStrategy() {\n return { provide: LocationStrategy, useClass: HashLocationStrategy };\n}\nfunction providePathLocationStrategy() {\n return { provide: LocationStrategy, useClass: PathLocationStrategy };\n}\nfunction provideForRootGuard(router) {\n if (NG_DEV_MODE && router) {\n throw new ɵRuntimeError(4007 /* RuntimeErrorCode.FOR_ROOT_CALLED_TWICE */, `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, compiler, config, titleStrategy, opts = {}, urlHandlingStrategy, routeReuseStrategy) {\n const router = new Router(null, urlSerializer, contexts, location, injector, compiler, flatten(config));\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n router.titleStrategy = titleStrategy;\n assignExtraOptionsToRouter(opts, router);\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 if (opts.canceledNavigationResolution) {\n router.canceledNavigationResolution = opts.canceledNavigationResolution;\n }\n}\nfunction rootRoute(router) {\n return router.routerState.root;\n}\nfunction getBootstrapListener() {\n const injector = inject(Injector);\n return (bootstrappedComponentRef) => {\n const ref = injector.get(ApplicationRef);\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n const router = injector.get(Router);\n const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n // Default case\n if (injector.get(INITIAL_NAVIGATION, null, InjectFlags.Optional) === null) {\n router.initialNavigation();\n }\n injector.get(ROUTER_PRELOADER, null, InjectFlags.Optional)?.setUpPreloading();\n injector.get(ROUTER_SCROLLER, null, InjectFlags.Optional)?.init();\n router.resetRootComponentType(ref.componentTypes[0]);\n bootstrapDone.next();\n bootstrapDone.complete();\n };\n}\n// TODO(atscott): This should not be in the public API\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(NG_DEV_MODE ? 'Router Initializer' : '');\nfunction provideInitialNavigation(config) {\n return [\n config.initialNavigation === 'disabled' ? provideDisabledInitialNavigation() : [],\n config.initialNavigation === 'enabledBlocking' ? provideEnabledBlockingInitialNavigation() : [],\n ];\n}\nfunction provideRouterInitializer() {\n return [\n // ROUTER_INITIALIZER token should be removed. It's public API but shouldn't be. We can just\n // have `getBootstrapListener` directly attached to APP_BOOTSTRAP_LISTENER.\n { provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener },\n { provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER },\n ];\n}\n/**\n * A subject used to indicate that the bootstrapping phase is done. When initial navigation is\n * `enabledBlocking`, the first navigation waits until bootstrapping is finished before continuing\n * to the activation phase.\n */\nconst BOOTSTRAP_DONE = new InjectionToken(NG_DEV_MODE ? 'bootstrap done indicator' : '', {\n factory: () => {\n return new Subject();\n }\n});\nfunction provideEnabledBlockingInitialNavigation() {\n return [\n { provide: INITIAL_NAVIGATION, useValue: 'enabledBlocking' },\n {\n provide: APP_INITIALIZER,\n multi: true,\n deps: [Injector],\n useFactory: (injector) => {\n const locationInitialized = injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n let initNavigation = false;\n /**\n * Performs the given action once the router finishes its next/current navigation.\n *\n * If the navigation is canceled or errors without a redirect, the navigation is considered\n * complete. If the `NavigationEnd` event emits, the navigation is also considered complete.\n */\n function afterNextNavigation(action) {\n const router = injector.get(Router);\n router.events\n .pipe(filter((e) => e instanceof NavigationEnd || e instanceof NavigationCancel ||\n e instanceof NavigationError), map(e => {\n if (e instanceof NavigationEnd) {\n // Navigation assumed to succeed if we get `ActivationStart`\n return true;\n }\n const redirecting = e instanceof NavigationCancel ?\n (e.code === 0 /* NavigationCancellationCode.Redirect */ ||\n e.code === 1 /* NavigationCancellationCode.SupersededByNewNavigation */) :\n false;\n return redirecting ? null : false;\n }), filter((result) => result !== null), take(1))\n .subscribe(() => {\n action();\n });\n }\n return () => {\n return locationInitialized.then(() => {\n return new Promise(resolve => {\n const router = injector.get(Router);\n const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n afterNextNavigation(() => {\n // Unblock APP_INITIALIZER in case the initial navigation was canceled or errored\n // without a redirect.\n resolve(true);\n initNavigation = true;\n });\n router.afterPreactivation = () => {\n // Unblock APP_INITIALIZER once we get to `afterPreactivation`. At this point, we\n // assume activation will complete successfully (even though this is not\n // guaranteed).\n resolve(true);\n // only the initial navigation should be delayed until bootstrapping is done.\n if (!initNavigation) {\n return bootstrapDone.closed ? of(void 0) : bootstrapDone;\n // subsequent navigations should not be delayed\n }\n else {\n return of(void 0);\n }\n };\n router.initialNavigation();\n });\n });\n };\n }\n },\n ];\n}\nconst INITIAL_NAVIGATION = new InjectionToken(NG_DEV_MODE ? 'initial navigation' : '');\nfunction provideDisabledInitialNavigation() {\n return [\n {\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: () => {\n const router = inject(Router);\n return () => {\n router.setUpLocationChangeListener();\n };\n }\n },\n { provide: INITIAL_NAVIGATION, useValue: 'disabled' }\n ];\n}\nfunction provideTracing() {\n if (NG_DEV_MODE) {\n return [{\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory: () => {\n const router = inject(Router);\n return () => router.events.subscribe((e) => {\n // tslint:disable:no-console\n console.group?.(`Router Event: ${e.constructor.name}`);\n console.log(stringifyEvent(e));\n console.log(e);\n console.groupEnd?.();\n // tslint:enable:no-console\n });\n }\n }];\n }\n else {\n return [];\n }\n}\nfunction providePreloading(preloadingStrategy) {\n return [\n RouterPreloader,\n { provide: ROUTER_PRELOADER, useExisting: RouterPreloader },\n { provide: PreloadingStrategy, useExisting: preloadingStrategy },\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('14.1.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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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, DefaultTitleStrategy, 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, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, provideRoutes, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, assignExtraOptionsToRouter as ɵassignExtraOptionsToRouter, flatten as ɵflatten, providePreloading as ɵprovidePreloading };\n","import * as i1 from '@ngrx/store';\nimport { createAction, props, isNgrxMockEnvironment, select, ACTIVE_RUNTIME_CHECKS, createFeatureSelector, createSelector } from '@ngrx/store';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, isDevMode, NgModule, Inject } from '@angular/core';\nimport * as i2 from '@angular/router';\nimport { NavigationStart, RoutesRecognized, NavigationCancel, NavigationError, NavigationEnd } from '@angular/router';\nimport { withLatestFrom } from 'rxjs/operators';\n\n/**\n * An action dispatched when a router navigation request is fired.\n */\nconst ROUTER_REQUEST = '@ngrx/router-store/request';\nconst routerRequestAction = createAction(ROUTER_REQUEST, props());\n/**\n * An action dispatched when the router navigates.\n */\nconst ROUTER_NAVIGATION = '@ngrx/router-store/navigation';\nconst routerNavigationAction = createAction(ROUTER_NAVIGATION, props());\n/**\n * An action dispatched when the router cancels navigation.\n */\nconst ROUTER_CANCEL = '@ngrx/router-store/cancel';\nconst routerCancelAction = createAction(ROUTER_CANCEL, props());\n/**\n * An action dispatched when the router errors.\n */\nconst ROUTER_ERROR = '@ngrx/router-store/error';\nconst routerErrorAction = createAction(ROUTER_ERROR, props());\n/**\n * An action dispatched after navigation has ended and new route is active.\n */\nconst ROUTER_NAVIGATED = '@ngrx/router-store/navigated';\nconst routerNavigatedAction = createAction(ROUTER_NAVIGATED, props());\n\nfunction routerReducer(state, action) {\n // Allow compilation with strictFunctionTypes - ref: #1344\n const routerAction = action;\n switch (routerAction.type) {\n case ROUTER_NAVIGATION:\n case ROUTER_ERROR:\n case ROUTER_CANCEL:\n return {\n state: routerAction.payload.routerState,\n navigationId: routerAction.payload.event.id,\n };\n default:\n return state;\n }\n}\n\nclass RouterStateSerializer {\n}\n\nclass FullRouterStateSerializer {\n serialize(routerState) {\n return {\n root: this.serializeRoute(routerState.root),\n url: routerState.url,\n };\n }\n serializeRoute(route) {\n const children = route.children.map((c) => this.serializeRoute(c));\n return {\n params: route.params,\n paramMap: route.paramMap,\n data: route.data,\n url: route.url,\n outlet: route.outlet,\n routeConfig: route.routeConfig\n ? {\n component: route.routeConfig.component,\n path: route.routeConfig.path,\n pathMatch: route.routeConfig.pathMatch,\n redirectTo: route.routeConfig.redirectTo,\n outlet: route.routeConfig.outlet,\n title: route.routeConfig.title,\n }\n : null,\n queryParams: route.queryParams,\n queryParamMap: route.queryParamMap,\n fragment: route.fragment,\n component: (route.routeConfig\n ? route.routeConfig.component\n : undefined),\n root: undefined,\n parent: undefined,\n firstChild: children[0],\n pathFromRoot: undefined,\n children,\n };\n }\n}\n\nclass MinimalRouterStateSerializer {\n serialize(routerState) {\n return {\n root: this.serializeRoute(routerState.root),\n url: routerState.url,\n };\n }\n serializeRoute(route) {\n const children = route.children.map((c) => this.serializeRoute(c));\n return {\n params: route.params,\n data: route.data,\n url: route.url,\n outlet: route.outlet,\n routeConfig: route.routeConfig\n ? {\n path: route.routeConfig.path,\n pathMatch: route.routeConfig.pathMatch,\n redirectTo: route.routeConfig.redirectTo,\n outlet: route.routeConfig.outlet,\n title: route.routeConfig.title,\n }\n : null,\n queryParams: route.queryParams,\n fragment: route.fragment,\n firstChild: children[0],\n children,\n };\n }\n}\n\nvar NavigationActionTiming;\n(function (NavigationActionTiming) {\n NavigationActionTiming[NavigationActionTiming[\"PreActivation\"] = 1] = \"PreActivation\";\n NavigationActionTiming[NavigationActionTiming[\"PostActivation\"] = 2] = \"PostActivation\";\n})(NavigationActionTiming || (NavigationActionTiming = {}));\nconst _ROUTER_CONFIG = new InjectionToken('@ngrx/router-store Internal Configuration');\nconst ROUTER_CONFIG = new InjectionToken('@ngrx/router-store Configuration');\nconst DEFAULT_ROUTER_FEATURENAME = 'router';\nfunction _createRouterConfig(config) {\n return {\n stateKey: DEFAULT_ROUTER_FEATURENAME,\n serializer: MinimalRouterStateSerializer,\n navigationActionTiming: NavigationActionTiming.PreActivation,\n ...config,\n };\n}\nvar RouterTrigger;\n(function (RouterTrigger) {\n RouterTrigger[RouterTrigger[\"NONE\"] = 1] = \"NONE\";\n RouterTrigger[RouterTrigger[\"ROUTER\"] = 2] = \"ROUTER\";\n RouterTrigger[RouterTrigger[\"STORE\"] = 3] = \"STORE\";\n})(RouterTrigger || (RouterTrigger = {}));\n/**\n * Connects RouterModule with StoreModule.\n *\n * During the navigation, before any guards or resolvers run, the router will dispatch\n * a ROUTER_NAVIGATION action, which has the following signature:\n *\n * ```\n * export type RouterNavigationPayload = {\n * routerState: SerializedRouterStateSnapshot,\n * event: RoutesRecognized\n * }\n * ```\n *\n * Either a reducer or an effect can be invoked in response to this action.\n * If the invoked reducer throws, the navigation will be canceled.\n *\n * If navigation gets canceled because of a guard, a ROUTER_CANCEL action will be\n * dispatched. If navigation results in an error, a ROUTER_ERROR action will be dispatched.\n *\n * Both ROUTER_CANCEL and ROUTER_ERROR contain the store state before the navigation\n * which can be used to restore the consistency of the store.\n *\n * Usage:\n *\n * ```typescript\n * @NgModule({\n * declarations: [AppCmp, SimpleCmp],\n * imports: [\n * BrowserModule,\n * StoreModule.forRoot(mapOfReducers),\n * RouterModule.forRoot([\n * { path: '', component: SimpleCmp },\n * { path: 'next', component: SimpleCmp }\n * ]),\n * StoreRouterConnectingModule.forRoot()\n * ],\n * bootstrap: [AppCmp]\n * })\n * export class AppModule {\n * }\n * ```\n */\nclass StoreRouterConnectingModule {\n constructor(store, router, serializer, errorHandler, config, activeRuntimeChecks) {\n this.store = store;\n this.router = router;\n this.serializer = serializer;\n this.errorHandler = errorHandler;\n this.config = config;\n this.activeRuntimeChecks = activeRuntimeChecks;\n this.lastEvent = null;\n this.routerState = null;\n this.trigger = RouterTrigger.NONE;\n this.stateKey = this.config.stateKey;\n if (!isNgrxMockEnvironment() &&\n isDevMode() &&\n (activeRuntimeChecks?.strictActionSerializability ||\n activeRuntimeChecks?.strictStateSerializability) &&\n this.serializer instanceof FullRouterStateSerializer) {\n console.warn('@ngrx/router-store: The serializability runtime checks cannot be enabled ' +\n 'with the FullRouterStateSerializer. The FullRouterStateSerializer ' +\n 'has an unserializable router state and actions that are not serializable. ' +\n 'To use the serializability runtime checks either use ' +\n 'the MinimalRouterStateSerializer or implement a custom router state serializer.');\n }\n this.setUpStoreStateListener();\n this.setUpRouterEventsListener();\n }\n static forRoot(config = {}) {\n return {\n ngModule: StoreRouterConnectingModule,\n providers: [\n { provide: _ROUTER_CONFIG, useValue: config },\n {\n provide: ROUTER_CONFIG,\n useFactory: _createRouterConfig,\n deps: [_ROUTER_CONFIG],\n },\n {\n provide: RouterStateSerializer,\n useClass: config.serializer\n ? config.serializer\n : config.routerState === 0 /* Full */\n ? FullRouterStateSerializer\n : MinimalRouterStateSerializer,\n },\n ],\n };\n }\n setUpStoreStateListener() {\n this.store\n .pipe(select(this.stateKey), withLatestFrom(this.store))\n .subscribe(([routerStoreState, storeState]) => {\n this.navigateIfNeeded(routerStoreState, storeState);\n });\n }\n navigateIfNeeded(routerStoreState, storeState) {\n if (!routerStoreState || !routerStoreState.state) {\n return;\n }\n if (this.trigger === RouterTrigger.ROUTER) {\n return;\n }\n if (this.lastEvent instanceof NavigationStart) {\n return;\n }\n const url = routerStoreState.state.url;\n if (!isSameUrl(this.router.url, url)) {\n this.storeState = storeState;\n this.trigger = RouterTrigger.STORE;\n this.router.navigateByUrl(url).catch((error) => {\n this.errorHandler.handleError(error);\n });\n }\n }\n setUpRouterEventsListener() {\n const dispatchNavLate = this.config.navigationActionTiming ===\n NavigationActionTiming.PostActivation;\n let routesRecognized;\n this.router.events\n .pipe(withLatestFrom(this.store))\n .subscribe(([event, storeState]) => {\n this.lastEvent = event;\n if (event instanceof NavigationStart) {\n this.routerState = this.serializer.serialize(this.router.routerState.snapshot);\n if (this.trigger !== RouterTrigger.STORE) {\n this.storeState = storeState;\n this.dispatchRouterRequest(event);\n }\n }\n else if (event instanceof RoutesRecognized) {\n routesRecognized = event;\n if (!dispatchNavLate && this.trigger !== RouterTrigger.STORE) {\n this.dispatchRouterNavigation(event);\n }\n }\n else if (event instanceof NavigationCancel) {\n this.dispatchRouterCancel(event);\n this.reset();\n }\n else if (event instanceof NavigationError) {\n this.dispatchRouterError(event);\n this.reset();\n }\n else if (event instanceof NavigationEnd) {\n if (this.trigger !== RouterTrigger.STORE) {\n if (dispatchNavLate) {\n this.dispatchRouterNavigation(routesRecognized);\n }\n this.dispatchRouterNavigated(event);\n }\n this.reset();\n }\n });\n }\n dispatchRouterRequest(event) {\n this.dispatchRouterAction(ROUTER_REQUEST, { event });\n }\n dispatchRouterNavigation(lastRoutesRecognized) {\n const nextRouterState = this.serializer.serialize(lastRoutesRecognized.state);\n this.dispatchRouterAction(ROUTER_NAVIGATION, {\n routerState: nextRouterState,\n event: new RoutesRecognized(lastRoutesRecognized.id, lastRoutesRecognized.url, lastRoutesRecognized.urlAfterRedirects, nextRouterState),\n });\n }\n dispatchRouterCancel(event) {\n this.dispatchRouterAction(ROUTER_CANCEL, {\n storeState: this.storeState,\n event,\n });\n }\n dispatchRouterError(event) {\n this.dispatchRouterAction(ROUTER_ERROR, {\n storeState: this.storeState,\n event: new NavigationError(event.id, event.url, `${event}`),\n });\n }\n dispatchRouterNavigated(event) {\n const routerState = this.serializer.serialize(this.router.routerState.snapshot);\n this.dispatchRouterAction(ROUTER_NAVIGATED, { event, routerState });\n }\n dispatchRouterAction(type, payload) {\n this.trigger = RouterTrigger.ROUTER;\n try {\n this.store.dispatch({\n type,\n payload: {\n routerState: this.routerState,\n ...payload,\n event: this.config.routerState === 0 /* Full */\n ? payload.event\n : {\n id: payload.event.id,\n url: payload.event.url,\n // safe, as it will just be `undefined` for non-NavigationEnd router events\n urlAfterRedirects: payload.event\n .urlAfterRedirects,\n },\n },\n });\n }\n finally {\n this.trigger = RouterTrigger.NONE;\n }\n }\n reset() {\n this.trigger = RouterTrigger.NONE;\n this.storeState = null;\n this.routerState = null;\n }\n}\n/** @nocollapse */ StoreRouterConnectingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreRouterConnectingModule, deps: [{ token: i1.Store }, { token: i2.Router }, { token: RouterStateSerializer }, { token: i0.ErrorHandler }, { token: ROUTER_CONFIG }, { token: ACTIVE_RUNTIME_CHECKS }], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ StoreRouterConnectingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreRouterConnectingModule });\n/** @nocollapse */ StoreRouterConnectingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreRouterConnectingModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreRouterConnectingModule, decorators: [{\n type: NgModule,\n args: [{}]\n }], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.Router }, { type: RouterStateSerializer }, { type: i0.ErrorHandler }, { type: undefined, decorators: [{\n type: Inject,\n args: [ROUTER_CONFIG]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [ACTIVE_RUNTIME_CHECKS]\n }] }]; } });\n/**\n * Check if the URLs are matching. Accounts for the possibility of trailing \"/\" in url.\n */\nfunction isSameUrl(first, second) {\n return stripTrailingSlash(first) === stripTrailingSlash(second);\n}\nfunction stripTrailingSlash(text) {\n if (text?.length > 0 && text[text.length - 1] === '/') {\n return text.substring(0, text.length - 1);\n }\n return text;\n}\n\nfunction createRouterSelector() {\n return createFeatureSelector(DEFAULT_ROUTER_FEATURENAME);\n}\nfunction getSelectors(selectState = createRouterSelector()) {\n const selectRouterState = createSelector(selectState, (router) => router && router.state);\n const selectRootRoute = createSelector(selectRouterState, (routerState) => routerState && routerState.root);\n const selectCurrentRoute = createSelector(selectRootRoute, (rootRoute) => {\n if (!rootRoute) {\n return undefined;\n }\n let route = rootRoute;\n while (route.firstChild) {\n route = route.firstChild;\n }\n return route;\n });\n const selectFragment = createSelector(selectRootRoute, (route) => route && route.fragment);\n const selectQueryParams = createSelector(selectRootRoute, (route) => route && route.queryParams);\n const selectQueryParam = (param) => createSelector(selectQueryParams, (params) => params && params[param]);\n const selectRouteParams = createSelector(selectCurrentRoute, (route) => route && route.params);\n const selectRouteParam = (param) => createSelector(selectRouteParams, (params) => params && params[param]);\n const selectRouteData = createSelector(selectCurrentRoute, (route) => route && route.data);\n const selectUrl = createSelector(selectRouterState, (routerState) => routerState && routerState.url);\n const selectTitle = createSelector(selectCurrentRoute, (route) => route && route.routeConfig?.title);\n return {\n selectCurrentRoute,\n selectFragment,\n selectQueryParams,\n selectQueryParam,\n selectRouteParams,\n selectRouteParam,\n selectRouteData,\n selectUrl,\n selectTitle,\n };\n}\n\n/**\n * DO NOT EDIT\n *\n * This file is automatically generated at build\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { DEFAULT_ROUTER_FEATURENAME, FullRouterStateSerializer, MinimalRouterStateSerializer, NavigationActionTiming, ROUTER_CANCEL, ROUTER_CONFIG, ROUTER_ERROR, ROUTER_NAVIGATED, ROUTER_NAVIGATION, ROUTER_REQUEST, RouterStateSerializer, StoreRouterConnectingModule, createRouterSelector, getSelectors, routerCancelAction, routerErrorAction, routerNavigatedAction, routerNavigationAction, routerReducer, routerRequestAction };\n","import * as i0 from '@angular/core';\nimport { PLATFORM_ID, Injectable, Inject, NgModule } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator;\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n hasV8BreakIterator = typeof Intl !== 'undefined' && Intl.v8BreakIterator;\n}\ncatch {\n hasV8BreakIterator = false;\n}\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\nclass Platform {\n constructor(_platformId) {\n this._platformId = _platformId;\n // We want to use the Angular platform check because if the Document is shimmed\n // without the navigator, the following checks will fail. This is preferred because\n // sometimes the Document may be shimmed without the user's knowledge or intention\n /** Whether the Angular application is being rendered in the browser. */\n this.isBrowser = this._platformId\n ? isPlatformBrowser(this._platformId)\n : typeof document === 'object' && !!document;\n /** Whether the current browser is Microsoft Edge. */\n this.EDGE = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n /** Whether the current rendering engine is Microsoft Trident. */\n this.TRIDENT = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n this.BLINK = this.isBrowser &&\n !!(window.chrome || hasV8BreakIterator) &&\n typeof CSS !== 'undefined' &&\n !this.EDGE &&\n !this.TRIDENT;\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n this.WEBKIT = this.isBrowser &&\n /AppleWebKit/i.test(navigator.userAgent) &&\n !this.BLINK &&\n !this.EDGE &&\n !this.TRIDENT;\n /** Whether the current platform is Apple iOS. */\n this.IOS = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n this.FIREFOX = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n this.ANDROID = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n this.SAFARI = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n }\n}\nPlatform.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Platform, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });\nPlatform.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Platform, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Platform, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: Object, decorators: [{\n type: Inject,\n args: [PLATFORM_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 PlatformModule {\n}\nPlatformModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: PlatformModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nPlatformModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: PlatformModule });\nPlatformModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: PlatformModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: PlatformModule, decorators: [{\n type: NgModule,\n args: [{}]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Cached result Set of input types support by the current browser. */\nlet supportedInputTypes;\n/** Types of `<input>` that *might* be supported. */\nconst candidateInputTypes = [\n // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n // first changing it to something else:\n // The specified value \"\" does not conform to the required format.\n // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n 'color',\n 'button',\n 'checkbox',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n];\n/** @returns The input types supported by this browser. */\nfunction getSupportedInputTypes() {\n // Result is cached.\n if (supportedInputTypes) {\n return supportedInputTypes;\n }\n // We can't check if an input type is not supported until we're on the browser, so say that\n // everything is supported when not on the browser. We don't use `Platform` here since it's\n // just a helper function and can't inject it.\n if (typeof document !== 'object' || !document) {\n supportedInputTypes = new Set(candidateInputTypes);\n return supportedInputTypes;\n }\n let featureTestInput = document.createElement('input');\n supportedInputTypes = new Set(candidateInputTypes.filter(value => {\n featureTestInput.setAttribute('type', value);\n return featureTestInput.type === value;\n }));\n return supportedInputTypes;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Cached result of whether the user's browser supports passive event listeners. */\nlet supportsPassiveEvents;\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nfunction supportsPassiveEventListeners() {\n if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n try {\n window.addEventListener('test', null, Object.defineProperty({}, 'passive', {\n get: () => (supportsPassiveEvents = true),\n }));\n }\n finally {\n supportsPassiveEvents = supportsPassiveEvents || false;\n }\n }\n return supportsPassiveEvents;\n}\n/**\n * Normalizes an `AddEventListener` object to something that can be passed\n * to `addEventListener` on any browser, no matter whether it supports the\n * `options` parameter.\n * @param options Object to be normalized.\n */\nfunction normalizePassiveListenerOptions(options) {\n return supportsPassiveEventListeners() ? options : !!options.capture;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Cached result of the way the browser handles the horizontal scroll axis in RTL mode. */\nlet rtlScrollAxisType;\n/** Cached result of the check that indicates whether the browser supports scroll behaviors. */\nlet scrollBehaviorSupported;\n/** Check whether the browser supports scroll behaviors. */\nfunction supportsScrollBehavior() {\n if (scrollBehaviorSupported == null) {\n // If we're not in the browser, it can't be supported. Also check for `Element`, because\n // some projects stub out the global `document` during SSR which can throw us off.\n if (typeof document !== 'object' || !document || typeof Element !== 'function' || !Element) {\n scrollBehaviorSupported = false;\n return scrollBehaviorSupported;\n }\n // If the element can have a `scrollBehavior` style, we can be sure that it's supported.\n if ('scrollBehavior' in document.documentElement.style) {\n scrollBehaviorSupported = true;\n }\n else {\n // At this point we have 3 possibilities: `scrollTo` isn't supported at all, it's\n // supported but it doesn't handle scroll behavior, or it has been polyfilled.\n const scrollToFunction = Element.prototype.scrollTo;\n if (scrollToFunction) {\n // We can detect if the function has been polyfilled by calling `toString` on it. Native\n // functions are obfuscated using `[native code]`, whereas if it was overwritten we'd get\n // the actual function source. Via https://davidwalsh.name/detect-native-function. Consider\n // polyfilled functions as supporting scroll behavior.\n scrollBehaviorSupported = !/\\{\\s*\\[native code\\]\\s*\\}/.test(scrollToFunction.toString());\n }\n else {\n scrollBehaviorSupported = false;\n }\n }\n }\n return scrollBehaviorSupported;\n}\n/**\n * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,\n * Firefox & Safari are NEGATED, and IE & Edge are INVERTED.\n */\nfunction getRtlScrollAxisType() {\n // We can't check unless we're on the browser. Just assume 'normal' if we're not.\n if (typeof document !== 'object' || !document) {\n return 0 /* RtlScrollAxisType.NORMAL */;\n }\n if (rtlScrollAxisType == null) {\n // Create a 1px wide scrolling container and a 2px wide content element.\n const scrollContainer = document.createElement('div');\n const containerStyle = scrollContainer.style;\n scrollContainer.dir = 'rtl';\n containerStyle.width = '1px';\n containerStyle.overflow = 'auto';\n containerStyle.visibility = 'hidden';\n containerStyle.pointerEvents = 'none';\n containerStyle.position = 'absolute';\n const content = document.createElement('div');\n const contentStyle = content.style;\n contentStyle.width = '2px';\n contentStyle.height = '1px';\n scrollContainer.appendChild(content);\n document.body.appendChild(scrollContainer);\n rtlScrollAxisType = 0 /* RtlScrollAxisType.NORMAL */;\n // The viewport starts scrolled all the way to the right in RTL mode. If we are in a NORMAL\n // browser this would mean that the scrollLeft should be 1. If it's zero instead we know we're\n // dealing with one of the other two types of browsers.\n if (scrollContainer.scrollLeft === 0) {\n // In a NEGATED browser the scrollLeft is always somewhere in [-maxScrollAmount, 0]. For an\n // INVERTED browser it is always somewhere in [0, maxScrollAmount]. We can determine which by\n // setting to the scrollLeft to 1. This is past the max for a NEGATED browser, so it will\n // return 0 when we read it again.\n scrollContainer.scrollLeft = 1;\n rtlScrollAxisType =\n scrollContainer.scrollLeft === 0 ? 1 /* RtlScrollAxisType.NEGATED */ : 2 /* RtlScrollAxisType.INVERTED */;\n }\n scrollContainer.remove();\n }\n return rtlScrollAxisType;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 shadowDomIsSupported;\n/** Checks whether the user's browser support Shadow DOM. */\nfunction _supportsShadowDom() {\n if (shadowDomIsSupported == null) {\n const head = typeof document !== 'undefined' ? document.head : null;\n shadowDomIsSupported = !!(head && (head.createShadowRoot || head.attachShadow));\n }\n return shadowDomIsSupported;\n}\n/** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */\nfunction _getShadowRoot(element) {\n if (_supportsShadowDom()) {\n const rootNode = element.getRootNode ? element.getRootNode() : null;\n // Note that this should be caught by `_supportsShadowDom`, but some\n // teams have been able to hit this code path on unsupported browsers.\n if (typeof ShadowRoot !== 'undefined' && ShadowRoot && rootNode instanceof ShadowRoot) {\n return rootNode;\n }\n }\n return null;\n}\n/**\n * Gets the currently-focused element on the page while\n * also piercing through Shadow DOM boundaries.\n */\nfunction _getFocusedElementPierceShadowDom() {\n let activeElement = typeof document !== 'undefined' && document\n ? document.activeElement\n : null;\n while (activeElement && activeElement.shadowRoot) {\n const newActiveElement = activeElement.shadowRoot.activeElement;\n if (newActiveElement === activeElement) {\n break;\n }\n else {\n activeElement = newActiveElement;\n }\n }\n return activeElement;\n}\n/** Gets the target of an event while accounting for Shadow DOM. */\nfunction _getEventTarget(event) {\n // If an event is bound outside the Shadow DOM, the `event.target` will\n // point to the shadow root so we have to use `composedPath` instead.\n return (event.composedPath ? event.composedPath()[0] : event.target);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Gets whether the code is currently running in a test environment. */\nfunction _isTestEnvironment() {\n // We can't use `declare const` because it causes conflicts inside Google with the real typings\n // for these symbols and we can't read them off the global object, because they don't appear to\n // be attached there for some runners like Jest.\n // (see: https://github.com/angular/components/issues/23365#issuecomment-938146643)\n return (\n // @ts-ignore\n (typeof __karma__ !== 'undefined' && !!__karma__) ||\n // @ts-ignore\n (typeof jasmine !== 'undefined' && !!jasmine) ||\n // @ts-ignore\n (typeof jest !== 'undefined' && !!jest) ||\n // @ts-ignore\n (typeof Mocha !== 'undefined' && !!Mocha));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Generated bundle index. Do not edit.\n */\n\nexport { Platform, PlatformModule, _getEventTarget, _getFocusedElementPierceShadowDom, _getShadowRoot, _isTestEnvironment, _supportsShadowDom, getRtlScrollAxisType, getSupportedInputTypes, normalizePassiveListenerOptions, supportsPassiveEventListeners, supportsScrollBehavior };\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 MAC_ENTER = 3;\nconst BACKSPACE = 8;\nconst TAB = 9;\nconst NUM_CENTER = 12;\nconst ENTER = 13;\nconst SHIFT = 16;\nconst CONTROL = 17;\nconst ALT = 18;\nconst PAUSE = 19;\nconst CAPS_LOCK = 20;\nconst ESCAPE = 27;\nconst SPACE = 32;\nconst PAGE_UP = 33;\nconst PAGE_DOWN = 34;\nconst END = 35;\nconst HOME = 36;\nconst LEFT_ARROW = 37;\nconst UP_ARROW = 38;\nconst RIGHT_ARROW = 39;\nconst DOWN_ARROW = 40;\nconst PLUS_SIGN = 43;\nconst PRINT_SCREEN = 44;\nconst INSERT = 45;\nconst DELETE = 46;\nconst ZERO = 48;\nconst ONE = 49;\nconst TWO = 50;\nconst THREE = 51;\nconst FOUR = 52;\nconst FIVE = 53;\nconst SIX = 54;\nconst SEVEN = 55;\nconst EIGHT = 56;\nconst NINE = 57;\nconst FF_SEMICOLON = 59; // Firefox (Gecko) fires this for semicolon instead of 186\nconst FF_EQUALS = 61; // Firefox (Gecko) fires this for equals instead of 187\nconst QUESTION_MARK = 63;\nconst AT_SIGN = 64;\nconst A = 65;\nconst B = 66;\nconst C = 67;\nconst D = 68;\nconst E = 69;\nconst F = 70;\nconst G = 71;\nconst H = 72;\nconst I = 73;\nconst J = 74;\nconst K = 75;\nconst L = 76;\nconst M = 77;\nconst N = 78;\nconst O = 79;\nconst P = 80;\nconst Q = 81;\nconst R = 82;\nconst S = 83;\nconst T = 84;\nconst U = 85;\nconst V = 86;\nconst W = 87;\nconst X = 88;\nconst Y = 89;\nconst Z = 90;\nconst META = 91; // WIN_KEY_LEFT\nconst MAC_WK_CMD_LEFT = 91;\nconst MAC_WK_CMD_RIGHT = 93;\nconst CONTEXT_MENU = 93;\nconst NUMPAD_ZERO = 96;\nconst NUMPAD_ONE = 97;\nconst NUMPAD_TWO = 98;\nconst NUMPAD_THREE = 99;\nconst NUMPAD_FOUR = 100;\nconst NUMPAD_FIVE = 101;\nconst NUMPAD_SIX = 102;\nconst NUMPAD_SEVEN = 103;\nconst NUMPAD_EIGHT = 104;\nconst NUMPAD_NINE = 105;\nconst NUMPAD_MULTIPLY = 106;\nconst NUMPAD_PLUS = 107;\nconst NUMPAD_MINUS = 109;\nconst NUMPAD_PERIOD = 110;\nconst NUMPAD_DIVIDE = 111;\nconst F1 = 112;\nconst F2 = 113;\nconst F3 = 114;\nconst F4 = 115;\nconst F5 = 116;\nconst F6 = 117;\nconst F7 = 118;\nconst F8 = 119;\nconst F9 = 120;\nconst F10 = 121;\nconst F11 = 122;\nconst F12 = 123;\nconst NUM_LOCK = 144;\nconst SCROLL_LOCK = 145;\nconst FIRST_MEDIA = 166;\nconst FF_MINUS = 173;\nconst MUTE = 173; // Firefox (Gecko) fires 181 for MUTE\nconst VOLUME_DOWN = 174; // Firefox (Gecko) fires 182 for VOLUME_DOWN\nconst VOLUME_UP = 175; // Firefox (Gecko) fires 183 for VOLUME_UP\nconst FF_MUTE = 181;\nconst FF_VOLUME_DOWN = 182;\nconst LAST_MEDIA = 183;\nconst FF_VOLUME_UP = 183;\nconst SEMICOLON = 186; // Firefox (Gecko) fires 59 for SEMICOLON\nconst EQUALS = 187; // Firefox (Gecko) fires 61 for EQUALS\nconst COMMA = 188;\nconst DASH = 189; // Firefox (Gecko) fires 173 for DASH/MINUS\nconst PERIOD = 190;\nconst SLASH = 191;\nconst APOSTROPHE = 192;\nconst TILDE = 192;\nconst OPEN_SQUARE_BRACKET = 219;\nconst BACKSLASH = 220;\nconst CLOSE_SQUARE_BRACKET = 221;\nconst SINGLE_QUOTE = 222;\nconst MAC_META = 224;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 whether a modifier key is pressed.\n * @param event Event to be checked.\n */\nfunction hasModifierKey(event, ...modifiers) {\n if (modifiers.length) {\n return modifiers.some(modifier => event[modifier]);\n }\n return event.altKey || event.shiftKey || event.ctrlKey || event.metaKey;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Generated bundle index. Do not edit.\n */\n\nexport { A, ALT, APOSTROPHE, AT_SIGN, B, BACKSLASH, BACKSPACE, C, CAPS_LOCK, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, D, DASH, DELETE, DOWN_ARROW, E, EIGHT, END, ENTER, EQUALS, ESCAPE, F, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, FF_EQUALS, FF_MINUS, FF_MUTE, FF_SEMICOLON, FF_VOLUME_DOWN, FF_VOLUME_UP, FIRST_MEDIA, FIVE, FOUR, G, H, HOME, I, INSERT, J, K, L, LAST_MEDIA, LEFT_ARROW, M, MAC_ENTER, MAC_META, MAC_WK_CMD_LEFT, MAC_WK_CMD_RIGHT, META, MUTE, N, NINE, NUMPAD_DIVIDE, NUMPAD_EIGHT, NUMPAD_FIVE, NUMPAD_FOUR, NUMPAD_MINUS, NUMPAD_MULTIPLY, NUMPAD_NINE, NUMPAD_ONE, NUMPAD_PERIOD, NUMPAD_PLUS, NUMPAD_SEVEN, NUMPAD_SIX, NUMPAD_THREE, NUMPAD_TWO, NUMPAD_ZERO, NUM_CENTER, NUM_LOCK, O, ONE, OPEN_SQUARE_BRACKET, P, PAGE_DOWN, PAGE_UP, PAUSE, PERIOD, PLUS_SIGN, PRINT_SCREEN, Q, QUESTION_MARK, R, RIGHT_ARROW, S, SCROLL_LOCK, SEMICOLON, SEVEN, SHIFT, SINGLE_QUOTE, SIX, SLASH, SPACE, T, TAB, THREE, TILDE, TWO, U, UP_ARROW, V, VOLUME_DOWN, VOLUME_UP, W, X, Y, Z, ZERO, hasModifierKey };\n","import { ElementRef } 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/** Coerces a data-bound value (typically a string) to a boolean. */\nfunction coerceBooleanProperty(value) {\n return value != null && `${value}` !== '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 coerceNumberProperty(value, fallbackValue = 0) {\n return _isNumberValue(value) ? Number(value) : fallbackValue;\n}\n/**\n * Whether the provided value is considered a number.\n * @docs-private\n */\nfunction _isNumberValue(value) {\n // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n // and other non-number values as NaN, where Number just uses 0) but it considers the string\n // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n return !isNaN(parseFloat(value)) && !isNaN(Number(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 coerceArray(value) {\n return Array.isArray(value) ? value : [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/** Coerces a value to a CSS pixel value. */\nfunction coerceCssPixelValue(value) {\n if (value == null) {\n return '';\n }\n return typeof value === 'string' ? value : `${value}px`;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Coerces an ElementRef or an Element into an element.\n * Useful for APIs that can accept either a ref or the native element itself.\n */\nfunction coerceElement(elementOrRef) {\n return elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Coerces a value to an array of trimmed non-empty strings.\n * Any input that is not an array, `null` or `undefined` will be turned into a string\n * via `toString()` and subsequently split with the given separator.\n * `null` and `undefined` will result in an empty array.\n * This results in the following outcomes:\n * - `null` -> `[]`\n * - `[null]` -> `[\"null\"]`\n * - `[\"a\", \"b \", \" \"]` -> `[\"a\", \"b\"]`\n * - `[1, [2, 3]]` -> `[\"1\", \"2,3\"]`\n * - `[{ a: 0 }]` -> `[\"[object Object]\"]`\n * - `{ a: 0 }` -> `[\"[object\", \"Object]\"]`\n *\n * Useful for defining CSS classes or table columns.\n * @param value the value to coerce into an array of strings\n * @param separator split-separator if value isn't an array\n */\nfunction coerceStringArray(value, separator = /\\s+/) {\n const result = [];\n if (value != null) {\n const sourceValues = Array.isArray(value) ? value : `${value}`.split(separator);\n for (const sourceValue of sourceValues) {\n const trimmedString = `${sourceValue}`.trim();\n if (trimmedString) {\n result.push(trimmedString);\n }\n }\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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport { _isNumberValue, coerceArray, coerceBooleanProperty, coerceCssPixelValue, coerceElement, coerceNumberProperty, coerceStringArray };\n","import { coerceElement, coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport * as i0 from '@angular/core';\nimport { Injectable, EventEmitter, Directive, Output, Input, NgModule } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { debounceTime } 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 * Factory that creates a new MutationObserver and allows us to stub it out in unit tests.\n * @docs-private\n */\nclass MutationObserverFactory {\n create(callback) {\n return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback);\n }\n}\nMutationObserverFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MutationObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nMutationObserverFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MutationObserverFactory, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MutationObserverFactory, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n/** An injectable service that allows watching elements for changes to their content. */\nclass ContentObserver {\n constructor(_mutationObserverFactory) {\n this._mutationObserverFactory = _mutationObserverFactory;\n /** Keeps track of the existing MutationObservers so they can be reused. */\n this._observedElements = new Map();\n }\n ngOnDestroy() {\n this._observedElements.forEach((_, element) => this._cleanupObserver(element));\n }\n observe(elementOrRef) {\n const element = coerceElement(elementOrRef);\n return new Observable((observer) => {\n const stream = this._observeElement(element);\n const subscription = stream.subscribe(observer);\n return () => {\n subscription.unsubscribe();\n this._unobserveElement(element);\n };\n });\n }\n /**\n * Observes the given element by using the existing MutationObserver if available, or creating a\n * new one if not.\n */\n _observeElement(element) {\n if (!this._observedElements.has(element)) {\n const stream = new Subject();\n const observer = this._mutationObserverFactory.create(mutations => stream.next(mutations));\n if (observer) {\n observer.observe(element, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n this._observedElements.set(element, { observer, stream, count: 1 });\n }\n else {\n this._observedElements.get(element).count++;\n }\n return this._observedElements.get(element).stream;\n }\n /**\n * Un-observes the given element and cleans up the underlying MutationObserver if nobody else is\n * observing this element.\n */\n _unobserveElement(element) {\n if (this._observedElements.has(element)) {\n this._observedElements.get(element).count--;\n if (!this._observedElements.get(element).count) {\n this._cleanupObserver(element);\n }\n }\n }\n /** Clean up the underlying MutationObserver for the specified element. */\n _cleanupObserver(element) {\n if (this._observedElements.has(element)) {\n const { observer, stream } = this._observedElements.get(element);\n if (observer) {\n observer.disconnect();\n }\n stream.complete();\n this._observedElements.delete(element);\n }\n }\n}\nContentObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ContentObserver, deps: [{ token: MutationObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable });\nContentObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ContentObserver, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ContentObserver, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: MutationObserverFactory }]; } });\n/**\n * Directive that triggers a callback whenever the content of\n * its associated element has changed.\n */\nclass CdkObserveContent {\n constructor(_contentObserver, _elementRef, _ngZone) {\n this._contentObserver = _contentObserver;\n this._elementRef = _elementRef;\n this._ngZone = _ngZone;\n /** Event emitted for each change in the element's content. */\n this.event = new EventEmitter();\n this._disabled = false;\n this._currentSubscription = null;\n }\n /**\n * Whether observing content is disabled. This option can be used\n * to disconnect the underlying MutationObserver until it is needed.\n */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n this._disabled ? this._unsubscribe() : this._subscribe();\n }\n /** Debounce interval for emitting the changes. */\n get debounce() {\n return this._debounce;\n }\n set debounce(value) {\n this._debounce = coerceNumberProperty(value);\n this._subscribe();\n }\n ngAfterContentInit() {\n if (!this._currentSubscription && !this.disabled) {\n this._subscribe();\n }\n }\n ngOnDestroy() {\n this._unsubscribe();\n }\n _subscribe() {\n this._unsubscribe();\n const stream = this._contentObserver.observe(this._elementRef);\n // TODO(mmalerba): We shouldn't be emitting on this @Output() outside the zone.\n // Consider brining it back inside the zone next time we're making breaking changes.\n // Bringing it back inside can cause things like infinite change detection loops and changed\n // after checked errors if people's code isn't handling it properly.\n this._ngZone.runOutsideAngular(() => {\n this._currentSubscription = (this.debounce ? stream.pipe(debounceTime(this.debounce)) : stream).subscribe(this.event);\n });\n }\n _unsubscribe() {\n this._currentSubscription?.unsubscribe();\n }\n}\nCdkObserveContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkObserveContent, deps: [{ token: ContentObserver }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });\nCdkObserveContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkObserveContent, selector: \"[cdkObserveContent]\", inputs: { disabled: [\"cdkObserveContentDisabled\", \"disabled\"], debounce: \"debounce\" }, outputs: { event: \"cdkObserveContent\" }, exportAs: [\"cdkObserveContent\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkObserveContent, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkObserveContent]',\n exportAs: 'cdkObserveContent',\n }]\n }], ctorParameters: function () { return [{ type: ContentObserver }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { event: [{\n type: Output,\n args: ['cdkObserveContent']\n }], disabled: [{\n type: Input,\n args: ['cdkObserveContentDisabled']\n }], debounce: [{\n type: Input\n }] } });\nclass ObserversModule {\n}\nObserversModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ObserversModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nObserversModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: ObserversModule, declarations: [CdkObserveContent], exports: [CdkObserveContent] });\nObserversModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ObserversModule, providers: [MutationObserverFactory] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ObserversModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [CdkObserveContent],\n declarations: [CdkObserveContent],\n providers: [MutationObserverFactory],\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 * Generated bundle index. Do not edit.\n */\n\nexport { CdkObserveContent, ContentObserver, MutationObserverFactory, ObserversModule };\n","import * as i0 from '@angular/core';\nimport { NgModule, Injectable } from '@angular/core';\nimport { coerceArray } from '@angular/cdk/coercion';\nimport { Subject, combineLatest, concat, Observable } from 'rxjs';\nimport { take, skip, debounceTime, map, startWith, takeUntil } from 'rxjs/operators';\nimport * as i1 from '@angular/cdk/platform';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 LayoutModule {\n}\nLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: LayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: LayoutModule });\nLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: LayoutModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: LayoutModule, decorators: [{\n type: NgModule,\n args: [{}]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 registry for all dynamically-created, injected media queries. */\nconst mediaQueriesForWebkitCompatibility = new Set();\n/** Style tag that holds all of the dynamically-created media queries. */\nlet mediaQueryStyleNode;\n/** A utility for calling matchMedia queries. */\nclass MediaMatcher {\n constructor(_platform) {\n this._platform = _platform;\n this._matchMedia =\n this._platform.isBrowser && window.matchMedia\n ? // matchMedia is bound to the window scope intentionally as it is an illegal invocation to\n // call it from a different scope.\n window.matchMedia.bind(window)\n : noopMatchMedia;\n }\n /**\n * Evaluates the given media query and returns the native MediaQueryList from which results\n * can be retrieved.\n * Confirms the layout engine will trigger for the selector query provided and returns the\n * MediaQueryList for the query provided.\n */\n matchMedia(query) {\n if (this._platform.WEBKIT || this._platform.BLINK) {\n createEmptyStyleRule(query);\n }\n return this._matchMedia(query);\n }\n}\nMediaMatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MediaMatcher, deps: [{ token: i1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });\nMediaMatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MediaMatcher, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MediaMatcher, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.Platform }]; } });\n/**\n * Creates an empty stylesheet that is used to work around browser inconsistencies related to\n * `matchMedia`. At the time of writing, it handles the following cases:\n * 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`\n * to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.\n * 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules\n * inside the `@media` match existing elements on the page. We work around it by having one rule\n * targeting the `body`. See https://github.com/angular/components/issues/23546.\n */\nfunction createEmptyStyleRule(query) {\n if (mediaQueriesForWebkitCompatibility.has(query)) {\n return;\n }\n try {\n if (!mediaQueryStyleNode) {\n mediaQueryStyleNode = document.createElement('style');\n mediaQueryStyleNode.setAttribute('type', 'text/css');\n document.head.appendChild(mediaQueryStyleNode);\n }\n if (mediaQueryStyleNode.sheet) {\n mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);\n mediaQueriesForWebkitCompatibility.add(query);\n }\n }\n catch (e) {\n console.error(e);\n }\n}\n/** No-op matchMedia replacement for non-browser platforms. */\nfunction noopMatchMedia(query) {\n // Use `as any` here to avoid adding additional necessary properties for\n // the noop matcher.\n return {\n matches: query === 'all' || query === '',\n media: query,\n addListener: () => { },\n removeListener: () => { },\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/** Utility for checking the matching state of @media queries. */\nclass BreakpointObserver {\n constructor(_mediaMatcher, _zone) {\n this._mediaMatcher = _mediaMatcher;\n this._zone = _zone;\n /** A map of all media queries currently being listened for. */\n this._queries = new Map();\n /** A subject for all other observables to takeUntil based on. */\n this._destroySubject = new Subject();\n }\n /** Completes the active subject, signalling to all other observables to complete. */\n ngOnDestroy() {\n this._destroySubject.next();\n this._destroySubject.complete();\n }\n /**\n * Whether one or more media queries match the current viewport size.\n * @param value One or more media queries to check.\n * @returns Whether any of the media queries match.\n */\n isMatched(value) {\n const queries = splitQueries(coerceArray(value));\n return queries.some(mediaQuery => this._registerQuery(mediaQuery).mql.matches);\n }\n /**\n * Gets an observable of results for the given queries that will emit new results for any changes\n * in matching of the given queries.\n * @param value One or more media queries to check.\n * @returns A stream of matches for the given queries.\n */\n observe(value) {\n const queries = splitQueries(coerceArray(value));\n const observables = queries.map(query => this._registerQuery(query).observable);\n let stateObservable = combineLatest(observables);\n // Emit the first state immediately, and then debounce the subsequent emissions.\n stateObservable = concat(stateObservable.pipe(take(1)), stateObservable.pipe(skip(1), debounceTime(0)));\n return stateObservable.pipe(map(breakpointStates => {\n const response = {\n matches: false,\n breakpoints: {},\n };\n breakpointStates.forEach(({ matches, query }) => {\n response.matches = response.matches || matches;\n response.breakpoints[query] = matches;\n });\n return response;\n }));\n }\n /** Registers a specific query to be listened for. */\n _registerQuery(query) {\n // Only set up a new MediaQueryList if it is not already being listened for.\n if (this._queries.has(query)) {\n return this._queries.get(query);\n }\n const mql = this._mediaMatcher.matchMedia(query);\n // Create callback for match changes and add it is as a listener.\n const queryObservable = new Observable((observer) => {\n // Listener callback methods are wrapped to be placed back in ngZone. Callbacks must be placed\n // back into the zone because matchMedia is only included in Zone.js by loading the\n // webapis-media-query.js file alongside the zone.js file. Additionally, some browsers do not\n // have MediaQueryList inherit from EventTarget, which causes inconsistencies in how Zone.js\n // patches it.\n const handler = (e) => this._zone.run(() => observer.next(e));\n mql.addListener(handler);\n return () => {\n mql.removeListener(handler);\n };\n }).pipe(startWith(mql), map(({ matches }) => ({ query, matches })), takeUntil(this._destroySubject));\n // Add the MediaQueryList to the set of queries.\n const output = { observable: queryObservable, mql };\n this._queries.set(query, output);\n return output;\n }\n}\nBreakpointObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: BreakpointObserver, deps: [{ token: MediaMatcher }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });\nBreakpointObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: BreakpointObserver, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: BreakpointObserver, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: MediaMatcher }, { type: i0.NgZone }]; } });\n/**\n * Split each query string into separate query strings if two queries are provided as comma\n * separated.\n */\nfunction splitQueries(queries) {\n return queries\n .map(query => query.split(','))\n .reduce((a1, a2) => a1.concat(a2))\n .map(query => query.trim());\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// PascalCase is being used as Breakpoints is used like an enum.\n// tslint:disable-next-line:variable-name\nconst Breakpoints = {\n XSmall: '(max-width: 599.98px)',\n Small: '(min-width: 600px) and (max-width: 959.98px)',\n Medium: '(min-width: 960px) and (max-width: 1279.98px)',\n Large: '(min-width: 1280px) and (max-width: 1919.98px)',\n XLarge: '(min-width: 1920px)',\n Handset: '(max-width: 599.98px) and (orientation: portrait), ' +\n '(max-width: 959.98px) and (orientation: landscape)',\n Tablet: '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), ' +\n '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)',\n Web: '(min-width: 840px) and (orientation: portrait), ' +\n '(min-width: 1280px) and (orientation: landscape)',\n HandsetPortrait: '(max-width: 599.98px) and (orientation: portrait)',\n TabletPortrait: '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)',\n WebPortrait: '(min-width: 840px) and (orientation: portrait)',\n HandsetLandscape: '(max-width: 959.98px) and (orientation: landscape)',\n TabletLandscape: '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)',\n WebLandscape: '(min-width: 1280px) and (orientation: landscape)',\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Generated bundle index. Do not edit.\n */\n\nexport { BreakpointObserver, Breakpoints, LayoutModule, MediaMatcher };\n","import { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { inject, APP_ID, Injectable, Inject, QueryList, Directive, Input, InjectionToken, Optional, EventEmitter, Output, NgModule } from '@angular/core';\nimport * as i1 from '@angular/cdk/platform';\nimport { _getFocusedElementPierceShadowDom, normalizePassiveListenerOptions, _getEventTarget, _getShadowRoot } from '@angular/cdk/platform';\nimport { Subject, Subscription, BehaviorSubject, of } from 'rxjs';\nimport { hasModifierKey, A, Z, ZERO, NINE, END, HOME, LEFT_ARROW, RIGHT_ARROW, UP_ARROW, DOWN_ARROW, TAB, ALT, CONTROL, MAC_META, META, SHIFT } from '@angular/cdk/keycodes';\nimport { tap, debounceTime, filter, map, take, skip, distinctUntilChanged, takeUntil } from 'rxjs/operators';\nimport { coerceBooleanProperty, coerceElement } from '@angular/cdk/coercion';\nimport * as i1$1 from '@angular/cdk/observers';\nimport { ObserversModule } from '@angular/cdk/observers';\nimport { BreakpointObserver } from '@angular/cdk/layout';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** IDs are delimited by an empty space, as per the spec. */\nconst ID_DELIMITER = ' ';\n/**\n * Adds the given ID to the specified ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nfunction addAriaReferencedId(el, attr, id) {\n const ids = getAriaReferenceIds(el, attr);\n if (ids.some(existingId => existingId.trim() == id.trim())) {\n return;\n }\n ids.push(id.trim());\n el.setAttribute(attr, ids.join(ID_DELIMITER));\n}\n/**\n * Removes the given ID from the specified ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nfunction removeAriaReferencedId(el, attr, id) {\n const ids = getAriaReferenceIds(el, attr);\n const filteredIds = ids.filter(val => val != id.trim());\n if (filteredIds.length) {\n el.setAttribute(attr, filteredIds.join(ID_DELIMITER));\n }\n else {\n el.removeAttribute(attr);\n }\n}\n/**\n * Gets the list of IDs referenced by the given ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nfunction getAriaReferenceIds(el, attr) {\n // Get string array of all individual ids (whitespace delimited) in the attribute value\n return (el.getAttribute(attr) || '').match(/\\S+/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 */\n/**\n * ID used for the body container where all messages are appended.\n * @deprecated No longer being used. To be removed.\n * @breaking-change 14.0.0\n */\nconst MESSAGES_CONTAINER_ID = 'cdk-describedby-message-container';\n/**\n * ID prefix used for each created message element.\n * @deprecated To be turned into a private variable.\n * @breaking-change 14.0.0\n */\nconst CDK_DESCRIBEDBY_ID_PREFIX = 'cdk-describedby-message';\n/**\n * Attribute given to each host element that is described by a message element.\n * @deprecated To be turned into a private variable.\n * @breaking-change 14.0.0\n */\nconst CDK_DESCRIBEDBY_HOST_ATTRIBUTE = 'cdk-describedby-host';\n/** Global incremental identifier for each registered message element. */\nlet nextId = 0;\n/**\n * Utility that creates visually hidden elements with a message content. Useful for elements that\n * want to use aria-describedby to further describe themselves without adding additional visual\n * content.\n */\nclass AriaDescriber {\n constructor(_document, \n /**\n * @deprecated To be turned into a required parameter.\n * @breaking-change 14.0.0\n */\n _platform) {\n this._platform = _platform;\n /** Map of all registered message elements that have been placed into the document. */\n this._messageRegistry = new Map();\n /** Container for all registered messages. */\n this._messagesContainer = null;\n /** Unique ID for the service. */\n this._id = `${nextId++}`;\n this._document = _document;\n this._id = inject(APP_ID) + '-' + nextId++;\n }\n describe(hostElement, message, role) {\n if (!this._canBeDescribed(hostElement, message)) {\n return;\n }\n const key = getKey(message, role);\n if (typeof message !== 'string') {\n // We need to ensure that the element has an ID.\n setMessageId(message, this._id);\n this._messageRegistry.set(key, { messageElement: message, referenceCount: 0 });\n }\n else if (!this._messageRegistry.has(key)) {\n this._createMessageElement(message, role);\n }\n if (!this._isElementDescribedByMessage(hostElement, key)) {\n this._addMessageReference(hostElement, key);\n }\n }\n removeDescription(hostElement, message, role) {\n if (!message || !this._isElementNode(hostElement)) {\n return;\n }\n const key = getKey(message, role);\n if (this._isElementDescribedByMessage(hostElement, key)) {\n this._removeMessageReference(hostElement, key);\n }\n // If the message is a string, it means that it's one that we created for the\n // consumer so we can remove it safely, otherwise we should leave it in place.\n if (typeof message === 'string') {\n const registeredMessage = this._messageRegistry.get(key);\n if (registeredMessage && registeredMessage.referenceCount === 0) {\n this._deleteMessageElement(key);\n }\n }\n if (this._messagesContainer?.childNodes.length === 0) {\n this._messagesContainer.remove();\n this._messagesContainer = null;\n }\n }\n /** Unregisters all created message elements and removes the message container. */\n ngOnDestroy() {\n const describedElements = this._document.querySelectorAll(`[${CDK_DESCRIBEDBY_HOST_ATTRIBUTE}=\"${this._id}\"]`);\n for (let i = 0; i < describedElements.length; i++) {\n this._removeCdkDescribedByReferenceIds(describedElements[i]);\n describedElements[i].removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);\n }\n this._messagesContainer?.remove();\n this._messagesContainer = null;\n this._messageRegistry.clear();\n }\n /**\n * Creates a new element in the visually hidden message container element with the message\n * as its content and adds it to the message registry.\n */\n _createMessageElement(message, role) {\n const messageElement = this._document.createElement('div');\n setMessageId(messageElement, this._id);\n messageElement.textContent = message;\n if (role) {\n messageElement.setAttribute('role', role);\n }\n this._createMessagesContainer();\n this._messagesContainer.appendChild(messageElement);\n this._messageRegistry.set(getKey(message, role), { messageElement, referenceCount: 0 });\n }\n /** Deletes the message element from the global messages container. */\n _deleteMessageElement(key) {\n this._messageRegistry.get(key)?.messageElement?.remove();\n this._messageRegistry.delete(key);\n }\n /** Creates the global container for all aria-describedby messages. */\n _createMessagesContainer() {\n if (this._messagesContainer) {\n return;\n }\n const containerClassName = 'cdk-describedby-message-container';\n const serverContainers = this._document.querySelectorAll(`.${containerClassName}[platform=\"server\"]`);\n for (let i = 0; i < serverContainers.length; i++) {\n // When going from the server to the client, we may end up in a situation where there's\n // already a container on the page, but we don't have a reference to it. Clear the\n // old container so we don't get duplicates. Doing this, instead of emptying the previous\n // container, should be slightly faster.\n serverContainers[i].remove();\n }\n const messagesContainer = this._document.createElement('div');\n // We add `visibility: hidden` in order to prevent text in this container from\n // being searchable by the browser's Ctrl + F functionality.\n // Screen-readers will still read the description for elements with aria-describedby even\n // when the description element is not visible.\n messagesContainer.style.visibility = 'hidden';\n // Even though we use `visibility: hidden`, we still apply `cdk-visually-hidden` so that\n // the description element doesn't impact page layout.\n messagesContainer.classList.add(containerClassName);\n messagesContainer.classList.add('cdk-visually-hidden');\n // @breaking-change 14.0.0 Remove null check for `_platform`.\n if (this._platform && !this._platform.isBrowser) {\n messagesContainer.setAttribute('platform', 'server');\n }\n this._document.body.appendChild(messagesContainer);\n this._messagesContainer = messagesContainer;\n }\n /** Removes all cdk-describedby messages that are hosted through the element. */\n _removeCdkDescribedByReferenceIds(element) {\n // Remove all aria-describedby reference IDs that are prefixed by CDK_DESCRIBEDBY_ID_PREFIX\n const originalReferenceIds = getAriaReferenceIds(element, 'aria-describedby').filter(id => id.indexOf(CDK_DESCRIBEDBY_ID_PREFIX) != 0);\n element.setAttribute('aria-describedby', originalReferenceIds.join(' '));\n }\n /**\n * Adds a message reference to the element using aria-describedby and increments the registered\n * message's reference count.\n */\n _addMessageReference(element, key) {\n const registeredMessage = this._messageRegistry.get(key);\n // Add the aria-describedby reference and set the\n // describedby_host attribute to mark the element.\n addAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);\n element.setAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE, this._id);\n registeredMessage.referenceCount++;\n }\n /**\n * Removes a message reference from the element using aria-describedby\n * and decrements the registered message's reference count.\n */\n _removeMessageReference(element, key) {\n const registeredMessage = this._messageRegistry.get(key);\n registeredMessage.referenceCount--;\n removeAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);\n element.removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);\n }\n /** Returns true if the element has been described by the provided message ID. */\n _isElementDescribedByMessage(element, key) {\n const referenceIds = getAriaReferenceIds(element, 'aria-describedby');\n const registeredMessage = this._messageRegistry.get(key);\n const messageId = registeredMessage && registeredMessage.messageElement.id;\n return !!messageId && referenceIds.indexOf(messageId) != -1;\n }\n /** Determines whether a message can be described on a particular element. */\n _canBeDescribed(element, message) {\n if (!this._isElementNode(element)) {\n return false;\n }\n if (message && typeof message === 'object') {\n // We'd have to make some assumptions about the description element's text, if the consumer\n // passed in an element. Assume that if an element is passed in, the consumer has verified\n // that it can be used as a description.\n return true;\n }\n const trimmedMessage = message == null ? '' : `${message}`.trim();\n const ariaLabel = element.getAttribute('aria-label');\n // We shouldn't set descriptions if they're exactly the same as the `aria-label` of the\n // element, because screen readers will end up reading out the same text twice in a row.\n return trimmedMessage ? !ariaLabel || ariaLabel.trim() !== trimmedMessage : false;\n }\n /** Checks whether a node is an Element node. */\n _isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }\n}\nAriaDescriber.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: AriaDescriber, deps: [{ token: DOCUMENT }, { token: i1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });\nAriaDescriber.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: AriaDescriber, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: AriaDescriber, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i1.Platform }]; } });\n/** Gets a key that can be used to look messages up in the registry. */\nfunction getKey(message, role) {\n return typeof message === 'string' ? `${role || ''}/${message}` : message;\n}\n/** Assigns a unique ID to an element, if it doesn't have one already. */\nfunction setMessageId(element, serviceId) {\n if (!element.id) {\n element.id = `${CDK_DESCRIBEDBY_ID_PREFIX}-${serviceId}-${nextId++}`;\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 class manages keyboard events for selectable lists. If you pass it a query list\n * of items, it will set the active item correctly when arrow events occur.\n */\nclass ListKeyManager {\n constructor(_items) {\n this._items = _items;\n this._activeItemIndex = -1;\n this._activeItem = null;\n this._wrap = false;\n this._letterKeyStream = new Subject();\n this._typeaheadSubscription = Subscription.EMPTY;\n this._vertical = true;\n this._allowedModifierKeys = [];\n this._homeAndEnd = false;\n /**\n * Predicate function that can be used to check whether an item should be skipped\n * by the key manager. By default, disabled items are skipped.\n */\n this._skipPredicateFn = (item) => item.disabled;\n // Buffer for the letters that the user has pressed when the typeahead option is turned on.\n this._pressedLetters = [];\n /**\n * Stream that emits any time the TAB key is pressed, so components can react\n * when focus is shifted off of the list.\n */\n this.tabOut = new Subject();\n /** Stream that emits whenever the active item of the list manager changes. */\n this.change = new Subject();\n // We allow for the items to be an array because, in some cases, the consumer may\n // not have access to a QueryList of the items they want to manage (e.g. when the\n // items aren't being collected via `ViewChildren` or `ContentChildren`).\n if (_items instanceof QueryList) {\n _items.changes.subscribe((newItems) => {\n if (this._activeItem) {\n const itemArray = newItems.toArray();\n const newIndex = itemArray.indexOf(this._activeItem);\n if (newIndex > -1 && newIndex !== this._activeItemIndex) {\n this._activeItemIndex = newIndex;\n }\n }\n });\n }\n }\n /**\n * Sets the predicate function that determines which items should be skipped by the\n * list key manager.\n * @param predicate Function that determines whether the given item should be skipped.\n */\n skipPredicate(predicate) {\n this._skipPredicateFn = predicate;\n return this;\n }\n /**\n * Configures wrapping mode, which determines whether the active item will wrap to\n * the other end of list when there are no more items in the given direction.\n * @param shouldWrap Whether the list should wrap when reaching the end.\n */\n withWrap(shouldWrap = true) {\n this._wrap = shouldWrap;\n return this;\n }\n /**\n * Configures whether the key manager should be able to move the selection vertically.\n * @param enabled Whether vertical selection should be enabled.\n */\n withVerticalOrientation(enabled = true) {\n this._vertical = enabled;\n return this;\n }\n /**\n * Configures the key manager to move the selection horizontally.\n * Passing in `null` will disable horizontal movement.\n * @param direction Direction in which the selection can be moved.\n */\n withHorizontalOrientation(direction) {\n this._horizontal = direction;\n return this;\n }\n /**\n * Modifier keys which are allowed to be held down and whose default actions will be prevented\n * as the user is pressing the arrow keys. Defaults to not allowing any modifier keys.\n */\n withAllowedModifierKeys(keys) {\n this._allowedModifierKeys = keys;\n return this;\n }\n /**\n * Turns on typeahead mode which allows users to set the active item by typing.\n * @param debounceInterval Time to wait after the last keystroke before setting the active item.\n */\n withTypeAhead(debounceInterval = 200) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n this._items.length &&\n this._items.some(item => typeof item.getLabel !== 'function')) {\n throw Error('ListKeyManager items in typeahead mode must implement the `getLabel` method.');\n }\n this._typeaheadSubscription.unsubscribe();\n // Debounce the presses of non-navigational keys, collect the ones that correspond to letters\n // and convert those letters back into a string. Afterwards find the first item that starts\n // with that string and select it.\n this._typeaheadSubscription = this._letterKeyStream\n .pipe(tap(letter => this._pressedLetters.push(letter)), debounceTime(debounceInterval), filter(() => this._pressedLetters.length > 0), map(() => this._pressedLetters.join('')))\n .subscribe(inputString => {\n const items = this._getItemsArray();\n // Start at 1 because we want to start searching at the item immediately\n // following the current active item.\n for (let i = 1; i < items.length + 1; i++) {\n const index = (this._activeItemIndex + i) % items.length;\n const item = items[index];\n if (!this._skipPredicateFn(item) &&\n item.getLabel().toUpperCase().trim().indexOf(inputString) === 0) {\n this.setActiveItem(index);\n break;\n }\n }\n this._pressedLetters = [];\n });\n return this;\n }\n /**\n * Configures the key manager to activate the first and last items\n * respectively when the Home or End key is pressed.\n * @param enabled Whether pressing the Home or End key activates the first/last item.\n */\n withHomeAndEnd(enabled = true) {\n this._homeAndEnd = enabled;\n return this;\n }\n setActiveItem(item) {\n const previousActiveItem = this._activeItem;\n this.updateActiveItem(item);\n if (this._activeItem !== previousActiveItem) {\n this.change.next(this._activeItemIndex);\n }\n }\n /**\n * Sets the active item depending on the key event passed in.\n * @param event Keyboard event to be used for determining which element should be active.\n */\n onKeydown(event) {\n const keyCode = event.keyCode;\n const modifiers = ['altKey', 'ctrlKey', 'metaKey', 'shiftKey'];\n const isModifierAllowed = modifiers.every(modifier => {\n return !event[modifier] || this._allowedModifierKeys.indexOf(modifier) > -1;\n });\n switch (keyCode) {\n case TAB:\n this.tabOut.next();\n return;\n case DOWN_ARROW:\n if (this._vertical && isModifierAllowed) {\n this.setNextItemActive();\n break;\n }\n else {\n return;\n }\n case UP_ARROW:\n if (this._vertical && isModifierAllowed) {\n this.setPreviousItemActive();\n break;\n }\n else {\n return;\n }\n case RIGHT_ARROW:\n if (this._horizontal && isModifierAllowed) {\n this._horizontal === 'rtl' ? this.setPreviousItemActive() : this.setNextItemActive();\n break;\n }\n else {\n return;\n }\n case LEFT_ARROW:\n if (this._horizontal && isModifierAllowed) {\n this._horizontal === 'rtl' ? this.setNextItemActive() : this.setPreviousItemActive();\n break;\n }\n else {\n return;\n }\n case HOME:\n if (this._homeAndEnd && isModifierAllowed) {\n this.setFirstItemActive();\n break;\n }\n else {\n return;\n }\n case END:\n if (this._homeAndEnd && isModifierAllowed) {\n this.setLastItemActive();\n break;\n }\n else {\n return;\n }\n default:\n if (isModifierAllowed || hasModifierKey(event, 'shiftKey')) {\n // Attempt to use the `event.key` which also maps it to the user's keyboard language,\n // otherwise fall back to resolving alphanumeric characters via the keyCode.\n if (event.key && event.key.length === 1) {\n this._letterKeyStream.next(event.key.toLocaleUpperCase());\n }\n else if ((keyCode >= A && keyCode <= Z) || (keyCode >= ZERO && keyCode <= NINE)) {\n this._letterKeyStream.next(String.fromCharCode(keyCode));\n }\n }\n // Note that we return here, in order to avoid preventing\n // the default action of non-navigational keys.\n return;\n }\n this._pressedLetters = [];\n event.preventDefault();\n }\n /** Index of the currently active item. */\n get activeItemIndex() {\n return this._activeItemIndex;\n }\n /** The active item. */\n get activeItem() {\n return this._activeItem;\n }\n /** Gets whether the user is currently typing into the manager using the typeahead feature. */\n isTyping() {\n return this._pressedLetters.length > 0;\n }\n /** Sets the active item to the first enabled item in the list. */\n setFirstItemActive() {\n this._setActiveItemByIndex(0, 1);\n }\n /** Sets the active item to the last enabled item in the list. */\n setLastItemActive() {\n this._setActiveItemByIndex(this._items.length - 1, -1);\n }\n /** Sets the active item to the next enabled item in the list. */\n setNextItemActive() {\n this._activeItemIndex < 0 ? this.setFirstItemActive() : this._setActiveItemByDelta(1);\n }\n /** Sets the active item to a previous enabled item in the list. */\n setPreviousItemActive() {\n this._activeItemIndex < 0 && this._wrap\n ? this.setLastItemActive()\n : this._setActiveItemByDelta(-1);\n }\n updateActiveItem(item) {\n const itemArray = this._getItemsArray();\n const index = typeof item === 'number' ? item : itemArray.indexOf(item);\n const activeItem = itemArray[index];\n // Explicitly check for `null` and `undefined` because other falsy values are valid.\n this._activeItem = activeItem == null ? null : activeItem;\n this._activeItemIndex = index;\n }\n /**\n * This method sets the active item, given a list of items and the delta between the\n * currently active item and the new active item. It will calculate differently\n * depending on whether wrap mode is turned on.\n */\n _setActiveItemByDelta(delta) {\n this._wrap ? this._setActiveInWrapMode(delta) : this._setActiveInDefaultMode(delta);\n }\n /**\n * Sets the active item properly given \"wrap\" mode. In other words, it will continue to move\n * down the list until it finds an item that is not disabled, and it will wrap if it\n * encounters either end of the list.\n */\n _setActiveInWrapMode(delta) {\n const items = this._getItemsArray();\n for (let i = 1; i <= items.length; i++) {\n const index = (this._activeItemIndex + delta * i + items.length) % items.length;\n const item = items[index];\n if (!this._skipPredicateFn(item)) {\n this.setActiveItem(index);\n return;\n }\n }\n }\n /**\n * Sets the active item properly given the default mode. In other words, it will\n * continue to move down the list until it finds an item that is not disabled. If\n * it encounters either end of the list, it will stop and not wrap.\n */\n _setActiveInDefaultMode(delta) {\n this._setActiveItemByIndex(this._activeItemIndex + delta, delta);\n }\n /**\n * Sets the active item to the first enabled item starting at the index specified. If the\n * item is disabled, it will move in the fallbackDelta direction until it either\n * finds an enabled item or encounters the end of the list.\n */\n _setActiveItemByIndex(index, fallbackDelta) {\n const items = this._getItemsArray();\n if (!items[index]) {\n return;\n }\n while (this._skipPredicateFn(items[index])) {\n index += fallbackDelta;\n if (!items[index]) {\n return;\n }\n }\n this.setActiveItem(index);\n }\n /** Returns the items as an array. */\n _getItemsArray() {\n return this._items instanceof QueryList ? this._items.toArray() : this._items;\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 ActiveDescendantKeyManager extends ListKeyManager {\n setActiveItem(index) {\n if (this.activeItem) {\n this.activeItem.setInactiveStyles();\n }\n super.setActiveItem(index);\n if (this.activeItem) {\n this.activeItem.setActiveStyles();\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 FocusKeyManager extends ListKeyManager {\n constructor() {\n super(...arguments);\n this._origin = 'program';\n }\n /**\n * Sets the focus origin that will be passed in to the items for any subsequent `focus` calls.\n * @param origin Focus origin to be used when focusing items.\n */\n setFocusOrigin(origin) {\n this._origin = origin;\n return this;\n }\n setActiveItem(item) {\n super.setActiveItem(item);\n if (this.activeItem) {\n this.activeItem.focus(this._origin);\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 * Configuration for the isFocusable method.\n */\nclass IsFocusableConfig {\n constructor() {\n /**\n * Whether to count an element as focusable even if it is not currently visible.\n */\n this.ignoreVisibility = false;\n }\n}\n// The InteractivityChecker leans heavily on the ally.js accessibility utilities.\n// Methods like `isTabbable` are only covering specific edge-cases for the browsers which are\n// supported.\n/**\n * Utility for checking the interactivity of an element, such as whether is is focusable or\n * tabbable.\n */\nclass InteractivityChecker {\n constructor(_platform) {\n this._platform = _platform;\n }\n /**\n * Gets whether an element is disabled.\n *\n * @param element Element to be checked.\n * @returns Whether the element is disabled.\n */\n isDisabled(element) {\n // This does not capture some cases, such as a non-form control with a disabled attribute or\n // a form control inside of a disabled form, but should capture the most common cases.\n return element.hasAttribute('disabled');\n }\n /**\n * Gets whether an element is visible for the purposes of interactivity.\n *\n * This will capture states like `display: none` and `visibility: hidden`, but not things like\n * being clipped by an `overflow: hidden` parent or being outside the viewport.\n *\n * @returns Whether the element is visible.\n */\n isVisible(element) {\n return hasGeometry(element) && getComputedStyle(element).visibility === 'visible';\n }\n /**\n * Gets whether an element can be reached via Tab key.\n * Assumes that the element has already been checked with isFocusable.\n *\n * @param element Element to be checked.\n * @returns Whether the element is tabbable.\n */\n isTabbable(element) {\n // Nothing is tabbable on the server 😎\n if (!this._platform.isBrowser) {\n return false;\n }\n const frameElement = getFrameElement(getWindow(element));\n if (frameElement) {\n // Frame elements inherit their tabindex onto all child elements.\n if (getTabIndexValue(frameElement) === -1) {\n return false;\n }\n // Browsers disable tabbing to an element inside of an invisible frame.\n if (!this.isVisible(frameElement)) {\n return false;\n }\n }\n let nodeName = element.nodeName.toLowerCase();\n let tabIndexValue = getTabIndexValue(element);\n if (element.hasAttribute('contenteditable')) {\n return tabIndexValue !== -1;\n }\n if (nodeName === 'iframe' || nodeName === 'object') {\n // The frame or object's content may be tabbable depending on the content, but it's\n // not possibly to reliably detect the content of the frames. We always consider such\n // elements as non-tabbable.\n return false;\n }\n // In iOS, the browser only considers some specific elements as tabbable.\n if (this._platform.WEBKIT && this._platform.IOS && !isPotentiallyTabbableIOS(element)) {\n return false;\n }\n if (nodeName === 'audio') {\n // Audio elements without controls enabled are never tabbable, regardless\n // of the tabindex attribute explicitly being set.\n if (!element.hasAttribute('controls')) {\n return false;\n }\n // Audio elements with controls are by default tabbable unless the\n // tabindex attribute is set to `-1` explicitly.\n return tabIndexValue !== -1;\n }\n if (nodeName === 'video') {\n // For all video elements, if the tabindex attribute is set to `-1`, the video\n // is not tabbable. Note: We cannot rely on the default `HTMLElement.tabIndex`\n // property as that one is set to `-1` in Chrome, Edge and Safari v13.1. The\n // tabindex attribute is the source of truth here.\n if (tabIndexValue === -1) {\n return false;\n }\n // If the tabindex is explicitly set, and not `-1` (as per check before), the\n // video element is always tabbable (regardless of whether it has controls or not).\n if (tabIndexValue !== null) {\n return true;\n }\n // Otherwise (when no explicit tabindex is set), a video is only tabbable if it\n // has controls enabled. Firefox is special as videos are always tabbable regardless\n // of whether there are controls or not.\n return this._platform.FIREFOX || element.hasAttribute('controls');\n }\n return element.tabIndex >= 0;\n }\n /**\n * Gets whether an element can be focused by the user.\n *\n * @param element Element to be checked.\n * @param config The config object with options to customize this method's behavior\n * @returns Whether the element is focusable.\n */\n isFocusable(element, config) {\n // Perform checks in order of left to most expensive.\n // Again, naive approach that does not capture many edge cases and browser quirks.\n return (isPotentiallyFocusable(element) &&\n !this.isDisabled(element) &&\n (config?.ignoreVisibility || this.isVisible(element)));\n }\n}\nInteractivityChecker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: InteractivityChecker, deps: [{ token: i1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });\nInteractivityChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: InteractivityChecker, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: InteractivityChecker, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.Platform }]; } });\n/**\n * Returns the frame element from a window object. Since browsers like MS Edge throw errors if\n * the frameElement property is being accessed from a different host address, this property\n * should be accessed carefully.\n */\nfunction getFrameElement(window) {\n try {\n return window.frameElement;\n }\n catch {\n return null;\n }\n}\n/** Checks whether the specified element has any geometry / rectangles. */\nfunction hasGeometry(element) {\n // Use logic from jQuery to check for an invisible element.\n // See https://github.com/jquery/jquery/blob/master/src/css/hiddenVisibleSelectors.js#L12\n return !!(element.offsetWidth ||\n element.offsetHeight ||\n (typeof element.getClientRects === 'function' && element.getClientRects().length));\n}\n/** Gets whether an element's */\nfunction isNativeFormElement(element) {\n let nodeName = element.nodeName.toLowerCase();\n return (nodeName === 'input' ||\n nodeName === 'select' ||\n nodeName === 'button' ||\n nodeName === 'textarea');\n}\n/** Gets whether an element is an `<input type=\"hidden\">`. */\nfunction isHiddenInput(element) {\n return isInputElement(element) && element.type == 'hidden';\n}\n/** Gets whether an element is an anchor that has an href attribute. */\nfunction isAnchorWithHref(element) {\n return isAnchorElement(element) && element.hasAttribute('href');\n}\n/** Gets whether an element is an input element. */\nfunction isInputElement(element) {\n return element.nodeName.toLowerCase() == 'input';\n}\n/** Gets whether an element is an anchor element. */\nfunction isAnchorElement(element) {\n return element.nodeName.toLowerCase() == 'a';\n}\n/** Gets whether an element has a valid tabindex. */\nfunction hasValidTabIndex(element) {\n if (!element.hasAttribute('tabindex') || element.tabIndex === undefined) {\n return false;\n }\n let tabIndex = element.getAttribute('tabindex');\n return !!(tabIndex && !isNaN(parseInt(tabIndex, 10)));\n}\n/**\n * Returns the parsed tabindex from the element attributes instead of returning the\n * evaluated tabindex from the browsers defaults.\n */\nfunction getTabIndexValue(element) {\n if (!hasValidTabIndex(element)) {\n return null;\n }\n // See browser issue in Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054\n const tabIndex = parseInt(element.getAttribute('tabindex') || '', 10);\n return isNaN(tabIndex) ? -1 : tabIndex;\n}\n/** Checks whether the specified element is potentially tabbable on iOS */\nfunction isPotentiallyTabbableIOS(element) {\n let nodeName = element.nodeName.toLowerCase();\n let inputType = nodeName === 'input' && element.type;\n return (inputType === 'text' ||\n inputType === 'password' ||\n nodeName === 'select' ||\n nodeName === 'textarea');\n}\n/**\n * Gets whether an element is potentially focusable without taking current visible/disabled state\n * into account.\n */\nfunction isPotentiallyFocusable(element) {\n // Inputs are potentially focusable *unless* they're type=\"hidden\".\n if (isHiddenInput(element)) {\n return false;\n }\n return (isNativeFormElement(element) ||\n isAnchorWithHref(element) ||\n element.hasAttribute('contenteditable') ||\n hasValidTabIndex(element));\n}\n/** Gets the parent window of a DOM node with regards of being inside of an iframe. */\nfunction getWindow(node) {\n // ownerDocument is null if `node` itself *is* a document.\n return (node.ownerDocument && node.ownerDocument.defaultView) || window;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Class that allows for trapping focus within a DOM element.\n *\n * This class currently uses a relatively simple approach to focus trapping.\n * It assumes that the tab order is the same as DOM order, which is not necessarily true.\n * Things like `tabIndex > 0`, flex `order`, and shadow roots can cause the two to be misaligned.\n *\n * @deprecated Use `ConfigurableFocusTrap` instead.\n * @breaking-change 11.0.0\n */\nclass FocusTrap {\n constructor(_element, _checker, _ngZone, _document, deferAnchors = false) {\n this._element = _element;\n this._checker = _checker;\n this._ngZone = _ngZone;\n this._document = _document;\n this._hasAttached = false;\n // Event listeners for the anchors. Need to be regular functions so that we can unbind them later.\n this.startAnchorListener = () => this.focusLastTabbableElement();\n this.endAnchorListener = () => this.focusFirstTabbableElement();\n this._enabled = true;\n if (!deferAnchors) {\n this.attachAnchors();\n }\n }\n /** Whether the focus trap is active. */\n get enabled() {\n return this._enabled;\n }\n set enabled(value) {\n this._enabled = value;\n if (this._startAnchor && this._endAnchor) {\n this._toggleAnchorTabIndex(value, this._startAnchor);\n this._toggleAnchorTabIndex(value, this._endAnchor);\n }\n }\n /** Destroys the focus trap by cleaning up the anchors. */\n destroy() {\n const startAnchor = this._startAnchor;\n const endAnchor = this._endAnchor;\n if (startAnchor) {\n startAnchor.removeEventListener('focus', this.startAnchorListener);\n startAnchor.remove();\n }\n if (endAnchor) {\n endAnchor.removeEventListener('focus', this.endAnchorListener);\n endAnchor.remove();\n }\n this._startAnchor = this._endAnchor = null;\n this._hasAttached = false;\n }\n /**\n * Inserts the anchors into the DOM. This is usually done automatically\n * in the constructor, but can be deferred for cases like directives with `*ngIf`.\n * @returns Whether the focus trap managed to attach successfully. This may not be the case\n * if the target element isn't currently in the DOM.\n */\n attachAnchors() {\n // If we're not on the browser, there can be no focus to trap.\n if (this._hasAttached) {\n return true;\n }\n this._ngZone.runOutsideAngular(() => {\n if (!this._startAnchor) {\n this._startAnchor = this._createAnchor();\n this._startAnchor.addEventListener('focus', this.startAnchorListener);\n }\n if (!this._endAnchor) {\n this._endAnchor = this._createAnchor();\n this._endAnchor.addEventListener('focus', this.endAnchorListener);\n }\n });\n if (this._element.parentNode) {\n this._element.parentNode.insertBefore(this._startAnchor, this._element);\n this._element.parentNode.insertBefore(this._endAnchor, this._element.nextSibling);\n this._hasAttached = true;\n }\n return this._hasAttached;\n }\n /**\n * Waits for the zone to stabilize, then focuses the first tabbable element.\n * @returns Returns a promise that resolves with a boolean, depending\n * on whether focus was moved successfully.\n */\n focusInitialElementWhenReady(options) {\n return new Promise(resolve => {\n this._executeOnStable(() => resolve(this.focusInitialElement(options)));\n });\n }\n /**\n * Waits for the zone to stabilize, then focuses\n * the first tabbable element within the focus trap region.\n * @returns Returns a promise that resolves with a boolean, depending\n * on whether focus was moved successfully.\n */\n focusFirstTabbableElementWhenReady(options) {\n return new Promise(resolve => {\n this._executeOnStable(() => resolve(this.focusFirstTabbableElement(options)));\n });\n }\n /**\n * Waits for the zone to stabilize, then focuses\n * the last tabbable element within the focus trap region.\n * @returns Returns a promise that resolves with a boolean, depending\n * on whether focus was moved successfully.\n */\n focusLastTabbableElementWhenReady(options) {\n return new Promise(resolve => {\n this._executeOnStable(() => resolve(this.focusLastTabbableElement(options)));\n });\n }\n /**\n * Get the specified boundary element of the trapped region.\n * @param bound The boundary to get (start or end of trapped region).\n * @returns The boundary element.\n */\n _getRegionBoundary(bound) {\n // Contains the deprecated version of selector, for temporary backwards comparability.\n const markers = this._element.querySelectorAll(`[cdk-focus-region-${bound}], ` + `[cdkFocusRegion${bound}], ` + `[cdk-focus-${bound}]`);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n for (let i = 0; i < markers.length; i++) {\n // @breaking-change 8.0.0\n if (markers[i].hasAttribute(`cdk-focus-${bound}`)) {\n console.warn(`Found use of deprecated attribute 'cdk-focus-${bound}', ` +\n `use 'cdkFocusRegion${bound}' instead. The deprecated ` +\n `attribute will be removed in 8.0.0.`, markers[i]);\n }\n else if (markers[i].hasAttribute(`cdk-focus-region-${bound}`)) {\n console.warn(`Found use of deprecated attribute 'cdk-focus-region-${bound}', ` +\n `use 'cdkFocusRegion${bound}' instead. The deprecated attribute ` +\n `will be removed in 8.0.0.`, markers[i]);\n }\n }\n }\n if (bound == 'start') {\n return markers.length ? markers[0] : this._getFirstTabbableElement(this._element);\n }\n return markers.length\n ? markers[markers.length - 1]\n : this._getLastTabbableElement(this._element);\n }\n /**\n * Focuses the element that should be focused when the focus trap is initialized.\n * @returns Whether focus was moved successfully.\n */\n focusInitialElement(options) {\n // Contains the deprecated version of selector, for temporary backwards comparability.\n const redirectToElement = this._element.querySelector(`[cdk-focus-initial], ` + `[cdkFocusInitial]`);\n if (redirectToElement) {\n // @breaking-change 8.0.0\n if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n redirectToElement.hasAttribute(`cdk-focus-initial`)) {\n console.warn(`Found use of deprecated attribute 'cdk-focus-initial', ` +\n `use 'cdkFocusInitial' instead. The deprecated attribute ` +\n `will be removed in 8.0.0`, redirectToElement);\n }\n // Warn the consumer if the element they've pointed to\n // isn't focusable, when not in production mode.\n if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n !this._checker.isFocusable(redirectToElement)) {\n console.warn(`Element matching '[cdkFocusInitial]' is not focusable.`, redirectToElement);\n }\n if (!this._checker.isFocusable(redirectToElement)) {\n const focusableChild = this._getFirstTabbableElement(redirectToElement);\n focusableChild?.focus(options);\n return !!focusableChild;\n }\n redirectToElement.focus(options);\n return true;\n }\n return this.focusFirstTabbableElement(options);\n }\n /**\n * Focuses the first tabbable element within the focus trap region.\n * @returns Whether focus was moved successfully.\n */\n focusFirstTabbableElement(options) {\n const redirectToElement = this._getRegionBoundary('start');\n if (redirectToElement) {\n redirectToElement.focus(options);\n }\n return !!redirectToElement;\n }\n /**\n * Focuses the last tabbable element within the focus trap region.\n * @returns Whether focus was moved successfully.\n */\n focusLastTabbableElement(options) {\n const redirectToElement = this._getRegionBoundary('end');\n if (redirectToElement) {\n redirectToElement.focus(options);\n }\n return !!redirectToElement;\n }\n /**\n * Checks whether the focus trap has successfully been attached.\n */\n hasAttached() {\n return this._hasAttached;\n }\n /** Get the first tabbable element from a DOM subtree (inclusive). */\n _getFirstTabbableElement(root) {\n if (this._checker.isFocusable(root) && this._checker.isTabbable(root)) {\n return root;\n }\n const children = root.children;\n for (let i = 0; i < children.length; i++) {\n const tabbableChild = children[i].nodeType === this._document.ELEMENT_NODE\n ? this._getFirstTabbableElement(children[i])\n : null;\n if (tabbableChild) {\n return tabbableChild;\n }\n }\n return null;\n }\n /** Get the last tabbable element from a DOM subtree (inclusive). */\n _getLastTabbableElement(root) {\n if (this._checker.isFocusable(root) && this._checker.isTabbable(root)) {\n return root;\n }\n // Iterate in reverse DOM order.\n const children = root.children;\n for (let i = children.length - 1; i >= 0; i--) {\n const tabbableChild = children[i].nodeType === this._document.ELEMENT_NODE\n ? this._getLastTabbableElement(children[i])\n : null;\n if (tabbableChild) {\n return tabbableChild;\n }\n }\n return null;\n }\n /** Creates an anchor element. */\n _createAnchor() {\n const anchor = this._document.createElement('div');\n this._toggleAnchorTabIndex(this._enabled, anchor);\n anchor.classList.add('cdk-visually-hidden');\n anchor.classList.add('cdk-focus-trap-anchor');\n anchor.setAttribute('aria-hidden', 'true');\n return anchor;\n }\n /**\n * Toggles the `tabindex` of an anchor, based on the enabled state of the focus trap.\n * @param isEnabled Whether the focus trap is enabled.\n * @param anchor Anchor on which to toggle the tabindex.\n */\n _toggleAnchorTabIndex(isEnabled, anchor) {\n // Remove the tabindex completely, rather than setting it to -1, because if the\n // element has a tabindex, the user might still hit it when navigating with the arrow keys.\n isEnabled ? anchor.setAttribute('tabindex', '0') : anchor.removeAttribute('tabindex');\n }\n /**\n * Toggles the`tabindex` of both anchors to either trap Tab focus or allow it to escape.\n * @param enabled: Whether the anchors should trap Tab.\n */\n toggleAnchors(enabled) {\n if (this._startAnchor && this._endAnchor) {\n this._toggleAnchorTabIndex(enabled, this._startAnchor);\n this._toggleAnchorTabIndex(enabled, this._endAnchor);\n }\n }\n /** Executes a function when the zone is stable. */\n _executeOnStable(fn) {\n if (this._ngZone.isStable) {\n fn();\n }\n else {\n this._ngZone.onStable.pipe(take(1)).subscribe(fn);\n }\n }\n}\n/**\n * Factory that allows easy instantiation of focus traps.\n * @deprecated Use `ConfigurableFocusTrapFactory` instead.\n * @breaking-change 11.0.0\n */\nclass FocusTrapFactory {\n constructor(_checker, _ngZone, _document) {\n this._checker = _checker;\n this._ngZone = _ngZone;\n this._document = _document;\n }\n /**\n * Creates a focus-trapped region around the given element.\n * @param element The element around which focus will be trapped.\n * @param deferCaptureElements Defers the creation of focus-capturing elements to be done\n * manually by the user.\n * @returns The created focus trap instance.\n */\n create(element, deferCaptureElements = false) {\n return new FocusTrap(element, this._checker, this._ngZone, this._document, deferCaptureElements);\n }\n}\nFocusTrapFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: FocusTrapFactory, deps: [{ token: InteractivityChecker }, { token: i0.NgZone }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nFocusTrapFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: FocusTrapFactory, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: FocusTrapFactory, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: InteractivityChecker }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n/** Directive for trapping focus within a region. */\nclass CdkTrapFocus {\n constructor(_elementRef, _focusTrapFactory, \n /**\n * @deprecated No longer being used. To be removed.\n * @breaking-change 13.0.0\n */\n _document) {\n this._elementRef = _elementRef;\n this._focusTrapFactory = _focusTrapFactory;\n /** Previously focused element to restore focus to upon destroy when using autoCapture. */\n this._previouslyFocusedElement = null;\n this.focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement, true);\n }\n /** Whether the focus trap is active. */\n get enabled() {\n return this.focusTrap.enabled;\n }\n set enabled(value) {\n this.focusTrap.enabled = coerceBooleanProperty(value);\n }\n /**\n * Whether the directive should automatically move focus into the trapped region upon\n * initialization and return focus to the previous activeElement upon destruction.\n */\n get autoCapture() {\n return this._autoCapture;\n }\n set autoCapture(value) {\n this._autoCapture = coerceBooleanProperty(value);\n }\n ngOnDestroy() {\n this.focusTrap.destroy();\n // If we stored a previously focused element when using autoCapture, return focus to that\n // element now that the trapped region is being destroyed.\n if (this._previouslyFocusedElement) {\n this._previouslyFocusedElement.focus();\n this._previouslyFocusedElement = null;\n }\n }\n ngAfterContentInit() {\n this.focusTrap.attachAnchors();\n if (this.autoCapture) {\n this._captureFocus();\n }\n }\n ngDoCheck() {\n if (!this.focusTrap.hasAttached()) {\n this.focusTrap.attachAnchors();\n }\n }\n ngOnChanges(changes) {\n const autoCaptureChange = changes['autoCapture'];\n if (autoCaptureChange &&\n !autoCaptureChange.firstChange &&\n this.autoCapture &&\n this.focusTrap.hasAttached()) {\n this._captureFocus();\n }\n }\n _captureFocus() {\n this._previouslyFocusedElement = _getFocusedElementPierceShadowDom();\n this.focusTrap.focusInitialElementWhenReady();\n }\n}\nCdkTrapFocus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTrapFocus, deps: [{ token: i0.ElementRef }, { token: FocusTrapFactory }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });\nCdkTrapFocus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkTrapFocus, selector: \"[cdkTrapFocus]\", inputs: { enabled: [\"cdkTrapFocus\", \"enabled\"], autoCapture: [\"cdkTrapFocusAutoCapture\", \"autoCapture\"] }, exportAs: [\"cdkTrapFocus\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTrapFocus, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkTrapFocus]',\n exportAs: 'cdkTrapFocus',\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: FocusTrapFactory }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, propDecorators: { enabled: [{\n type: Input,\n args: ['cdkTrapFocus']\n }], autoCapture: [{\n type: Input,\n args: ['cdkTrapFocusAutoCapture']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Class that allows for trapping focus within a DOM element.\n *\n * This class uses a strategy pattern that determines how it traps focus.\n * See FocusTrapInertStrategy.\n */\nclass ConfigurableFocusTrap extends FocusTrap {\n constructor(_element, _checker, _ngZone, _document, _focusTrapManager, _inertStrategy, config) {\n super(_element, _checker, _ngZone, _document, config.defer);\n this._focusTrapManager = _focusTrapManager;\n this._inertStrategy = _inertStrategy;\n this._focusTrapManager.register(this);\n }\n /** Whether the FocusTrap is enabled. */\n get enabled() {\n return this._enabled;\n }\n set enabled(value) {\n this._enabled = value;\n if (this._enabled) {\n this._focusTrapManager.register(this);\n }\n else {\n this._focusTrapManager.deregister(this);\n }\n }\n /** Notifies the FocusTrapManager that this FocusTrap will be destroyed. */\n destroy() {\n this._focusTrapManager.deregister(this);\n super.destroy();\n }\n /** @docs-private Implemented as part of ManagedFocusTrap. */\n _enable() {\n this._inertStrategy.preventFocus(this);\n this.toggleAnchors(true);\n }\n /** @docs-private Implemented as part of ManagedFocusTrap. */\n _disable() {\n this._inertStrategy.allowFocus(this);\n this.toggleAnchors(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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** The injection token used to specify the inert strategy. */\nconst FOCUS_TRAP_INERT_STRATEGY = new InjectionToken('FOCUS_TRAP_INERT_STRATEGY');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Lightweight FocusTrapInertStrategy that adds a document focus event\n * listener to redirect focus back inside the FocusTrap.\n */\nclass EventListenerFocusTrapInertStrategy {\n constructor() {\n /** Focus event handler. */\n this._listener = null;\n }\n /** Adds a document event listener that keeps focus inside the FocusTrap. */\n preventFocus(focusTrap) {\n // Ensure there's only one listener per document\n if (this._listener) {\n focusTrap._document.removeEventListener('focus', this._listener, true);\n }\n this._listener = (e) => this._trapFocus(focusTrap, e);\n focusTrap._ngZone.runOutsideAngular(() => {\n focusTrap._document.addEventListener('focus', this._listener, true);\n });\n }\n /** Removes the event listener added in preventFocus. */\n allowFocus(focusTrap) {\n if (!this._listener) {\n return;\n }\n focusTrap._document.removeEventListener('focus', this._listener, true);\n this._listener = null;\n }\n /**\n * Refocuses the first element in the FocusTrap if the focus event target was outside\n * the FocusTrap.\n *\n * This is an event listener callback. The event listener is added in runOutsideAngular,\n * so all this code runs outside Angular as well.\n */\n _trapFocus(focusTrap, event) {\n const target = event.target;\n const focusTrapRoot = focusTrap._element;\n // Don't refocus if target was in an overlay, because the overlay might be associated\n // with an element inside the FocusTrap, ex. mat-select.\n if (target && !focusTrapRoot.contains(target) && !target.closest?.('div.cdk-overlay-pane')) {\n // Some legacy FocusTrap usages have logic that focuses some element on the page\n // just before FocusTrap is destroyed. For backwards compatibility, wait\n // to be sure FocusTrap is still enabled before refocusing.\n setTimeout(() => {\n // Check whether focus wasn't put back into the focus trap while the timeout was pending.\n if (focusTrap.enabled && !focusTrapRoot.contains(focusTrap._document.activeElement)) {\n focusTrap.focusFirstTabbableElement();\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/** Injectable that ensures only the most recently enabled FocusTrap is active. */\nclass FocusTrapManager {\n constructor() {\n // A stack of the FocusTraps on the page. Only the FocusTrap at the\n // top of the stack is active.\n this._focusTrapStack = [];\n }\n /**\n * Disables the FocusTrap at the top of the stack, and then pushes\n * the new FocusTrap onto the stack.\n */\n register(focusTrap) {\n // Dedupe focusTraps that register multiple times.\n this._focusTrapStack = this._focusTrapStack.filter(ft => ft !== focusTrap);\n let stack = this._focusTrapStack;\n if (stack.length) {\n stack[stack.length - 1]._disable();\n }\n stack.push(focusTrap);\n focusTrap._enable();\n }\n /**\n * Removes the FocusTrap from the stack, and activates the\n * FocusTrap that is the new top of the stack.\n */\n deregister(focusTrap) {\n focusTrap._disable();\n const stack = this._focusTrapStack;\n const i = stack.indexOf(focusTrap);\n if (i !== -1) {\n stack.splice(i, 1);\n if (stack.length) {\n stack[stack.length - 1]._enable();\n }\n }\n }\n}\nFocusTrapManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: FocusTrapManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nFocusTrapManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: FocusTrapManager, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: FocusTrapManager, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Factory that allows easy instantiation of configurable focus traps. */\nclass ConfigurableFocusTrapFactory {\n constructor(_checker, _ngZone, _focusTrapManager, _document, _inertStrategy) {\n this._checker = _checker;\n this._ngZone = _ngZone;\n this._focusTrapManager = _focusTrapManager;\n this._document = _document;\n // TODO split up the strategies into different modules, similar to DateAdapter.\n this._inertStrategy = _inertStrategy || new EventListenerFocusTrapInertStrategy();\n }\n create(element, config = { defer: false }) {\n let configObject;\n if (typeof config === 'boolean') {\n configObject = { defer: config };\n }\n else {\n configObject = config;\n }\n return new ConfigurableFocusTrap(element, this._checker, this._ngZone, this._document, this._focusTrapManager, this._inertStrategy, configObject);\n }\n}\nConfigurableFocusTrapFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ConfigurableFocusTrapFactory, deps: [{ token: InteractivityChecker }, { token: i0.NgZone }, { token: FocusTrapManager }, { token: DOCUMENT }, { token: FOCUS_TRAP_INERT_STRATEGY, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nConfigurableFocusTrapFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ConfigurableFocusTrapFactory, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ConfigurableFocusTrapFactory, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: InteractivityChecker }, { type: i0.NgZone }, { type: FocusTrapManager }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [FOCUS_TRAP_INERT_STRATEGY]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Gets whether an event could be a faked `mousedown` event dispatched by a screen reader. */\nfunction isFakeMousedownFromScreenReader(event) {\n // Some screen readers will dispatch a fake `mousedown` event when pressing enter or space on\n // a clickable element. We can distinguish these events when both `offsetX` and `offsetY` are\n // zero or `event.buttons` is zero, depending on the browser:\n // - `event.buttons` works on Firefox, but fails on Chrome.\n // - `offsetX` and `offsetY` work on Chrome, but fail on Firefox.\n // Note that there's an edge case where the user could click the 0x0 spot of the\n // screen themselves, but that is unlikely to contain interactive elements.\n return event.buttons === 0 || (event.offsetX === 0 && event.offsetY === 0);\n}\n/** Gets whether an event could be a faked `touchstart` event dispatched by a screen reader. */\nfunction isFakeTouchstartFromScreenReader(event) {\n const touch = (event.touches && event.touches[0]) || (event.changedTouches && event.changedTouches[0]);\n // A fake `touchstart` can be distinguished from a real one by looking at the `identifier`\n // which is typically >= 0 on a real device versus -1 from a screen reader. Just to be safe,\n // we can also look at `radiusX` and `radiusY`. This behavior was observed against a Windows 10\n // device with a touch screen running NVDA v2020.4 and Firefox 85 or Chrome 88.\n return (!!touch &&\n touch.identifier === -1 &&\n (touch.radiusX == null || touch.radiusX === 1) &&\n (touch.radiusY == null || touch.radiusY === 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 * Injectable options for the InputModalityDetector. These are shallowly merged with the default\n * options.\n */\nconst INPUT_MODALITY_DETECTOR_OPTIONS = new InjectionToken('cdk-input-modality-detector-options');\n/**\n * Default options for the InputModalityDetector.\n *\n * Modifier keys are ignored by default (i.e. when pressed won't cause the service to detect\n * keyboard input modality) for two reasons:\n *\n * 1. Modifier keys are commonly used with mouse to perform actions such as 'right click' or 'open\n * in new tab', and are thus less representative of actual keyboard interaction.\n * 2. VoiceOver triggers some keyboard events when linearly navigating with Control + Option (but\n * confusingly not with Caps Lock). Thus, to have parity with other screen readers, we ignore\n * these keys so as to not update the input modality.\n *\n * Note that we do not by default ignore the right Meta key on Safari because it has the same key\n * code as the ContextMenu key on other browsers. When we switch to using event.key, we can\n * distinguish between the two.\n */\nconst INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS = {\n ignoreKeys: [ALT, CONTROL, MAC_META, META, SHIFT],\n};\n/**\n * The amount of time needed to pass after a touchstart event in order for a subsequent mousedown\n * event to be attributed as mouse and not touch.\n *\n * This is the value used by AngularJS Material. Through trial and error (on iPhone 6S) they found\n * that a value of around 650ms seems appropriate.\n */\nconst TOUCH_BUFFER_MS = 650;\n/**\n * Event listener options that enable capturing and also mark the listener as passive if the browser\n * supports it.\n */\nconst modalityEventListenerOptions = normalizePassiveListenerOptions({\n passive: true,\n capture: true,\n});\n/**\n * Service that detects the user's input modality.\n *\n * This service does not update the input modality when a user navigates with a screen reader\n * (e.g. linear navigation with VoiceOver, object navigation / browse mode with NVDA, virtual PC\n * cursor mode with JAWS). This is in part due to technical limitations (i.e. keyboard events do not\n * fire as expected in these modes) but is also arguably the correct behavior. Navigating with a\n * screen reader is akin to visually scanning a page, and should not be interpreted as actual user\n * input interaction.\n *\n * When a user is not navigating but *interacting* with a screen reader, this service attempts to\n * update the input modality to keyboard, but in general this service's behavior is largely\n * undefined.\n */\nclass InputModalityDetector {\n constructor(_platform, ngZone, document, options) {\n this._platform = _platform;\n /**\n * The most recently detected input modality event target. Is null if no input modality has been\n * detected or if the associated event target is null for some unknown reason.\n */\n this._mostRecentTarget = null;\n /** The underlying BehaviorSubject that emits whenever an input modality is detected. */\n this._modality = new BehaviorSubject(null);\n /**\n * The timestamp of the last touch input modality. Used to determine whether mousedown events\n * should be attributed to mouse or touch.\n */\n this._lastTouchMs = 0;\n /**\n * Handles keydown events. Must be an arrow function in order to preserve the context when it gets\n * bound.\n */\n this._onKeydown = (event) => {\n // If this is one of the keys we should ignore, then ignore it and don't update the input\n // modality to keyboard.\n if (this._options?.ignoreKeys?.some(keyCode => keyCode === event.keyCode)) {\n return;\n }\n this._modality.next('keyboard');\n this._mostRecentTarget = _getEventTarget(event);\n };\n /**\n * Handles mousedown events. Must be an arrow function in order to preserve the context when it\n * gets bound.\n */\n this._onMousedown = (event) => {\n // Touches trigger both touch and mouse events, so we need to distinguish between mouse events\n // that were triggered via mouse vs touch. To do so, check if the mouse event occurs closely\n // after the previous touch event.\n if (Date.now() - this._lastTouchMs < TOUCH_BUFFER_MS) {\n return;\n }\n // Fake mousedown events are fired by some screen readers when controls are activated by the\n // screen reader. Attribute them to keyboard input modality.\n this._modality.next(isFakeMousedownFromScreenReader(event) ? 'keyboard' : 'mouse');\n this._mostRecentTarget = _getEventTarget(event);\n };\n /**\n * Handles touchstart events. Must be an arrow function in order to preserve the context when it\n * gets bound.\n */\n this._onTouchstart = (event) => {\n // Same scenario as mentioned in _onMousedown, but on touch screen devices, fake touchstart\n // events are fired. Again, attribute to keyboard input modality.\n if (isFakeTouchstartFromScreenReader(event)) {\n this._modality.next('keyboard');\n return;\n }\n // Store the timestamp of this touch event, as it's used to distinguish between mouse events\n // triggered via mouse vs touch.\n this._lastTouchMs = Date.now();\n this._modality.next('touch');\n this._mostRecentTarget = _getEventTarget(event);\n };\n this._options = {\n ...INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS,\n ...options,\n };\n // Skip the first emission as it's null.\n this.modalityDetected = this._modality.pipe(skip(1));\n this.modalityChanged = this.modalityDetected.pipe(distinctUntilChanged());\n // If we're not in a browser, this service should do nothing, as there's no relevant input\n // modality to detect.\n if (_platform.isBrowser) {\n ngZone.runOutsideAngular(() => {\n document.addEventListener('keydown', this._onKeydown, modalityEventListenerOptions);\n document.addEventListener('mousedown', this._onMousedown, modalityEventListenerOptions);\n document.addEventListener('touchstart', this._onTouchstart, modalityEventListenerOptions);\n });\n }\n }\n /** The most recently detected input modality. */\n get mostRecentModality() {\n return this._modality.value;\n }\n ngOnDestroy() {\n this._modality.complete();\n if (this._platform.isBrowser) {\n document.removeEventListener('keydown', this._onKeydown, modalityEventListenerOptions);\n document.removeEventListener('mousedown', this._onMousedown, modalityEventListenerOptions);\n document.removeEventListener('touchstart', this._onTouchstart, modalityEventListenerOptions);\n }\n }\n}\nInputModalityDetector.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: InputModalityDetector, deps: [{ token: i1.Platform }, { token: i0.NgZone }, { token: DOCUMENT }, { token: INPUT_MODALITY_DETECTOR_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nInputModalityDetector.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: InputModalityDetector, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: InputModalityDetector, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.Platform }, { type: i0.NgZone }, { type: Document, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [INPUT_MODALITY_DETECTOR_OPTIONS]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 LIVE_ANNOUNCER_ELEMENT_TOKEN = new InjectionToken('liveAnnouncerElement', {\n providedIn: 'root',\n factory: LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY,\n});\n/** @docs-private */\nfunction LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY() {\n return null;\n}\n/** Injection token that can be used to configure the default options for the LiveAnnouncer. */\nconst LIVE_ANNOUNCER_DEFAULT_OPTIONS = new InjectionToken('LIVE_ANNOUNCER_DEFAULT_OPTIONS');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 LiveAnnouncer {\n constructor(elementToken, _ngZone, _document, _defaultOptions) {\n this._ngZone = _ngZone;\n this._defaultOptions = _defaultOptions;\n // We inject the live element and document as `any` because the constructor signature cannot\n // reference browser globals (HTMLElement, Document) on non-browser environments, since having\n // a class decorator causes TypeScript to preserve the constructor signature types.\n this._document = _document;\n this._liveElement = elementToken || this._createLiveElement();\n }\n announce(message, ...args) {\n const defaultOptions = this._defaultOptions;\n let politeness;\n let duration;\n if (args.length === 1 && typeof args[0] === 'number') {\n duration = args[0];\n }\n else {\n [politeness, duration] = args;\n }\n this.clear();\n clearTimeout(this._previousTimeout);\n if (!politeness) {\n politeness =\n defaultOptions && defaultOptions.politeness ? defaultOptions.politeness : 'polite';\n }\n if (duration == null && defaultOptions) {\n duration = defaultOptions.duration;\n }\n // TODO: ensure changing the politeness works on all environments we support.\n this._liveElement.setAttribute('aria-live', politeness);\n // This 100ms timeout is necessary for some browser + screen-reader combinations:\n // - Both JAWS and NVDA over IE11 will not announce anything without a non-zero timeout.\n // - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a\n // second time without clearing and then using a non-zero delay.\n // (using JAWS 17 at time of this writing).\n return this._ngZone.runOutsideAngular(() => {\n if (!this._currentPromise) {\n this._currentPromise = new Promise(resolve => (this._currentResolve = resolve));\n }\n clearTimeout(this._previousTimeout);\n this._previousTimeout = setTimeout(() => {\n this._liveElement.textContent = message;\n if (typeof duration === 'number') {\n this._previousTimeout = setTimeout(() => this.clear(), duration);\n }\n this._currentResolve();\n this._currentPromise = this._currentResolve = undefined;\n }, 100);\n return this._currentPromise;\n });\n }\n /**\n * Clears the current text from the announcer element. Can be used to prevent\n * screen readers from reading the text out again while the user is going\n * through the page landmarks.\n */\n clear() {\n if (this._liveElement) {\n this._liveElement.textContent = '';\n }\n }\n ngOnDestroy() {\n clearTimeout(this._previousTimeout);\n this._liveElement?.remove();\n this._liveElement = null;\n this._currentResolve?.();\n this._currentPromise = this._currentResolve = undefined;\n }\n _createLiveElement() {\n const elementClass = 'cdk-live-announcer-element';\n const previousElements = this._document.getElementsByClassName(elementClass);\n const liveEl = this._document.createElement('div');\n // Remove any old containers. This can happen when coming in from a server-side-rendered page.\n for (let i = 0; i < previousElements.length; i++) {\n previousElements[i].remove();\n }\n liveEl.classList.add(elementClass);\n liveEl.classList.add('cdk-visually-hidden');\n liveEl.setAttribute('aria-atomic', 'true');\n liveEl.setAttribute('aria-live', 'polite');\n this._document.body.appendChild(liveEl);\n return liveEl;\n }\n}\nLiveAnnouncer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: LiveAnnouncer, deps: [{ token: LIVE_ANNOUNCER_ELEMENT_TOKEN, optional: true }, { token: i0.NgZone }, { token: DOCUMENT }, { token: LIVE_ANNOUNCER_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nLiveAnnouncer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: LiveAnnouncer, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: LiveAnnouncer, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [LIVE_ANNOUNCER_ELEMENT_TOKEN]\n }] }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [LIVE_ANNOUNCER_DEFAULT_OPTIONS]\n }] }]; } });\n/**\n * A directive that works similarly to aria-live, but uses the LiveAnnouncer to ensure compatibility\n * with a wider range of browsers and screen readers.\n */\nclass CdkAriaLive {\n constructor(_elementRef, _liveAnnouncer, _contentObserver, _ngZone) {\n this._elementRef = _elementRef;\n this._liveAnnouncer = _liveAnnouncer;\n this._contentObserver = _contentObserver;\n this._ngZone = _ngZone;\n this._politeness = 'polite';\n }\n /** The aria-live politeness level to use when announcing messages. */\n get politeness() {\n return this._politeness;\n }\n set politeness(value) {\n this._politeness = value === 'off' || value === 'assertive' ? value : 'polite';\n if (this._politeness === 'off') {\n if (this._subscription) {\n this._subscription.unsubscribe();\n this._subscription = null;\n }\n }\n else if (!this._subscription) {\n this._subscription = this._ngZone.runOutsideAngular(() => {\n return this._contentObserver.observe(this._elementRef).subscribe(() => {\n // Note that we use textContent here, rather than innerText, in order to avoid a reflow.\n const elementText = this._elementRef.nativeElement.textContent;\n // The `MutationObserver` fires also for attribute\n // changes which we don't want to announce.\n if (elementText !== this._previousAnnouncedText) {\n this._liveAnnouncer.announce(elementText, this._politeness, this.duration);\n this._previousAnnouncedText = elementText;\n }\n });\n });\n }\n }\n ngOnDestroy() {\n if (this._subscription) {\n this._subscription.unsubscribe();\n }\n }\n}\nCdkAriaLive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkAriaLive, deps: [{ token: i0.ElementRef }, { token: LiveAnnouncer }, { token: i1$1.ContentObserver }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });\nCdkAriaLive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkAriaLive, selector: \"[cdkAriaLive]\", inputs: { politeness: [\"cdkAriaLive\", \"politeness\"], duration: [\"cdkAriaLiveDuration\", \"duration\"] }, exportAs: [\"cdkAriaLive\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkAriaLive, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkAriaLive]',\n exportAs: 'cdkAriaLive',\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: LiveAnnouncer }, { type: i1$1.ContentObserver }, { type: i0.NgZone }]; }, propDecorators: { politeness: [{\n type: Input,\n args: ['cdkAriaLive']\n }], duration: [{\n type: Input,\n args: ['cdkAriaLiveDuration']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** InjectionToken for FocusMonitorOptions. */\nconst FOCUS_MONITOR_DEFAULT_OPTIONS = new InjectionToken('cdk-focus-monitor-default-options');\n/**\n * Event listener options that enable capturing and also\n * mark the listener as passive if the browser supports it.\n */\nconst captureEventListenerOptions = normalizePassiveListenerOptions({\n passive: true,\n capture: true,\n});\n/** Monitors mouse and keyboard events to determine the cause of focus events. */\nclass FocusMonitor {\n constructor(_ngZone, _platform, _inputModalityDetector, \n /** @breaking-change 11.0.0 make document required */\n document, options) {\n this._ngZone = _ngZone;\n this._platform = _platform;\n this._inputModalityDetector = _inputModalityDetector;\n /** The focus origin that the next focus event is a result of. */\n this._origin = null;\n /** Whether the window has just been focused. */\n this._windowFocused = false;\n /**\n * Whether the origin was determined via a touch interaction. Necessary as properly attributing\n * focus events to touch interactions requires special logic.\n */\n this._originFromTouchInteraction = false;\n /** Map of elements being monitored to their info. */\n this._elementInfo = new Map();\n /** The number of elements currently being monitored. */\n this._monitoredElementCount = 0;\n /**\n * Keeps track of the root nodes to which we've currently bound a focus/blur handler,\n * as well as the number of monitored elements that they contain. We have to treat focus/blur\n * handlers differently from the rest of the events, because the browser won't emit events\n * to the document when focus moves inside of a shadow root.\n */\n this._rootNodeFocusListenerCount = new Map();\n /**\n * Event listener for `focus` events on the window.\n * Needs to be an arrow function in order to preserve the context when it gets bound.\n */\n this._windowFocusListener = () => {\n // Make a note of when the window regains focus, so we can\n // restore the origin info for the focused element.\n this._windowFocused = true;\n this._windowFocusTimeoutId = window.setTimeout(() => (this._windowFocused = false));\n };\n /** Subject for stopping our InputModalityDetector subscription. */\n this._stopInputModalityDetector = new Subject();\n /**\n * Event listener for `focus` and 'blur' events on the document.\n * Needs to be an arrow function in order to preserve the context when it gets bound.\n */\n this._rootNodeFocusAndBlurListener = (event) => {\n const target = _getEventTarget(event);\n // We need to walk up the ancestor chain in order to support `checkChildren`.\n for (let element = target; element; element = element.parentElement) {\n if (event.type === 'focus') {\n this._onFocus(event, element);\n }\n else {\n this._onBlur(event, element);\n }\n }\n };\n this._document = document;\n this._detectionMode = options?.detectionMode || 0 /* FocusMonitorDetectionMode.IMMEDIATE */;\n }\n monitor(element, checkChildren = false) {\n const nativeElement = coerceElement(element);\n // Do nothing if we're not on the browser platform or the passed in node isn't an element.\n if (!this._platform.isBrowser || nativeElement.nodeType !== 1) {\n return of(null);\n }\n // If the element is inside the shadow DOM, we need to bind our focus/blur listeners to\n // the shadow root, rather than the `document`, because the browser won't emit focus events\n // to the `document`, if focus is moving within the same shadow root.\n const rootNode = _getShadowRoot(nativeElement) || this._getDocument();\n const cachedInfo = this._elementInfo.get(nativeElement);\n // Check if we're already monitoring this element.\n if (cachedInfo) {\n if (checkChildren) {\n // TODO(COMP-318): this can be problematic, because it'll turn all non-checkChildren\n // observers into ones that behave as if `checkChildren` was turned on. We need a more\n // robust solution.\n cachedInfo.checkChildren = true;\n }\n return cachedInfo.subject;\n }\n // Create monitored element info.\n const info = {\n checkChildren: checkChildren,\n subject: new Subject(),\n rootNode,\n };\n this._elementInfo.set(nativeElement, info);\n this._registerGlobalListeners(info);\n return info.subject;\n }\n stopMonitoring(element) {\n const nativeElement = coerceElement(element);\n const elementInfo = this._elementInfo.get(nativeElement);\n if (elementInfo) {\n elementInfo.subject.complete();\n this._setClasses(nativeElement);\n this._elementInfo.delete(nativeElement);\n this._removeGlobalListeners(elementInfo);\n }\n }\n focusVia(element, origin, options) {\n const nativeElement = coerceElement(element);\n const focusedElement = this._getDocument().activeElement;\n // If the element is focused already, calling `focus` again won't trigger the event listener\n // which means that the focus classes won't be updated. If that's the case, update the classes\n // directly without waiting for an event.\n if (nativeElement === focusedElement) {\n this._getClosestElementsInfo(nativeElement).forEach(([currentElement, info]) => this._originChanged(currentElement, origin, info));\n }\n else {\n this._setOrigin(origin);\n // `focus` isn't available on the server\n if (typeof nativeElement.focus === 'function') {\n nativeElement.focus(options);\n }\n }\n }\n ngOnDestroy() {\n this._elementInfo.forEach((_info, element) => this.stopMonitoring(element));\n }\n /** Access injected document if available or fallback to global document reference */\n _getDocument() {\n return this._document || document;\n }\n /** Use defaultView of injected document if available or fallback to global window reference */\n _getWindow() {\n const doc = this._getDocument();\n return doc.defaultView || window;\n }\n _getFocusOrigin(focusEventTarget) {\n if (this._origin) {\n // If the origin was realized via a touch interaction, we need to perform additional checks\n // to determine whether the focus origin should be attributed to touch or program.\n if (this._originFromTouchInteraction) {\n return this._shouldBeAttributedToTouch(focusEventTarget) ? 'touch' : 'program';\n }\n else {\n return this._origin;\n }\n }\n // If the window has just regained focus, we can restore the most recent origin from before the\n // window blurred. Otherwise, we've reached the point where we can't identify the source of the\n // focus. This typically means one of two things happened:\n //\n // 1) The element was programmatically focused, or\n // 2) The element was focused via screen reader navigation (which generally doesn't fire\n // events).\n //\n // Because we can't distinguish between these two cases, we default to setting `program`.\n if (this._windowFocused && this._lastFocusOrigin) {\n return this._lastFocusOrigin;\n }\n // If the interaction is coming from an input label, we consider it a mouse interactions.\n // This is a special case where focus moves on `click`, rather than `mousedown` which breaks\n // our detection, because all our assumptions are for `mousedown`. We need to handle this\n // special case, because it's very common for checkboxes and radio buttons.\n if (focusEventTarget && this._isLastInteractionFromInputLabel(focusEventTarget)) {\n return 'mouse';\n }\n return 'program';\n }\n /**\n * Returns whether the focus event should be attributed to touch. Recall that in IMMEDIATE mode, a\n * touch origin isn't immediately reset at the next tick (see _setOrigin). This means that when we\n * handle a focus event following a touch interaction, we need to determine whether (1) the focus\n * event was directly caused by the touch interaction or (2) the focus event was caused by a\n * subsequent programmatic focus call triggered by the touch interaction.\n * @param focusEventTarget The target of the focus event under examination.\n */\n _shouldBeAttributedToTouch(focusEventTarget) {\n // Please note that this check is not perfect. Consider the following edge case:\n //\n // <div #parent tabindex=\"0\">\n // <div #child tabindex=\"0\" (click)=\"#parent.focus()\"></div>\n // </div>\n //\n // Suppose there is a FocusMonitor in IMMEDIATE mode attached to #parent. When the user touches\n // #child, #parent is programmatically focused. This code will attribute the focus to touch\n // instead of program. This is a relatively minor edge-case that can be worked around by using\n // focusVia(parent, 'program') to focus #parent.\n return (this._detectionMode === 1 /* FocusMonitorDetectionMode.EVENTUAL */ ||\n !!focusEventTarget?.contains(this._inputModalityDetector._mostRecentTarget));\n }\n /**\n * Sets the focus classes on the element based on the given focus origin.\n * @param element The element to update the classes on.\n * @param origin The focus origin.\n */\n _setClasses(element, origin) {\n element.classList.toggle('cdk-focused', !!origin);\n element.classList.toggle('cdk-touch-focused', origin === 'touch');\n element.classList.toggle('cdk-keyboard-focused', origin === 'keyboard');\n element.classList.toggle('cdk-mouse-focused', origin === 'mouse');\n element.classList.toggle('cdk-program-focused', origin === 'program');\n }\n /**\n * Updates the focus origin. If we're using immediate detection mode, we schedule an async\n * function to clear the origin at the end of a timeout. The duration of the timeout depends on\n * the origin being set.\n * @param origin The origin to set.\n * @param isFromInteraction Whether we are setting the origin from an interaction event.\n */\n _setOrigin(origin, isFromInteraction = false) {\n this._ngZone.runOutsideAngular(() => {\n this._origin = origin;\n this._originFromTouchInteraction = origin === 'touch' && isFromInteraction;\n // If we're in IMMEDIATE mode, reset the origin at the next tick (or in `TOUCH_BUFFER_MS` ms\n // for a touch event). We reset the origin at the next tick because Firefox focuses one tick\n // after the interaction event. We wait `TOUCH_BUFFER_MS` ms before resetting the origin for\n // a touch event because when a touch event is fired, the associated focus event isn't yet in\n // the event queue. Before doing so, clear any pending timeouts.\n if (this._detectionMode === 0 /* FocusMonitorDetectionMode.IMMEDIATE */) {\n clearTimeout(this._originTimeoutId);\n const ms = this._originFromTouchInteraction ? TOUCH_BUFFER_MS : 1;\n this._originTimeoutId = setTimeout(() => (this._origin = null), ms);\n }\n });\n }\n /**\n * Handles focus events on a registered element.\n * @param event The focus event.\n * @param element The monitored element.\n */\n _onFocus(event, element) {\n // NOTE(mmalerba): We currently set the classes based on the focus origin of the most recent\n // focus event affecting the monitored element. If we want to use the origin of the first event\n // instead we should check for the cdk-focused class here and return if the element already has\n // it. (This only matters for elements that have includesChildren = true).\n // If we are not counting child-element-focus as focused, make sure that the event target is the\n // monitored element itself.\n const elementInfo = this._elementInfo.get(element);\n const focusEventTarget = _getEventTarget(event);\n if (!elementInfo || (!elementInfo.checkChildren && element !== focusEventTarget)) {\n return;\n }\n this._originChanged(element, this._getFocusOrigin(focusEventTarget), elementInfo);\n }\n /**\n * Handles blur events on a registered element.\n * @param event The blur event.\n * @param element The monitored element.\n */\n _onBlur(event, element) {\n // If we are counting child-element-focus as focused, make sure that we aren't just blurring in\n // order to focus another child of the monitored element.\n const elementInfo = this._elementInfo.get(element);\n if (!elementInfo ||\n (elementInfo.checkChildren &&\n event.relatedTarget instanceof Node &&\n element.contains(event.relatedTarget))) {\n return;\n }\n this._setClasses(element);\n this._emitOrigin(elementInfo, null);\n }\n _emitOrigin(info, origin) {\n if (info.subject.observers.length) {\n this._ngZone.run(() => info.subject.next(origin));\n }\n }\n _registerGlobalListeners(elementInfo) {\n if (!this._platform.isBrowser) {\n return;\n }\n const rootNode = elementInfo.rootNode;\n const rootNodeFocusListeners = this._rootNodeFocusListenerCount.get(rootNode) || 0;\n if (!rootNodeFocusListeners) {\n this._ngZone.runOutsideAngular(() => {\n rootNode.addEventListener('focus', this._rootNodeFocusAndBlurListener, captureEventListenerOptions);\n rootNode.addEventListener('blur', this._rootNodeFocusAndBlurListener, captureEventListenerOptions);\n });\n }\n this._rootNodeFocusListenerCount.set(rootNode, rootNodeFocusListeners + 1);\n // Register global listeners when first element is monitored.\n if (++this._monitoredElementCount === 1) {\n // Note: we listen to events in the capture phase so we\n // can detect them even if the user stops propagation.\n this._ngZone.runOutsideAngular(() => {\n const window = this._getWindow();\n window.addEventListener('focus', this._windowFocusListener);\n });\n // The InputModalityDetector is also just a collection of global listeners.\n this._inputModalityDetector.modalityDetected\n .pipe(takeUntil(this._stopInputModalityDetector))\n .subscribe(modality => {\n this._setOrigin(modality, true /* isFromInteraction */);\n });\n }\n }\n _removeGlobalListeners(elementInfo) {\n const rootNode = elementInfo.rootNode;\n if (this._rootNodeFocusListenerCount.has(rootNode)) {\n const rootNodeFocusListeners = this._rootNodeFocusListenerCount.get(rootNode);\n if (rootNodeFocusListeners > 1) {\n this._rootNodeFocusListenerCount.set(rootNode, rootNodeFocusListeners - 1);\n }\n else {\n rootNode.removeEventListener('focus', this._rootNodeFocusAndBlurListener, captureEventListenerOptions);\n rootNode.removeEventListener('blur', this._rootNodeFocusAndBlurListener, captureEventListenerOptions);\n this._rootNodeFocusListenerCount.delete(rootNode);\n }\n }\n // Unregister global listeners when last element is unmonitored.\n if (!--this._monitoredElementCount) {\n const window = this._getWindow();\n window.removeEventListener('focus', this._windowFocusListener);\n // Equivalently, stop our InputModalityDetector subscription.\n this._stopInputModalityDetector.next();\n // Clear timeouts for all potentially pending timeouts to prevent the leaks.\n clearTimeout(this._windowFocusTimeoutId);\n clearTimeout(this._originTimeoutId);\n }\n }\n /** Updates all the state on an element once its focus origin has changed. */\n _originChanged(element, origin, elementInfo) {\n this._setClasses(element, origin);\n this._emitOrigin(elementInfo, origin);\n this._lastFocusOrigin = origin;\n }\n /**\n * Collects the `MonitoredElementInfo` of a particular element and\n * all of its ancestors that have enabled `checkChildren`.\n * @param element Element from which to start the search.\n */\n _getClosestElementsInfo(element) {\n const results = [];\n this._elementInfo.forEach((info, currentElement) => {\n if (currentElement === element || (info.checkChildren && currentElement.contains(element))) {\n results.push([currentElement, info]);\n }\n });\n return results;\n }\n /**\n * Returns whether an interaction is likely to have come from the user clicking the `label` of\n * an `input` or `textarea` in order to focus it.\n * @param focusEventTarget Target currently receiving focus.\n */\n _isLastInteractionFromInputLabel(focusEventTarget) {\n const { _mostRecentTarget: mostRecentTarget, mostRecentModality } = this._inputModalityDetector;\n // If the last interaction used the mouse on an element contained by one of the labels\n // of an `input`/`textarea` that is currently focused, it is very likely that the\n // user redirected focus using the label.\n if (mostRecentModality !== 'mouse' ||\n !mostRecentTarget ||\n mostRecentTarget === focusEventTarget ||\n (focusEventTarget.nodeName !== 'INPUT' && focusEventTarget.nodeName !== 'TEXTAREA') ||\n focusEventTarget.disabled) {\n return false;\n }\n const labels = focusEventTarget.labels;\n if (labels) {\n for (let i = 0; i < labels.length; i++) {\n if (labels[i].contains(mostRecentTarget)) {\n return true;\n }\n }\n }\n return false;\n }\n}\nFocusMonitor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: FocusMonitor, deps: [{ token: i0.NgZone }, { token: i1.Platform }, { token: InputModalityDetector }, { token: DOCUMENT, optional: true }, { token: FOCUS_MONITOR_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nFocusMonitor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: FocusMonitor, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: FocusMonitor, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.Platform }, { type: InputModalityDetector }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [FOCUS_MONITOR_DEFAULT_OPTIONS]\n }] }]; } });\n/**\n * Directive that determines how a particular element was focused (via keyboard, mouse, touch, or\n * programmatically) and adds corresponding classes to the element.\n *\n * There are two variants of this directive:\n * 1) cdkMonitorElementFocus: does not consider an element to be focused if one of its children is\n * focused.\n * 2) cdkMonitorSubtreeFocus: considers an element focused if it or any of its children are focused.\n */\nclass CdkMonitorFocus {\n constructor(_elementRef, _focusMonitor) {\n this._elementRef = _elementRef;\n this._focusMonitor = _focusMonitor;\n this.cdkFocusChange = new EventEmitter();\n }\n ngAfterViewInit() {\n const element = this._elementRef.nativeElement;\n this._monitorSubscription = this._focusMonitor\n .monitor(element, element.nodeType === 1 && element.hasAttribute('cdkMonitorSubtreeFocus'))\n .subscribe(origin => this.cdkFocusChange.emit(origin));\n }\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n if (this._monitorSubscription) {\n this._monitorSubscription.unsubscribe();\n }\n }\n}\nCdkMonitorFocus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkMonitorFocus, deps: [{ token: i0.ElementRef }, { token: FocusMonitor }], target: i0.ɵɵFactoryTarget.Directive });\nCdkMonitorFocus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkMonitorFocus, selector: \"[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]\", outputs: { cdkFocusChange: \"cdkFocusChange\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkMonitorFocus, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]',\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: FocusMonitor }]; }, propDecorators: { cdkFocusChange: [{\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 */\n/** CSS class applied to the document body when in black-on-white high-contrast mode. */\nconst BLACK_ON_WHITE_CSS_CLASS = 'cdk-high-contrast-black-on-white';\n/** CSS class applied to the document body when in white-on-black high-contrast mode. */\nconst WHITE_ON_BLACK_CSS_CLASS = 'cdk-high-contrast-white-on-black';\n/** CSS class applied to the document body when in high-contrast mode. */\nconst HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS = 'cdk-high-contrast-active';\n/**\n * Service to determine whether the browser is currently in a high-contrast-mode environment.\n *\n * Microsoft Windows supports an accessibility feature called \"High Contrast Mode\". This mode\n * changes the appearance of all applications, including web applications, to dramatically increase\n * contrast.\n *\n * IE, Edge, and Firefox currently support this mode. Chrome does not support Windows High Contrast\n * Mode. This service does not detect high-contrast mode as added by the Chrome \"High Contrast\"\n * browser extension.\n */\nclass HighContrastModeDetector {\n constructor(_platform, document) {\n this._platform = _platform;\n this._document = document;\n this._breakpointSubscription = inject(BreakpointObserver)\n .observe('(forced-colors: active)')\n .subscribe(() => {\n if (this._hasCheckedHighContrastMode) {\n this._hasCheckedHighContrastMode = false;\n this._applyBodyHighContrastModeCssClasses();\n }\n });\n }\n /** Gets the current high-contrast-mode for the page. */\n getHighContrastMode() {\n if (!this._platform.isBrowser) {\n return 0 /* HighContrastMode.NONE */;\n }\n // Create a test element with an arbitrary background-color that is neither black nor\n // white; high-contrast mode will coerce the color to either black or white. Also ensure that\n // appending the test element to the DOM does not affect layout by absolutely positioning it\n const testElement = this._document.createElement('div');\n testElement.style.backgroundColor = 'rgb(1,2,3)';\n testElement.style.position = 'absolute';\n this._document.body.appendChild(testElement);\n // Get the computed style for the background color, collapsing spaces to normalize between\n // browsers. Once we get this color, we no longer need the test element. Access the `window`\n // via the document so we can fake it in tests. Note that we have extra null checks, because\n // this logic will likely run during app bootstrap and throwing can break the entire app.\n const documentWindow = this._document.defaultView || window;\n const computedStyle = documentWindow && documentWindow.getComputedStyle\n ? documentWindow.getComputedStyle(testElement)\n : null;\n const computedColor = ((computedStyle && computedStyle.backgroundColor) || '').replace(/ /g, '');\n testElement.remove();\n switch (computedColor) {\n case 'rgb(0,0,0)':\n return 2 /* HighContrastMode.WHITE_ON_BLACK */;\n case 'rgb(255,255,255)':\n return 1 /* HighContrastMode.BLACK_ON_WHITE */;\n }\n return 0 /* HighContrastMode.NONE */;\n }\n ngOnDestroy() {\n this._breakpointSubscription.unsubscribe();\n }\n /** Applies CSS classes indicating high-contrast mode to document body (browser-only). */\n _applyBodyHighContrastModeCssClasses() {\n if (!this._hasCheckedHighContrastMode && this._platform.isBrowser && this._document.body) {\n const bodyClasses = this._document.body.classList;\n bodyClasses.remove(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS, BLACK_ON_WHITE_CSS_CLASS, WHITE_ON_BLACK_CSS_CLASS);\n this._hasCheckedHighContrastMode = true;\n const mode = this.getHighContrastMode();\n if (mode === 1 /* HighContrastMode.BLACK_ON_WHITE */) {\n bodyClasses.add(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS, BLACK_ON_WHITE_CSS_CLASS);\n }\n else if (mode === 2 /* HighContrastMode.WHITE_ON_BLACK */) {\n bodyClasses.add(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS, WHITE_ON_BLACK_CSS_CLASS);\n }\n }\n }\n}\nHighContrastModeDetector.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: HighContrastModeDetector, deps: [{ token: i1.Platform }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nHighContrastModeDetector.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: HighContrastModeDetector, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: HighContrastModeDetector, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.Platform }, { type: undefined, decorators: [{\n type: Inject,\n args: [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 */\nclass A11yModule {\n constructor(highContrastModeDetector) {\n highContrastModeDetector._applyBodyHighContrastModeCssClasses();\n }\n}\nA11yModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: A11yModule, deps: [{ token: HighContrastModeDetector }], target: i0.ɵɵFactoryTarget.NgModule });\nA11yModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: A11yModule, declarations: [CdkAriaLive, CdkTrapFocus, CdkMonitorFocus], imports: [ObserversModule], exports: [CdkAriaLive, CdkTrapFocus, CdkMonitorFocus] });\nA11yModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: A11yModule, imports: [ObserversModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: A11yModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [ObserversModule],\n declarations: [CdkAriaLive, CdkTrapFocus, CdkMonitorFocus],\n exports: [CdkAriaLive, CdkTrapFocus, CdkMonitorFocus],\n }]\n }], ctorParameters: function () { return [{ type: HighContrastModeDetector }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Generated bundle index. Do not edit.\n */\n\nexport { A11yModule, ActiveDescendantKeyManager, AriaDescriber, CDK_DESCRIBEDBY_HOST_ATTRIBUTE, CDK_DESCRIBEDBY_ID_PREFIX, CdkAriaLive, CdkMonitorFocus, CdkTrapFocus, ConfigurableFocusTrap, ConfigurableFocusTrapFactory, EventListenerFocusTrapInertStrategy, FOCUS_MONITOR_DEFAULT_OPTIONS, FOCUS_TRAP_INERT_STRATEGY, FocusKeyManager, FocusMonitor, FocusTrap, FocusTrapFactory, HighContrastModeDetector, INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS, INPUT_MODALITY_DETECTOR_OPTIONS, InputModalityDetector, InteractivityChecker, IsFocusableConfig, LIVE_ANNOUNCER_DEFAULT_OPTIONS, LIVE_ANNOUNCER_ELEMENT_TOKEN, LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY, ListKeyManager, LiveAnnouncer, MESSAGES_CONTAINER_ID, isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, inject, EventEmitter, Injectable, Optional, Inject, Directive, Output, Input, NgModule } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 token used to inject the document into Directionality.\n * This is used so that the value can be faked in tests.\n *\n * We can't use the real document in tests because changing the real `dir` causes geometry-based\n * tests in Safari to fail.\n *\n * We also can't re-provide the DOCUMENT token from platform-browser because the unit tests\n * themselves use things like `querySelector` in test code.\n *\n * This token is defined in a separate file from Directionality as a workaround for\n * https://github.com/angular/angular/issues/22559\n *\n * @docs-private\n */\nconst DIR_DOCUMENT = new InjectionToken('cdk-dir-doc', {\n providedIn: 'root',\n factory: DIR_DOCUMENT_FACTORY,\n});\n/** @docs-private */\nfunction DIR_DOCUMENT_FACTORY() {\n return 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/** Regex that matches locales with an RTL script. Taken from `goog.i18n.bidi.isRtlLanguage`. */\nconst RTL_LOCALE_PATTERN = /^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;\n/** Resolves a string value to a specific direction. */\nfunction _resolveDirectionality(rawValue) {\n const value = rawValue?.toLowerCase() || '';\n if (value === 'auto' && typeof navigator !== 'undefined' && navigator?.language) {\n return RTL_LOCALE_PATTERN.test(navigator.language) ? 'rtl' : 'ltr';\n }\n return value === 'rtl' ? 'rtl' : 'ltr';\n}\n/**\n * The directionality (LTR / RTL) context for the application (or a subtree of it).\n * Exposes the current direction and a stream of direction changes.\n */\nclass Directionality {\n constructor(_document) {\n /** The current 'ltr' or 'rtl' value. */\n this.value = 'ltr';\n /** Stream that emits whenever the 'ltr' / 'rtl' state changes. */\n this.change = new EventEmitter();\n if (_document) {\n const bodyDir = _document.body ? _document.body.dir : null;\n const htmlDir = _document.documentElement ? _document.documentElement.dir : null;\n this.value = _resolveDirectionality(bodyDir || htmlDir || 'ltr');\n }\n }\n ngOnDestroy() {\n this.change.complete();\n }\n}\nDirectionality.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Directionality, deps: [{ token: DIR_DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nDirectionality.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Directionality, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Directionality, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DIR_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 * Directive to listen for changes of direction of part of the DOM.\n *\n * Provides itself as Directionality such that descendant directives only need to ever inject\n * Directionality to get the closest direction.\n */\nclass Dir {\n constructor() {\n /** Normalized direction that accounts for invalid/unsupported values. */\n this._dir = 'ltr';\n /** Whether the `value` has been set to its initial value. */\n this._isInitialized = false;\n /** Event emitted when the direction changes. */\n this.change = new EventEmitter();\n }\n /** @docs-private */\n get dir() {\n return this._dir;\n }\n set dir(value) {\n const previousValue = this._dir;\n // Note: `_resolveDirectionality` resolves the language based on the browser's language,\n // whereas the browser does it based on the content of the element. Since doing so based\n // on the content can be expensive, for now we're doing the simpler matching.\n this._dir = _resolveDirectionality(value);\n this._rawDir = value;\n if (previousValue !== this._dir && this._isInitialized) {\n this.change.emit(this._dir);\n }\n }\n /** Current layout direction of the element. */\n get value() {\n return this.dir;\n }\n /** Initialize once default value has been set. */\n ngAfterContentInit() {\n this._isInitialized = true;\n }\n ngOnDestroy() {\n this.change.complete();\n }\n}\nDir.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Dir, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nDir.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: Dir, selector: \"[dir]\", inputs: { dir: \"dir\" }, outputs: { change: \"dirChange\" }, host: { properties: { \"attr.dir\": \"_rawDir\" } }, providers: [{ provide: Directionality, useExisting: Dir }], exportAs: [\"dir\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Dir, decorators: [{\n type: Directive,\n args: [{\n selector: '[dir]',\n providers: [{ provide: Directionality, useExisting: Dir }],\n host: { '[attr.dir]': '_rawDir' },\n exportAs: 'dir',\n }]\n }], propDecorators: { change: [{\n type: Output,\n args: ['dirChange']\n }], dir: [{\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 */\nclass BidiModule {\n}\nBidiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: BidiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nBidiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: BidiModule, declarations: [Dir], exports: [Dir] });\nBidiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: BidiModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: BidiModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [Dir],\n declarations: [Dir],\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 * Generated bundle index. Do not edit.\n */\n\nexport { BidiModule, DIR_DOCUMENT, Dir, Directionality };\n","import { 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/** Current version of the Angular Component Development Kit. */\nconst VERSION = new Version('14.1.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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport { VERSION };\n","import * as i0 from '@angular/core';\nimport { Version, InjectionToken, NgModule, Optional, Inject, inject, LOCALE_ID, Injectable, Directive, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, EventEmitter, Output } from '@angular/core';\nimport * as i1 from '@angular/cdk/a11y';\nimport { isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader } from '@angular/cdk/a11y';\nimport { BidiModule } from '@angular/cdk/bidi';\nimport { VERSION as VERSION$1 } from '@angular/cdk';\nimport * as i3 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i1$1 from '@angular/cdk/platform';\nimport { _isTestEnvironment, normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { coerceBooleanProperty, coerceNumberProperty, coerceElement } from '@angular/cdk/coercion';\nimport { Observable, Subject } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\nimport { ENTER, SPACE, hasModifierKey } from '@angular/cdk/keycodes';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Current version of Angular Material. */\nconst VERSION = new Version('14.1.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/** @docs-private */\nclass AnimationCurves {\n}\nAnimationCurves.STANDARD_CURVE = 'cubic-bezier(0.4,0.0,0.2,1)';\nAnimationCurves.DECELERATION_CURVE = 'cubic-bezier(0.0,0.0,0.2,1)';\nAnimationCurves.ACCELERATION_CURVE = 'cubic-bezier(0.4,0.0,1,1)';\nAnimationCurves.SHARP_CURVE = 'cubic-bezier(0.4,0.0,0.6,1)';\n/** @docs-private */\nclass AnimationDurations {\n}\nAnimationDurations.COMPLEX = '375ms';\nAnimationDurations.ENTERING = '225ms';\nAnimationDurations.EXITING = '195ms';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** @docs-private */\nfunction MATERIAL_SANITY_CHECKS_FACTORY() {\n return true;\n}\n/** Injection token that configures whether the Material sanity checks are enabled. */\nconst MATERIAL_SANITY_CHECKS = new InjectionToken('mat-sanity-checks', {\n providedIn: 'root',\n factory: MATERIAL_SANITY_CHECKS_FACTORY,\n});\n/**\n * Module that captures anything that should be loaded and/or run for *all* Angular Material\n * components. This includes Bidi, etc.\n *\n * This module should be imported to each top-level component module (e.g., MatTabsModule).\n */\nclass MatCommonModule {\n constructor(highContrastModeDetector, _sanityChecks, _document) {\n this._sanityChecks = _sanityChecks;\n this._document = _document;\n /** Whether we've done the global sanity checks (e.g. a theme is loaded, there is a doctype). */\n this._hasDoneGlobalChecks = false;\n // While A11yModule also does this, we repeat it here to avoid importing A11yModule\n // in MatCommonModule.\n highContrastModeDetector._applyBodyHighContrastModeCssClasses();\n if (!this._hasDoneGlobalChecks) {\n this._hasDoneGlobalChecks = true;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (this._checkIsEnabled('doctype')) {\n _checkDoctypeIsDefined(this._document);\n }\n if (this._checkIsEnabled('theme')) {\n _checkThemeIsPresent(this._document);\n }\n if (this._checkIsEnabled('version')) {\n _checkCdkVersionMatch();\n }\n }\n }\n }\n /** Gets whether a specific sanity check is enabled. */\n _checkIsEnabled(name) {\n if (_isTestEnvironment()) {\n return false;\n }\n if (typeof this._sanityChecks === 'boolean') {\n return this._sanityChecks;\n }\n return !!this._sanityChecks[name];\n }\n}\nMatCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatCommonModule, deps: [{ token: i1.HighContrastModeDetector }, { token: MATERIAL_SANITY_CHECKS, optional: true }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.NgModule });\nMatCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatCommonModule, imports: [BidiModule], exports: [BidiModule] });\nMatCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatCommonModule, imports: [BidiModule, BidiModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatCommonModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [BidiModule],\n exports: [BidiModule],\n }]\n }], ctorParameters: function () { return [{ type: i1.HighContrastModeDetector }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MATERIAL_SANITY_CHECKS]\n }] }, { type: Document, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n/** Checks that the page has a doctype. */\nfunction _checkDoctypeIsDefined(doc) {\n if (!doc.doctype) {\n console.warn('Current document does not have a doctype. This may cause ' +\n 'some Angular Material components not to behave as expected.');\n }\n}\n/** Checks that a theme has been included. */\nfunction _checkThemeIsPresent(doc) {\n // We need to assert that the `body` is defined, because these checks run very early\n // and the `body` won't be defined if the consumer put their scripts in the `head`.\n if (!doc.body || typeof getComputedStyle !== 'function') {\n return;\n }\n const testElement = doc.createElement('div');\n testElement.classList.add('mat-theme-loaded-marker');\n doc.body.appendChild(testElement);\n const computedStyle = getComputedStyle(testElement);\n // In some situations the computed style of the test element can be null. For example in\n // Firefox, the computed style is null if an application is running inside of a hidden iframe.\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n if (computedStyle && computedStyle.display !== 'none') {\n console.warn('Could not find Angular Material core theme. Most Material ' +\n 'components may not work as expected. For more info refer ' +\n 'to the theming guide: https://material.angular.io/guide/theming');\n }\n testElement.remove();\n}\n/** Checks whether the Material version matches the CDK version. */\nfunction _checkCdkVersionMatch() {\n if (VERSION.full !== VERSION$1.full) {\n console.warn('The Angular Material version (' +\n VERSION.full +\n ') does not match ' +\n 'the Angular CDK version (' +\n VERSION$1.full +\n ').\\n' +\n 'Please ensure the versions of these two packages exactly match.');\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 mixinDisabled(base) {\n return class extends base {\n constructor(...args) {\n super(...args);\n this._disabled = false;\n }\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\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 mixinColor(base, defaultColor) {\n return class extends base {\n constructor(...args) {\n super(...args);\n this.defaultColor = defaultColor;\n // Set the default color that can be specified from the mixin.\n this.color = defaultColor;\n }\n get color() {\n return this._color;\n }\n set color(value) {\n const colorPalette = value || this.defaultColor;\n if (colorPalette !== this._color) {\n if (this._color) {\n this._elementRef.nativeElement.classList.remove(`mat-${this._color}`);\n }\n if (colorPalette) {\n this._elementRef.nativeElement.classList.add(`mat-${colorPalette}`);\n }\n this._color = colorPalette;\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 mixinDisableRipple(base) {\n return class extends base {\n constructor(...args) {\n super(...args);\n this._disableRipple = false;\n }\n /** Whether the ripple effect is disabled or not. */\n get disableRipple() {\n return this._disableRipple;\n }\n set disableRipple(value) {\n this._disableRipple = coerceBooleanProperty(value);\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 mixinTabIndex(base, defaultTabIndex = 0) {\n return class extends base {\n constructor(...args) {\n super(...args);\n this._tabIndex = defaultTabIndex;\n this.defaultTabIndex = defaultTabIndex;\n }\n get tabIndex() {\n return this.disabled ? -1 : this._tabIndex;\n }\n set tabIndex(value) {\n // If the specified tabIndex value is null or undefined, fall back to the default value.\n this._tabIndex = value != null ? coerceNumberProperty(value) : this.defaultTabIndex;\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 mixinErrorState(base) {\n return class extends base {\n constructor(...args) {\n super(...args);\n /** Whether the component is in an error state. */\n this.errorState = false;\n }\n /** Updates the error state based on the provided error state matcher. */\n updateErrorState() {\n const oldState = this.errorState;\n const parent = this._parentFormGroup || this._parentForm;\n const matcher = this.errorStateMatcher || this._defaultErrorStateMatcher;\n const control = this.ngControl ? this.ngControl.control : null;\n const newState = matcher.isErrorState(control, parent);\n if (newState !== oldState) {\n this.errorState = newState;\n this.stateChanges.next();\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/** Mixin to augment a directive with an initialized property that will emits when ngOnInit ends. */\nfunction mixinInitialized(base) {\n return class extends base {\n constructor(...args) {\n super(...args);\n /** Whether this directive has been marked as initialized. */\n this._isInitialized = false;\n /**\n * List of subscribers that subscribed before the directive was initialized. Should be notified\n * during _markInitialized. Set to null after pending subscribers are notified, and should\n * not expect to be populated after.\n */\n this._pendingSubscribers = [];\n /**\n * Observable stream that emits when the directive initializes. If already initialized, the\n * subscriber is stored to be notified once _markInitialized is called.\n */\n this.initialized = new Observable(subscriber => {\n // If initialized, immediately notify the subscriber. Otherwise store the subscriber to notify\n // when _markInitialized is called.\n if (this._isInitialized) {\n this._notifySubscriber(subscriber);\n }\n else {\n this._pendingSubscribers.push(subscriber);\n }\n });\n }\n /**\n * Marks the state as initialized and notifies pending subscribers. Should be called at the end\n * of ngOnInit.\n * @docs-private\n */\n _markInitialized() {\n if (this._isInitialized && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('This directive has already been marked as initialized and ' +\n 'should not be called twice.');\n }\n this._isInitialized = true;\n this._pendingSubscribers.forEach(this._notifySubscriber);\n this._pendingSubscribers = null;\n }\n /** Emits and completes the subscriber stream (should only emit once). */\n _notifySubscriber(subscriber) {\n subscriber.next();\n subscriber.complete();\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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** InjectionToken for datepicker that can be used to override default locale code. */\nconst MAT_DATE_LOCALE = new InjectionToken('MAT_DATE_LOCALE', {\n providedIn: 'root',\n factory: MAT_DATE_LOCALE_FACTORY,\n});\n/** @docs-private */\nfunction MAT_DATE_LOCALE_FACTORY() {\n return inject(LOCALE_ID);\n}\n/** Adapts type `D` to be usable as a date by cdk-based components that work with dates. */\nclass DateAdapter {\n constructor() {\n this._localeChanges = new Subject();\n /** A stream that emits when the locale changes. */\n this.localeChanges = this._localeChanges;\n }\n /**\n * Given a potential date object, returns that same date object if it is\n * a valid date, or `null` if it's not a valid date.\n * @param obj The object to check.\n * @returns A date or `null`.\n */\n getValidDateOrNull(obj) {\n return this.isDateInstance(obj) && this.isValid(obj) ? obj : null;\n }\n /**\n * Attempts to deserialize a value to a valid date object. This is different from parsing in that\n * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601\n * string). The default implementation does not allow any deserialization, it simply checks that\n * the given value is already a valid date object or null. The `<mat-datepicker>` will call this\n * method on all of its `@Input()` properties that accept dates. It is therefore possible to\n * support passing values from your backend directly to these properties by overriding this method\n * to also deserialize the format used by your backend.\n * @param value The value to be deserialized into a date object.\n * @returns The deserialized date object, either a valid date, null if the value can be\n * deserialized into a null date (e.g. the empty string), or an invalid date.\n */\n deserialize(value) {\n if (value == null || (this.isDateInstance(value) && this.isValid(value))) {\n return value;\n }\n return this.invalid();\n }\n /**\n * Sets the locale used for all dates.\n * @param locale The new locale.\n */\n setLocale(locale) {\n this.locale = locale;\n this._localeChanges.next();\n }\n /**\n * Compares two dates.\n * @param first The first date to compare.\n * @param second The second date to compare.\n * @returns 0 if the dates are equal, a number less than 0 if the first date is earlier,\n * a number greater than 0 if the first date is later.\n */\n compareDate(first, second) {\n return (this.getYear(first) - this.getYear(second) ||\n this.getMonth(first) - this.getMonth(second) ||\n this.getDate(first) - this.getDate(second));\n }\n /**\n * Checks if two dates are equal.\n * @param first The first date to check.\n * @param second The second date to check.\n * @returns Whether the two dates are equal.\n * Null dates are considered equal to other null dates.\n */\n sameDate(first, second) {\n if (first && second) {\n let firstValid = this.isValid(first);\n let secondValid = this.isValid(second);\n if (firstValid && secondValid) {\n return !this.compareDate(first, second);\n }\n return firstValid == secondValid;\n }\n return first == second;\n }\n /**\n * Clamp the given date between min and max dates.\n * @param date The date to clamp.\n * @param min The minimum value to allow. If null or omitted no min is enforced.\n * @param max The maximum value to allow. If null or omitted no max is enforced.\n * @returns `min` if `date` is less than `min`, `max` if date is greater than `max`,\n * otherwise `date`.\n */\n clampDate(date, min, max) {\n if (min && this.compareDate(date, min) < 0) {\n return min;\n }\n if (max && this.compareDate(date, max) > 0) {\n return max;\n }\n return date;\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 MAT_DATE_FORMATS = new InjectionToken('mat-date-formats');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Matches strings that have the form of a valid RFC 3339 string\n * (https://tools.ietf.org/html/rfc3339). Note that the string may not actually be a valid date\n * because the regex will match strings an with out of bounds month, date, etc.\n */\nconst ISO_8601_REGEX = /^\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|(?:(?:\\+|-)\\d{2}:\\d{2}))?)?$/;\n/** Creates an array and fills it with values. */\nfunction range(length, valueFunction) {\n const valuesArray = Array(length);\n for (let i = 0; i < length; i++) {\n valuesArray[i] = valueFunction(i);\n }\n return valuesArray;\n}\n/** Adapts the native JS Date for use with cdk-based components that work with dates. */\nclass NativeDateAdapter extends DateAdapter {\n constructor(matDateLocale, \n /**\n * @deprecated No longer being used. To be removed.\n * @breaking-change 14.0.0\n */\n _platform) {\n super();\n /**\n * @deprecated No longer being used. To be removed.\n * @breaking-change 14.0.0\n */\n this.useUtcForDisplay = false;\n super.setLocale(matDateLocale);\n }\n getYear(date) {\n return date.getFullYear();\n }\n getMonth(date) {\n return date.getMonth();\n }\n getDate(date) {\n return date.getDate();\n }\n getDayOfWeek(date) {\n return date.getDay();\n }\n getMonthNames(style) {\n const dtf = new Intl.DateTimeFormat(this.locale, { month: style, timeZone: 'utc' });\n return range(12, i => this._format(dtf, new Date(2017, i, 1)));\n }\n getDateNames() {\n const dtf = new Intl.DateTimeFormat(this.locale, { day: 'numeric', timeZone: 'utc' });\n return range(31, i => this._format(dtf, new Date(2017, 0, i + 1)));\n }\n getDayOfWeekNames(style) {\n const dtf = new Intl.DateTimeFormat(this.locale, { weekday: style, timeZone: 'utc' });\n return range(7, i => this._format(dtf, new Date(2017, 0, i + 1)));\n }\n getYearName(date) {\n const dtf = new Intl.DateTimeFormat(this.locale, { year: 'numeric', timeZone: 'utc' });\n return this._format(dtf, date);\n }\n getFirstDayOfWeek() {\n // We can't tell using native JS Date what the first day of the week is, we default to Sunday.\n return 0;\n }\n getNumDaysInMonth(date) {\n return this.getDate(this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + 1, 0));\n }\n clone(date) {\n return new Date(date.getTime());\n }\n createDate(year, month, date) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Check for invalid month and date (except upper bound on date which we have to check after\n // creating the Date).\n if (month < 0 || month > 11) {\n throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`);\n }\n if (date < 1) {\n throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`);\n }\n }\n let result = this._createDateWithOverflow(year, month, date);\n // Check that the date wasn't above the upper bound for the month, causing the month to overflow\n if (result.getMonth() != month && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\n }\n return result;\n }\n today() {\n return new Date();\n }\n parse(value, parseFormat) {\n // We have no way using the native JS Date to set the parse format or locale, so we ignore these\n // parameters.\n if (typeof value == 'number') {\n return new Date(value);\n }\n return value ? new Date(Date.parse(value)) : null;\n }\n format(date, displayFormat) {\n if (!this.isValid(date)) {\n throw Error('NativeDateAdapter: Cannot format invalid date.');\n }\n const dtf = new Intl.DateTimeFormat(this.locale, { ...displayFormat, timeZone: 'utc' });\n return this._format(dtf, date);\n }\n addCalendarYears(date, years) {\n return this.addCalendarMonths(date, years * 12);\n }\n addCalendarMonths(date, months) {\n let newDate = this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + months, this.getDate(date));\n // It's possible to wind up in the wrong month if the original month has more days than the new\n // month. In this case we want to go to the last day of the desired month.\n // Note: the additional + 12 % 12 ensures we end up with a positive number, since JS % doesn't\n // guarantee this.\n if (this.getMonth(newDate) != (((this.getMonth(date) + months) % 12) + 12) % 12) {\n newDate = this._createDateWithOverflow(this.getYear(newDate), this.getMonth(newDate), 0);\n }\n return newDate;\n }\n addCalendarDays(date, days) {\n return this._createDateWithOverflow(this.getYear(date), this.getMonth(date), this.getDate(date) + days);\n }\n toIso8601(date) {\n return [\n date.getUTCFullYear(),\n this._2digit(date.getUTCMonth() + 1),\n this._2digit(date.getUTCDate()),\n ].join('-');\n }\n /**\n * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings\n * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an\n * invalid date for all other values.\n */\n deserialize(value) {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\n // string is the right format first.\n if (ISO_8601_REGEX.test(value)) {\n let date = new Date(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n }\n return super.deserialize(value);\n }\n isDateInstance(obj) {\n return obj instanceof Date;\n }\n isValid(date) {\n return !isNaN(date.getTime());\n }\n invalid() {\n return new Date(NaN);\n }\n /** Creates a date but allows the month and date to overflow. */\n _createDateWithOverflow(year, month, date) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setFullYear` and `setHours` instead.\n const d = new Date();\n d.setFullYear(year, month, date);\n d.setHours(0, 0, 0, 0);\n return d;\n }\n /**\n * Pads a number to make it two digits.\n * @param n The number to pad.\n * @returns The padded number.\n */\n _2digit(n) {\n return ('00' + n).slice(-2);\n }\n /**\n * When converting Date object to string, javascript built-in functions may return wrong\n * results because it applies its internal DST rules. The DST rules around the world change\n * very frequently, and the current valid rule is not always valid in previous years though.\n * We work around this problem building a new Date object which has its internal UTC\n * representation with the local date and time.\n * @param dtf Intl.DateTimeFormat object, containing the desired string format. It must have\n * timeZone set to 'utc' to work fine.\n * @param date Date from which we want to get the string representation according to dtf\n * @returns A Date object with its UTC representation based on the passed in date info\n */\n _format(dtf, date) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setUTCFullYear` and `setUTCHours` instead.\n const d = new Date();\n d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n return dtf.format(d);\n }\n}\nNativeDateAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: NativeDateAdapter, deps: [{ token: MAT_DATE_LOCALE, optional: true }, { token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });\nNativeDateAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: NativeDateAdapter });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: NativeDateAdapter, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_DATE_LOCALE]\n }] }, { type: i1$1.Platform }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 MAT_NATIVE_DATE_FORMATS = {\n parse: {\n dateInput: null,\n },\n display: {\n dateInput: { year: 'numeric', month: 'numeric', day: 'numeric' },\n monthYearLabel: { year: 'numeric', month: 'short' },\n dateA11yLabel: { year: 'numeric', month: 'long', day: 'numeric' },\n monthYearA11yLabel: { year: 'numeric', month: 'long' },\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 NativeDateModule {\n}\nNativeDateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: NativeDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNativeDateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: NativeDateModule });\nNativeDateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: NativeDateModule, providers: [{ provide: DateAdapter, useClass: NativeDateAdapter }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: NativeDateModule, decorators: [{\n type: NgModule,\n args: [{\n providers: [{ provide: DateAdapter, useClass: NativeDateAdapter }],\n }]\n }] });\nclass MatNativeDateModule {\n}\nMatNativeDateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatNativeDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatNativeDateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatNativeDateModule, imports: [NativeDateModule] });\nMatNativeDateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatNativeDateModule, providers: [{ provide: MAT_DATE_FORMATS, useValue: MAT_NATIVE_DATE_FORMATS }], imports: [NativeDateModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatNativeDateModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [NativeDateModule],\n providers: [{ provide: MAT_DATE_FORMATS, useValue: MAT_NATIVE_DATE_FORMATS }],\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/** Error state matcher that matches when a control is invalid and dirty. */\nclass ShowOnDirtyErrorStateMatcher {\n isErrorState(control, form) {\n return !!(control && control.invalid && (control.dirty || (form && form.submitted)));\n }\n}\nShowOnDirtyErrorStateMatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ShowOnDirtyErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nShowOnDirtyErrorStateMatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ShowOnDirtyErrorStateMatcher });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ShowOnDirtyErrorStateMatcher, decorators: [{\n type: Injectable\n }] });\n/** Provider that defines how form controls behave with regards to displaying error messages. */\nclass ErrorStateMatcher {\n isErrorState(control, form) {\n return !!(control && control.invalid && (control.touched || (form && form.submitted)));\n }\n}\nErrorStateMatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nErrorStateMatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ErrorStateMatcher, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ErrorStateMatcher, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Shared directive to count lines inside a text area, such as a list item.\n * Line elements can be extracted with a @ContentChildren(MatLine) query, then\n * counted by checking the query list's length.\n */\nclass MatLine {\n}\nMatLine.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatLine, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatLine.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatLine, selector: \"[mat-line], [matLine]\", host: { classAttribute: \"mat-line\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatLine, decorators: [{\n type: Directive,\n args: [{\n selector: '[mat-line], [matLine]',\n host: { 'class': 'mat-line' },\n }]\n }] });\n/**\n * Helper that takes a query list of lines and sets the correct class on the host.\n * @docs-private\n */\nfunction setLines(lines, element, prefix = 'mat') {\n // Note: doesn't need to unsubscribe, because `changes`\n // gets completed by Angular when the view is destroyed.\n lines.changes.pipe(startWith(lines)).subscribe(({ length }) => {\n setClass(element, `${prefix}-2-line`, false);\n setClass(element, `${prefix}-3-line`, false);\n setClass(element, `${prefix}-multi-line`, false);\n if (length === 2 || length === 3) {\n setClass(element, `${prefix}-${length}-line`, true);\n }\n else if (length > 3) {\n setClass(element, `${prefix}-multi-line`, true);\n }\n });\n}\n/** Adds or removes a class from an element. */\nfunction setClass(element, className, isAdd) {\n element.nativeElement.classList.toggle(className, isAdd);\n}\nclass MatLineModule {\n}\nMatLineModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatLineModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatLineModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatLineModule, declarations: [MatLine], imports: [MatCommonModule], exports: [MatLine, MatCommonModule] });\nMatLineModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatLineModule, imports: [MatCommonModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatLineModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [MatCommonModule],\n exports: [MatLine, MatCommonModule],\n declarations: [MatLine],\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 * Reference to a previously launched ripple element.\n */\nclass RippleRef {\n constructor(_renderer, \n /** Reference to the ripple HTML element. */\n element, \n /** Ripple configuration used for the ripple. */\n config, \n /* Whether animations are forcibly disabled for ripples through CSS. */\n _animationForciblyDisabledThroughCss = false) {\n this._renderer = _renderer;\n this.element = element;\n this.config = config;\n this._animationForciblyDisabledThroughCss = _animationForciblyDisabledThroughCss;\n /** Current state of the ripple. */\n this.state = 3 /* RippleState.HIDDEN */;\n }\n /** Fades out the ripple element. */\n fadeOut() {\n this._renderer.fadeOutRipple(this);\n }\n}\n\n// TODO: import these values from `@material/ripple` eventually.\n/**\n * Default ripple animation configuration for ripples without an explicit\n * animation config specified.\n */\nconst defaultRippleAnimationConfig = {\n enterDuration: 225,\n exitDuration: 150,\n};\n/**\n * Timeout for ignoring mouse events. Mouse events will be temporary ignored after touch\n * events to avoid synthetic mouse events.\n */\nconst ignoreMouseEventsTimeout = 800;\n/** Options that apply to all the event listeners that are bound by the ripple renderer. */\nconst passiveEventOptions = normalizePassiveListenerOptions({ passive: true });\n/** Events that signal that the pointer is down. */\nconst pointerDownEvents = ['mousedown', 'touchstart'];\n/** Events that signal that the pointer is up. */\nconst pointerUpEvents = ['mouseup', 'mouseleave', 'touchend', 'touchcancel'];\n/**\n * Helper service that performs DOM manipulations. Not intended to be used outside this module.\n * The constructor takes a reference to the ripple directive's host element and a map of DOM\n * event handlers to be installed on the element that triggers ripple animations.\n * This will eventually become a custom renderer once Angular support exists.\n * @docs-private\n */\nclass RippleRenderer {\n constructor(_target, _ngZone, elementOrElementRef, platform) {\n this._target = _target;\n this._ngZone = _ngZone;\n /** Whether the pointer is currently down or not. */\n this._isPointerDown = false;\n /**\n * Map of currently active ripple references.\n * The ripple reference is mapped to its element event listeners.\n * The reason why `| null` is used is that event listeners are added only\n * when the condition is truthy (see the `_startFadeOutTransition` method).\n */\n this._activeRipples = new Map();\n /** Whether pointer-up event listeners have been registered. */\n this._pointerUpEventsRegistered = false;\n // Only do anything if we're on the browser.\n if (platform.isBrowser) {\n this._containerElement = coerceElement(elementOrElementRef);\n }\n }\n /**\n * Fades in a ripple at the given coordinates.\n * @param x Coordinate within the element, along the X axis at which to start the ripple.\n * @param y Coordinate within the element, along the Y axis at which to start the ripple.\n * @param config Extra ripple options.\n */\n fadeInRipple(x, y, config = {}) {\n const containerRect = (this._containerRect =\n this._containerRect || this._containerElement.getBoundingClientRect());\n const animationConfig = { ...defaultRippleAnimationConfig, ...config.animation };\n if (config.centered) {\n x = containerRect.left + containerRect.width / 2;\n y = containerRect.top + containerRect.height / 2;\n }\n const radius = config.radius || distanceToFurthestCorner(x, y, containerRect);\n const offsetX = x - containerRect.left;\n const offsetY = y - containerRect.top;\n const enterDuration = animationConfig.enterDuration;\n const ripple = document.createElement('div');\n ripple.classList.add('mat-ripple-element');\n ripple.style.left = `${offsetX - radius}px`;\n ripple.style.top = `${offsetY - radius}px`;\n ripple.style.height = `${radius * 2}px`;\n ripple.style.width = `${radius * 2}px`;\n // If a custom color has been specified, set it as inline style. If no color is\n // set, the default color will be applied through the ripple theme styles.\n if (config.color != null) {\n ripple.style.backgroundColor = config.color;\n }\n ripple.style.transitionDuration = `${enterDuration}ms`;\n this._containerElement.appendChild(ripple);\n // By default the browser does not recalculate the styles of dynamically created\n // ripple elements. This is critical to ensure that the `scale` animates properly.\n // We enforce a style recalculation by calling `getComputedStyle` and *accessing* a property.\n // See: https://gist.github.com/paulirish/5d52fb081b3570c81e3a\n const computedStyles = window.getComputedStyle(ripple);\n const userTransitionProperty = computedStyles.transitionProperty;\n const userTransitionDuration = computedStyles.transitionDuration;\n // Note: We detect whether animation is forcibly disabled through CSS by the use of\n // `transition: none`. This is technically unexpected since animations are controlled\n // through the animation config, but this exists for backwards compatibility. This logic does\n // not need to be super accurate since it covers some edge cases which can be easily avoided by users.\n const animationForciblyDisabledThroughCss = userTransitionProperty === 'none' ||\n // Note: The canonical unit for serialized CSS `<time>` properties is seconds. Additionally\n // some browsers expand the duration for every property (in our case `opacity` and `transform`).\n userTransitionDuration === '0s' ||\n userTransitionDuration === '0s, 0s';\n // Exposed reference to the ripple that will be returned.\n const rippleRef = new RippleRef(this, ripple, config, animationForciblyDisabledThroughCss);\n // Start the enter animation by setting the transform/scale to 100%. The animation will\n // execute as part of this statement because we forced a style recalculation before.\n // Note: We use a 3d transform here in order to avoid an issue in Safari where\n // the ripples aren't clipped when inside the shadow DOM (see #24028).\n ripple.style.transform = 'scale3d(1, 1, 1)';\n rippleRef.state = 0 /* RippleState.FADING_IN */;\n if (!config.persistent) {\n this._mostRecentTransientRipple = rippleRef;\n }\n let eventListeners = null;\n // Do not register the `transition` event listener if fade-in and fade-out duration\n // are set to zero. The events won't fire anyway and we can save resources here.\n if (!animationForciblyDisabledThroughCss && (enterDuration || animationConfig.exitDuration)) {\n this._ngZone.runOutsideAngular(() => {\n const onTransitionEnd = () => this._finishRippleTransition(rippleRef);\n const onTransitionCancel = () => this._destroyRipple(rippleRef);\n ripple.addEventListener('transitionend', onTransitionEnd);\n // If the transition is cancelled (e.g. due to DOM removal), we destroy the ripple\n // directly as otherwise we would keep it part of the ripple container forever.\n // https://www.w3.org/TR/css-transitions-1/#:~:text=no%20longer%20in%20the%20document.\n ripple.addEventListener('transitioncancel', onTransitionCancel);\n eventListeners = { onTransitionEnd, onTransitionCancel };\n });\n }\n // Add the ripple reference to the list of all active ripples.\n this._activeRipples.set(rippleRef, eventListeners);\n // In case there is no fade-in transition duration, we need to manually call the transition\n // end listener because `transitionend` doesn't fire if there is no transition.\n if (animationForciblyDisabledThroughCss || !enterDuration) {\n this._finishRippleTransition(rippleRef);\n }\n return rippleRef;\n }\n /** Fades out a ripple reference. */\n fadeOutRipple(rippleRef) {\n // For ripples already fading out or hidden, this should be a noop.\n if (rippleRef.state === 2 /* RippleState.FADING_OUT */ || rippleRef.state === 3 /* RippleState.HIDDEN */) {\n return;\n }\n const rippleEl = rippleRef.element;\n const animationConfig = { ...defaultRippleAnimationConfig, ...rippleRef.config.animation };\n // This starts the fade-out transition and will fire the transition end listener that\n // removes the ripple element from the DOM.\n rippleEl.style.transitionDuration = `${animationConfig.exitDuration}ms`;\n rippleEl.style.opacity = '0';\n rippleRef.state = 2 /* RippleState.FADING_OUT */;\n // In case there is no fade-out transition duration, we need to manually call the\n // transition end listener because `transitionend` doesn't fire if there is no transition.\n if (rippleRef._animationForciblyDisabledThroughCss || !animationConfig.exitDuration) {\n this._finishRippleTransition(rippleRef);\n }\n }\n /** Fades out all currently active ripples. */\n fadeOutAll() {\n this._getActiveRipples().forEach(ripple => ripple.fadeOut());\n }\n /** Fades out all currently active non-persistent ripples. */\n fadeOutAllNonPersistent() {\n this._getActiveRipples().forEach(ripple => {\n if (!ripple.config.persistent) {\n ripple.fadeOut();\n }\n });\n }\n /** Sets up the trigger event listeners */\n setupTriggerEvents(elementOrElementRef) {\n const element = coerceElement(elementOrElementRef);\n if (!element || element === this._triggerElement) {\n return;\n }\n // Remove all previously registered event listeners from the trigger element.\n this._removeTriggerEvents();\n this._triggerElement = element;\n this._registerEvents(pointerDownEvents);\n }\n /**\n * Handles all registered events.\n * @docs-private\n */\n handleEvent(event) {\n if (event.type === 'mousedown') {\n this._onMousedown(event);\n }\n else if (event.type === 'touchstart') {\n this._onTouchStart(event);\n }\n else {\n this._onPointerUp();\n }\n // If pointer-up events haven't been registered yet, do so now.\n // We do this on-demand in order to reduce the total number of event listeners\n // registered by the ripples, which speeds up the rendering time for large UIs.\n if (!this._pointerUpEventsRegistered) {\n this._registerEvents(pointerUpEvents);\n this._pointerUpEventsRegistered = true;\n }\n }\n /** Method that will be called if the fade-in or fade-in transition completed. */\n _finishRippleTransition(rippleRef) {\n if (rippleRef.state === 0 /* RippleState.FADING_IN */) {\n this._startFadeOutTransition(rippleRef);\n }\n else if (rippleRef.state === 2 /* RippleState.FADING_OUT */) {\n this._destroyRipple(rippleRef);\n }\n }\n /**\n * Starts the fade-out transition of the given ripple if it's not persistent and the pointer\n * is not held down anymore.\n */\n _startFadeOutTransition(rippleRef) {\n const isMostRecentTransientRipple = rippleRef === this._mostRecentTransientRipple;\n const { persistent } = rippleRef.config;\n rippleRef.state = 1 /* RippleState.VISIBLE */;\n // When the timer runs out while the user has kept their pointer down, we want to\n // keep only the persistent ripples and the latest transient ripple. We do this,\n // because we don't want stacked transient ripples to appear after their enter\n // animation has finished.\n if (!persistent && (!isMostRecentTransientRipple || !this._isPointerDown)) {\n rippleRef.fadeOut();\n }\n }\n /** Destroys the given ripple by removing it from the DOM and updating its state. */\n _destroyRipple(rippleRef) {\n const eventListeners = this._activeRipples.get(rippleRef) ?? null;\n this._activeRipples.delete(rippleRef);\n // Clear out the cached bounding rect if we have no more ripples.\n if (!this._activeRipples.size) {\n this._containerRect = null;\n }\n // If the current ref is the most recent transient ripple, unset it\n // avoid memory leaks.\n if (rippleRef === this._mostRecentTransientRipple) {\n this._mostRecentTransientRipple = null;\n }\n rippleRef.state = 3 /* RippleState.HIDDEN */;\n if (eventListeners !== null) {\n rippleRef.element.removeEventListener('transitionend', eventListeners.onTransitionEnd);\n rippleRef.element.removeEventListener('transitioncancel', eventListeners.onTransitionCancel);\n }\n rippleRef.element.remove();\n }\n /** Function being called whenever the trigger is being pressed using mouse. */\n _onMousedown(event) {\n // Screen readers will fire fake mouse events for space/enter. Skip launching a\n // ripple in this case for consistency with the non-screen-reader experience.\n const isFakeMousedown = isFakeMousedownFromScreenReader(event);\n const isSyntheticEvent = this._lastTouchStartEvent &&\n Date.now() < this._lastTouchStartEvent + ignoreMouseEventsTimeout;\n if (!this._target.rippleDisabled && !isFakeMousedown && !isSyntheticEvent) {\n this._isPointerDown = true;\n this.fadeInRipple(event.clientX, event.clientY, this._target.rippleConfig);\n }\n }\n /** Function being called whenever the trigger is being pressed using touch. */\n _onTouchStart(event) {\n if (!this._target.rippleDisabled && !isFakeTouchstartFromScreenReader(event)) {\n // Some browsers fire mouse events after a `touchstart` event. Those synthetic mouse\n // events will launch a second ripple if we don't ignore mouse events for a specific\n // time after a touchstart event.\n this._lastTouchStartEvent = Date.now();\n this._isPointerDown = true;\n // Use `changedTouches` so we skip any touches where the user put\n // their finger down, but used another finger to tap the element again.\n const touches = event.changedTouches;\n for (let i = 0; i < touches.length; i++) {\n this.fadeInRipple(touches[i].clientX, touches[i].clientY, this._target.rippleConfig);\n }\n }\n }\n /** Function being called whenever the trigger is being released. */\n _onPointerUp() {\n if (!this._isPointerDown) {\n return;\n }\n this._isPointerDown = false;\n // Fade-out all ripples that are visible and not persistent.\n this._getActiveRipples().forEach(ripple => {\n // By default, only ripples that are completely visible will fade out on pointer release.\n // If the `terminateOnPointerUp` option is set, ripples that still fade in will also fade out.\n const isVisible = ripple.state === 1 /* RippleState.VISIBLE */ ||\n (ripple.config.terminateOnPointerUp && ripple.state === 0 /* RippleState.FADING_IN */);\n if (!ripple.config.persistent && isVisible) {\n ripple.fadeOut();\n }\n });\n }\n /** Registers event listeners for a given list of events. */\n _registerEvents(eventTypes) {\n this._ngZone.runOutsideAngular(() => {\n eventTypes.forEach(type => {\n this._triggerElement.addEventListener(type, this, passiveEventOptions);\n });\n });\n }\n _getActiveRipples() {\n return Array.from(this._activeRipples.keys());\n }\n /** Removes previously registered event listeners from the trigger element. */\n _removeTriggerEvents() {\n if (this._triggerElement) {\n pointerDownEvents.forEach(type => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n if (this._pointerUpEventsRegistered) {\n pointerUpEvents.forEach(type => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n }\n }\n }\n}\n/**\n * Returns the distance from the point (x, y) to the furthest corner of a rectangle.\n */\nfunction distanceToFurthestCorner(x, y, rect) {\n const distX = Math.max(Math.abs(x - rect.left), Math.abs(x - rect.right));\n const distY = Math.max(Math.abs(y - rect.top), Math.abs(y - rect.bottom));\n return Math.sqrt(distX * distX + distY * distY);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token that can be used to specify the global ripple options. */\nconst MAT_RIPPLE_GLOBAL_OPTIONS = new InjectionToken('mat-ripple-global-options');\nclass MatRipple {\n constructor(_elementRef, ngZone, platform, globalOptions, _animationMode) {\n this._elementRef = _elementRef;\n this._animationMode = _animationMode;\n /**\n * If set, the radius in pixels of foreground ripples when fully expanded. If unset, the radius\n * will be the distance from the center of the ripple to the furthest corner of the host element's\n * bounding rectangle.\n */\n this.radius = 0;\n this._disabled = false;\n /** Whether ripple directive is initialized and the input bindings are set. */\n this._isInitialized = false;\n this._globalOptions = globalOptions || {};\n this._rippleRenderer = new RippleRenderer(this, ngZone, _elementRef, platform);\n }\n /**\n * Whether click events will not trigger the ripple. Ripples can be still launched manually\n * by using the `launch()` method.\n */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n if (value) {\n this.fadeOutAllNonPersistent();\n }\n this._disabled = value;\n this._setupTriggerEventsIfEnabled();\n }\n /**\n * The element that triggers the ripple when click events are received.\n * Defaults to the directive's host element.\n */\n get trigger() {\n return this._trigger || this._elementRef.nativeElement;\n }\n set trigger(trigger) {\n this._trigger = trigger;\n this._setupTriggerEventsIfEnabled();\n }\n ngOnInit() {\n this._isInitialized = true;\n this._setupTriggerEventsIfEnabled();\n }\n ngOnDestroy() {\n this._rippleRenderer._removeTriggerEvents();\n }\n /** Fades out all currently showing ripple elements. */\n fadeOutAll() {\n this._rippleRenderer.fadeOutAll();\n }\n /** Fades out all currently showing non-persistent ripple elements. */\n fadeOutAllNonPersistent() {\n this._rippleRenderer.fadeOutAllNonPersistent();\n }\n /**\n * Ripple configuration from the directive's input values.\n * @docs-private Implemented as part of RippleTarget\n */\n get rippleConfig() {\n return {\n centered: this.centered,\n radius: this.radius,\n color: this.color,\n animation: {\n ...this._globalOptions.animation,\n ...(this._animationMode === 'NoopAnimations' ? { enterDuration: 0, exitDuration: 0 } : {}),\n ...this.animation,\n },\n terminateOnPointerUp: this._globalOptions.terminateOnPointerUp,\n };\n }\n /**\n * Whether ripples on pointer-down are disabled or not.\n * @docs-private Implemented as part of RippleTarget\n */\n get rippleDisabled() {\n return this.disabled || !!this._globalOptions.disabled;\n }\n /** Sets up the trigger event listeners if ripples are enabled. */\n _setupTriggerEventsIfEnabled() {\n if (!this.disabled && this._isInitialized) {\n this._rippleRenderer.setupTriggerEvents(this.trigger);\n }\n }\n /** Launches a manual ripple at the specified coordinated or just by the ripple config. */\n launch(configOrX, y = 0, config) {\n if (typeof configOrX === 'number') {\n return this._rippleRenderer.fadeInRipple(configOrX, y, { ...this.rippleConfig, ...config });\n }\n else {\n return this._rippleRenderer.fadeInRipple(0, 0, { ...this.rippleConfig, ...configOrX });\n }\n }\n}\nMatRipple.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatRipple, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1$1.Platform }, { token: MAT_RIPPLE_GLOBAL_OPTIONS, optional: true }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatRipple.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: { color: [\"matRippleColor\", \"color\"], unbounded: [\"matRippleUnbounded\", \"unbounded\"], centered: [\"matRippleCentered\", \"centered\"], radius: [\"matRippleRadius\", \"radius\"], animation: [\"matRippleAnimation\", \"animation\"], disabled: [\"matRippleDisabled\", \"disabled\"], trigger: [\"matRippleTrigger\", \"trigger\"] }, host: { properties: { \"class.mat-ripple-unbounded\": \"unbounded\" }, classAttribute: \"mat-ripple\" }, exportAs: [\"matRipple\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatRipple, decorators: [{\n type: Directive,\n args: [{\n selector: '[mat-ripple], [matRipple]',\n exportAs: 'matRipple',\n host: {\n 'class': 'mat-ripple',\n '[class.mat-ripple-unbounded]': 'unbounded',\n },\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1$1.Platform }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_RIPPLE_GLOBAL_OPTIONS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { color: [{\n type: Input,\n args: ['matRippleColor']\n }], unbounded: [{\n type: Input,\n args: ['matRippleUnbounded']\n }], centered: [{\n type: Input,\n args: ['matRippleCentered']\n }], radius: [{\n type: Input,\n args: ['matRippleRadius']\n }], animation: [{\n type: Input,\n args: ['matRippleAnimation']\n }], disabled: [{\n type: Input,\n args: ['matRippleDisabled']\n }], trigger: [{\n type: Input,\n args: ['matRippleTrigger']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 MatRippleModule {\n}\nMatRippleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatRippleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatRippleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatRippleModule, declarations: [MatRipple], imports: [MatCommonModule], exports: [MatRipple, MatCommonModule] });\nMatRippleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatRippleModule, imports: [MatCommonModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatRippleModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [MatCommonModule],\n exports: [MatRipple, MatCommonModule],\n declarations: [MatRipple],\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 * Component that shows a simplified checkbox without including any kind of \"real\" checkbox.\n * Meant to be used when the checkbox is purely decorative and a large number of them will be\n * included, such as for the options in a multi-select. Uses no SVGs or complex animations.\n * Note that theming is meant to be handled by the parent element, e.g.\n * `mat-primary .mat-pseudo-checkbox`.\n *\n * Note that this component will be completely invisible to screen-reader users. This is *not*\n * interchangeable with `<mat-checkbox>` and should *not* be used if the user would directly\n * interact with the checkbox. The pseudo-checkbox should only be used as an implementation detail\n * of more complex components that appropriately handle selected / checked state.\n * @docs-private\n */\nclass MatPseudoCheckbox {\n constructor(_animationMode) {\n this._animationMode = _animationMode;\n /** Display state of the checkbox. */\n this.state = 'unchecked';\n /** Whether the checkbox is disabled. */\n this.disabled = false;\n }\n}\nMatPseudoCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatPseudoCheckbox, deps: [{ token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatPseudoCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatPseudoCheckbox, selector: \"mat-pseudo-checkbox\", inputs: { state: \"state\", disabled: \"disabled\" }, host: { properties: { \"class.mat-pseudo-checkbox-indeterminate\": \"state === \\\"indeterminate\\\"\", \"class.mat-pseudo-checkbox-checked\": \"state === \\\"checked\\\"\", \"class.mat-pseudo-checkbox-disabled\": \"disabled\", \"class._mat-animation-noopable\": \"_animationMode === \\\"NoopAnimations\\\"\" }, classAttribute: \"mat-pseudo-checkbox\" }, ngImport: i0, template: '', isInline: true, styles: [\".mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:\\\"\\\";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatPseudoCheckbox, decorators: [{\n type: Component,\n args: [{ encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, selector: 'mat-pseudo-checkbox', template: '', host: {\n 'class': 'mat-pseudo-checkbox',\n '[class.mat-pseudo-checkbox-indeterminate]': 'state === \"indeterminate\"',\n '[class.mat-pseudo-checkbox-checked]': 'state === \"checked\"',\n '[class.mat-pseudo-checkbox-disabled]': 'disabled',\n '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n }, styles: [\".mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:\\\"\\\";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}\"] }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { state: [{\n type: Input\n }], disabled: [{\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 */\nclass MatPseudoCheckboxModule {\n}\nMatPseudoCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatPseudoCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatPseudoCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatPseudoCheckboxModule, declarations: [MatPseudoCheckbox], imports: [MatCommonModule], exports: [MatPseudoCheckbox] });\nMatPseudoCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatPseudoCheckboxModule, imports: [MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatPseudoCheckboxModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [MatCommonModule],\n exports: [MatPseudoCheckbox],\n declarations: [MatPseudoCheckbox],\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 * Injection token used to provide the parent component to options.\n */\nconst MAT_OPTION_PARENT_COMPONENT = new InjectionToken('MAT_OPTION_PARENT_COMPONENT');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Notes on the accessibility pattern used for `mat-optgroup`.\n// The option group has two different \"modes\": regular and inert. The regular mode uses the\n// recommended a11y pattern which has `role=\"group\"` on the group element with `aria-labelledby`\n// pointing to the label. This works for `mat-select`, but it seems to hit a bug for autocomplete\n// under VoiceOver where the group doesn't get read out at all. The bug appears to be that if\n// there's __any__ a11y-related attribute on the group (e.g. `role` or `aria-labelledby`),\n// VoiceOver on Safari won't read it out.\n// We've introduced the `inert` mode as a workaround. Under this mode, all a11y attributes are\n// removed from the group, and we get the screen reader to read out the group label by mirroring it\n// inside an invisible element in the option. This is sub-optimal, because the screen reader will\n// repeat the group label on each navigation, whereas the default pattern only reads the group when\n// the user enters a new group. The following alternate approaches were considered:\n// 1. Reading out the group label using the `LiveAnnouncer` solves the problem, but we can't control\n// when the text will be read out so sometimes it comes in too late or never if the user\n// navigates quickly.\n// 2. `<mat-option aria-describedby=\"groupLabel\"` - This works on Safari, but VoiceOver in Chrome\n// won't read out the description at all.\n// 3. `<mat-option aria-labelledby=\"optionLabel groupLabel\"` - This works on Chrome, but Safari\n// doesn't read out the text at all. Furthermore, on\n// Boilerplate for applying mixins to MatOptgroup.\n/** @docs-private */\nconst _MatOptgroupMixinBase = mixinDisabled(class {\n});\n// Counter for unique group ids.\nlet _uniqueOptgroupIdCounter = 0;\nclass _MatOptgroupBase extends _MatOptgroupMixinBase {\n constructor(parent) {\n super();\n /** Unique id for the underlying label. */\n this._labelId = `mat-optgroup-label-${_uniqueOptgroupIdCounter++}`;\n this._inert = parent?.inertGroups ?? false;\n }\n}\n_MatOptgroupBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatOptgroupBase, deps: [{ token: MAT_OPTION_PARENT_COMPONENT, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n_MatOptgroupBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _MatOptgroupBase, inputs: { label: \"label\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatOptgroupBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [MAT_OPTION_PARENT_COMPONENT]\n }, {\n type: Optional\n }] }]; }, propDecorators: { label: [{\n type: Input\n }] } });\n/**\n * Injection token that can be used to reference instances of `MatOptgroup`. It serves as\n * alternative token to the actual `MatOptgroup` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nconst MAT_OPTGROUP = new InjectionToken('MatOptgroup');\n/**\n * Component that is used to group instances of `mat-option`.\n */\nclass MatOptgroup extends _MatOptgroupBase {\n}\nMatOptgroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatOptgroup, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatOptgroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatOptgroup, selector: \"mat-optgroup\", inputs: { disabled: \"disabled\" }, host: { properties: { \"attr.role\": \"_inert ? null : \\\"group\\\"\", \"attr.aria-disabled\": \"_inert ? null : disabled.toString()\", \"attr.aria-labelledby\": \"_inert ? null : _labelId\", \"class.mat-optgroup-disabled\": \"disabled\" }, classAttribute: \"mat-optgroup\" }, providers: [{ provide: MAT_OPTGROUP, useExisting: MatOptgroup }], exportAs: [\"matOptgroup\"], usesInheritance: true, ngImport: i0, template: \"<span class=\\\"mat-optgroup-label\\\" aria-hidden=\\\"true\\\" [id]=\\\"_labelId\\\">{{ label }} <ng-content></ng-content></span>\\n<ng-content select=\\\"mat-option, ng-container\\\"></ng-content>\\n\", styles: [\".mat-optgroup-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;-webkit-user-select:none;user-select:none;cursor:default}.mat-optgroup-label[disabled]{cursor:default}[dir=rtl] .mat-optgroup-label{text-align:right}.mat-optgroup-label .mat-icon{margin-right:16px;vertical-align:middle}.mat-optgroup-label .mat-icon svg{vertical-align:top}[dir=rtl] .mat-optgroup-label .mat-icon{margin-left:16px;margin-right:0}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatOptgroup, decorators: [{\n type: Component,\n args: [{ selector: 'mat-optgroup', exportAs: 'matOptgroup', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['disabled'], host: {\n 'class': 'mat-optgroup',\n '[attr.role]': '_inert ? null : \"group\"',\n '[attr.aria-disabled]': '_inert ? null : disabled.toString()',\n '[attr.aria-labelledby]': '_inert ? null : _labelId',\n '[class.mat-optgroup-disabled]': 'disabled',\n }, providers: [{ provide: MAT_OPTGROUP, useExisting: MatOptgroup }], template: \"<span class=\\\"mat-optgroup-label\\\" aria-hidden=\\\"true\\\" [id]=\\\"_labelId\\\">{{ label }} <ng-content></ng-content></span>\\n<ng-content select=\\\"mat-option, ng-container\\\"></ng-content>\\n\", styles: [\".mat-optgroup-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;-webkit-user-select:none;user-select:none;cursor:default}.mat-optgroup-label[disabled]{cursor:default}[dir=rtl] .mat-optgroup-label{text-align:right}.mat-optgroup-label .mat-icon{margin-right:16px;vertical-align:middle}.mat-optgroup-label .mat-icon svg{vertical-align:top}[dir=rtl] .mat-optgroup-label .mat-icon{margin-left:16px;margin-right: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 * Option IDs need to be unique across components, so this counter exists outside of\n * the component definition.\n */\nlet _uniqueIdCounter = 0;\n/** Event object emitted by MatOption when selected or deselected. */\nclass MatOptionSelectionChange {\n constructor(\n /** Reference to the option that emitted the event. */\n source, \n /** Whether the change in the option's value was a result of a user action. */\n isUserInput = false) {\n this.source = source;\n this.isUserInput = isUserInput;\n }\n}\nclass _MatOptionBase {\n constructor(_element, _changeDetectorRef, _parent, group) {\n this._element = _element;\n this._changeDetectorRef = _changeDetectorRef;\n this._parent = _parent;\n this.group = group;\n this._selected = false;\n this._active = false;\n this._disabled = false;\n this._mostRecentViewValue = '';\n /** The unique ID of the option. */\n this.id = `mat-option-${_uniqueIdCounter++}`;\n /** Event emitted when the option is selected or deselected. */\n // tslint:disable-next-line:no-output-on-prefix\n this.onSelectionChange = new EventEmitter();\n /** Emits when the state of the option changes and any parents have to be notified. */\n this._stateChanges = new Subject();\n }\n /** Whether the wrapping component is in multiple selection mode. */\n get multiple() {\n return this._parent && this._parent.multiple;\n }\n /** Whether or not the option is currently selected. */\n get selected() {\n return this._selected;\n }\n /** Whether the option is disabled. */\n get disabled() {\n return (this.group && this.group.disabled) || this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n }\n /** Whether ripples for the option are disabled. */\n get disableRipple() {\n return !!(this._parent && this._parent.disableRipple);\n }\n /**\n * Whether or not the option is currently active and ready to be selected.\n * An active option displays styles as if it is focused, but the\n * focus is actually retained somewhere else. This comes in handy\n * for components like autocomplete where focus must remain on the input.\n */\n get active() {\n return this._active;\n }\n /**\n * The displayed value of the option. It is necessary to show the selected option in the\n * select's trigger.\n */\n get viewValue() {\n // TODO(kara): Add input property alternative for node envs.\n return (this._getHostElement().textContent || '').trim();\n }\n /** Selects the option. */\n select() {\n if (!this._selected) {\n this._selected = true;\n this._changeDetectorRef.markForCheck();\n this._emitSelectionChangeEvent();\n }\n }\n /** Deselects the option. */\n deselect() {\n if (this._selected) {\n this._selected = false;\n this._changeDetectorRef.markForCheck();\n this._emitSelectionChangeEvent();\n }\n }\n /** Sets focus onto this option. */\n focus(_origin, options) {\n // Note that we aren't using `_origin`, but we need to keep it because some internal consumers\n // use `MatOption` in a `FocusKeyManager` and we need it to match `FocusableOption`.\n const element = this._getHostElement();\n if (typeof element.focus === 'function') {\n element.focus(options);\n }\n }\n /**\n * This method sets display styles on the option to make it appear\n * active. This is used by the ActiveDescendantKeyManager so key\n * events will display the proper options as active on arrow key events.\n */\n setActiveStyles() {\n if (!this._active) {\n this._active = true;\n this._changeDetectorRef.markForCheck();\n }\n }\n /**\n * This method removes display styles on the option that made it appear\n * active. This is used by the ActiveDescendantKeyManager so key\n * events will display the proper options as active on arrow key events.\n */\n setInactiveStyles() {\n if (this._active) {\n this._active = false;\n this._changeDetectorRef.markForCheck();\n }\n }\n /** Gets the label to be used when determining whether the option should be focused. */\n getLabel() {\n return this.viewValue;\n }\n /** Ensures the option is selected when activated from the keyboard. */\n _handleKeydown(event) {\n if ((event.keyCode === ENTER || event.keyCode === SPACE) && !hasModifierKey(event)) {\n this._selectViaInteraction();\n // Prevent the page from scrolling down and form submits.\n event.preventDefault();\n }\n }\n /**\n * `Selects the option while indicating the selection came from the user. Used to\n * determine if the select's view -> model callback should be invoked.`\n */\n _selectViaInteraction() {\n if (!this.disabled) {\n this._selected = this.multiple ? !this._selected : true;\n this._changeDetectorRef.markForCheck();\n this._emitSelectionChangeEvent(true);\n }\n }\n /**\n * Gets the `aria-selected` value for the option. We explicitly omit the `aria-selected`\n * attribute from single-selection, unselected options. Including the `aria-selected=\"false\"`\n * attributes adds a significant amount of noise to screen-reader users without providing useful\n * information.\n */\n _getAriaSelected() {\n return this.selected || (this.multiple ? false : null);\n }\n /** Returns the correct tabindex for the option depending on disabled state. */\n _getTabIndex() {\n return this.disabled ? '-1' : '0';\n }\n /** Gets the host DOM element. */\n _getHostElement() {\n return this._element.nativeElement;\n }\n ngAfterViewChecked() {\n // Since parent components could be using the option's label to display the selected values\n // (e.g. `mat-select`) and they don't have a way of knowing if the option's label has changed\n // we have to check for changes in the DOM ourselves and dispatch an event. These checks are\n // relatively cheap, however we still limit them only to selected options in order to avoid\n // hitting the DOM too often.\n if (this._selected) {\n const viewValue = this.viewValue;\n if (viewValue !== this._mostRecentViewValue) {\n this._mostRecentViewValue = viewValue;\n this._stateChanges.next();\n }\n }\n }\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n /** Emits the selection change event. */\n _emitSelectionChangeEvent(isUserInput = false) {\n this.onSelectionChange.emit(new MatOptionSelectionChange(this, isUserInput));\n }\n}\n_MatOptionBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatOptionBase, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Directive });\n_MatOptionBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _MatOptionBase, inputs: { value: \"value\", id: \"id\", disabled: \"disabled\" }, outputs: { onSelectionChange: \"onSelectionChange\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatOptionBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: undefined }, { type: _MatOptgroupBase }]; }, propDecorators: { value: [{\n type: Input\n }], id: [{\n type: Input\n }], disabled: [{\n type: Input\n }], onSelectionChange: [{\n type: Output\n }] } });\n/**\n * Single option inside of a `<mat-select>` element.\n */\nclass MatOption extends _MatOptionBase {\n constructor(element, changeDetectorRef, parent, group) {\n super(element, changeDetectorRef, parent, group);\n }\n}\nMatOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatOption, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: MAT_OPTION_PARENT_COMPONENT, optional: true }, { token: MAT_OPTGROUP, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatOption.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatOption, selector: \"mat-option\", host: { attributes: { \"role\": \"option\" }, listeners: { \"click\": \"_selectViaInteraction()\", \"keydown\": \"_handleKeydown($event)\" }, properties: { \"attr.tabindex\": \"_getTabIndex()\", \"class.mat-selected\": \"selected\", \"class.mat-option-multiple\": \"multiple\", \"class.mat-active\": \"active\", \"id\": \"id\", \"attr.aria-selected\": \"_getAriaSelected()\", \"attr.aria-disabled\": \"disabled.toString()\", \"class.mat-option-disabled\": \"disabled\" }, classAttribute: \"mat-option mat-focus-indicator\" }, exportAs: [\"matOption\"], usesInheritance: true, ngImport: i0, template: \"<mat-pseudo-checkbox *ngIf=\\\"multiple\\\" class=\\\"mat-option-pseudo-checkbox\\\"\\n [state]=\\\"selected ? 'checked' : 'unchecked'\\\" [disabled]=\\\"disabled\\\"></mat-pseudo-checkbox>\\n\\n<span class=\\\"mat-option-text\\\"><ng-content></ng-content></span>\\n\\n<!-- See a11y notes inside optgroup.ts for context behind this element. -->\\n<span class=\\\"cdk-visually-hidden\\\" *ngIf=\\\"group && group._inert\\\">({{ group.label }})</span>\\n\\n<div class=\\\"mat-option-ripple\\\" mat-ripple\\n [matRippleTrigger]=\\\"_getHostElement()\\\"\\n [matRippleDisabled]=\\\"disabled || disableRipple\\\">\\n</div>\\n\", styles: [\".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.mat-option.mat-active::before{content:\\\"\\\"}.cdk-high-contrast-active .mat-option[aria-disabled=true]{opacity:.5}.cdk-high-contrast-active .mat-option.mat-selected:not(.mat-option-multiple)::after{content:\\\"\\\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-option.mat-selected:not(.mat-option-multiple)::after{right:auto;left:16px}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}\"], dependencies: [{ kind: \"directive\", type: MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }, { kind: \"directive\", type: i3.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: MatPseudoCheckbox, selector: \"mat-pseudo-checkbox\", inputs: [\"state\", \"disabled\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatOption, decorators: [{\n type: Component,\n args: [{ selector: 'mat-option', exportAs: 'matOption', host: {\n 'role': 'option',\n '[attr.tabindex]': '_getTabIndex()',\n '[class.mat-selected]': 'selected',\n '[class.mat-option-multiple]': 'multiple',\n '[class.mat-active]': 'active',\n '[id]': 'id',\n '[attr.aria-selected]': '_getAriaSelected()',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[class.mat-option-disabled]': 'disabled',\n '(click)': '_selectViaInteraction()',\n '(keydown)': '_handleKeydown($event)',\n 'class': 'mat-option mat-focus-indicator',\n }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"<mat-pseudo-checkbox *ngIf=\\\"multiple\\\" class=\\\"mat-option-pseudo-checkbox\\\"\\n [state]=\\\"selected ? 'checked' : 'unchecked'\\\" [disabled]=\\\"disabled\\\"></mat-pseudo-checkbox>\\n\\n<span class=\\\"mat-option-text\\\"><ng-content></ng-content></span>\\n\\n<!-- See a11y notes inside optgroup.ts for context behind this element. -->\\n<span class=\\\"cdk-visually-hidden\\\" *ngIf=\\\"group && group._inert\\\">({{ group.label }})</span>\\n\\n<div class=\\\"mat-option-ripple\\\" mat-ripple\\n [matRippleTrigger]=\\\"_getHostElement()\\\"\\n [matRippleDisabled]=\\\"disabled || disableRipple\\\">\\n</div>\\n\", styles: [\".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.mat-option.mat-active::before{content:\\\"\\\"}.cdk-high-contrast-active .mat-option[aria-disabled=true]{opacity:.5}.cdk-high-contrast-active .mat-option.mat-selected:not(.mat-option-multiple)::after{content:\\\"\\\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-option.mat-selected:not(.mat-option-multiple)::after{right:auto;left:16px}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_OPTION_PARENT_COMPONENT]\n }] }, { type: MatOptgroup, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_OPTGROUP]\n }] }]; } });\n/**\n * Counts the amount of option group labels that precede the specified option.\n * @param optionIndex Index of the option at which to start counting.\n * @param options Flat list of all of the options.\n * @param optionGroups Flat list of all of the option groups.\n * @docs-private\n */\nfunction _countGroupLabelsBeforeOption(optionIndex, options, optionGroups) {\n if (optionGroups.length) {\n let optionsArray = options.toArray();\n let groups = optionGroups.toArray();\n let groupCounter = 0;\n for (let i = 0; i < optionIndex + 1; i++) {\n if (optionsArray[i].group && optionsArray[i].group === groups[groupCounter]) {\n groupCounter++;\n }\n }\n return groupCounter;\n }\n return 0;\n}\n/**\n * Determines the position to which to scroll a panel in order for an option to be into view.\n * @param optionOffset Offset of the option from the top of the panel.\n * @param optionHeight Height of the options.\n * @param currentScrollPosition Current scroll position of the panel.\n * @param panelHeight Height of the panel.\n * @docs-private\n */\nfunction _getOptionScrollPosition(optionOffset, optionHeight, currentScrollPosition, panelHeight) {\n if (optionOffset < currentScrollPosition) {\n return optionOffset;\n }\n if (optionOffset + optionHeight > currentScrollPosition + panelHeight) {\n return Math.max(0, optionOffset - panelHeight + optionHeight);\n }\n return currentScrollPosition;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 MatOptionModule {\n}\nMatOptionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatOptionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatOptionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatOptionModule, declarations: [MatOption, MatOptgroup], imports: [MatRippleModule, CommonModule, MatCommonModule, MatPseudoCheckboxModule], exports: [MatOption, MatOptgroup] });\nMatOptionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatOptionModule, imports: [MatRippleModule, CommonModule, MatCommonModule, MatPseudoCheckboxModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatOptionModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [MatRippleModule, CommonModule, MatCommonModule, MatPseudoCheckboxModule],\n exports: [MatOption, MatOptgroup],\n declarations: [MatOption, MatOptgroup],\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 * Generated bundle index. Do not edit.\n */\n\nexport { AnimationCurves, AnimationDurations, DateAdapter, ErrorStateMatcher, MATERIAL_SANITY_CHECKS, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MAT_DATE_LOCALE_FACTORY, MAT_NATIVE_DATE_FORMATS, MAT_OPTGROUP, MAT_OPTION_PARENT_COMPONENT, MAT_RIPPLE_GLOBAL_OPTIONS, MatCommonModule, MatLine, MatLineModule, MatNativeDateModule, MatOptgroup, MatOption, MatOptionModule, MatOptionSelectionChange, MatPseudoCheckbox, MatPseudoCheckboxModule, MatRipple, MatRippleModule, NativeDateAdapter, NativeDateModule, RippleRef, RippleRenderer, ShowOnDirtyErrorStateMatcher, VERSION, _MatOptgroupBase, _MatOptionBase, _countGroupLabelsBeforeOption, _getOptionScrollPosition, defaultRippleAnimationConfig, mixinColor, mixinDisableRipple, mixinDisabled, mixinErrorState, mixinInitialized, mixinTabIndex, setLines };\n","import * as i0 from '@angular/core';\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, ViewChild, Input, NgModule } from '@angular/core';\nimport * as i2 from '@angular/material/core';\nimport { mixinColor, mixinDisabled, mixinDisableRipple, MatRipple, MatRippleModule, MatCommonModule } from '@angular/material/core';\nimport * as i1 from '@angular/cdk/a11y';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Default color palette for round buttons (mat-fab and mat-mini-fab) */\nconst DEFAULT_ROUND_BUTTON_COLOR = 'accent';\n/**\n * List of classes to add to MatButton instances based on host attributes to\n * style as different variants.\n */\nconst BUTTON_HOST_ATTRIBUTES = [\n 'mat-button',\n 'mat-flat-button',\n 'mat-icon-button',\n 'mat-raised-button',\n 'mat-stroked-button',\n 'mat-mini-fab',\n 'mat-fab',\n];\n// Boilerplate for applying mixins to MatButton.\nconst _MatButtonBase = mixinColor(mixinDisabled(mixinDisableRipple(class {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n})));\n/**\n * Material design button.\n */\nclass MatButton extends _MatButtonBase {\n constructor(elementRef, _focusMonitor, _animationMode) {\n super(elementRef);\n this._focusMonitor = _focusMonitor;\n this._animationMode = _animationMode;\n /** Whether the button is round. */\n this.isRoundButton = this._hasHostAttributes('mat-fab', 'mat-mini-fab');\n /** Whether the button is icon button. */\n this.isIconButton = this._hasHostAttributes('mat-icon-button');\n // For each of the variant selectors that is present in the button's host\n // attributes, add the correct corresponding class.\n for (const attr of BUTTON_HOST_ATTRIBUTES) {\n if (this._hasHostAttributes(attr)) {\n this._getHostElement().classList.add(attr);\n }\n }\n // Add a class that applies to all buttons. This makes it easier to target if somebody\n // wants to target all Material buttons. We do it here rather than `host` to ensure that\n // the class is applied to derived classes.\n elementRef.nativeElement.classList.add('mat-button-base');\n if (this.isRoundButton) {\n this.color = DEFAULT_ROUND_BUTTON_COLOR;\n }\n }\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true);\n }\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n /** Focuses the button. */\n focus(origin, options) {\n if (origin) {\n this._focusMonitor.focusVia(this._getHostElement(), origin, options);\n }\n else {\n this._getHostElement().focus(options);\n }\n }\n _getHostElement() {\n return this._elementRef.nativeElement;\n }\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n /** Gets whether the button has one of the given attributes. */\n _hasHostAttributes(...attributes) {\n return attributes.some(attribute => this._getHostElement().hasAttribute(attribute));\n }\n}\nMatButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatButton, deps: [{ token: i0.ElementRef }, { token: i1.FocusMonitor }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatButton, selector: \"button[mat-button], button[mat-raised-button], button[mat-icon-button],\\n button[mat-fab], button[mat-mini-fab], button[mat-stroked-button],\\n button[mat-flat-button]\", inputs: { disabled: \"disabled\", disableRipple: \"disableRipple\", color: \"color\" }, host: { properties: { \"attr.disabled\": \"disabled || null\", \"class._mat-animation-noopable\": \"_animationMode === \\\"NoopAnimations\\\"\", \"class.mat-button-disabled\": \"disabled\" }, classAttribute: \"mat-focus-indicator\" }, viewQueries: [{ propertyName: \"ripple\", first: true, predicate: MatRipple, descendants: true }], exportAs: [\"matButton\"], usesInheritance: true, ngImport: i0, template: \"<span class=\\\"mat-button-wrapper\\\"><ng-content></ng-content></span>\\n<span matRipple class=\\\"mat-button-ripple\\\"\\n [class.mat-button-ripple-round]=\\\"isRoundButton || isIconButton\\\"\\n [matRippleDisabled]=\\\"_isRippleDisabled()\\\"\\n [matRippleCentered]=\\\"isIconButton\\\"\\n [matRippleTrigger]=\\\"_getHostElement()\\\"></span>\\n<span class=\\\"mat-button-focus-overlay\\\"></span>\\n\", styles: [\".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}.mat-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.mat-flat-button::before,.mat-raised-button::before,.mat-fab::before,.mat-mini-fab::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-stroked-button::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px) * -1)}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}\"], dependencies: [{ kind: \"directive\", type: i2.MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatButton, decorators: [{\n type: Component,\n args: [{ selector: `button[mat-button], button[mat-raised-button], button[mat-icon-button],\n button[mat-fab], button[mat-mini-fab], button[mat-stroked-button],\n button[mat-flat-button]`, exportAs: 'matButton', host: {\n '[attr.disabled]': 'disabled || null',\n '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n // Add a class for disabled button styling instead of the using attribute\n // selector or pseudo-selector. This allows users to create focusable\n // disabled buttons without recreating the styles.\n '[class.mat-button-disabled]': 'disabled',\n 'class': 'mat-focus-indicator',\n }, inputs: ['disabled', 'disableRipple', 'color'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"<span class=\\\"mat-button-wrapper\\\"><ng-content></ng-content></span>\\n<span matRipple class=\\\"mat-button-ripple\\\"\\n [class.mat-button-ripple-round]=\\\"isRoundButton || isIconButton\\\"\\n [matRippleDisabled]=\\\"_isRippleDisabled()\\\"\\n [matRippleCentered]=\\\"isIconButton\\\"\\n [matRippleTrigger]=\\\"_getHostElement()\\\"></span>\\n<span class=\\\"mat-button-focus-overlay\\\"></span>\\n\", styles: [\".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}.mat-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.mat-flat-button::before,.mat-raised-button::before,.mat-fab::before,.mat-mini-fab::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-stroked-button::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px) * -1)}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FocusMonitor }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { ripple: [{\n type: ViewChild,\n args: [MatRipple]\n }] } });\n/**\n * Material design anchor button.\n */\nclass MatAnchor extends MatButton {\n constructor(focusMonitor, elementRef, animationMode, \n /** @breaking-change 14.0.0 _ngZone will be required. */\n _ngZone) {\n super(elementRef, focusMonitor, animationMode);\n this._ngZone = _ngZone;\n this._haltDisabledEvents = (event) => {\n // A disabled button shouldn't apply any actions\n if (this.disabled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n };\n }\n ngAfterViewInit() {\n super.ngAfterViewInit();\n /** @breaking-change 14.0.0 _ngZone will be required. */\n if (this._ngZone) {\n this._ngZone.runOutsideAngular(() => {\n this._elementRef.nativeElement.addEventListener('click', this._haltDisabledEvents);\n });\n }\n else {\n this._elementRef.nativeElement.addEventListener('click', this._haltDisabledEvents);\n }\n }\n ngOnDestroy() {\n super.ngOnDestroy();\n this._elementRef.nativeElement.removeEventListener('click', this._haltDisabledEvents);\n }\n}\nMatAnchor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatAnchor, deps: [{ token: i1.FocusMonitor }, { token: i0.ElementRef }, { token: ANIMATION_MODULE_TYPE, optional: true }, { token: i0.NgZone, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatAnchor.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatAnchor, selector: \"a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab],\\n a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]\", inputs: { disabled: \"disabled\", disableRipple: \"disableRipple\", color: \"color\", tabIndex: \"tabIndex\" }, host: { properties: { \"attr.tabindex\": \"disabled ? -1 : tabIndex\", \"attr.disabled\": \"disabled || null\", \"attr.aria-disabled\": \"disabled.toString()\", \"class._mat-animation-noopable\": \"_animationMode === \\\"NoopAnimations\\\"\", \"class.mat-button-disabled\": \"disabled\" }, classAttribute: \"mat-focus-indicator\" }, exportAs: [\"matButton\", \"matAnchor\"], usesInheritance: true, ngImport: i0, template: \"<span class=\\\"mat-button-wrapper\\\"><ng-content></ng-content></span>\\n<span matRipple class=\\\"mat-button-ripple\\\"\\n [class.mat-button-ripple-round]=\\\"isRoundButton || isIconButton\\\"\\n [matRippleDisabled]=\\\"_isRippleDisabled()\\\"\\n [matRippleCentered]=\\\"isIconButton\\\"\\n [matRippleTrigger]=\\\"_getHostElement()\\\"></span>\\n<span class=\\\"mat-button-focus-overlay\\\"></span>\\n\", styles: [\".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}.mat-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.mat-flat-button::before,.mat-raised-button::before,.mat-fab::before,.mat-mini-fab::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-stroked-button::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px) * -1)}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}\"], dependencies: [{ kind: \"directive\", type: i2.MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatAnchor, decorators: [{\n type: Component,\n args: [{ selector: `a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab],\n a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]`, exportAs: 'matButton, matAnchor', host: {\n // Note that we ignore the user-specified tabindex when it's disabled for\n // consistency with the `mat-button` applied on native buttons where even\n // though they have an index, they're not tabbable.\n '[attr.tabindex]': 'disabled ? -1 : tabIndex',\n '[attr.disabled]': 'disabled || null',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n '[class.mat-button-disabled]': 'disabled',\n 'class': 'mat-focus-indicator',\n }, inputs: ['disabled', 'disableRipple', 'color'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"<span class=\\\"mat-button-wrapper\\\"><ng-content></ng-content></span>\\n<span matRipple class=\\\"mat-button-ripple\\\"\\n [class.mat-button-ripple-round]=\\\"isRoundButton || isIconButton\\\"\\n [matRippleDisabled]=\\\"_isRippleDisabled()\\\"\\n [matRippleCentered]=\\\"isIconButton\\\"\\n [matRippleTrigger]=\\\"_getHostElement()\\\"></span>\\n<span class=\\\"mat-button-focus-overlay\\\"></span>\\n\", styles: [\".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}.mat-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.mat-flat-button::before,.mat-raised-button::before,.mat-fab::before,.mat-mini-fab::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-stroked-button::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px) * -1)}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}\"] }]\n }], ctorParameters: function () { return [{ type: i1.FocusMonitor }, { type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }, { type: i0.NgZone, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { tabIndex: [{\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 */\nclass MatButtonModule {\n}\nMatButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatButtonModule, declarations: [MatButton, MatAnchor], imports: [MatRippleModule, MatCommonModule], exports: [MatButton, MatAnchor, MatCommonModule] });\nMatButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatButtonModule, imports: [MatRippleModule, MatCommonModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatButtonModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [MatRippleModule, MatCommonModule],\n exports: [MatButton, MatAnchor, MatCommonModule],\n declarations: [MatButton, MatAnchor],\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 * Generated bundle index. Do not edit.\n */\n\nexport { MatAnchor, MatButton, MatButtonModule };\n","import { innerFrom } from '../observable/innerFrom';\nimport { Observable } from '../Observable';\nimport { mergeMap } from '../operators/mergeMap';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nconst nodeEventEmitterMethods = ['addListener', 'removeListener'];\nconst eventTargetMethods = ['addEventListener', 'removeEventListener'];\nconst jqueryMethods = ['on', 'off'];\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(mapOneOrManyArgs(resultSelector));\n }\n const [add, remove] = isEventTarget(target)\n ? eventTargetMethods.map((methodName) => (handler) => target[methodName](eventName, handler, options))\n :\n isNodeStyleEventEmitter(target)\n ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))\n : isJQueryStyleEventEmitter(target)\n ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))\n : [];\n if (!add) {\n if (isArrayLike(target)) {\n return mergeMap((subTarget) => fromEvent(subTarget, eventName, options))(innerFrom(target));\n }\n }\n if (!add) {\n throw new TypeError('Invalid event target');\n }\n return new Observable((subscriber) => {\n const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]);\n add(handler);\n return () => remove(handler);\n });\n}\nfunction toCommonHandlerRegistry(target, eventName) {\n return (methodName) => (handler) => target[methodName](eventName, handler);\n}\nfunction isNodeStyleEventEmitter(target) {\n return isFunction(target.addListener) && isFunction(target.removeListener);\n}\nfunction isJQueryStyleEventEmitter(target) {\n return isFunction(target.on) && isFunction(target.off);\n}\nfunction isEventTarget(target) {\n return isFunction(target.addEventListener) && isFunction(target.removeEventListener);\n}\n","import { Subscription } from '../Subscription';\nexport const animationFrameProvider = {\n schedule(callback) {\n let request = requestAnimationFrame;\n let cancel = cancelAnimationFrame;\n const { delegate } = animationFrameProvider;\n if (delegate) {\n request = delegate.requestAnimationFrame;\n cancel = delegate.cancelAnimationFrame;\n }\n const handle = request((timestamp) => {\n cancel = undefined;\n callback(timestamp);\n });\n return new Subscription(() => cancel === null || cancel === void 0 ? void 0 : cancel(handle));\n },\n requestAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame)(...args);\n },\n cancelAnimationFrame(...args) {\n const { delegate } = animationFrameProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame)(...args);\n },\n delegate: undefined,\n};\n","import { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nexport const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);\nexport const animationFrame = animationFrameScheduler;\n","import { AsyncScheduler } from './AsyncScheduler';\nexport class AnimationFrameScheduler extends AsyncScheduler {\n flush(action) {\n this._active = true;\n const flushId = this._scheduled;\n this._scheduled = undefined;\n const { actions } = this;\n let error;\n action = action || actions.shift();\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n this._active = false;\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n","import { AsyncAction } from './AsyncAction';\nimport { animationFrameProvider } from './animationFrameProvider';\nexport class AnimationFrameAction extends AsyncAction {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n }\n requestAsyncId(scheduler, id, delay = 0) {\n if (delay !== null && delay > 0) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n scheduler.actions.push(this);\n return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined)));\n }\n recycleAsyncId(scheduler, id, delay = 0) {\n if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n if (!scheduler.actions.some((action) => action.id === id)) {\n animationFrameProvider.cancelAnimationFrame(id);\n scheduler._scheduled = undefined;\n }\n return undefined;\n }\n}\n","let nextHandle = 1;\nlet resolved;\nconst activeHandles = {};\nfunction findAndClearHandle(handle) {\n if (handle in activeHandles) {\n delete activeHandles[handle];\n return true;\n }\n return false;\n}\nexport const Immediate = {\n setImmediate(cb) {\n const handle = nextHandle++;\n activeHandles[handle] = true;\n if (!resolved) {\n resolved = Promise.resolve();\n }\n resolved.then(() => findAndClearHandle(handle) && cb());\n return handle;\n },\n clearImmediate(handle) {\n findAndClearHandle(handle);\n },\n};\nexport const TestTools = {\n pending() {\n return Object.keys(activeHandles).length;\n }\n};\n","import { Immediate } from '../util/Immediate';\nconst { setImmediate, clearImmediate } = Immediate;\nexport const immediateProvider = {\n setImmediate(...args) {\n const { delegate } = immediateProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate)(...args);\n },\n clearImmediate(handle) {\n const { delegate } = immediateProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle);\n },\n delegate: undefined,\n};\n","import { AsapAction } from './AsapAction';\nimport { AsapScheduler } from './AsapScheduler';\nexport const asapScheduler = new AsapScheduler(AsapAction);\nexport const asap = asapScheduler;\n","import { AsyncScheduler } from './AsyncScheduler';\nexport class AsapScheduler extends AsyncScheduler {\n flush(action) {\n this._active = true;\n const flushId = this._scheduled;\n this._scheduled = undefined;\n const { actions } = this;\n let error;\n action = action || actions.shift();\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n this._active = false;\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n","import { AsyncAction } from './AsyncAction';\nimport { immediateProvider } from './immediateProvider';\nexport class AsapAction extends AsyncAction {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n }\n requestAsyncId(scheduler, id, delay = 0) {\n if (delay !== null && delay > 0) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n scheduler.actions.push(this);\n return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined)));\n }\n recycleAsyncId(scheduler, id, delay = 0) {\n if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) {\n return super.recycleAsyncId(scheduler, id, delay);\n }\n if (!scheduler.actions.some((action) => action.id === id)) {\n immediateProvider.clearImmediate(id);\n scheduler._scheduled = undefined;\n }\n return undefined;\n }\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nexport function auditTime(duration, scheduler = asyncScheduler) {\n return audit(() => timer(duration, scheduler));\n}\n","import { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function audit(durationSelector) {\n return operate((source, subscriber) => {\n let hasValue = false;\n let lastValue = null;\n let durationSubscriber = null;\n let isComplete = false;\n const endDuration = () => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n isComplete && subscriber.complete();\n };\n const cleanupDuration = () => {\n durationSubscriber = null;\n isComplete && subscriber.complete();\n };\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n lastValue = value;\n if (!durationSubscriber) {\n innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)));\n }\n }, () => {\n isComplete = true;\n (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete();\n }));\n });\n}\n","import { coerceNumberProperty, coerceElement, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, forwardRef, Directive, Input, Injectable, Optional, Inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, ViewChild, SkipSelf, ElementRef, NgModule } from '@angular/core';\nimport { Subject, of, Observable, fromEvent, animationFrameScheduler, asapScheduler, Subscription, isObservable } from 'rxjs';\nimport { distinctUntilChanged, auditTime, filter, takeUntil, startWith, pairwise, switchMap, shareReplay } from 'rxjs/operators';\nimport * as i1 from '@angular/cdk/platform';\nimport { getRtlScrollAxisType, supportsScrollBehavior } from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\nimport * as i2 from '@angular/cdk/bidi';\nimport { BidiModule } from '@angular/cdk/bidi';\nimport * as i2$1 from '@angular/cdk/collections';\nimport { isDataSource, ArrayDataSource, _VIEW_REPEATER_STRATEGY, _RecycleViewRepeaterStrategy } from '@angular/cdk/collections';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** The injection token used to specify the virtual scrolling strategy. */\nconst VIRTUAL_SCROLL_STRATEGY = new InjectionToken('VIRTUAL_SCROLL_STRATEGY');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Virtual scrolling strategy for lists with items of known fixed size. */\nclass FixedSizeVirtualScrollStrategy {\n /**\n * @param itemSize The size of the items in the virtually scrolling list.\n * @param minBufferPx The minimum amount of buffer (in pixels) before needing to render more\n * @param maxBufferPx The amount of buffer (in pixels) to render when rendering more.\n */\n constructor(itemSize, minBufferPx, maxBufferPx) {\n this._scrolledIndexChange = new Subject();\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n this.scrolledIndexChange = this._scrolledIndexChange.pipe(distinctUntilChanged());\n /** The attached viewport. */\n this._viewport = null;\n this._itemSize = itemSize;\n this._minBufferPx = minBufferPx;\n this._maxBufferPx = maxBufferPx;\n }\n /**\n * Attaches this scroll strategy to a viewport.\n * @param viewport The viewport to attach this strategy to.\n */\n attach(viewport) {\n this._viewport = viewport;\n this._updateTotalContentSize();\n this._updateRenderedRange();\n }\n /** Detaches this scroll strategy from the currently attached viewport. */\n detach() {\n this._scrolledIndexChange.complete();\n this._viewport = null;\n }\n /**\n * Update the item size and buffer size.\n * @param itemSize The size of the items in the virtually scrolling list.\n * @param minBufferPx The minimum amount of buffer (in pixels) before needing to render more\n * @param maxBufferPx The amount of buffer (in pixels) to render when rendering more.\n */\n updateItemAndBufferSize(itemSize, minBufferPx, maxBufferPx) {\n if (maxBufferPx < minBufferPx && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('CDK virtual scroll: maxBufferPx must be greater than or equal to minBufferPx');\n }\n this._itemSize = itemSize;\n this._minBufferPx = minBufferPx;\n this._maxBufferPx = maxBufferPx;\n this._updateTotalContentSize();\n this._updateRenderedRange();\n }\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onContentScrolled() {\n this._updateRenderedRange();\n }\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onDataLengthChanged() {\n this._updateTotalContentSize();\n this._updateRenderedRange();\n }\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onContentRendered() {\n /* no-op */\n }\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onRenderedOffsetChanged() {\n /* no-op */\n }\n /**\n * Scroll to the offset for the given index.\n * @param index The index of the element to scroll to.\n * @param behavior The ScrollBehavior to use when scrolling.\n */\n scrollToIndex(index, behavior) {\n if (this._viewport) {\n this._viewport.scrollToOffset(index * this._itemSize, behavior);\n }\n }\n /** Update the viewport's total content size. */\n _updateTotalContentSize() {\n if (!this._viewport) {\n return;\n }\n this._viewport.setTotalContentSize(this._viewport.getDataLength() * this._itemSize);\n }\n /** Update the viewport's rendered range. */\n _updateRenderedRange() {\n if (!this._viewport) {\n return;\n }\n const renderedRange = this._viewport.getRenderedRange();\n const newRange = { start: renderedRange.start, end: renderedRange.end };\n const viewportSize = this._viewport.getViewportSize();\n const dataLength = this._viewport.getDataLength();\n let scrollOffset = this._viewport.measureScrollOffset();\n // Prevent NaN as result when dividing by zero.\n let firstVisibleIndex = this._itemSize > 0 ? scrollOffset / this._itemSize : 0;\n // If user scrolls to the bottom of the list and data changes to a smaller list\n if (newRange.end > dataLength) {\n // We have to recalculate the first visible index based on new data length and viewport size.\n const maxVisibleItems = Math.ceil(viewportSize / this._itemSize);\n const newVisibleIndex = Math.max(0, Math.min(firstVisibleIndex, dataLength - maxVisibleItems));\n // If first visible index changed we must update scroll offset to handle start/end buffers\n // Current range must also be adjusted to cover the new position (bottom of new list).\n if (firstVisibleIndex != newVisibleIndex) {\n firstVisibleIndex = newVisibleIndex;\n scrollOffset = newVisibleIndex * this._itemSize;\n newRange.start = Math.floor(firstVisibleIndex);\n }\n newRange.end = Math.max(0, Math.min(dataLength, newRange.start + maxVisibleItems));\n }\n const startBuffer = scrollOffset - newRange.start * this._itemSize;\n if (startBuffer < this._minBufferPx && newRange.start != 0) {\n const expandStart = Math.ceil((this._maxBufferPx - startBuffer) / this._itemSize);\n newRange.start = Math.max(0, newRange.start - expandStart);\n newRange.end = Math.min(dataLength, Math.ceil(firstVisibleIndex + (viewportSize + this._minBufferPx) / this._itemSize));\n }\n else {\n const endBuffer = newRange.end * this._itemSize - (scrollOffset + viewportSize);\n if (endBuffer < this._minBufferPx && newRange.end != dataLength) {\n const expandEnd = Math.ceil((this._maxBufferPx - endBuffer) / this._itemSize);\n if (expandEnd > 0) {\n newRange.end = Math.min(dataLength, newRange.end + expandEnd);\n newRange.start = Math.max(0, Math.floor(firstVisibleIndex - this._minBufferPx / this._itemSize));\n }\n }\n }\n this._viewport.setRenderedRange(newRange);\n this._viewport.setRenderedContentOffset(this._itemSize * newRange.start);\n this._scrolledIndexChange.next(Math.floor(firstVisibleIndex));\n }\n}\n/**\n * Provider factory for `FixedSizeVirtualScrollStrategy` that simply extracts the already created\n * `FixedSizeVirtualScrollStrategy` from the given directive.\n * @param fixedSizeDir The instance of `CdkFixedSizeVirtualScroll` to extract the\n * `FixedSizeVirtualScrollStrategy` from.\n */\nfunction _fixedSizeVirtualScrollStrategyFactory(fixedSizeDir) {\n return fixedSizeDir._scrollStrategy;\n}\n/** A virtual scroll strategy that supports fixed-size items. */\nclass CdkFixedSizeVirtualScroll {\n constructor() {\n this._itemSize = 20;\n this._minBufferPx = 100;\n this._maxBufferPx = 200;\n /** The scroll strategy used by this directive. */\n this._scrollStrategy = new FixedSizeVirtualScrollStrategy(this.itemSize, this.minBufferPx, this.maxBufferPx);\n }\n /** The size of the items in the list (in pixels). */\n get itemSize() {\n return this._itemSize;\n }\n set itemSize(value) {\n this._itemSize = coerceNumberProperty(value);\n }\n /**\n * The minimum amount of buffer rendered beyond the viewport (in pixels).\n * If the amount of buffer dips below this number, more items will be rendered. Defaults to 100px.\n */\n get minBufferPx() {\n return this._minBufferPx;\n }\n set minBufferPx(value) {\n this._minBufferPx = coerceNumberProperty(value);\n }\n /**\n * The number of pixels worth of buffer to render for when rendering new items. Defaults to 200px.\n */\n get maxBufferPx() {\n return this._maxBufferPx;\n }\n set maxBufferPx(value) {\n this._maxBufferPx = coerceNumberProperty(value);\n }\n ngOnChanges() {\n this._scrollStrategy.updateItemAndBufferSize(this.itemSize, this.minBufferPx, this.maxBufferPx);\n }\n}\nCdkFixedSizeVirtualScroll.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkFixedSizeVirtualScroll, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nCdkFixedSizeVirtualScroll.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkFixedSizeVirtualScroll, selector: \"cdk-virtual-scroll-viewport[itemSize]\", inputs: { itemSize: \"itemSize\", minBufferPx: \"minBufferPx\", maxBufferPx: \"maxBufferPx\" }, providers: [\n {\n provide: VIRTUAL_SCROLL_STRATEGY,\n useFactory: _fixedSizeVirtualScrollStrategyFactory,\n deps: [forwardRef(() => CdkFixedSizeVirtualScroll)],\n },\n ], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkFixedSizeVirtualScroll, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-virtual-scroll-viewport[itemSize]',\n providers: [\n {\n provide: VIRTUAL_SCROLL_STRATEGY,\n useFactory: _fixedSizeVirtualScrollStrategyFactory,\n deps: [forwardRef(() => CdkFixedSizeVirtualScroll)],\n },\n ],\n }]\n }], propDecorators: { itemSize: [{\n type: Input\n }], minBufferPx: [{\n type: Input\n }], maxBufferPx: [{\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/** Time in ms to throttle the scrolling events by default. */\nconst DEFAULT_SCROLL_TIME = 20;\n/**\n * Service contained all registered Scrollable references and emits an event when any one of the\n * Scrollable references emit a scrolled event.\n */\nclass ScrollDispatcher {\n constructor(_ngZone, _platform, document) {\n this._ngZone = _ngZone;\n this._platform = _platform;\n /** Subject for notifying that a registered scrollable reference element has been scrolled. */\n this._scrolled = new Subject();\n /** Keeps track of the global `scroll` and `resize` subscriptions. */\n this._globalSubscription = null;\n /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */\n this._scrolledCount = 0;\n /**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n */\n this.scrollContainers = new Map();\n this._document = document;\n }\n /**\n * Registers a scrollable instance with the service and listens for its scrolled events. When the\n * scrollable is scrolled, the service emits the event to its scrolled observable.\n * @param scrollable Scrollable instance to be registered.\n */\n register(scrollable) {\n if (!this.scrollContainers.has(scrollable)) {\n this.scrollContainers.set(scrollable, scrollable.elementScrolled().subscribe(() => this._scrolled.next(scrollable)));\n }\n }\n /**\n * De-registers a Scrollable reference and unsubscribes from its scroll event observable.\n * @param scrollable Scrollable instance to be deregistered.\n */\n deregister(scrollable) {\n const scrollableReference = this.scrollContainers.get(scrollable);\n if (scrollableReference) {\n scrollableReference.unsubscribe();\n this.scrollContainers.delete(scrollable);\n }\n }\n /**\n * Returns an observable that emits an event whenever any of the registered Scrollable\n * references (or window, document, or body) fire a scrolled event. Can provide a time in ms\n * to override the default \"throttle\" time.\n *\n * **Note:** in order to avoid hitting change detection for every scroll event,\n * all of the events emitted from this stream will be run outside the Angular zone.\n * If you need to update any data bindings as a result of a scroll event, you have\n * to run the callback using `NgZone.run`.\n */\n scrolled(auditTimeInMs = DEFAULT_SCROLL_TIME) {\n if (!this._platform.isBrowser) {\n return of();\n }\n return new Observable((observer) => {\n if (!this._globalSubscription) {\n this._addGlobalListener();\n }\n // In the case of a 0ms delay, use an observable without auditTime\n // since it does add a perceptible delay in processing overhead.\n const subscription = auditTimeInMs > 0\n ? this._scrolled.pipe(auditTime(auditTimeInMs)).subscribe(observer)\n : this._scrolled.subscribe(observer);\n this._scrolledCount++;\n return () => {\n subscription.unsubscribe();\n this._scrolledCount--;\n if (!this._scrolledCount) {\n this._removeGlobalListener();\n }\n };\n });\n }\n ngOnDestroy() {\n this._removeGlobalListener();\n this.scrollContainers.forEach((_, container) => this.deregister(container));\n this._scrolled.complete();\n }\n /**\n * Returns an observable that emits whenever any of the\n * scrollable ancestors of an element are scrolled.\n * @param elementOrElementRef Element whose ancestors to listen for.\n * @param auditTimeInMs Time to throttle the scroll events.\n */\n ancestorScrolled(elementOrElementRef, auditTimeInMs) {\n const ancestors = this.getAncestorScrollContainers(elementOrElementRef);\n return this.scrolled(auditTimeInMs).pipe(filter(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }\n /** Returns all registered Scrollables that contain the provided element. */\n getAncestorScrollContainers(elementOrElementRef) {\n const scrollingContainers = [];\n this.scrollContainers.forEach((_subscription, scrollable) => {\n if (this._scrollableContainsElement(scrollable, elementOrElementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n return scrollingContainers;\n }\n /** Use defaultView of injected document if available or fallback to global window reference */\n _getWindow() {\n return this._document.defaultView || window;\n }\n /** Returns true if the element is contained within the provided Scrollable. */\n _scrollableContainsElement(scrollable, elementOrElementRef) {\n let element = coerceElement(elementOrElementRef);\n let scrollableElement = scrollable.getElementRef().nativeElement;\n // Traverse through the element parents until we reach null, checking if any of the elements\n // are the scrollable's element.\n do {\n if (element == scrollableElement) {\n return true;\n }\n } while ((element = element.parentElement));\n return false;\n }\n /** Sets up the global scroll listeners. */\n _addGlobalListener() {\n this._globalSubscription = this._ngZone.runOutsideAngular(() => {\n const window = this._getWindow();\n return fromEvent(window.document, 'scroll').subscribe(() => this._scrolled.next());\n });\n }\n /** Cleans up the global scroll listener. */\n _removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }\n}\nScrollDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ScrollDispatcher, deps: [{ token: i0.NgZone }, { token: i1.Platform }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nScrollDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ScrollDispatcher, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ScrollDispatcher, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.Platform }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [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 * Sends an event when the directive's element is scrolled. Registers itself with the\n * ScrollDispatcher service to include itself as part of its collection of scrolling events that it\n * can be listened to through the service.\n */\nclass CdkScrollable {\n constructor(elementRef, scrollDispatcher, ngZone, dir) {\n this.elementRef = elementRef;\n this.scrollDispatcher = scrollDispatcher;\n this.ngZone = ngZone;\n this.dir = dir;\n this._destroyed = new Subject();\n this._elementScrolled = new Observable((observer) => this.ngZone.runOutsideAngular(() => fromEvent(this.elementRef.nativeElement, 'scroll')\n .pipe(takeUntil(this._destroyed))\n .subscribe(observer)));\n }\n ngOnInit() {\n this.scrollDispatcher.register(this);\n }\n ngOnDestroy() {\n this.scrollDispatcher.deregister(this);\n this._destroyed.next();\n this._destroyed.complete();\n }\n /** Returns observable that emits when a scroll event is fired on the host element. */\n elementScrolled() {\n return this._elementScrolled;\n }\n /** Gets the ElementRef for the viewport. */\n getElementRef() {\n return this.elementRef;\n }\n /**\n * Scrolls to the specified offsets. This is a normalized version of the browser's native scrollTo\n * method, since browsers are not consistent about what scrollLeft means in RTL. For this method\n * left and right always refer to the left and right side of the scrolling container irrespective\n * of the layout direction. start and end refer to left and right in an LTR context and vice-versa\n * in an RTL context.\n * @param options specified the offsets to scroll to.\n */\n scrollTo(options) {\n const el = this.elementRef.nativeElement;\n const isRtl = this.dir && this.dir.value == 'rtl';\n // Rewrite start & end offsets as right or left offsets.\n if (options.left == null) {\n options.left = isRtl ? options.end : options.start;\n }\n if (options.right == null) {\n options.right = isRtl ? options.start : options.end;\n }\n // Rewrite the bottom offset as a top offset.\n if (options.bottom != null) {\n options.top =\n el.scrollHeight - el.clientHeight - options.bottom;\n }\n // Rewrite the right offset as a left offset.\n if (isRtl && getRtlScrollAxisType() != 0 /* RtlScrollAxisType.NORMAL */) {\n if (options.left != null) {\n options.right =\n el.scrollWidth - el.clientWidth - options.left;\n }\n if (getRtlScrollAxisType() == 2 /* RtlScrollAxisType.INVERTED */) {\n options.left = options.right;\n }\n else if (getRtlScrollAxisType() == 1 /* RtlScrollAxisType.NEGATED */) {\n options.left = options.right ? -options.right : options.right;\n }\n }\n else {\n if (options.right != null) {\n options.left =\n el.scrollWidth - el.clientWidth - options.right;\n }\n }\n this._applyScrollToOptions(options);\n }\n _applyScrollToOptions(options) {\n const el = this.elementRef.nativeElement;\n if (supportsScrollBehavior()) {\n el.scrollTo(options);\n }\n else {\n if (options.top != null) {\n el.scrollTop = options.top;\n }\n if (options.left != null) {\n el.scrollLeft = options.left;\n }\n }\n }\n /**\n * Measures the scroll offset relative to the specified edge of the viewport. This method can be\n * used instead of directly checking scrollLeft or scrollTop, since browsers are not consistent\n * about what scrollLeft means in RTL. The values returned by this method are normalized such that\n * left and right always refer to the left and right side of the scrolling container irrespective\n * of the layout direction. start and end refer to left and right in an LTR context and vice-versa\n * in an RTL context.\n * @param from The edge to measure from.\n */\n measureScrollOffset(from) {\n const LEFT = 'left';\n const RIGHT = 'right';\n const el = this.elementRef.nativeElement;\n if (from == 'top') {\n return el.scrollTop;\n }\n if (from == 'bottom') {\n return el.scrollHeight - el.clientHeight - el.scrollTop;\n }\n // Rewrite start & end as left or right offsets.\n const isRtl = this.dir && this.dir.value == 'rtl';\n if (from == 'start') {\n from = isRtl ? RIGHT : LEFT;\n }\n else if (from == 'end') {\n from = isRtl ? LEFT : RIGHT;\n }\n if (isRtl && getRtlScrollAxisType() == 2 /* RtlScrollAxisType.INVERTED */) {\n // For INVERTED, scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and\n // 0 when scrolled all the way right.\n if (from == LEFT) {\n return el.scrollWidth - el.clientWidth - el.scrollLeft;\n }\n else {\n return el.scrollLeft;\n }\n }\n else if (isRtl && getRtlScrollAxisType() == 1 /* RtlScrollAxisType.NEGATED */) {\n // For NEGATED, scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and\n // 0 when scrolled all the way right.\n if (from == LEFT) {\n return el.scrollLeft + el.scrollWidth - el.clientWidth;\n }\n else {\n return -el.scrollLeft;\n }\n }\n else {\n // For NORMAL, as well as non-RTL contexts, scrollLeft is 0 when scrolled all the way left and\n // (scrollWidth - clientWidth) when scrolled all the way right.\n if (from == LEFT) {\n return el.scrollLeft;\n }\n else {\n return el.scrollWidth - el.clientWidth - el.scrollLeft;\n }\n }\n }\n}\nCdkScrollable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkScrollable, deps: [{ token: i0.ElementRef }, { token: ScrollDispatcher }, { token: i0.NgZone }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkScrollable.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkScrollable, selector: \"[cdk-scrollable], [cdkScrollable]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkScrollable, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdk-scrollable], [cdkScrollable]',\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ScrollDispatcher }, { type: i0.NgZone }, { type: i2.Directionality, decorators: [{\n type: Optional\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Time in ms to throttle the resize events by default. */\nconst DEFAULT_RESIZE_TIME = 20;\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * @docs-private\n */\nclass ViewportRuler {\n constructor(_platform, ngZone, document) {\n this._platform = _platform;\n /** Stream of viewport change events. */\n this._change = new Subject();\n /** Event listener that will be used to handle the viewport change events. */\n this._changeListener = (event) => {\n this._change.next(event);\n };\n this._document = document;\n ngZone.runOutsideAngular(() => {\n if (_platform.isBrowser) {\n const window = this._getWindow();\n // Note that bind the events ourselves, rather than going through something like RxJS's\n // `fromEvent` so that we can ensure that they're bound outside of the NgZone.\n window.addEventListener('resize', this._changeListener);\n window.addEventListener('orientationchange', this._changeListener);\n }\n // Clear the cached position so that the viewport is re-measured next time it is required.\n // We don't need to keep track of the subscription, because it is completed on destroy.\n this.change().subscribe(() => (this._viewportSize = null));\n });\n }\n ngOnDestroy() {\n if (this._platform.isBrowser) {\n const window = this._getWindow();\n window.removeEventListener('resize', this._changeListener);\n window.removeEventListener('orientationchange', this._changeListener);\n }\n this._change.complete();\n }\n /** Returns the viewport's width and height. */\n getViewportSize() {\n if (!this._viewportSize) {\n this._updateViewportSize();\n }\n const output = { width: this._viewportSize.width, height: this._viewportSize.height };\n // If we're not on a browser, don't cache the size since it'll be mocked out anyway.\n if (!this._platform.isBrowser) {\n this._viewportSize = null;\n }\n return output;\n }\n /** Gets a ClientRect for the viewport's bounds. */\n getViewportRect() {\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n const scrollPosition = this.getViewportScrollPosition();\n const { width, height } = this.getViewportSize();\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height,\n width,\n };\n }\n /** Gets the (top, left) scroll position of the viewport. */\n getViewportScrollPosition() {\n // While we can get a reference to the fake document\n // during SSR, it doesn't have getBoundingClientRect.\n if (!this._platform.isBrowser) {\n return { top: 0, left: 0 };\n }\n // The top-left-corner of the viewport is determined by the scroll position of the document\n // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about\n // whether `document.body` or `document.documentElement` is the scrolled element, so reading\n // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of\n // `document.documentElement` works consistently, where the `top` and `left` values will\n // equal negative the scroll position.\n const document = this._document;\n const window = this._getWindow();\n const documentElement = document.documentElement;\n const documentRect = documentElement.getBoundingClientRect();\n const top = -documentRect.top ||\n document.body.scrollTop ||\n window.scrollY ||\n documentElement.scrollTop ||\n 0;\n const left = -documentRect.left ||\n document.body.scrollLeft ||\n window.scrollX ||\n documentElement.scrollLeft ||\n 0;\n return { top, left };\n }\n /**\n * Returns a stream that emits whenever the size of the viewport changes.\n * This stream emits outside of the Angular zone.\n * @param throttleTime Time in milliseconds to throttle the stream.\n */\n change(throttleTime = DEFAULT_RESIZE_TIME) {\n return throttleTime > 0 ? this._change.pipe(auditTime(throttleTime)) : this._change;\n }\n /** Use defaultView of injected document if available or fallback to global window reference */\n _getWindow() {\n return this._document.defaultView || window;\n }\n /** Updates the cached viewport size. */\n _updateViewportSize() {\n const window = this._getWindow();\n this._viewportSize = this._platform.isBrowser\n ? { width: window.innerWidth, height: window.innerHeight }\n : { width: 0, height: 0 };\n }\n}\nViewportRuler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ViewportRuler, deps: [{ token: i1.Platform }, { token: i0.NgZone }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nViewportRuler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ViewportRuler, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ViewportRuler, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.Platform }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [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 */\nconst VIRTUAL_SCROLLABLE = new InjectionToken('VIRTUAL_SCROLLABLE');\n/**\n * Extending the {@link CdkScrollable} to be used as scrolling container for virtual scrolling.\n */\nclass CdkVirtualScrollable extends CdkScrollable {\n constructor(elementRef, scrollDispatcher, ngZone, dir) {\n super(elementRef, scrollDispatcher, ngZone, dir);\n }\n /**\n * Measure the viewport size for the provided orientation.\n *\n * @param orientation The orientation to measure the size from.\n */\n measureViewportSize(orientation) {\n const viewportEl = this.elementRef.nativeElement;\n return orientation === 'horizontal' ? viewportEl.clientWidth : viewportEl.clientHeight;\n }\n}\nCdkVirtualScrollable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkVirtualScrollable, deps: [{ token: i0.ElementRef }, { token: ScrollDispatcher }, { token: i0.NgZone }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkVirtualScrollable.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkVirtualScrollable, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkVirtualScrollable, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ScrollDispatcher }, { type: i0.NgZone }, { type: i2.Directionality, decorators: [{\n type: Optional\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Checks if the given ranges are equal. */\nfunction rangesEqual(r1, r2) {\n return r1.start == r2.start && r1.end == r2.end;\n}\n/**\n * Scheduler to be used for scroll events. Needs to fall back to\n * something that doesn't rely on requestAnimationFrame on environments\n * that don't support it (e.g. server-side rendering).\n */\nconst SCROLL_SCHEDULER = typeof requestAnimationFrame !== 'undefined' ? animationFrameScheduler : asapScheduler;\n/** A viewport that virtualizes its scrolling with the help of `CdkVirtualForOf`. */\nclass CdkVirtualScrollViewport extends CdkVirtualScrollable {\n constructor(elementRef, _changeDetectorRef, ngZone, _scrollStrategy, dir, scrollDispatcher, viewportRuler, scrollable) {\n super(elementRef, scrollDispatcher, ngZone, dir);\n this.elementRef = elementRef;\n this._changeDetectorRef = _changeDetectorRef;\n this._scrollStrategy = _scrollStrategy;\n this.scrollable = scrollable;\n /** Emits when the viewport is detached from a CdkVirtualForOf. */\n this._detachedSubject = new Subject();\n /** Emits when the rendered range changes. */\n this._renderedRangeSubject = new Subject();\n this._orientation = 'vertical';\n this._appendOnly = false;\n // Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll\n // strategy lazily (i.e. only if the user is actually listening to the events). We do this because\n // depending on how the strategy calculates the scrolled index, it may come at a cost to\n // performance.\n /** Emits when the index of the first element visible in the viewport changes. */\n this.scrolledIndexChange = new Observable((observer) => this._scrollStrategy.scrolledIndexChange.subscribe(index => Promise.resolve().then(() => this.ngZone.run(() => observer.next(index)))));\n /** A stream that emits whenever the rendered range changes. */\n this.renderedRangeStream = this._renderedRangeSubject;\n /**\n * The total size of all content (in pixels), including content that is not currently rendered.\n */\n this._totalContentSize = 0;\n /** A string representing the `style.width` property value to be used for the spacer element. */\n this._totalContentWidth = '';\n /** A string representing the `style.height` property value to be used for the spacer element. */\n this._totalContentHeight = '';\n /** The currently rendered range of indices. */\n this._renderedRange = { start: 0, end: 0 };\n /** The length of the data bound to this viewport (in number of items). */\n this._dataLength = 0;\n /** The size of the viewport (in pixels). */\n this._viewportSize = 0;\n /** The last rendered content offset that was set. */\n this._renderedContentOffset = 0;\n /**\n * Whether the last rendered content offset was to the end of the content (and therefore needs to\n * be rewritten as an offset to the start of the content).\n */\n this._renderedContentOffsetNeedsRewrite = false;\n /** Whether there is a pending change detection cycle. */\n this._isChangeDetectionPending = false;\n /** A list of functions to run after the next change detection cycle. */\n this._runAfterChangeDetection = [];\n /** Subscription to changes in the viewport size. */\n this._viewportChanges = Subscription.EMPTY;\n if (!_scrollStrategy && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Error: cdk-virtual-scroll-viewport requires the \"itemSize\" property to be set.');\n }\n this._viewportChanges = viewportRuler.change().subscribe(() => {\n this.checkViewportSize();\n });\n if (!this.scrollable) {\n // No scrollable is provided, so the virtual-scroll-viewport needs to become a scrollable\n this.elementRef.nativeElement.classList.add('cdk-virtual-scrollable');\n this.scrollable = this;\n }\n }\n /** The direction the viewport scrolls. */\n get orientation() {\n return this._orientation;\n }\n set orientation(orientation) {\n if (this._orientation !== orientation) {\n this._orientation = orientation;\n this._calculateSpacerSize();\n }\n }\n /**\n * Whether rendered items should persist in the DOM after scrolling out of view. By default, items\n * will be removed.\n */\n get appendOnly() {\n return this._appendOnly;\n }\n set appendOnly(value) {\n this._appendOnly = coerceBooleanProperty(value);\n }\n ngOnInit() {\n if (this.scrollable === this) {\n super.ngOnInit();\n }\n // It's still too early to measure the viewport at this point. Deferring with a promise allows\n // the Viewport to be rendered with the correct size before we measure. We run this outside the\n // zone to avoid causing more change detection cycles. We handle the change detection loop\n // ourselves instead.\n this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {\n this._measureViewportSize();\n this._scrollStrategy.attach(this);\n this.scrollable\n .elementScrolled()\n .pipe(\n // Start off with a fake scroll event so we properly detect our initial position.\n startWith(null), \n // Collect multiple events into one until the next animation frame. This way if\n // there are multiple scroll events in the same frame we only need to recheck\n // our layout once.\n auditTime(0, SCROLL_SCHEDULER))\n .subscribe(() => this._scrollStrategy.onContentScrolled());\n this._markChangeDetectionNeeded();\n }));\n }\n ngOnDestroy() {\n this.detach();\n this._scrollStrategy.detach();\n // Complete all subjects\n this._renderedRangeSubject.complete();\n this._detachedSubject.complete();\n this._viewportChanges.unsubscribe();\n super.ngOnDestroy();\n }\n /** Attaches a `CdkVirtualScrollRepeater` to this viewport. */\n attach(forOf) {\n if (this._forOf && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('CdkVirtualScrollViewport is already attached.');\n }\n // Subscribe to the data stream of the CdkVirtualForOf to keep track of when the data length\n // changes. Run outside the zone to avoid triggering change detection, since we're managing the\n // change detection loop ourselves.\n this.ngZone.runOutsideAngular(() => {\n this._forOf = forOf;\n this._forOf.dataStream.pipe(takeUntil(this._detachedSubject)).subscribe(data => {\n const newLength = data.length;\n if (newLength !== this._dataLength) {\n this._dataLength = newLength;\n this._scrollStrategy.onDataLengthChanged();\n }\n this._doChangeDetection();\n });\n });\n }\n /** Detaches the current `CdkVirtualForOf`. */\n detach() {\n this._forOf = null;\n this._detachedSubject.next();\n }\n /** Gets the length of the data bound to this viewport (in number of items). */\n getDataLength() {\n return this._dataLength;\n }\n /** Gets the size of the viewport (in pixels). */\n getViewportSize() {\n return this._viewportSize;\n }\n // TODO(mmalerba): This is technically out of sync with what's really rendered until a render\n // cycle happens. I'm being careful to only call it after the render cycle is complete and before\n // setting it to something else, but its error prone and should probably be split into\n // `pendingRange` and `renderedRange`, the latter reflecting whats actually in the DOM.\n /** Get the current rendered range of items. */\n getRenderedRange() {\n return this._renderedRange;\n }\n measureBoundingClientRectWithScrollOffset(from) {\n return this.getElementRef().nativeElement.getBoundingClientRect()[from];\n }\n /**\n * Sets the total size of all content (in pixels), including content that is not currently\n * rendered.\n */\n setTotalContentSize(size) {\n if (this._totalContentSize !== size) {\n this._totalContentSize = size;\n this._calculateSpacerSize();\n this._markChangeDetectionNeeded();\n }\n }\n /** Sets the currently rendered range of indices. */\n setRenderedRange(range) {\n if (!rangesEqual(this._renderedRange, range)) {\n if (this.appendOnly) {\n range = { start: 0, end: Math.max(this._renderedRange.end, range.end) };\n }\n this._renderedRangeSubject.next((this._renderedRange = range));\n this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered());\n }\n }\n /**\n * Gets the offset from the start of the viewport to the start of the rendered data (in pixels).\n */\n getOffsetToRenderedContentStart() {\n return this._renderedContentOffsetNeedsRewrite ? null : this._renderedContentOffset;\n }\n /**\n * Sets the offset from the start of the viewport to either the start or end of the rendered data\n * (in pixels).\n */\n setRenderedContentOffset(offset, to = 'to-start') {\n // In appendOnly, we always start from the top\n offset = this.appendOnly && to === 'to-start' ? 0 : offset;\n // For a horizontal viewport in a right-to-left language we need to translate along the x-axis\n // in the negative direction.\n const isRtl = this.dir && this.dir.value == 'rtl';\n const isHorizontal = this.orientation == 'horizontal';\n const axis = isHorizontal ? 'X' : 'Y';\n const axisDirection = isHorizontal && isRtl ? -1 : 1;\n let transform = `translate${axis}(${Number(axisDirection * offset)}px)`;\n this._renderedContentOffset = offset;\n if (to === 'to-end') {\n transform += ` translate${axis}(-100%)`;\n // The viewport should rewrite this as a `to-start` offset on the next render cycle. Otherwise\n // elements will appear to expand in the wrong direction (e.g. `mat-expansion-panel` would\n // expand upward).\n this._renderedContentOffsetNeedsRewrite = true;\n }\n if (this._renderedContentTransform != transform) {\n // We know this value is safe because we parse `offset` with `Number()` before passing it\n // into the string.\n this._renderedContentTransform = transform;\n this._markChangeDetectionNeeded(() => {\n if (this._renderedContentOffsetNeedsRewrite) {\n this._renderedContentOffset -= this.measureRenderedContentSize();\n this._renderedContentOffsetNeedsRewrite = false;\n this.setRenderedContentOffset(this._renderedContentOffset);\n }\n else {\n this._scrollStrategy.onRenderedOffsetChanged();\n }\n });\n }\n }\n /**\n * Scrolls to the given offset from the start of the viewport. Please note that this is not always\n * the same as setting `scrollTop` or `scrollLeft`. In a horizontal viewport with right-to-left\n * direction, this would be the equivalent of setting a fictional `scrollRight` property.\n * @param offset The offset to scroll to.\n * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.\n */\n scrollToOffset(offset, behavior = 'auto') {\n const options = { behavior };\n if (this.orientation === 'horizontal') {\n options.start = offset;\n }\n else {\n options.top = offset;\n }\n this.scrollable.scrollTo(options);\n }\n /**\n * Scrolls to the offset for the given index.\n * @param index The index of the element to scroll to.\n * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.\n */\n scrollToIndex(index, behavior = 'auto') {\n this._scrollStrategy.scrollToIndex(index, behavior);\n }\n /**\n * Gets the current scroll offset from the start of the scrollable (in pixels).\n * @param from The edge to measure the offset from. Defaults to 'top' in vertical mode and 'start'\n * in horizontal mode.\n */\n measureScrollOffset(from) {\n // This is to break the call cycle\n let measureScrollOffset;\n if (this.scrollable == this) {\n measureScrollOffset = (_from) => super.measureScrollOffset(_from);\n }\n else {\n measureScrollOffset = (_from) => this.scrollable.measureScrollOffset(_from);\n }\n return Math.max(0, measureScrollOffset(from ?? (this.orientation === 'horizontal' ? 'start' : 'top')) -\n this.measureViewportOffset());\n }\n /**\n * Measures the offset of the viewport from the scrolling container\n * @param from The edge to measure from.\n */\n measureViewportOffset(from) {\n let fromRect;\n const LEFT = 'left';\n const RIGHT = 'right';\n const isRtl = this.dir?.value == 'rtl';\n if (from == 'start') {\n fromRect = isRtl ? RIGHT : LEFT;\n }\n else if (from == 'end') {\n fromRect = isRtl ? LEFT : RIGHT;\n }\n else if (from) {\n fromRect = from;\n }\n else {\n fromRect = this.orientation === 'horizontal' ? 'left' : 'top';\n }\n const scrollerClientRect = this.scrollable.measureBoundingClientRectWithScrollOffset(fromRect);\n const viewportClientRect = this.elementRef.nativeElement.getBoundingClientRect()[fromRect];\n return viewportClientRect - scrollerClientRect;\n }\n /** Measure the combined size of all of the rendered items. */\n measureRenderedContentSize() {\n const contentEl = this._contentWrapper.nativeElement;\n return this.orientation === 'horizontal' ? contentEl.offsetWidth : contentEl.offsetHeight;\n }\n /**\n * Measure the total combined size of the given range. Throws if the range includes items that are\n * not rendered.\n */\n measureRangeSize(range) {\n if (!this._forOf) {\n return 0;\n }\n return this._forOf.measureRangeSize(range, this.orientation);\n }\n /** Update the viewport dimensions and re-render. */\n checkViewportSize() {\n // TODO: Cleanup later when add logic for handling content resize\n this._measureViewportSize();\n this._scrollStrategy.onDataLengthChanged();\n }\n /** Measure the viewport size. */\n _measureViewportSize() {\n this._viewportSize = this.scrollable.measureViewportSize(this.orientation);\n }\n /** Queue up change detection to run. */\n _markChangeDetectionNeeded(runAfter) {\n if (runAfter) {\n this._runAfterChangeDetection.push(runAfter);\n }\n // Use a Promise to batch together calls to `_doChangeDetection`. This way if we set a bunch of\n // properties sequentially we only have to run `_doChangeDetection` once at the end.\n if (!this._isChangeDetectionPending) {\n this._isChangeDetectionPending = true;\n this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {\n this._doChangeDetection();\n }));\n }\n }\n /** Run change detection. */\n _doChangeDetection() {\n this._isChangeDetectionPending = false;\n // Apply the content transform. The transform can't be set via an Angular binding because\n // bypassSecurityTrustStyle is banned in Google. However the value is safe, it's composed of\n // string literals, a variable that can only be 'X' or 'Y', and user input that is run through\n // the `Number` function first to coerce it to a numeric value.\n this._contentWrapper.nativeElement.style.transform = this._renderedContentTransform;\n // Apply changes to Angular bindings. Note: We must call `markForCheck` to run change detection\n // from the root, since the repeated items are content projected in. Calling `detectChanges`\n // instead does not properly check the projected content.\n this.ngZone.run(() => this._changeDetectorRef.markForCheck());\n const runAfterChangeDetection = this._runAfterChangeDetection;\n this._runAfterChangeDetection = [];\n for (const fn of runAfterChangeDetection) {\n fn();\n }\n }\n /** Calculates the `style.width` and `style.height` for the spacer element. */\n _calculateSpacerSize() {\n this._totalContentHeight =\n this.orientation === 'horizontal' ? '' : `${this._totalContentSize}px`;\n this._totalContentWidth =\n this.orientation === 'horizontal' ? `${this._totalContentSize}px` : '';\n }\n}\nCdkVirtualScrollViewport.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkVirtualScrollViewport, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: VIRTUAL_SCROLL_STRATEGY, optional: true }, { token: i2.Directionality, optional: true }, { token: ScrollDispatcher }, { token: ViewportRuler }, { token: VIRTUAL_SCROLLABLE, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nCdkVirtualScrollViewport.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkVirtualScrollViewport, selector: \"cdk-virtual-scroll-viewport\", inputs: { orientation: \"orientation\", appendOnly: \"appendOnly\" }, outputs: { scrolledIndexChange: \"scrolledIndexChange\" }, host: { properties: { \"class.cdk-virtual-scroll-orientation-horizontal\": \"orientation === \\\"horizontal\\\"\", \"class.cdk-virtual-scroll-orientation-vertical\": \"orientation !== \\\"horizontal\\\"\" }, classAttribute: \"cdk-virtual-scroll-viewport\" }, providers: [\n {\n provide: CdkScrollable,\n useFactory: (virtualScrollable, viewport) => virtualScrollable || viewport,\n deps: [CdkVirtualScrollable, CdkVirtualScrollViewport],\n },\n ], viewQueries: [{ propertyName: \"_contentWrapper\", first: true, predicate: [\"contentWrapper\"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: \"<!--\\n Wrap the rendered content in an element that will be used to offset it based on the scroll\\n position.\\n-->\\n<div #contentWrapper class=\\\"cdk-virtual-scroll-content-wrapper\\\">\\n <ng-content></ng-content>\\n</div>\\n<!--\\n Spacer used to force the scrolling container to the correct size for the *total* number of items\\n so that the scrollbar captures the size of the entire data set.\\n-->\\n<div class=\\\"cdk-virtual-scroll-spacer\\\"\\n [style.width]=\\\"_totalContentWidth\\\" [style.height]=\\\"_totalContentHeight\\\"></div>\\n\", styles: [\"cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkVirtualScrollViewport, decorators: [{\n type: Component,\n args: [{ selector: 'cdk-virtual-scroll-viewport', host: {\n 'class': 'cdk-virtual-scroll-viewport',\n '[class.cdk-virtual-scroll-orientation-horizontal]': 'orientation === \"horizontal\"',\n '[class.cdk-virtual-scroll-orientation-vertical]': 'orientation !== \"horizontal\"',\n }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [\n {\n provide: CdkScrollable,\n useFactory: (virtualScrollable, viewport) => virtualScrollable || viewport,\n deps: [CdkVirtualScrollable, CdkVirtualScrollViewport],\n },\n ], template: \"<!--\\n Wrap the rendered content in an element that will be used to offset it based on the scroll\\n position.\\n-->\\n<div #contentWrapper class=\\\"cdk-virtual-scroll-content-wrapper\\\">\\n <ng-content></ng-content>\\n</div>\\n<!--\\n Spacer used to force the scrolling container to the correct size for the *total* number of items\\n so that the scrollbar captures the size of the entire data set.\\n-->\\n<div class=\\\"cdk-virtual-scroll-spacer\\\"\\n [style.width]=\\\"_totalContentWidth\\\" [style.height]=\\\"_totalContentHeight\\\"></div>\\n\", styles: [\"cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [VIRTUAL_SCROLL_STRATEGY]\n }] }, { type: i2.Directionality, decorators: [{\n type: Optional\n }] }, { type: ScrollDispatcher }, { type: ViewportRuler }, { type: CdkVirtualScrollable, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [VIRTUAL_SCROLLABLE]\n }] }]; }, propDecorators: { orientation: [{\n type: Input\n }], appendOnly: [{\n type: Input\n }], scrolledIndexChange: [{\n type: Output\n }], _contentWrapper: [{\n type: ViewChild,\n args: ['contentWrapper', { static: 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/** Helper to extract the offset of a DOM Node in a certain direction. */\nfunction getOffset(orientation, direction, node) {\n const el = node;\n if (!el.getBoundingClientRect) {\n return 0;\n }\n const rect = el.getBoundingClientRect();\n if (orientation === 'horizontal') {\n return direction === 'start' ? rect.left : rect.right;\n }\n return direction === 'start' ? rect.top : rect.bottom;\n}\n/**\n * A directive similar to `ngForOf` to be used for rendering data inside a virtual scrolling\n * container.\n */\nclass CdkVirtualForOf {\n constructor(\n /** The view container to add items to. */\n _viewContainerRef, \n /** The template to use when stamping out new items. */\n _template, \n /** The set of available differs. */\n _differs, \n /** The strategy used to render items in the virtual scroll viewport. */\n _viewRepeater, \n /** The virtual scrolling viewport that these items are being rendered in. */\n _viewport, ngZone) {\n this._viewContainerRef = _viewContainerRef;\n this._template = _template;\n this._differs = _differs;\n this._viewRepeater = _viewRepeater;\n this._viewport = _viewport;\n /** Emits when the rendered view of the data changes. */\n this.viewChange = new Subject();\n /** Subject that emits when a new DataSource instance is given. */\n this._dataSourceChanges = new Subject();\n /** Emits whenever the data in the current DataSource changes. */\n this.dataStream = this._dataSourceChanges.pipe(\n // Start off with null `DataSource`.\n startWith(null), \n // Bundle up the previous and current data sources so we can work with both.\n pairwise(), \n // Use `_changeDataSource` to disconnect from the previous data source and connect to the\n // new one, passing back a stream of data changes which we run through `switchMap` to give\n // us a data stream that emits the latest data from whatever the current `DataSource` is.\n switchMap(([prev, cur]) => this._changeDataSource(prev, cur)), \n // Replay the last emitted data when someone subscribes.\n shareReplay(1));\n /** The differ used to calculate changes to the data. */\n this._differ = null;\n /** Whether the rendered data should be updated during the next ngDoCheck cycle. */\n this._needsUpdate = false;\n this._destroyed = new Subject();\n this.dataStream.subscribe(data => {\n this._data = data;\n this._onRenderedDataChange();\n });\n this._viewport.renderedRangeStream.pipe(takeUntil(this._destroyed)).subscribe(range => {\n this._renderedRange = range;\n if (this.viewChange.observers.length) {\n ngZone.run(() => this.viewChange.next(this._renderedRange));\n }\n this._onRenderedDataChange();\n });\n this._viewport.attach(this);\n }\n /** The DataSource to display. */\n get cdkVirtualForOf() {\n return this._cdkVirtualForOf;\n }\n set cdkVirtualForOf(value) {\n this._cdkVirtualForOf = value;\n if (isDataSource(value)) {\n this._dataSourceChanges.next(value);\n }\n else {\n // If value is an an NgIterable, convert it to an array.\n this._dataSourceChanges.next(new ArrayDataSource(isObservable(value) ? value : Array.from(value || [])));\n }\n }\n /**\n * The `TrackByFunction` to use for tracking changes. The `TrackByFunction` takes the index and\n * the item and produces a value to be used as the item's identity when tracking changes.\n */\n get cdkVirtualForTrackBy() {\n return this._cdkVirtualForTrackBy;\n }\n set cdkVirtualForTrackBy(fn) {\n this._needsUpdate = true;\n this._cdkVirtualForTrackBy = fn\n ? (index, item) => fn(index + (this._renderedRange ? this._renderedRange.start : 0), item)\n : undefined;\n }\n /** The template used to stamp out new elements. */\n set cdkVirtualForTemplate(value) {\n if (value) {\n this._needsUpdate = true;\n this._template = value;\n }\n }\n /**\n * The size of the cache used to store templates that are not being used for re-use later.\n * Setting the cache size to `0` will disable caching. Defaults to 20 templates.\n */\n get cdkVirtualForTemplateCacheSize() {\n return this._viewRepeater.viewCacheSize;\n }\n set cdkVirtualForTemplateCacheSize(size) {\n this._viewRepeater.viewCacheSize = coerceNumberProperty(size);\n }\n /**\n * Measures the combined size (width for horizontal orientation, height for vertical) of all items\n * in the specified range. Throws an error if the range includes items that are not currently\n * rendered.\n */\n measureRangeSize(range, orientation) {\n if (range.start >= range.end) {\n return 0;\n }\n if ((range.start < this._renderedRange.start || range.end > this._renderedRange.end) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Error: attempted to measure an item that isn't rendered.`);\n }\n // The index into the list of rendered views for the first item in the range.\n const renderedStartIndex = range.start - this._renderedRange.start;\n // The length of the range we're measuring.\n const rangeLen = range.end - range.start;\n // Loop over all the views, find the first and land node and compute the size by subtracting\n // the top of the first node from the bottom of the last one.\n let firstNode;\n let lastNode;\n // Find the first node by starting from the beginning and going forwards.\n for (let i = 0; i < rangeLen; i++) {\n const view = this._viewContainerRef.get(i + renderedStartIndex);\n if (view && view.rootNodes.length) {\n firstNode = lastNode = view.rootNodes[0];\n break;\n }\n }\n // Find the last node by starting from the end and going backwards.\n for (let i = rangeLen - 1; i > -1; i--) {\n const view = this._viewContainerRef.get(i + renderedStartIndex);\n if (view && view.rootNodes.length) {\n lastNode = view.rootNodes[view.rootNodes.length - 1];\n break;\n }\n }\n return firstNode && lastNode\n ? getOffset(orientation, 'end', lastNode) - getOffset(orientation, 'start', firstNode)\n : 0;\n }\n ngDoCheck() {\n if (this._differ && this._needsUpdate) {\n // TODO(mmalerba): We should differentiate needs update due to scrolling and a new portion of\n // this list being rendered (can use simpler algorithm) vs needs update due to data actually\n // changing (need to do this diff).\n const changes = this._differ.diff(this._renderedItems);\n if (!changes) {\n this._updateContext();\n }\n else {\n this._applyChanges(changes);\n }\n this._needsUpdate = false;\n }\n }\n ngOnDestroy() {\n this._viewport.detach();\n this._dataSourceChanges.next(undefined);\n this._dataSourceChanges.complete();\n this.viewChange.complete();\n this._destroyed.next();\n this._destroyed.complete();\n this._viewRepeater.detach();\n }\n /** React to scroll state changes in the viewport. */\n _onRenderedDataChange() {\n if (!this._renderedRange) {\n return;\n }\n this._renderedItems = this._data.slice(this._renderedRange.start, this._renderedRange.end);\n if (!this._differ) {\n // Use a wrapper function for the `trackBy` so any new values are\n // picked up automatically without having to recreate the differ.\n this._differ = this._differs.find(this._renderedItems).create((index, item) => {\n return this.cdkVirtualForTrackBy ? this.cdkVirtualForTrackBy(index, item) : item;\n });\n }\n this._needsUpdate = true;\n }\n /** Swap out one `DataSource` for another. */\n _changeDataSource(oldDs, newDs) {\n if (oldDs) {\n oldDs.disconnect(this);\n }\n this._needsUpdate = true;\n return newDs ? newDs.connect(this) : of();\n }\n /** Update the `CdkVirtualForOfContext` for all views. */\n _updateContext() {\n const count = this._data.length;\n let i = this._viewContainerRef.length;\n while (i--) {\n const view = this._viewContainerRef.get(i);\n view.context.index = this._renderedRange.start + i;\n view.context.count = count;\n this._updateComputedContextProperties(view.context);\n view.detectChanges();\n }\n }\n /** Apply changes to the DOM. */\n _applyChanges(changes) {\n this._viewRepeater.applyChanges(changes, this._viewContainerRef, (record, _adjustedPreviousIndex, currentIndex) => this._getEmbeddedViewArgs(record, currentIndex), record => record.item);\n // Update $implicit for any items that had an identity change.\n changes.forEachIdentityChange((record) => {\n const view = this._viewContainerRef.get(record.currentIndex);\n view.context.$implicit = record.item;\n });\n // Update the context variables on all items.\n const count = this._data.length;\n let i = this._viewContainerRef.length;\n while (i--) {\n const view = this._viewContainerRef.get(i);\n view.context.index = this._renderedRange.start + i;\n view.context.count = count;\n this._updateComputedContextProperties(view.context);\n }\n }\n /** Update the computed properties on the `CdkVirtualForOfContext`. */\n _updateComputedContextProperties(context) {\n context.first = context.index === 0;\n context.last = context.index === context.count - 1;\n context.even = context.index % 2 === 0;\n context.odd = !context.even;\n }\n _getEmbeddedViewArgs(record, index) {\n // Note that it's important that we insert the item directly at the proper index,\n // rather than inserting it and the moving it in place, because if there's a directive\n // on the same node that injects the `ViewContainerRef`, Angular will insert another\n // comment node which can throw off the move when it's being repeated for all items.\n return {\n templateRef: this._template,\n context: {\n $implicit: record.item,\n // It's guaranteed that the iterable is not \"undefined\" or \"null\" because we only\n // generate views for elements if the \"cdkVirtualForOf\" iterable has elements.\n cdkVirtualForOf: this._cdkVirtualForOf,\n index: -1,\n count: -1,\n first: false,\n last: false,\n odd: false,\n even: false,\n },\n index,\n };\n }\n}\nCdkVirtualForOf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkVirtualForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }, { token: _VIEW_REPEATER_STRATEGY }, { token: CdkVirtualScrollViewport, skipSelf: true }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });\nCdkVirtualForOf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkVirtualForOf, selector: \"[cdkVirtualFor][cdkVirtualForOf]\", inputs: { cdkVirtualForOf: \"cdkVirtualForOf\", cdkVirtualForTrackBy: \"cdkVirtualForTrackBy\", cdkVirtualForTemplate: \"cdkVirtualForTemplate\", cdkVirtualForTemplateCacheSize: \"cdkVirtualForTemplateCacheSize\" }, providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkVirtualForOf, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkVirtualFor][cdkVirtualForOf]',\n providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }],\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i0.IterableDiffers }, { type: i2$1._RecycleViewRepeaterStrategy, decorators: [{\n type: Inject,\n args: [_VIEW_REPEATER_STRATEGY]\n }] }, { type: CdkVirtualScrollViewport, decorators: [{\n type: SkipSelf\n }] }, { type: i0.NgZone }]; }, propDecorators: { cdkVirtualForOf: [{\n type: Input\n }], cdkVirtualForTrackBy: [{\n type: Input\n }], cdkVirtualForTemplate: [{\n type: Input\n }], cdkVirtualForTemplateCacheSize: [{\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 * Provides a virtual scrollable for the element it is attached to.\n */\nclass CdkVirtualScrollableElement extends CdkVirtualScrollable {\n constructor(elementRef, scrollDispatcher, ngZone, dir) {\n super(elementRef, scrollDispatcher, ngZone, dir);\n }\n measureBoundingClientRectWithScrollOffset(from) {\n return (this.getElementRef().nativeElement.getBoundingClientRect()[from] -\n this.measureScrollOffset(from));\n }\n}\nCdkVirtualScrollableElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkVirtualScrollableElement, deps: [{ token: i0.ElementRef }, { token: ScrollDispatcher }, { token: i0.NgZone }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkVirtualScrollableElement.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkVirtualScrollableElement, selector: \"[cdkVirtualScrollingElement]\", host: { classAttribute: \"cdk-virtual-scrollable\" }, providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableElement }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkVirtualScrollableElement, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkVirtualScrollingElement]',\n providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableElement }],\n host: {\n 'class': 'cdk-virtual-scrollable',\n },\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ScrollDispatcher }, { type: i0.NgZone }, { type: i2.Directionality, decorators: [{\n type: Optional\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 as virtual scrollable for the global / window scrollbar.\n */\nclass CdkVirtualScrollableWindow extends CdkVirtualScrollable {\n constructor(scrollDispatcher, ngZone, dir) {\n super(new ElementRef(document.documentElement), scrollDispatcher, ngZone, dir);\n this._elementScrolled = new Observable((observer) => this.ngZone.runOutsideAngular(() => fromEvent(document, 'scroll').pipe(takeUntil(this._destroyed)).subscribe(observer)));\n }\n measureBoundingClientRectWithScrollOffset(from) {\n return this.getElementRef().nativeElement.getBoundingClientRect()[from];\n }\n}\nCdkVirtualScrollableWindow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkVirtualScrollableWindow, deps: [{ token: ScrollDispatcher }, { token: i0.NgZone }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkVirtualScrollableWindow.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkVirtualScrollableWindow, selector: \"cdk-virtual-scroll-viewport[scrollWindow]\", providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableWindow }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkVirtualScrollableWindow, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-virtual-scroll-viewport[scrollWindow]',\n providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableWindow }],\n }]\n }], ctorParameters: function () { return [{ type: ScrollDispatcher }, { type: i0.NgZone }, { type: i2.Directionality, decorators: [{\n type: Optional\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 CdkScrollableModule {\n}\nCdkScrollableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkScrollableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nCdkScrollableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkScrollableModule, declarations: [CdkScrollable], exports: [CdkScrollable] });\nCdkScrollableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkScrollableModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkScrollableModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [CdkScrollable],\n declarations: [CdkScrollable],\n }]\n }] });\n/**\n * @docs-primary-export\n */\nclass ScrollingModule {\n}\nScrollingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ScrollingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nScrollingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: ScrollingModule, declarations: [CdkFixedSizeVirtualScroll,\n CdkVirtualForOf,\n CdkVirtualScrollViewport,\n CdkVirtualScrollableWindow,\n CdkVirtualScrollableElement], imports: [BidiModule, CdkScrollableModule], exports: [BidiModule, CdkScrollableModule, CdkFixedSizeVirtualScroll,\n CdkVirtualForOf,\n CdkVirtualScrollViewport,\n CdkVirtualScrollableWindow,\n CdkVirtualScrollableElement] });\nScrollingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ScrollingModule, imports: [BidiModule, CdkScrollableModule, BidiModule, CdkScrollableModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ScrollingModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [BidiModule, CdkScrollableModule],\n exports: [\n BidiModule,\n CdkScrollableModule,\n CdkFixedSizeVirtualScroll,\n CdkVirtualForOf,\n CdkVirtualScrollViewport,\n CdkVirtualScrollableWindow,\n CdkVirtualScrollableElement,\n ],\n declarations: [\n CdkFixedSizeVirtualScroll,\n CdkVirtualForOf,\n CdkVirtualScrollViewport,\n CdkVirtualScrollableWindow,\n CdkVirtualScrollableElement,\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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Generated bundle index. Do not edit.\n */\n\nexport { CdkFixedSizeVirtualScroll, CdkScrollable, CdkScrollableModule, CdkVirtualForOf, CdkVirtualScrollViewport, CdkVirtualScrollable, CdkVirtualScrollableElement, CdkVirtualScrollableWindow, DEFAULT_RESIZE_TIME, DEFAULT_SCROLL_TIME, FixedSizeVirtualScrollStrategy, ScrollDispatcher, ScrollingModule, VIRTUAL_SCROLLABLE, VIRTUAL_SCROLL_STRATEGY, ViewportRuler, _fixedSizeVirtualScrollStrategyFactory };\n","import * as i0 from '@angular/core';\nimport { ElementRef, Injector, Directive, EventEmitter, Inject, Output, NgModule } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Throws an exception when attempting to attach a null portal to a host.\n * @docs-private\n */\nfunction throwNullPortalError() {\n throw Error('Must provide a portal to attach');\n}\n/**\n * Throws an exception when attempting to attach a portal to a host that is already attached.\n * @docs-private\n */\nfunction throwPortalAlreadyAttachedError() {\n throw Error('Host already has a portal attached');\n}\n/**\n * Throws an exception when attempting to attach a portal to an already-disposed host.\n * @docs-private\n */\nfunction throwPortalOutletAlreadyDisposedError() {\n throw Error('This PortalOutlet has already been disposed');\n}\n/**\n * Throws an exception when attempting to attach an unknown portal type.\n * @docs-private\n */\nfunction throwUnknownPortalTypeError() {\n throw Error('Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' +\n 'a ComponentPortal or a TemplatePortal.');\n}\n/**\n * Throws an exception when attempting to attach a portal to a null host.\n * @docs-private\n */\nfunction throwNullPortalOutletError() {\n throw Error('Attempting to attach a portal to a null PortalOutlet');\n}\n/**\n * Throws an exception when attempting to detach a portal that is not attached.\n * @docs-private\n */\nfunction throwNoPortalAttachedError() {\n throw Error('Attempting to detach a portal that is not attached to a host');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n */\nclass Portal {\n /** Attach this portal to a host. */\n attach(host) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (host == null) {\n throwNullPortalOutletError();\n }\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n }\n this._attachedHost = host;\n return host.attach(this);\n }\n /** Detach this portal from its host */\n detach() {\n let host = this._attachedHost;\n if (host != null) {\n this._attachedHost = null;\n host.detach();\n }\n else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwNoPortalAttachedError();\n }\n }\n /** Whether this portal is attached to a host. */\n get isAttached() {\n return this._attachedHost != null;\n }\n /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n */\n setAttachedHost(host) {\n this._attachedHost = host;\n }\n}\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nclass ComponentPortal extends Portal {\n constructor(component, viewContainerRef, injector, componentFactoryResolver) {\n super();\n this.component = component;\n this.viewContainerRef = viewContainerRef;\n this.injector = injector;\n this.componentFactoryResolver = componentFactoryResolver;\n }\n}\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n */\nclass TemplatePortal extends Portal {\n constructor(\n /** The embedded template that will be used to instantiate an embedded View in the host. */\n templateRef, \n /** Reference to the ViewContainer into which the template will be stamped out. */\n viewContainerRef, \n /** Contextual data to be passed in to the embedded view. */\n context, \n /** The injector to use for the embedded view. */\n injector) {\n super();\n this.templateRef = templateRef;\n this.viewContainerRef = viewContainerRef;\n this.context = context;\n this.injector = injector;\n }\n get origin() {\n return this.templateRef.elementRef;\n }\n /**\n * Attach the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n */\n attach(host, context = this.context) {\n this.context = context;\n return super.attach(host);\n }\n detach() {\n this.context = undefined;\n return super.detach();\n }\n}\n/**\n * A `DomPortal` is a portal whose DOM element will be taken from its current position\n * in the DOM and moved into a portal outlet, when it is attached. On detach, the content\n * will be restored to its original position.\n */\nclass DomPortal extends Portal {\n constructor(element) {\n super();\n this.element = element instanceof ElementRef ? element.nativeElement : element;\n }\n}\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n */\nclass BasePortalOutlet {\n constructor() {\n /** Whether this host has already been permanently disposed. */\n this._isDisposed = false;\n // @breaking-change 10.0.0 `attachDomPortal` to become a required abstract method.\n this.attachDomPortal = null;\n }\n /** Whether this host has an attached portal. */\n hasAttached() {\n return !!this._attachedPortal;\n }\n /** Attaches a portal. */\n attach(portal) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!portal) {\n throwNullPortalError();\n }\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n if (this._isDisposed) {\n throwPortalOutletAlreadyDisposedError();\n }\n }\n if (portal instanceof ComponentPortal) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal);\n }\n else if (portal instanceof TemplatePortal) {\n this._attachedPortal = portal;\n return this.attachTemplatePortal(portal);\n // @breaking-change 10.0.0 remove null check for `this.attachDomPortal`.\n }\n else if (this.attachDomPortal && portal instanceof DomPortal) {\n this._attachedPortal = portal;\n return this.attachDomPortal(portal);\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwUnknownPortalTypeError();\n }\n }\n /** Detaches a previously attached portal. */\n detach() {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n this._invokeDisposeFn();\n }\n /** Permanently dispose of this portal host. */\n dispose() {\n if (this.hasAttached()) {\n this.detach();\n }\n this._invokeDisposeFn();\n this._isDisposed = true;\n }\n /** @docs-private */\n setDisposeFn(fn) {\n this._disposeFn = fn;\n }\n _invokeDisposeFn() {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n }\n}\n/**\n * @deprecated Use `BasePortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass BasePortalHost extends BasePortalOutlet {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nclass DomPortalOutlet extends BasePortalOutlet {\n /**\n * @param outletElement Element into which the content is projected.\n * @param _componentFactoryResolver Used to resolve the component factory.\n * Only required when attaching component portals.\n * @param _appRef Reference to the application. Only used in component portals when there\n * is no `ViewContainerRef` available.\n * @param _defaultInjector Injector to use as a fallback when the portal being attached doesn't\n * have one. Only used for component portals.\n * @param _document Reference to the document. Used when attaching a DOM portal. Will eventually\n * become a required parameter.\n */\n constructor(\n /** Element into which the content is projected. */\n outletElement, _componentFactoryResolver, _appRef, _defaultInjector, \n /**\n * @deprecated `_document` Parameter to be made required.\n * @breaking-change 10.0.0\n */\n _document) {\n super();\n this.outletElement = outletElement;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._appRef = _appRef;\n this._defaultInjector = _defaultInjector;\n /**\n * Attaches a DOM portal by transferring its content into the outlet.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n this.attachDomPortal = (portal) => {\n // @breaking-change 10.0.0 Remove check and error once the\n // `_document` constructor parameter is required.\n if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Cannot attach DOM portal without _document constructor parameter');\n }\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this._document.createComment('dom-portal');\n element.parentNode.insertBefore(anchorNode, element);\n this.outletElement.appendChild(element);\n this._attachedPortal = portal;\n super.setDisposeFn(() => {\n // We can't use `replaceWith` here because IE doesn't support it.\n if (anchorNode.parentNode) {\n anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n this._document = _document;\n }\n /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @param portal Portal to be attached\n * @returns Reference to the created component.\n */\n attachComponentPortal(portal) {\n const resolver = (portal.componentFactoryResolver || this._componentFactoryResolver);\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !resolver) {\n throw Error('Cannot attach component portal to outlet without a ComponentFactoryResolver.');\n }\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n let componentRef;\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the view to the application.\n if (portal.viewContainerRef) {\n componentRef = portal.viewContainerRef.createComponent(componentFactory, portal.viewContainerRef.length, portal.injector || portal.viewContainerRef.injector);\n this.setDisposeFn(() => componentRef.destroy());\n }\n else {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this._appRef) {\n throw Error('Cannot attach component portal to outlet without an ApplicationRef.');\n }\n componentRef = componentFactory.create(portal.injector || this._defaultInjector || Injector.NULL);\n this._appRef.attachView(componentRef.hostView);\n this.setDisposeFn(() => {\n // Verify that the ApplicationRef has registered views before trying to detach a host view.\n // This check also protects the `detachView` from being called on a destroyed ApplicationRef.\n if (this._appRef.viewCount > 0) {\n this._appRef.detachView(componentRef.hostView);\n }\n componentRef.destroy();\n });\n }\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n this.outletElement.appendChild(this._getComponentRootNode(componentRef));\n this._attachedPortal = portal;\n return componentRef;\n }\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal(portal) {\n let viewContainer = portal.viewContainerRef;\n let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector,\n });\n // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n // But for the DomPortalOutlet the view can be added everywhere in the DOM\n // (e.g Overlay Container) To move the view to the specified host element. We just\n // re-append the existing root nodes.\n viewRef.rootNodes.forEach(rootNode => this.outletElement.appendChild(rootNode));\n // Note that we want to detect changes after the nodes have been moved so that\n // any directives inside the portal that are looking at the DOM inside a lifecycle\n // hook won't be invoked too early.\n viewRef.detectChanges();\n this.setDisposeFn(() => {\n let index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n });\n this._attachedPortal = portal;\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n }\n /**\n * Clears out a portal from the DOM.\n */\n dispose() {\n super.dispose();\n this.outletElement.remove();\n }\n /** Gets the root HTMLElement for an instantiated component. */\n _getComponentRootNode(componentRef) {\n return componentRef.hostView.rootNodes[0];\n }\n}\n/**\n * @deprecated Use `DomPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass DomPortalHost extends DomPortalOutlet {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n */\nclass CdkPortal extends TemplatePortal {\n constructor(templateRef, viewContainerRef) {\n super(templateRef, viewContainerRef);\n }\n}\nCdkPortal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkPortal, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkPortal.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkPortal, selector: \"[cdkPortal]\", exportAs: [\"cdkPortal\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkPortal, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkPortal]',\n exportAs: 'cdkPortal',\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });\n/**\n * @deprecated Use `CdkPortal` instead.\n * @breaking-change 9.0.0\n */\nclass TemplatePortalDirective extends CdkPortal {\n}\nTemplatePortalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: TemplatePortalDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nTemplatePortalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: TemplatePortalDirective, selector: \"[cdk-portal], [portal]\", providers: [\n {\n provide: CdkPortal,\n useExisting: TemplatePortalDirective,\n },\n ], exportAs: [\"cdkPortal\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: TemplatePortalDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdk-portal], [portal]',\n exportAs: 'cdkPortal',\n providers: [\n {\n provide: CdkPortal,\n useExisting: TemplatePortalDirective,\n },\n ],\n }]\n }] });\n/**\n * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * `<ng-template [cdkPortalOutlet]=\"greeting\"></ng-template>`\n */\nclass CdkPortalOutlet extends BasePortalOutlet {\n constructor(_componentFactoryResolver, _viewContainerRef, \n /**\n * @deprecated `_document` parameter to be made required.\n * @breaking-change 9.0.0\n */\n _document) {\n super();\n this._componentFactoryResolver = _componentFactoryResolver;\n this._viewContainerRef = _viewContainerRef;\n /** Whether the portal component is initialized. */\n this._isInitialized = false;\n /** Emits when a portal is attached to the outlet. */\n this.attached = new EventEmitter();\n /**\n * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n this.attachDomPortal = (portal) => {\n // @breaking-change 9.0.0 Remove check and error once the\n // `_document` constructor parameter is required.\n if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Cannot attach DOM portal without _document constructor parameter');\n }\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode = this._document.createComment('dom-portal');\n portal.setAttachedHost(this);\n element.parentNode.insertBefore(anchorNode, element);\n this._getRootNode().appendChild(element);\n this._attachedPortal = portal;\n super.setDisposeFn(() => {\n if (anchorNode.parentNode) {\n anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n this._document = _document;\n }\n /** Portal associated with the Portal outlet. */\n get portal() {\n return this._attachedPortal;\n }\n set portal(portal) {\n // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have\n // run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`\n // and attach a portal programmatically in the parent component. When Angular does the first CD\n // round, it will fire the setter with empty string, causing the user's content to be cleared.\n if (this.hasAttached() && !portal && !this._isInitialized) {\n return;\n }\n if (this.hasAttached()) {\n super.detach();\n }\n if (portal) {\n super.attach(portal);\n }\n this._attachedPortal = portal || null;\n }\n /** Component or view reference that is attached to the portal. */\n get attachedRef() {\n return this._attachedRef;\n }\n ngOnInit() {\n this._isInitialized = true;\n }\n ngOnDestroy() {\n super.dispose();\n this._attachedPortal = null;\n this._attachedRef = null;\n }\n /**\n * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.\n *\n * @param portal Portal to be attached to the portal outlet.\n * @returns Reference to the created component.\n */\n attachComponentPortal(portal) {\n portal.setAttachedHost(this);\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalOutlet.\n const viewContainerRef = portal.viewContainerRef != null ? portal.viewContainerRef : this._viewContainerRef;\n const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n const ref = viewContainerRef.createComponent(componentFactory, viewContainerRef.length, portal.injector || viewContainerRef.injector);\n // If we're using a view container that's different from the injected one (e.g. when the portal\n // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered\n // inside of the alternate view container.\n if (viewContainerRef !== this._viewContainerRef) {\n this._getRootNode().appendChild(ref.hostView.rootNodes[0]);\n }\n super.setDisposeFn(() => ref.destroy());\n this._attachedPortal = portal;\n this._attachedRef = ref;\n this.attached.emit(ref);\n return ref;\n }\n /**\n * Attach the given TemplatePortal to this PortalHost as an embedded View.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal(portal) {\n portal.setAttachedHost(this);\n const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context, {\n injector: portal.injector,\n });\n super.setDisposeFn(() => this._viewContainerRef.clear());\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n return viewRef;\n }\n /** Gets the root node of the portal outlet. */\n _getRootNode() {\n const nativeElement = this._viewContainerRef.element.nativeElement;\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n return (nativeElement.nodeType === nativeElement.ELEMENT_NODE\n ? nativeElement\n : nativeElement.parentNode);\n }\n}\nCdkPortalOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkPortalOutlet, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ViewContainerRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });\nCdkPortalOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: { portal: [\"cdkPortalOutlet\", \"portal\"] }, outputs: { attached: \"attached\" }, exportAs: [\"cdkPortalOutlet\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkPortalOutlet, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkPortalOutlet]',\n exportAs: 'cdkPortalOutlet',\n inputs: ['portal: cdkPortalOutlet'],\n }]\n }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, propDecorators: { attached: [{\n type: Output\n }] } });\n/**\n * @deprecated Use `CdkPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass PortalHostDirective extends CdkPortalOutlet {\n}\nPortalHostDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: PortalHostDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nPortalHostDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: PortalHostDirective, selector: \"[cdkPortalHost], [portalHost]\", inputs: { portal: [\"cdkPortalHost\", \"portal\"] }, providers: [\n {\n provide: CdkPortalOutlet,\n useExisting: PortalHostDirective,\n },\n ], exportAs: [\"cdkPortalHost\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: PortalHostDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkPortalHost], [portalHost]',\n exportAs: 'cdkPortalHost',\n inputs: ['portal: cdkPortalHost'],\n providers: [\n {\n provide: CdkPortalOutlet,\n useExisting: PortalHostDirective,\n },\n ],\n }]\n }] });\nclass PortalModule {\n}\nPortalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: PortalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nPortalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: PortalModule, declarations: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective], exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective] });\nPortalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: PortalModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: PortalModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\n declarations: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\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 * Custom injector to be used when providing custom\n * injection tokens to components inside a portal.\n * @docs-private\n * @deprecated Use `Injector.create` instead.\n * @breaking-change 11.0.0\n */\nclass PortalInjector {\n constructor(_parentInjector, _customTokens) {\n this._parentInjector = _parentInjector;\n this._customTokens = _customTokens;\n }\n get(token, notFoundValue) {\n const value = this._customTokens.get(token);\n if (typeof value !== 'undefined') {\n return value;\n }\n return this._parentInjector.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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 { BasePortalHost, BasePortalOutlet, CdkPortal, CdkPortalOutlet, ComponentPortal, DomPortal, DomPortalHost, DomPortalOutlet, Portal, PortalHostDirective, PortalInjector, PortalModule, TemplatePortal, TemplatePortalDirective };\n","import * as i1 from '@angular/cdk/scrolling';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nexport { CdkScrollable, ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\nimport * as i6 from '@angular/common';\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Injectable, Inject, Optional, ElementRef, ApplicationRef, ANIMATION_MODULE_TYPE, InjectionToken, Directive, EventEmitter, Input, Output, NgModule } from '@angular/core';\nimport { coerceCssPixelValue, coerceArray, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport * as i1$1 from '@angular/cdk/platform';\nimport { supportsScrollBehavior, _getEventTarget, _isTestEnvironment } from '@angular/cdk/platform';\nimport * as i5 from '@angular/cdk/bidi';\nimport { BidiModule } from '@angular/cdk/bidi';\nimport { DomPortalOutlet, TemplatePortal, PortalModule } from '@angular/cdk/portal';\nimport { Subject, Subscription, merge } from 'rxjs';\nimport { take, takeUntil, takeWhile } from 'rxjs/operators';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 scrollBehaviorSupported = supportsScrollBehavior();\n/**\n * Strategy that will prevent the user from scrolling while the overlay is visible.\n */\nclass BlockScrollStrategy {\n constructor(_viewportRuler, document) {\n this._viewportRuler = _viewportRuler;\n this._previousHTMLStyles = { top: '', left: '' };\n this._isEnabled = false;\n this._document = document;\n }\n /** Attaches this scroll strategy to an overlay. */\n attach() { }\n /** Blocks page-level scroll while the attached overlay is open. */\n enable() {\n if (this._canBeEnabled()) {\n const root = this._document.documentElement;\n this._previousScrollPosition = this._viewportRuler.getViewportScrollPosition();\n // Cache the previous inline styles in case the user had set them.\n this._previousHTMLStyles.left = root.style.left || '';\n this._previousHTMLStyles.top = root.style.top || '';\n // Note: we're using the `html` node, instead of the `body`, because the `body` may\n // have the user agent margin, whereas the `html` is guaranteed not to have one.\n root.style.left = coerceCssPixelValue(-this._previousScrollPosition.left);\n root.style.top = coerceCssPixelValue(-this._previousScrollPosition.top);\n root.classList.add('cdk-global-scrollblock');\n this._isEnabled = true;\n }\n }\n /** Unblocks page-level scroll while the attached overlay is open. */\n disable() {\n if (this._isEnabled) {\n const html = this._document.documentElement;\n const body = this._document.body;\n const htmlStyle = html.style;\n const bodyStyle = body.style;\n const previousHtmlScrollBehavior = htmlStyle.scrollBehavior || '';\n const previousBodyScrollBehavior = bodyStyle.scrollBehavior || '';\n this._isEnabled = false;\n htmlStyle.left = this._previousHTMLStyles.left;\n htmlStyle.top = this._previousHTMLStyles.top;\n html.classList.remove('cdk-global-scrollblock');\n // Disable user-defined smooth scrolling temporarily while we restore the scroll position.\n // See https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior\n // Note that we don't mutate the property if the browser doesn't support `scroll-behavior`,\n // because it can throw off feature detections in `supportsScrollBehavior` which\n // checks for `'scrollBehavior' in documentElement.style`.\n if (scrollBehaviorSupported) {\n htmlStyle.scrollBehavior = bodyStyle.scrollBehavior = 'auto';\n }\n window.scroll(this._previousScrollPosition.left, this._previousScrollPosition.top);\n if (scrollBehaviorSupported) {\n htmlStyle.scrollBehavior = previousHtmlScrollBehavior;\n bodyStyle.scrollBehavior = previousBodyScrollBehavior;\n }\n }\n }\n _canBeEnabled() {\n // Since the scroll strategies can't be singletons, we have to use a global CSS class\n // (`cdk-global-scrollblock`) to make sure that we don't try to disable global\n // scrolling multiple times.\n const html = this._document.documentElement;\n if (html.classList.contains('cdk-global-scrollblock') || this._isEnabled) {\n return false;\n }\n const body = this._document.body;\n const viewport = this._viewportRuler.getViewportSize();\n return body.scrollHeight > viewport.height || body.scrollWidth > viewport.width;\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 * Returns an error to be thrown when attempting to attach an already-attached scroll strategy.\n */\nfunction getMatScrollStrategyAlreadyAttachedError() {\n return Error(`Scroll strategy has already been attached.`);\n}\n\n/**\n * Strategy that will close the overlay as soon as the user starts scrolling.\n */\nclass CloseScrollStrategy {\n constructor(_scrollDispatcher, _ngZone, _viewportRuler, _config) {\n this._scrollDispatcher = _scrollDispatcher;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n this._config = _config;\n this._scrollSubscription = null;\n /** Detaches the overlay ref and disables the scroll strategy. */\n this._detach = () => {\n this.disable();\n if (this._overlayRef.hasAttached()) {\n this._ngZone.run(() => this._overlayRef.detach());\n }\n };\n }\n /** Attaches this scroll strategy to an overlay. */\n attach(overlayRef) {\n if (this._overlayRef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatScrollStrategyAlreadyAttachedError();\n }\n this._overlayRef = overlayRef;\n }\n /** Enables the closing of the attached overlay on scroll. */\n enable() {\n if (this._scrollSubscription) {\n return;\n }\n const stream = this._scrollDispatcher.scrolled(0);\n if (this._config && this._config.threshold && this._config.threshold > 1) {\n this._initialScrollPosition = this._viewportRuler.getViewportScrollPosition().top;\n this._scrollSubscription = stream.subscribe(() => {\n const scrollPosition = this._viewportRuler.getViewportScrollPosition().top;\n if (Math.abs(scrollPosition - this._initialScrollPosition) > this._config.threshold) {\n this._detach();\n }\n else {\n this._overlayRef.updatePosition();\n }\n });\n }\n else {\n this._scrollSubscription = stream.subscribe(this._detach);\n }\n }\n /** Disables the closing the attached overlay on scroll. */\n disable() {\n if (this._scrollSubscription) {\n this._scrollSubscription.unsubscribe();\n this._scrollSubscription = null;\n }\n }\n detach() {\n this.disable();\n this._overlayRef = 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/** Scroll strategy that doesn't do anything. */\nclass NoopScrollStrategy {\n /** Does nothing, as this scroll strategy is a no-op. */\n enable() { }\n /** Does nothing, as this scroll strategy is a no-op. */\n disable() { }\n /** Does nothing, as this scroll strategy is a no-op. */\n attach() { }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 whether an element is scrolled outside of view by any of its parent scrolling containers.\n * @param element Dimensions of the element (from getBoundingClientRect)\n * @param scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)\n * @returns Whether the element is scrolled out of view\n * @docs-private\n */\nfunction isElementScrolledOutsideView(element, scrollContainers) {\n return scrollContainers.some(containerBounds => {\n const outsideAbove = element.bottom < containerBounds.top;\n const outsideBelow = element.top > containerBounds.bottom;\n const outsideLeft = element.right < containerBounds.left;\n const outsideRight = element.left > containerBounds.right;\n return outsideAbove || outsideBelow || outsideLeft || outsideRight;\n });\n}\n/**\n * Gets whether an element is clipped by any of its scrolling containers.\n * @param element Dimensions of the element (from getBoundingClientRect)\n * @param scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)\n * @returns Whether the element is clipped\n * @docs-private\n */\nfunction isElementClippedByScrolling(element, scrollContainers) {\n return scrollContainers.some(scrollContainerRect => {\n const clippedAbove = element.top < scrollContainerRect.top;\n const clippedBelow = element.bottom > scrollContainerRect.bottom;\n const clippedLeft = element.left < scrollContainerRect.left;\n const clippedRight = element.right > scrollContainerRect.right;\n return clippedAbove || clippedBelow || clippedLeft || clippedRight;\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 * Strategy that will update the element position as the user is scrolling.\n */\nclass RepositionScrollStrategy {\n constructor(_scrollDispatcher, _viewportRuler, _ngZone, _config) {\n this._scrollDispatcher = _scrollDispatcher;\n this._viewportRuler = _viewportRuler;\n this._ngZone = _ngZone;\n this._config = _config;\n this._scrollSubscription = null;\n }\n /** Attaches this scroll strategy to an overlay. */\n attach(overlayRef) {\n if (this._overlayRef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatScrollStrategyAlreadyAttachedError();\n }\n this._overlayRef = overlayRef;\n }\n /** Enables repositioning of the attached overlay on scroll. */\n enable() {\n if (!this._scrollSubscription) {\n const throttle = this._config ? this._config.scrollThrottle : 0;\n this._scrollSubscription = this._scrollDispatcher.scrolled(throttle).subscribe(() => {\n this._overlayRef.updatePosition();\n // TODO(crisbeto): make `close` on by default once all components can handle it.\n if (this._config && this._config.autoClose) {\n const overlayRect = this._overlayRef.overlayElement.getBoundingClientRect();\n const { width, height } = this._viewportRuler.getViewportSize();\n // TODO(crisbeto): include all ancestor scroll containers here once\n // we have a way of exposing the trigger element to the scroll strategy.\n const parentRects = [{ width, height, bottom: height, right: width, top: 0, left: 0 }];\n if (isElementScrolledOutsideView(overlayRect, parentRects)) {\n this.disable();\n this._ngZone.run(() => this._overlayRef.detach());\n }\n }\n });\n }\n }\n /** Disables repositioning of the attached overlay on scroll. */\n disable() {\n if (this._scrollSubscription) {\n this._scrollSubscription.unsubscribe();\n this._scrollSubscription = null;\n }\n }\n detach() {\n this.disable();\n this._overlayRef = 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 * Options for how an overlay will handle scrolling.\n *\n * Users can provide a custom value for `ScrollStrategyOptions` to replace the default\n * behaviors. This class primarily acts as a factory for ScrollStrategy instances.\n */\nclass ScrollStrategyOptions {\n constructor(_scrollDispatcher, _viewportRuler, _ngZone, document) {\n this._scrollDispatcher = _scrollDispatcher;\n this._viewportRuler = _viewportRuler;\n this._ngZone = _ngZone;\n /** Do nothing on scroll. */\n this.noop = () => new NoopScrollStrategy();\n /**\n * Close the overlay as soon as the user scrolls.\n * @param config Configuration to be used inside the scroll strategy.\n */\n this.close = (config) => new CloseScrollStrategy(this._scrollDispatcher, this._ngZone, this._viewportRuler, config);\n /** Block scrolling. */\n this.block = () => new BlockScrollStrategy(this._viewportRuler, this._document);\n /**\n * Update the overlay's position on scroll.\n * @param config Configuration to be used inside the scroll strategy.\n * Allows debouncing the reposition calls.\n */\n this.reposition = (config) => new RepositionScrollStrategy(this._scrollDispatcher, this._viewportRuler, this._ngZone, config);\n this._document = document;\n }\n}\nScrollStrategyOptions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ScrollStrategyOptions, deps: [{ token: i1.ScrollDispatcher }, { token: i1.ViewportRuler }, { token: i0.NgZone }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nScrollStrategyOptions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ScrollStrategyOptions, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ScrollStrategyOptions, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.ScrollDispatcher }, { type: i1.ViewportRuler }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [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/** Initial configuration used when creating an overlay. */\nclass OverlayConfig {\n constructor(config) {\n /** Strategy to be used when handling scroll events while the overlay is open. */\n this.scrollStrategy = new NoopScrollStrategy();\n /** Custom class to add to the overlay pane. */\n this.panelClass = '';\n /** Whether the overlay has a backdrop. */\n this.hasBackdrop = false;\n /** Custom class to add to the backdrop */\n this.backdropClass = 'cdk-overlay-dark-backdrop';\n /**\n * Whether the overlay should be disposed of when the user goes backwards/forwards in history.\n * Note that this usually doesn't include clicking on links (unless the user is using\n * the `HashLocationStrategy`).\n */\n this.disposeOnNavigation = false;\n if (config) {\n // Use `Iterable` instead of `Array` because TypeScript, as of 3.6.3,\n // loses the array generic type in the `for of`. But we *also* have to use `Array` because\n // typescript won't iterate over an `Iterable` unless you compile with `--downlevelIteration`\n const configKeys = Object.keys(config);\n for (const key of configKeys) {\n if (config[key] !== undefined) {\n // TypeScript, as of version 3.5, sees the left-hand-side of this expression\n // as \"I don't know *which* key this is, so the only valid value is the intersection\n // of all the possible values.\" In this case, that happens to be `undefined`. TypeScript\n // is not smart enough to see that the right-hand-side is actually an access of the same\n // exact type with the same exact key, meaning that the value type must be identical.\n // So we use `any` to work around this.\n this[key] = config[key];\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/** The points of the origin element and the overlay element to connect. */\nclass ConnectionPositionPair {\n constructor(origin, overlay, \n /** Offset along the X axis. */\n offsetX, \n /** Offset along the Y axis. */\n offsetY, \n /** Class(es) to be applied to the panel while this position is active. */\n panelClass) {\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n this.panelClass = panelClass;\n this.originX = origin.originX;\n this.originY = origin.originY;\n this.overlayX = overlay.overlayX;\n this.overlayY = overlay.overlayY;\n }\n}\n/**\n * Set of properties regarding the position of the origin and overlay relative to the viewport\n * with respect to the containing Scrollable elements.\n *\n * The overlay and origin are clipped if any part of their bounding client rectangle exceeds the\n * bounds of any one of the strategy's Scrollable's bounding client rectangle.\n *\n * The overlay and origin are outside view if there is no overlap between their bounding client\n * rectangle and any one of the strategy's Scrollable's bounding client rectangle.\n *\n * ----------- -----------\n * | outside | | clipped |\n * | view | --------------------------\n * | | | | | |\n * ---------- | ----------- |\n * -------------------------- | |\n * | | | Scrollable |\n * | | | |\n * | | --------------------------\n * | Scrollable |\n * | |\n * --------------------------\n *\n * @docs-private\n */\nclass ScrollingVisibility {\n}\n/** The change event emitted by the strategy when a fallback position is used. */\nclass ConnectedOverlayPositionChange {\n constructor(\n /** The position used as a result of this change. */\n connectionPair, \n /** @docs-private */\n scrollableViewProperties) {\n this.connectionPair = connectionPair;\n this.scrollableViewProperties = scrollableViewProperties;\n }\n}\n/**\n * Validates whether a vertical position property matches the expected values.\n * @param property Name of the property being validated.\n * @param value Value of the property being validated.\n * @docs-private\n */\nfunction validateVerticalPosition(property, value) {\n if (value !== 'top' && value !== 'bottom' && value !== 'center') {\n throw Error(`ConnectedPosition: Invalid ${property} \"${value}\". ` +\n `Expected \"top\", \"bottom\" or \"center\".`);\n }\n}\n/**\n * Validates whether a horizontal position property matches the expected values.\n * @param property Name of the property being validated.\n * @param value Value of the property being validated.\n * @docs-private\n */\nfunction validateHorizontalPosition(property, value) {\n if (value !== 'start' && value !== 'end' && value !== 'center') {\n throw Error(`ConnectedPosition: Invalid ${property} \"${value}\". ` +\n `Expected \"start\", \"end\" or \"center\".`);\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 * Service for dispatching events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\nclass BaseOverlayDispatcher {\n constructor(document) {\n /** Currently attached overlays in the order they were attached. */\n this._attachedOverlays = [];\n this._document = document;\n }\n ngOnDestroy() {\n this.detach();\n }\n /** Add a new overlay to the list of attached overlay refs. */\n add(overlayRef) {\n // Ensure that we don't get the same overlay multiple times.\n this.remove(overlayRef);\n this._attachedOverlays.push(overlayRef);\n }\n /** Remove an overlay from the list of attached overlay refs. */\n remove(overlayRef) {\n const index = this._attachedOverlays.indexOf(overlayRef);\n if (index > -1) {\n this._attachedOverlays.splice(index, 1);\n }\n // Remove the global listener once there are no more overlays.\n if (this._attachedOverlays.length === 0) {\n this.detach();\n }\n }\n}\nBaseOverlayDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: BaseOverlayDispatcher, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nBaseOverlayDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: BaseOverlayDispatcher, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: BaseOverlayDispatcher, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [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 * Service for dispatching keyboard events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\nclass OverlayKeyboardDispatcher extends BaseOverlayDispatcher {\n constructor(document, \n /** @breaking-change 14.0.0 _ngZone will be required. */\n _ngZone) {\n super(document);\n this._ngZone = _ngZone;\n /** Keyboard event listener that will be attached to the body. */\n this._keydownListener = (event) => {\n const overlays = this._attachedOverlays;\n for (let i = overlays.length - 1; i > -1; i--) {\n // Dispatch the keydown event to the top overlay which has subscribers to its keydown events.\n // We want to target the most recent overlay, rather than trying to match where the event came\n // from, because some components might open an overlay, but keep focus on a trigger element\n // (e.g. for select and autocomplete). We skip overlays without keydown event subscriptions,\n // because we don't want overlays that don't handle keyboard events to block the ones below\n // them that do.\n if (overlays[i]._keydownEvents.observers.length > 0) {\n const keydownEvents = overlays[i]._keydownEvents;\n /** @breaking-change 14.0.0 _ngZone will be required. */\n if (this._ngZone) {\n this._ngZone.run(() => keydownEvents.next(event));\n }\n else {\n keydownEvents.next(event);\n }\n break;\n }\n }\n };\n }\n /** Add a new overlay to the list of attached overlay refs. */\n add(overlayRef) {\n super.add(overlayRef);\n // Lazily start dispatcher once first overlay is added\n if (!this._isAttached) {\n /** @breaking-change 14.0.0 _ngZone will be required. */\n if (this._ngZone) {\n this._ngZone.runOutsideAngular(() => this._document.body.addEventListener('keydown', this._keydownListener));\n }\n else {\n this._document.body.addEventListener('keydown', this._keydownListener);\n }\n this._isAttached = true;\n }\n }\n /** Detaches the global keyboard event listener. */\n detach() {\n if (this._isAttached) {\n this._document.body.removeEventListener('keydown', this._keydownListener);\n this._isAttached = false;\n }\n }\n}\nOverlayKeyboardDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: OverlayKeyboardDispatcher, deps: [{ token: DOCUMENT }, { token: i0.NgZone, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nOverlayKeyboardDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: OverlayKeyboardDispatcher, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: OverlayKeyboardDispatcher, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.NgZone, decorators: [{\n type: Optional\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Service for dispatching mouse click events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\nclass OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {\n constructor(document, _platform, \n /** @breaking-change 14.0.0 _ngZone will be required. */\n _ngZone) {\n super(document);\n this._platform = _platform;\n this._ngZone = _ngZone;\n this._cursorStyleIsSet = false;\n /** Store pointerdown event target to track origin of click. */\n this._pointerDownListener = (event) => {\n this._pointerDownEventTarget = _getEventTarget(event);\n };\n /** Click event listener that will be attached to the body propagate phase. */\n this._clickListener = (event) => {\n const target = _getEventTarget(event);\n // In case of a click event, we want to check the origin of the click\n // (e.g. in case where a user starts a click inside the overlay and\n // releases the click outside of it).\n // This is done by using the event target of the preceding pointerdown event.\n // Every click event caused by a pointer device has a preceding pointerdown\n // event, unless the click was programmatically triggered (e.g. in a unit test).\n const origin = event.type === 'click' && this._pointerDownEventTarget\n ? this._pointerDownEventTarget\n : target;\n // Reset the stored pointerdown event target, to avoid having it interfere\n // in subsequent events.\n this._pointerDownEventTarget = null;\n // We copy the array because the original may be modified asynchronously if the\n // outsidePointerEvents listener decides to detach overlays resulting in index errors inside\n // the for loop.\n const overlays = this._attachedOverlays.slice();\n // Dispatch the mouse event to the top overlay which has subscribers to its mouse events.\n // We want to target all overlays for which the click could be considered as outside click.\n // As soon as we reach an overlay for which the click is not outside click we break off\n // the loop.\n for (let i = overlays.length - 1; i > -1; i--) {\n const overlayRef = overlays[i];\n if (overlayRef._outsidePointerEvents.observers.length < 1 || !overlayRef.hasAttached()) {\n continue;\n }\n // If it's a click inside the overlay, just break - we should do nothing\n // If it's an outside click (both origin and target of the click) dispatch the mouse event,\n // and proceed with the next overlay\n if (overlayRef.overlayElement.contains(target) ||\n overlayRef.overlayElement.contains(origin)) {\n break;\n }\n const outsidePointerEvents = overlayRef._outsidePointerEvents;\n /** @breaking-change 14.0.0 _ngZone will be required. */\n if (this._ngZone) {\n this._ngZone.run(() => outsidePointerEvents.next(event));\n }\n else {\n outsidePointerEvents.next(event);\n }\n }\n };\n }\n /** Add a new overlay to the list of attached overlay refs. */\n add(overlayRef) {\n super.add(overlayRef);\n // Safari on iOS does not generate click events for non-interactive\n // elements. However, we want to receive a click for any element outside\n // the overlay. We can force a \"clickable\" state by setting\n // `cursor: pointer` on the document body. See:\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event#Safari_Mobile\n // https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html\n if (!this._isAttached) {\n const body = this._document.body;\n /** @breaking-change 14.0.0 _ngZone will be required. */\n if (this._ngZone) {\n this._ngZone.runOutsideAngular(() => this._addEventListeners(body));\n }\n else {\n this._addEventListeners(body);\n }\n // click event is not fired on iOS. To make element \"clickable\" we are\n // setting the cursor to pointer\n if (this._platform.IOS && !this._cursorStyleIsSet) {\n this._cursorOriginalValue = body.style.cursor;\n body.style.cursor = 'pointer';\n this._cursorStyleIsSet = true;\n }\n this._isAttached = true;\n }\n }\n /** Detaches the global keyboard event listener. */\n detach() {\n if (this._isAttached) {\n const body = this._document.body;\n body.removeEventListener('pointerdown', this._pointerDownListener, true);\n body.removeEventListener('click', this._clickListener, true);\n body.removeEventListener('auxclick', this._clickListener, true);\n body.removeEventListener('contextmenu', this._clickListener, true);\n if (this._platform.IOS && this._cursorStyleIsSet) {\n body.style.cursor = this._cursorOriginalValue;\n this._cursorStyleIsSet = false;\n }\n this._isAttached = false;\n }\n }\n _addEventListeners(body) {\n body.addEventListener('pointerdown', this._pointerDownListener, true);\n body.addEventListener('click', this._clickListener, true);\n body.addEventListener('auxclick', this._clickListener, true);\n body.addEventListener('contextmenu', this._clickListener, true);\n }\n}\nOverlayOutsideClickDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: OverlayOutsideClickDispatcher, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }, { token: i0.NgZone, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nOverlayOutsideClickDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: OverlayOutsideClickDispatcher, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: OverlayOutsideClickDispatcher, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i1$1.Platform }, { type: i0.NgZone, decorators: [{\n type: Optional\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Container inside which all overlays will render. */\nclass OverlayContainer {\n constructor(document, _platform) {\n this._platform = _platform;\n this._document = document;\n }\n ngOnDestroy() {\n this._containerElement?.remove();\n }\n /**\n * This method returns the overlay container element. It will lazily\n * create the element the first time it is called to facilitate using\n * the container in non-browser environments.\n * @returns the container element\n */\n getContainerElement() {\n if (!this._containerElement) {\n this._createContainer();\n }\n return this._containerElement;\n }\n /**\n * Create the overlay container element, which is simply a div\n * with the 'cdk-overlay-container' class on the document body.\n */\n _createContainer() {\n const containerClass = 'cdk-overlay-container';\n // TODO(crisbeto): remove the testing check once we have an overlay testing\n // module or Angular starts tearing down the testing `NgModule`. See:\n // https://github.com/angular/angular/issues/18831\n if (this._platform.isBrowser || _isTestEnvironment()) {\n const oppositePlatformContainers = this._document.querySelectorAll(`.${containerClass}[platform=\"server\"], ` + `.${containerClass}[platform=\"test\"]`);\n // Remove any old containers from the opposite platform.\n // This can happen when transitioning from the server to the client.\n for (let i = 0; i < oppositePlatformContainers.length; i++) {\n oppositePlatformContainers[i].remove();\n }\n }\n const container = this._document.createElement('div');\n container.classList.add(containerClass);\n // A long time ago we kept adding new overlay containers whenever a new app was instantiated,\n // but at some point we added logic which clears the duplicate ones in order to avoid leaks.\n // The new logic was a little too aggressive since it was breaking some legitimate use cases.\n // To mitigate the problem we made it so that only containers from a different platform are\n // cleared, but the side-effect was that people started depending on the overly-aggressive\n // logic to clean up their tests for them. Until we can introduce an overlay-specific testing\n // module which does the cleanup, we try to detect that we're in a test environment and we\n // always clear the container. See #17006.\n // TODO(crisbeto): remove the test environment check once we have an overlay testing module.\n if (_isTestEnvironment()) {\n container.setAttribute('platform', 'test');\n }\n else if (!this._platform.isBrowser) {\n container.setAttribute('platform', 'server');\n }\n this._document.body.appendChild(container);\n this._containerElement = container;\n }\n}\nOverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: OverlayContainer, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });\nOverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: OverlayContainer, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: OverlayContainer, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i1$1.Platform }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Reference to an overlay that has been created with the Overlay service.\n * Used to manipulate or dispose of said overlay.\n */\nclass OverlayRef {\n constructor(_portalOutlet, _host, _pane, _config, _ngZone, _keyboardDispatcher, _document, _location, _outsideClickDispatcher, _animationsDisabled = false) {\n this._portalOutlet = _portalOutlet;\n this._host = _host;\n this._pane = _pane;\n this._config = _config;\n this._ngZone = _ngZone;\n this._keyboardDispatcher = _keyboardDispatcher;\n this._document = _document;\n this._location = _location;\n this._outsideClickDispatcher = _outsideClickDispatcher;\n this._animationsDisabled = _animationsDisabled;\n this._backdropElement = null;\n this._backdropClick = new Subject();\n this._attachments = new Subject();\n this._detachments = new Subject();\n this._locationChanges = Subscription.EMPTY;\n this._backdropClickHandler = (event) => this._backdropClick.next(event);\n this._backdropTransitionendHandler = (event) => {\n this._disposeBackdrop(event.target);\n };\n /** Stream of keydown events dispatched to this overlay. */\n this._keydownEvents = new Subject();\n /** Stream of mouse outside events dispatched to this overlay. */\n this._outsidePointerEvents = new Subject();\n if (_config.scrollStrategy) {\n this._scrollStrategy = _config.scrollStrategy;\n this._scrollStrategy.attach(this);\n }\n this._positionStrategy = _config.positionStrategy;\n }\n /** The overlay's HTML element */\n get overlayElement() {\n return this._pane;\n }\n /** The overlay's backdrop HTML element. */\n get backdropElement() {\n return this._backdropElement;\n }\n /**\n * Wrapper around the panel element. Can be used for advanced\n * positioning where a wrapper with specific styling is\n * required around the overlay pane.\n */\n get hostElement() {\n return this._host;\n }\n /**\n * Attaches content, given via a Portal, to the overlay.\n * If the overlay is configured to have a backdrop, it will be created.\n *\n * @param portal Portal instance to which to attach the overlay.\n * @returns The portal attachment result.\n */\n attach(portal) {\n // Insert the host into the DOM before attaching the portal, otherwise\n // the animations module will skip animations on repeat attachments.\n if (!this._host.parentElement && this._previousHostParent) {\n this._previousHostParent.appendChild(this._host);\n }\n const attachResult = this._portalOutlet.attach(portal);\n if (this._positionStrategy) {\n this._positionStrategy.attach(this);\n }\n this._updateStackingOrder();\n this._updateElementSize();\n this._updateElementDirection();\n if (this._scrollStrategy) {\n this._scrollStrategy.enable();\n }\n // Update the position once the zone is stable so that the overlay will be fully rendered\n // before attempting to position it, as the position may depend on the size of the rendered\n // content.\n this._ngZone.onStable.pipe(take(1)).subscribe(() => {\n // The overlay could've been detached before the zone has stabilized.\n if (this.hasAttached()) {\n this.updatePosition();\n }\n });\n // Enable pointer events for the overlay pane element.\n this._togglePointerEvents(true);\n if (this._config.hasBackdrop) {\n this._attachBackdrop();\n }\n if (this._config.panelClass) {\n this._toggleClasses(this._pane, this._config.panelClass, true);\n }\n // Only emit the `attachments` event once all other setup is done.\n this._attachments.next();\n // Track this overlay by the keyboard dispatcher\n this._keyboardDispatcher.add(this);\n if (this._config.disposeOnNavigation) {\n this._locationChanges = this._location.subscribe(() => this.dispose());\n }\n this._outsideClickDispatcher.add(this);\n return attachResult;\n }\n /**\n * Detaches an overlay from a portal.\n * @returns The portal detachment result.\n */\n detach() {\n if (!this.hasAttached()) {\n return;\n }\n this.detachBackdrop();\n // When the overlay is detached, the pane element should disable pointer events.\n // This is necessary because otherwise the pane element will cover the page and disable\n // pointer events therefore. Depends on the position strategy and the applied pane boundaries.\n this._togglePointerEvents(false);\n if (this._positionStrategy && this._positionStrategy.detach) {\n this._positionStrategy.detach();\n }\n if (this._scrollStrategy) {\n this._scrollStrategy.disable();\n }\n const detachmentResult = this._portalOutlet.detach();\n // Only emit after everything is detached.\n this._detachments.next();\n // Remove this overlay from keyboard dispatcher tracking.\n this._keyboardDispatcher.remove(this);\n // Keeping the host element in the DOM can cause scroll jank, because it still gets\n // rendered, even though it's transparent and unclickable which is why we remove it.\n this._detachContentWhenStable();\n this._locationChanges.unsubscribe();\n this._outsideClickDispatcher.remove(this);\n return detachmentResult;\n }\n /** Cleans up the overlay from the DOM. */\n dispose() {\n const isAttached = this.hasAttached();\n if (this._positionStrategy) {\n this._positionStrategy.dispose();\n }\n this._disposeScrollStrategy();\n this._disposeBackdrop(this._backdropElement);\n this._locationChanges.unsubscribe();\n this._keyboardDispatcher.remove(this);\n this._portalOutlet.dispose();\n this._attachments.complete();\n this._backdropClick.complete();\n this._keydownEvents.complete();\n this._outsidePointerEvents.complete();\n this._outsideClickDispatcher.remove(this);\n this._host?.remove();\n this._previousHostParent = this._pane = this._host = null;\n if (isAttached) {\n this._detachments.next();\n }\n this._detachments.complete();\n }\n /** Whether the overlay has attached content. */\n hasAttached() {\n return this._portalOutlet.hasAttached();\n }\n /** Gets an observable that emits when the backdrop has been clicked. */\n backdropClick() {\n return this._backdropClick;\n }\n /** Gets an observable that emits when the overlay has been attached. */\n attachments() {\n return this._attachments;\n }\n /** Gets an observable that emits when the overlay has been detached. */\n detachments() {\n return this._detachments;\n }\n /** Gets an observable of keydown events targeted to this overlay. */\n keydownEvents() {\n return this._keydownEvents;\n }\n /** Gets an observable of pointer events targeted outside this overlay. */\n outsidePointerEvents() {\n return this._outsidePointerEvents;\n }\n /** Gets the current overlay configuration, which is immutable. */\n getConfig() {\n return this._config;\n }\n /** Updates the position of the overlay based on the position strategy. */\n updatePosition() {\n if (this._positionStrategy) {\n this._positionStrategy.apply();\n }\n }\n /** Switches to a new position strategy and updates the overlay position. */\n updatePositionStrategy(strategy) {\n if (strategy === this._positionStrategy) {\n return;\n }\n if (this._positionStrategy) {\n this._positionStrategy.dispose();\n }\n this._positionStrategy = strategy;\n if (this.hasAttached()) {\n strategy.attach(this);\n this.updatePosition();\n }\n }\n /** Update the size properties of the overlay. */\n updateSize(sizeConfig) {\n this._config = { ...this._config, ...sizeConfig };\n this._updateElementSize();\n }\n /** Sets the LTR/RTL direction for the overlay. */\n setDirection(dir) {\n this._config = { ...this._config, direction: dir };\n this._updateElementDirection();\n }\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes) {\n if (this._pane) {\n this._toggleClasses(this._pane, classes, true);\n }\n }\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes) {\n if (this._pane) {\n this._toggleClasses(this._pane, classes, false);\n }\n }\n /**\n * Returns the layout direction of the overlay panel.\n */\n getDirection() {\n const direction = this._config.direction;\n if (!direction) {\n return 'ltr';\n }\n return typeof direction === 'string' ? direction : direction.value;\n }\n /** Switches to a new scroll strategy. */\n updateScrollStrategy(strategy) {\n if (strategy === this._scrollStrategy) {\n return;\n }\n this._disposeScrollStrategy();\n this._scrollStrategy = strategy;\n if (this.hasAttached()) {\n strategy.attach(this);\n strategy.enable();\n }\n }\n /** Updates the text direction of the overlay panel. */\n _updateElementDirection() {\n this._host.setAttribute('dir', this.getDirection());\n }\n /** Updates the size of the overlay element based on the overlay config. */\n _updateElementSize() {\n if (!this._pane) {\n return;\n }\n const style = this._pane.style;\n style.width = coerceCssPixelValue(this._config.width);\n style.height = coerceCssPixelValue(this._config.height);\n style.minWidth = coerceCssPixelValue(this._config.minWidth);\n style.minHeight = coerceCssPixelValue(this._config.minHeight);\n style.maxWidth = coerceCssPixelValue(this._config.maxWidth);\n style.maxHeight = coerceCssPixelValue(this._config.maxHeight);\n }\n /** Toggles the pointer events for the overlay pane element. */\n _togglePointerEvents(enablePointer) {\n this._pane.style.pointerEvents = enablePointer ? '' : 'none';\n }\n /** Attaches a backdrop for this overlay. */\n _attachBackdrop() {\n const showingClass = 'cdk-overlay-backdrop-showing';\n this._backdropElement = this._document.createElement('div');\n this._backdropElement.classList.add('cdk-overlay-backdrop');\n if (this._animationsDisabled) {\n this._backdropElement.classList.add('cdk-overlay-backdrop-noop-animation');\n }\n if (this._config.backdropClass) {\n this._toggleClasses(this._backdropElement, this._config.backdropClass, true);\n }\n // Insert the backdrop before the pane in the DOM order,\n // in order to handle stacked overlays properly.\n this._host.parentElement.insertBefore(this._backdropElement, this._host);\n // Forward backdrop clicks such that the consumer of the overlay can perform whatever\n // action desired when such a click occurs (usually closing the overlay).\n this._backdropElement.addEventListener('click', this._backdropClickHandler);\n // Add class to fade-in the backdrop after one frame.\n if (!this._animationsDisabled && typeof requestAnimationFrame !== 'undefined') {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => {\n if (this._backdropElement) {\n this._backdropElement.classList.add(showingClass);\n }\n });\n });\n }\n else {\n this._backdropElement.classList.add(showingClass);\n }\n }\n /**\n * Updates the stacking order of the element, moving it to the top if necessary.\n * This is required in cases where one overlay was detached, while another one,\n * that should be behind it, was destroyed. The next time both of them are opened,\n * the stacking will be wrong, because the detached element's pane will still be\n * in its original DOM position.\n */\n _updateStackingOrder() {\n if (this._host.nextSibling) {\n this._host.parentNode.appendChild(this._host);\n }\n }\n /** Detaches the backdrop (if any) associated with the overlay. */\n detachBackdrop() {\n const backdropToDetach = this._backdropElement;\n if (!backdropToDetach) {\n return;\n }\n if (this._animationsDisabled) {\n this._disposeBackdrop(backdropToDetach);\n return;\n }\n backdropToDetach.classList.remove('cdk-overlay-backdrop-showing');\n this._ngZone.runOutsideAngular(() => {\n backdropToDetach.addEventListener('transitionend', this._backdropTransitionendHandler);\n });\n // If the backdrop doesn't have a transition, the `transitionend` event won't fire.\n // In this case we make it unclickable and we try to remove it after a delay.\n backdropToDetach.style.pointerEvents = 'none';\n // Run this outside the Angular zone because there's nothing that Angular cares about.\n // If it were to run inside the Angular zone, every test that used Overlay would have to be\n // either async or fakeAsync.\n this._backdropTimeout = this._ngZone.runOutsideAngular(() => setTimeout(() => {\n this._disposeBackdrop(backdropToDetach);\n }, 500));\n }\n /** Toggles a single CSS class or an array of classes on an element. */\n _toggleClasses(element, cssClasses, isAdd) {\n const classes = coerceArray(cssClasses || []).filter(c => !!c);\n if (classes.length) {\n isAdd ? element.classList.add(...classes) : element.classList.remove(...classes);\n }\n }\n /** Detaches the overlay content next time the zone stabilizes. */\n _detachContentWhenStable() {\n // Normally we wouldn't have to explicitly run this outside the `NgZone`, however\n // if the consumer is using `zone-patch-rxjs`, the `Subscription.unsubscribe` call will\n // be patched to run inside the zone, which will throw us into an infinite loop.\n this._ngZone.runOutsideAngular(() => {\n // We can't remove the host here immediately, because the overlay pane's content\n // might still be animating. This stream helps us avoid interrupting the animation\n // by waiting for the pane to become empty.\n const subscription = this._ngZone.onStable\n .pipe(takeUntil(merge(this._attachments, this._detachments)))\n .subscribe(() => {\n // Needs a couple of checks for the pane and host, because\n // they may have been removed by the time the zone stabilizes.\n if (!this._pane || !this._host || this._pane.children.length === 0) {\n if (this._pane && this._config.panelClass) {\n this._toggleClasses(this._pane, this._config.panelClass, false);\n }\n if (this._host && this._host.parentElement) {\n this._previousHostParent = this._host.parentElement;\n this._host.remove();\n }\n subscription.unsubscribe();\n }\n });\n });\n }\n /** Disposes of a scroll strategy. */\n _disposeScrollStrategy() {\n const scrollStrategy = this._scrollStrategy;\n if (scrollStrategy) {\n scrollStrategy.disable();\n if (scrollStrategy.detach) {\n scrollStrategy.detach();\n }\n }\n }\n /** Removes a backdrop element from the DOM. */\n _disposeBackdrop(backdrop) {\n if (backdrop) {\n backdrop.removeEventListener('click', this._backdropClickHandler);\n backdrop.removeEventListener('transitionend', this._backdropTransitionendHandler);\n backdrop.remove();\n // It is possible that a new portal has been attached to this overlay since we started\n // removing the backdrop. If that is the case, only clear the backdrop reference if it\n // is still the same instance that we started to remove.\n if (this._backdropElement === backdrop) {\n this._backdropElement = null;\n }\n }\n if (this._backdropTimeout) {\n clearTimeout(this._backdropTimeout);\n this._backdropTimeout = undefined;\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// TODO: refactor clipping detection into a separate thing (part of scrolling module)\n// TODO: doesn't handle both flexible width and height when it has to scroll along both axis.\n/** Class to be added to the overlay bounding box. */\nconst boundingBoxClass = 'cdk-overlay-connected-position-bounding-box';\n/** Regex used to split a string on its CSS units. */\nconst cssUnitPattern = /([A-Za-z%]+)$/;\n/**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * implicit position relative some origin element. The relative position is defined in terms of\n * a point on the origin element that is connected to a point on the overlay element. For example,\n * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner\n * of the overlay.\n */\nclass FlexibleConnectedPositionStrategy {\n constructor(connectedTo, _viewportRuler, _document, _platform, _overlayContainer) {\n this._viewportRuler = _viewportRuler;\n this._document = _document;\n this._platform = _platform;\n this._overlayContainer = _overlayContainer;\n /** Last size used for the bounding box. Used to avoid resizing the overlay after open. */\n this._lastBoundingBoxSize = { width: 0, height: 0 };\n /** Whether the overlay was pushed in a previous positioning. */\n this._isPushed = false;\n /** Whether the overlay can be pushed on-screen on the initial open. */\n this._canPush = true;\n /** Whether the overlay can grow via flexible width/height after the initial open. */\n this._growAfterOpen = false;\n /** Whether the overlay's width and height can be constrained to fit within the viewport. */\n this._hasFlexibleDimensions = true;\n /** Whether the overlay position is locked. */\n this._positionLocked = false;\n /** Amount of space that must be maintained between the overlay and the edge of the viewport. */\n this._viewportMargin = 0;\n /** The Scrollable containers used to check scrollable view properties on position change. */\n this._scrollables = [];\n /** Ordered list of preferred positions, from most to least desirable. */\n this._preferredPositions = [];\n /** Subject that emits whenever the position changes. */\n this._positionChanges = new Subject();\n /** Subscription to viewport size changes. */\n this._resizeSubscription = Subscription.EMPTY;\n /** Default offset for the overlay along the x axis. */\n this._offsetX = 0;\n /** Default offset for the overlay along the y axis. */\n this._offsetY = 0;\n /** Keeps track of the CSS classes that the position strategy has applied on the overlay panel. */\n this._appliedPanelClasses = [];\n /** Observable sequence of position changes. */\n this.positionChanges = this._positionChanges;\n this.setOrigin(connectedTo);\n }\n /** Ordered list of preferred positions, from most to least desirable. */\n get positions() {\n return this._preferredPositions;\n }\n /** Attaches this position strategy to an overlay. */\n attach(overlayRef) {\n if (this._overlayRef &&\n overlayRef !== this._overlayRef &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('This position strategy is already attached to an overlay');\n }\n this._validatePositions();\n overlayRef.hostElement.classList.add(boundingBoxClass);\n this._overlayRef = overlayRef;\n this._boundingBox = overlayRef.hostElement;\n this._pane = overlayRef.overlayElement;\n this._isDisposed = false;\n this._isInitialRender = true;\n this._lastPosition = null;\n this._resizeSubscription.unsubscribe();\n this._resizeSubscription = this._viewportRuler.change().subscribe(() => {\n // When the window is resized, we want to trigger the next reposition as if it\n // was an initial render, in order for the strategy to pick a new optimal position,\n // otherwise position locking will cause it to stay at the old one.\n this._isInitialRender = true;\n this.apply();\n });\n }\n /**\n * Updates the position of the overlay element, using whichever preferred position relative\n * to the origin best fits on-screen.\n *\n * The selection of a position goes as follows:\n * - If any positions fit completely within the viewport as-is,\n * choose the first position that does so.\n * - If flexible dimensions are enabled and at least one satisfies the given minimum width/height,\n * choose the position with the greatest available size modified by the positions' weight.\n * - If pushing is enabled, take the position that went off-screen the least and push it\n * on-screen.\n * - If none of the previous criteria were met, use the position that goes off-screen the least.\n * @docs-private\n */\n apply() {\n // We shouldn't do anything if the strategy was disposed or we're on the server.\n if (this._isDisposed || !this._platform.isBrowser) {\n return;\n }\n // If the position has been applied already (e.g. when the overlay was opened) and the\n // consumer opted into locking in the position, re-use the old position, in order to\n // prevent the overlay from jumping around.\n if (!this._isInitialRender && this._positionLocked && this._lastPosition) {\n this.reapplyLastPosition();\n return;\n }\n this._clearPanelClasses();\n this._resetOverlayElementStyles();\n this._resetBoundingBoxStyles();\n // We need the bounding rects for the origin, the overlay and the container to determine how to position\n // the overlay relative to the origin.\n // We use the viewport rect to determine whether a position would go off-screen.\n this._viewportRect = this._getNarrowedViewportRect();\n this._originRect = this._getOriginRect();\n this._overlayRect = this._pane.getBoundingClientRect();\n this._containerRect = this._overlayContainer.getContainerElement().getBoundingClientRect();\n const originRect = this._originRect;\n const overlayRect = this._overlayRect;\n const viewportRect = this._viewportRect;\n const containerRect = this._containerRect;\n // Positions where the overlay will fit with flexible dimensions.\n const flexibleFits = [];\n // Fallback if none of the preferred positions fit within the viewport.\n let fallback;\n // Go through each of the preferred positions looking for a good fit.\n // If a good fit is found, it will be applied immediately.\n for (let pos of this._preferredPositions) {\n // Get the exact (x, y) coordinate for the point-of-origin on the origin element.\n let originPoint = this._getOriginPoint(originRect, containerRect, pos);\n // From that point-of-origin, get the exact (x, y) coordinate for the top-left corner of the\n // overlay in this position. We use the top-left corner for calculations and later translate\n // this into an appropriate (top, left, bottom, right) style.\n let overlayPoint = this._getOverlayPoint(originPoint, overlayRect, pos);\n // Calculate how well the overlay would fit into the viewport with this point.\n let overlayFit = this._getOverlayFit(overlayPoint, overlayRect, viewportRect, pos);\n // If the overlay, without any further work, fits into the viewport, use this position.\n if (overlayFit.isCompletelyWithinViewport) {\n this._isPushed = false;\n this._applyPosition(pos, originPoint);\n return;\n }\n // If the overlay has flexible dimensions, we can use this position\n // so long as there's enough space for the minimum dimensions.\n if (this._canFitWithFlexibleDimensions(overlayFit, overlayPoint, viewportRect)) {\n // Save positions where the overlay will fit with flexible dimensions. We will use these\n // if none of the positions fit *without* flexible dimensions.\n flexibleFits.push({\n position: pos,\n origin: originPoint,\n overlayRect,\n boundingBoxRect: this._calculateBoundingBoxRect(originPoint, pos),\n });\n continue;\n }\n // If the current preferred position does not fit on the screen, remember the position\n // if it has more visible area on-screen than we've seen and move onto the next preferred\n // position.\n if (!fallback || fallback.overlayFit.visibleArea < overlayFit.visibleArea) {\n fallback = { overlayFit, overlayPoint, originPoint, position: pos, overlayRect };\n }\n }\n // If there are any positions where the overlay would fit with flexible dimensions, choose the\n // one that has the greatest area available modified by the position's weight\n if (flexibleFits.length) {\n let bestFit = null;\n let bestScore = -1;\n for (const fit of flexibleFits) {\n const score = fit.boundingBoxRect.width * fit.boundingBoxRect.height * (fit.position.weight || 1);\n if (score > bestScore) {\n bestScore = score;\n bestFit = fit;\n }\n }\n this._isPushed = false;\n this._applyPosition(bestFit.position, bestFit.origin);\n return;\n }\n // When none of the preferred positions fit within the viewport, take the position\n // that went off-screen the least and attempt to push it on-screen.\n if (this._canPush) {\n // TODO(jelbourn): after pushing, the opening \"direction\" of the overlay might not make sense.\n this._isPushed = true;\n this._applyPosition(fallback.position, fallback.originPoint);\n return;\n }\n // All options for getting the overlay within the viewport have been exhausted, so go with the\n // position that went off-screen the least.\n this._applyPosition(fallback.position, fallback.originPoint);\n }\n detach() {\n this._clearPanelClasses();\n this._lastPosition = null;\n this._previousPushAmount = null;\n this._resizeSubscription.unsubscribe();\n }\n /** Cleanup after the element gets destroyed. */\n dispose() {\n if (this._isDisposed) {\n return;\n }\n // We can't use `_resetBoundingBoxStyles` here, because it resets\n // some properties to zero, rather than removing them.\n if (this._boundingBox) {\n extendStyles(this._boundingBox.style, {\n top: '',\n left: '',\n right: '',\n bottom: '',\n height: '',\n width: '',\n alignItems: '',\n justifyContent: '',\n });\n }\n if (this._pane) {\n this._resetOverlayElementStyles();\n }\n if (this._overlayRef) {\n this._overlayRef.hostElement.classList.remove(boundingBoxClass);\n }\n this.detach();\n this._positionChanges.complete();\n this._overlayRef = this._boundingBox = null;\n this._isDisposed = true;\n }\n /**\n * This re-aligns the overlay element with the trigger in its last calculated position,\n * even if a position higher in the \"preferred positions\" list would now fit. This\n * allows one to re-align the panel without changing the orientation of the panel.\n */\n reapplyLastPosition() {\n if (this._isDisposed || !this._platform.isBrowser) {\n return;\n }\n const lastPosition = this._lastPosition;\n if (lastPosition) {\n this._originRect = this._getOriginRect();\n this._overlayRect = this._pane.getBoundingClientRect();\n this._viewportRect = this._getNarrowedViewportRect();\n this._containerRect = this._overlayContainer.getContainerElement().getBoundingClientRect();\n const originPoint = this._getOriginPoint(this._originRect, this._containerRect, lastPosition);\n this._applyPosition(lastPosition, originPoint);\n }\n else {\n this.apply();\n }\n }\n /**\n * Sets the list of Scrollable containers that host the origin element so that\n * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every\n * Scrollable must be an ancestor element of the strategy's origin element.\n */\n withScrollableContainers(scrollables) {\n this._scrollables = scrollables;\n return this;\n }\n /**\n * Adds new preferred positions.\n * @param positions List of positions options for this overlay.\n */\n withPositions(positions) {\n this._preferredPositions = positions;\n // If the last calculated position object isn't part of the positions anymore, clear\n // it in order to avoid it being picked up if the consumer tries to re-apply.\n if (positions.indexOf(this._lastPosition) === -1) {\n this._lastPosition = null;\n }\n this._validatePositions();\n return this;\n }\n /**\n * Sets a minimum distance the overlay may be positioned to the edge of the viewport.\n * @param margin Required margin between the overlay and the viewport edge in pixels.\n */\n withViewportMargin(margin) {\n this._viewportMargin = margin;\n return this;\n }\n /** Sets whether the overlay's width and height can be constrained to fit within the viewport. */\n withFlexibleDimensions(flexibleDimensions = true) {\n this._hasFlexibleDimensions = flexibleDimensions;\n return this;\n }\n /** Sets whether the overlay can grow after the initial open via flexible width/height. */\n withGrowAfterOpen(growAfterOpen = true) {\n this._growAfterOpen = growAfterOpen;\n return this;\n }\n /** Sets whether the overlay can be pushed on-screen if none of the provided positions fit. */\n withPush(canPush = true) {\n this._canPush = canPush;\n return this;\n }\n /**\n * Sets whether the overlay's position should be locked in after it is positioned\n * initially. When an overlay is locked in, it won't attempt to reposition itself\n * when the position is re-applied (e.g. when the user scrolls away).\n * @param isLocked Whether the overlay should locked in.\n */\n withLockedPosition(isLocked = true) {\n this._positionLocked = isLocked;\n return this;\n }\n /**\n * Sets the origin, relative to which to position the overlay.\n * Using an element origin is useful for building components that need to be positioned\n * relatively to a trigger (e.g. dropdown menus or tooltips), whereas using a point can be\n * used for cases like contextual menus which open relative to the user's pointer.\n * @param origin Reference to the new origin.\n */\n setOrigin(origin) {\n this._origin = origin;\n return this;\n }\n /**\n * Sets the default offset for the overlay's connection point on the x-axis.\n * @param offset New offset in the X axis.\n */\n withDefaultOffsetX(offset) {\n this._offsetX = offset;\n return this;\n }\n /**\n * Sets the default offset for the overlay's connection point on the y-axis.\n * @param offset New offset in the Y axis.\n */\n withDefaultOffsetY(offset) {\n this._offsetY = offset;\n return this;\n }\n /**\n * Configures that the position strategy should set a `transform-origin` on some elements\n * inside the overlay, depending on the current position that is being applied. This is\n * useful for the cases where the origin of an animation can change depending on the\n * alignment of the overlay.\n * @param selector CSS selector that will be used to find the target\n * elements onto which to set the transform origin.\n */\n withTransformOriginOn(selector) {\n this._transformOriginSelector = selector;\n return this;\n }\n /**\n * Gets the (x, y) coordinate of a connection point on the origin based on a relative position.\n */\n _getOriginPoint(originRect, containerRect, pos) {\n let x;\n if (pos.originX == 'center') {\n // Note: when centering we should always use the `left`\n // offset, otherwise the position will be wrong in RTL.\n x = originRect.left + originRect.width / 2;\n }\n else {\n const startX = this._isRtl() ? originRect.right : originRect.left;\n const endX = this._isRtl() ? originRect.left : originRect.right;\n x = pos.originX == 'start' ? startX : endX;\n }\n // When zooming in Safari the container rectangle contains negative values for the position\n // and we need to re-add them to the calculated coordinates.\n if (containerRect.left < 0) {\n x -= containerRect.left;\n }\n let y;\n if (pos.originY == 'center') {\n y = originRect.top + originRect.height / 2;\n }\n else {\n y = pos.originY == 'top' ? originRect.top : originRect.bottom;\n }\n // Normally the containerRect's top value would be zero, however when the overlay is attached to an input\n // (e.g. in an autocomplete), mobile browsers will shift everything in order to put the input in the middle\n // of the screen and to make space for the virtual keyboard. We need to account for this offset,\n // otherwise our positioning will be thrown off.\n // Additionally, when zooming in Safari this fixes the vertical position.\n if (containerRect.top < 0) {\n y -= containerRect.top;\n }\n return { x, y };\n }\n /**\n * Gets the (x, y) coordinate of the top-left corner of the overlay given a given position and\n * origin point to which the overlay should be connected.\n */\n _getOverlayPoint(originPoint, overlayRect, pos) {\n // Calculate the (overlayStartX, overlayStartY), the start of the\n // potential overlay position relative to the origin point.\n let overlayStartX;\n if (pos.overlayX == 'center') {\n overlayStartX = -overlayRect.width / 2;\n }\n else if (pos.overlayX === 'start') {\n overlayStartX = this._isRtl() ? -overlayRect.width : 0;\n }\n else {\n overlayStartX = this._isRtl() ? 0 : -overlayRect.width;\n }\n let overlayStartY;\n if (pos.overlayY == 'center') {\n overlayStartY = -overlayRect.height / 2;\n }\n else {\n overlayStartY = pos.overlayY == 'top' ? 0 : -overlayRect.height;\n }\n // The (x, y) coordinates of the overlay.\n return {\n x: originPoint.x + overlayStartX,\n y: originPoint.y + overlayStartY,\n };\n }\n /** Gets how well an overlay at the given point will fit within the viewport. */\n _getOverlayFit(point, rawOverlayRect, viewport, position) {\n // Round the overlay rect when comparing against the\n // viewport, because the viewport is always rounded.\n const overlay = getRoundedBoundingClientRect(rawOverlayRect);\n let { x, y } = point;\n let offsetX = this._getOffset(position, 'x');\n let offsetY = this._getOffset(position, 'y');\n // Account for the offsets since they could push the overlay out of the viewport.\n if (offsetX) {\n x += offsetX;\n }\n if (offsetY) {\n y += offsetY;\n }\n // How much the overlay would overflow at this position, on each side.\n let leftOverflow = 0 - x;\n let rightOverflow = x + overlay.width - viewport.width;\n let topOverflow = 0 - y;\n let bottomOverflow = y + overlay.height - viewport.height;\n // Visible parts of the element on each axis.\n let visibleWidth = this._subtractOverflows(overlay.width, leftOverflow, rightOverflow);\n let visibleHeight = this._subtractOverflows(overlay.height, topOverflow, bottomOverflow);\n let visibleArea = visibleWidth * visibleHeight;\n return {\n visibleArea,\n isCompletelyWithinViewport: overlay.width * overlay.height === visibleArea,\n fitsInViewportVertically: visibleHeight === overlay.height,\n fitsInViewportHorizontally: visibleWidth == overlay.width,\n };\n }\n /**\n * Whether the overlay can fit within the viewport when it may resize either its width or height.\n * @param fit How well the overlay fits in the viewport at some position.\n * @param point The (x, y) coordinates of the overlay at some position.\n * @param viewport The geometry of the viewport.\n */\n _canFitWithFlexibleDimensions(fit, point, viewport) {\n if (this._hasFlexibleDimensions) {\n const availableHeight = viewport.bottom - point.y;\n const availableWidth = viewport.right - point.x;\n const minHeight = getPixelValue(this._overlayRef.getConfig().minHeight);\n const minWidth = getPixelValue(this._overlayRef.getConfig().minWidth);\n const verticalFit = fit.fitsInViewportVertically || (minHeight != null && minHeight <= availableHeight);\n const horizontalFit = fit.fitsInViewportHorizontally || (minWidth != null && minWidth <= availableWidth);\n return verticalFit && horizontalFit;\n }\n return false;\n }\n /**\n * Gets the point at which the overlay can be \"pushed\" on-screen. If the overlay is larger than\n * the viewport, the top-left corner will be pushed on-screen (with overflow occurring on the\n * right and bottom).\n *\n * @param start Starting point from which the overlay is pushed.\n * @param rawOverlayRect Dimensions of the overlay.\n * @param scrollPosition Current viewport scroll position.\n * @returns The point at which to position the overlay after pushing. This is effectively a new\n * originPoint.\n */\n _pushOverlayOnScreen(start, rawOverlayRect, scrollPosition) {\n // If the position is locked and we've pushed the overlay already, reuse the previous push\n // amount, rather than pushing it again. If we were to continue pushing, the element would\n // remain in the viewport, which goes against the expectations when position locking is enabled.\n if (this._previousPushAmount && this._positionLocked) {\n return {\n x: start.x + this._previousPushAmount.x,\n y: start.y + this._previousPushAmount.y,\n };\n }\n // Round the overlay rect when comparing against the\n // viewport, because the viewport is always rounded.\n const overlay = getRoundedBoundingClientRect(rawOverlayRect);\n const viewport = this._viewportRect;\n // Determine how much the overlay goes outside the viewport on each\n // side, which we'll use to decide which direction to push it.\n const overflowRight = Math.max(start.x + overlay.width - viewport.width, 0);\n const overflowBottom = Math.max(start.y + overlay.height - viewport.height, 0);\n const overflowTop = Math.max(viewport.top - scrollPosition.top - start.y, 0);\n const overflowLeft = Math.max(viewport.left - scrollPosition.left - start.x, 0);\n // Amount by which to push the overlay in each axis such that it remains on-screen.\n let pushX = 0;\n let pushY = 0;\n // If the overlay fits completely within the bounds of the viewport, push it from whichever\n // direction is goes off-screen. Otherwise, push the top-left corner such that its in the\n // viewport and allow for the trailing end of the overlay to go out of bounds.\n if (overlay.width <= viewport.width) {\n pushX = overflowLeft || -overflowRight;\n }\n else {\n pushX = start.x < this._viewportMargin ? viewport.left - scrollPosition.left - start.x : 0;\n }\n if (overlay.height <= viewport.height) {\n pushY = overflowTop || -overflowBottom;\n }\n else {\n pushY = start.y < this._viewportMargin ? viewport.top - scrollPosition.top - start.y : 0;\n }\n this._previousPushAmount = { x: pushX, y: pushY };\n return {\n x: start.x + pushX,\n y: start.y + pushY,\n };\n }\n /**\n * Applies a computed position to the overlay and emits a position change.\n * @param position The position preference\n * @param originPoint The point on the origin element where the overlay is connected.\n */\n _applyPosition(position, originPoint) {\n this._setTransformOrigin(position);\n this._setOverlayElementStyles(originPoint, position);\n this._setBoundingBoxStyles(originPoint, position);\n if (position.panelClass) {\n this._addPanelClasses(position.panelClass);\n }\n // Save the last connected position in case the position needs to be re-calculated.\n this._lastPosition = position;\n // Notify that the position has been changed along with its change properties.\n // We only emit if we've got any subscriptions, because the scroll visibility\n // calculations can be somewhat expensive.\n if (this._positionChanges.observers.length) {\n const scrollableViewProperties = this._getScrollVisibility();\n const changeEvent = new ConnectedOverlayPositionChange(position, scrollableViewProperties);\n this._positionChanges.next(changeEvent);\n }\n this._isInitialRender = false;\n }\n /** Sets the transform origin based on the configured selector and the passed-in position. */\n _setTransformOrigin(position) {\n if (!this._transformOriginSelector) {\n return;\n }\n const elements = this._boundingBox.querySelectorAll(this._transformOriginSelector);\n let xOrigin;\n let yOrigin = position.overlayY;\n if (position.overlayX === 'center') {\n xOrigin = 'center';\n }\n else if (this._isRtl()) {\n xOrigin = position.overlayX === 'start' ? 'right' : 'left';\n }\n else {\n xOrigin = position.overlayX === 'start' ? 'left' : 'right';\n }\n for (let i = 0; i < elements.length; i++) {\n elements[i].style.transformOrigin = `${xOrigin} ${yOrigin}`;\n }\n }\n /**\n * Gets the position and size of the overlay's sizing container.\n *\n * This method does no measuring and applies no styles so that we can cheaply compute the\n * bounds for all positions and choose the best fit based on these results.\n */\n _calculateBoundingBoxRect(origin, position) {\n const viewport = this._viewportRect;\n const isRtl = this._isRtl();\n let height, top, bottom;\n if (position.overlayY === 'top') {\n // Overlay is opening \"downward\" and thus is bound by the bottom viewport edge.\n top = origin.y;\n height = viewport.height - top + this._viewportMargin;\n }\n else if (position.overlayY === 'bottom') {\n // Overlay is opening \"upward\" and thus is bound by the top viewport edge. We need to add\n // the viewport margin back in, because the viewport rect is narrowed down to remove the\n // margin, whereas the `origin` position is calculated based on its `ClientRect`.\n bottom = viewport.height - origin.y + this._viewportMargin * 2;\n height = viewport.height - bottom + this._viewportMargin;\n }\n else {\n // If neither top nor bottom, it means that the overlay is vertically centered on the\n // origin point. Note that we want the position relative to the viewport, rather than\n // the page, which is why we don't use something like `viewport.bottom - origin.y` and\n // `origin.y - viewport.top`.\n const smallestDistanceToViewportEdge = Math.min(viewport.bottom - origin.y + viewport.top, origin.y);\n const previousHeight = this._lastBoundingBoxSize.height;\n height = smallestDistanceToViewportEdge * 2;\n top = origin.y - smallestDistanceToViewportEdge;\n if (height > previousHeight && !this._isInitialRender && !this._growAfterOpen) {\n top = origin.y - previousHeight / 2;\n }\n }\n // The overlay is opening 'right-ward' (the content flows to the right).\n const isBoundedByRightViewportEdge = (position.overlayX === 'start' && !isRtl) || (position.overlayX === 'end' && isRtl);\n // The overlay is opening 'left-ward' (the content flows to the left).\n const isBoundedByLeftViewportEdge = (position.overlayX === 'end' && !isRtl) || (position.overlayX === 'start' && isRtl);\n let width, left, right;\n if (isBoundedByLeftViewportEdge) {\n right = viewport.width - origin.x + this._viewportMargin;\n width = origin.x - this._viewportMargin;\n }\n else if (isBoundedByRightViewportEdge) {\n left = origin.x;\n width = viewport.right - origin.x;\n }\n else {\n // If neither start nor end, it means that the overlay is horizontally centered on the\n // origin point. Note that we want the position relative to the viewport, rather than\n // the page, which is why we don't use something like `viewport.right - origin.x` and\n // `origin.x - viewport.left`.\n const smallestDistanceToViewportEdge = Math.min(viewport.right - origin.x + viewport.left, origin.x);\n const previousWidth = this._lastBoundingBoxSize.width;\n width = smallestDistanceToViewportEdge * 2;\n left = origin.x - smallestDistanceToViewportEdge;\n if (width > previousWidth && !this._isInitialRender && !this._growAfterOpen) {\n left = origin.x - previousWidth / 2;\n }\n }\n return { top: top, left: left, bottom: bottom, right: right, width, height };\n }\n /**\n * Sets the position and size of the overlay's sizing wrapper. The wrapper is positioned on the\n * origin's connection point and stretches to the bounds of the viewport.\n *\n * @param origin The point on the origin element where the overlay is connected.\n * @param position The position preference\n */\n _setBoundingBoxStyles(origin, position) {\n const boundingBoxRect = this._calculateBoundingBoxRect(origin, position);\n // It's weird if the overlay *grows* while scrolling, so we take the last size into account\n // when applying a new size.\n if (!this._isInitialRender && !this._growAfterOpen) {\n boundingBoxRect.height = Math.min(boundingBoxRect.height, this._lastBoundingBoxSize.height);\n boundingBoxRect.width = Math.min(boundingBoxRect.width, this._lastBoundingBoxSize.width);\n }\n const styles = {};\n if (this._hasExactPosition()) {\n styles.top = styles.left = '0';\n styles.bottom = styles.right = styles.maxHeight = styles.maxWidth = '';\n styles.width = styles.height = '100%';\n }\n else {\n const maxHeight = this._overlayRef.getConfig().maxHeight;\n const maxWidth = this._overlayRef.getConfig().maxWidth;\n styles.height = coerceCssPixelValue(boundingBoxRect.height);\n styles.top = coerceCssPixelValue(boundingBoxRect.top);\n styles.bottom = coerceCssPixelValue(boundingBoxRect.bottom);\n styles.width = coerceCssPixelValue(boundingBoxRect.width);\n styles.left = coerceCssPixelValue(boundingBoxRect.left);\n styles.right = coerceCssPixelValue(boundingBoxRect.right);\n // Push the pane content towards the proper direction.\n if (position.overlayX === 'center') {\n styles.alignItems = 'center';\n }\n else {\n styles.alignItems = position.overlayX === 'end' ? 'flex-end' : 'flex-start';\n }\n if (position.overlayY === 'center') {\n styles.justifyContent = 'center';\n }\n else {\n styles.justifyContent = position.overlayY === 'bottom' ? 'flex-end' : 'flex-start';\n }\n if (maxHeight) {\n styles.maxHeight = coerceCssPixelValue(maxHeight);\n }\n if (maxWidth) {\n styles.maxWidth = coerceCssPixelValue(maxWidth);\n }\n }\n this._lastBoundingBoxSize = boundingBoxRect;\n extendStyles(this._boundingBox.style, styles);\n }\n /** Resets the styles for the bounding box so that a new positioning can be computed. */\n _resetBoundingBoxStyles() {\n extendStyles(this._boundingBox.style, {\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n height: '',\n width: '',\n alignItems: '',\n justifyContent: '',\n });\n }\n /** Resets the styles for the overlay pane so that a new positioning can be computed. */\n _resetOverlayElementStyles() {\n extendStyles(this._pane.style, {\n top: '',\n left: '',\n bottom: '',\n right: '',\n position: '',\n transform: '',\n });\n }\n /** Sets positioning styles to the overlay element. */\n _setOverlayElementStyles(originPoint, position) {\n const styles = {};\n const hasExactPosition = this._hasExactPosition();\n const hasFlexibleDimensions = this._hasFlexibleDimensions;\n const config = this._overlayRef.getConfig();\n if (hasExactPosition) {\n const scrollPosition = this._viewportRuler.getViewportScrollPosition();\n extendStyles(styles, this._getExactOverlayY(position, originPoint, scrollPosition));\n extendStyles(styles, this._getExactOverlayX(position, originPoint, scrollPosition));\n }\n else {\n styles.position = 'static';\n }\n // Use a transform to apply the offsets. We do this because the `center` positions rely on\n // being in the normal flex flow and setting a `top` / `left` at all will completely throw\n // off the position. We also can't use margins, because they won't have an effect in some\n // cases where the element doesn't have anything to \"push off of\". Finally, this works\n // better both with flexible and non-flexible positioning.\n let transformString = '';\n let offsetX = this._getOffset(position, 'x');\n let offsetY = this._getOffset(position, 'y');\n if (offsetX) {\n transformString += `translateX(${offsetX}px) `;\n }\n if (offsetY) {\n transformString += `translateY(${offsetY}px)`;\n }\n styles.transform = transformString.trim();\n // If a maxWidth or maxHeight is specified on the overlay, we remove them. We do this because\n // we need these values to both be set to \"100%\" for the automatic flexible sizing to work.\n // The maxHeight and maxWidth are set on the boundingBox in order to enforce the constraint.\n // Note that this doesn't apply when we have an exact position, in which case we do want to\n // apply them because they'll be cleared from the bounding box.\n if (config.maxHeight) {\n if (hasExactPosition) {\n styles.maxHeight = coerceCssPixelValue(config.maxHeight);\n }\n else if (hasFlexibleDimensions) {\n styles.maxHeight = '';\n }\n }\n if (config.maxWidth) {\n if (hasExactPosition) {\n styles.maxWidth = coerceCssPixelValue(config.maxWidth);\n }\n else if (hasFlexibleDimensions) {\n styles.maxWidth = '';\n }\n }\n extendStyles(this._pane.style, styles);\n }\n /** Gets the exact top/bottom for the overlay when not using flexible sizing or when pushing. */\n _getExactOverlayY(position, originPoint, scrollPosition) {\n // Reset any existing styles. This is necessary in case the\n // preferred position has changed since the last `apply`.\n let styles = { top: '', bottom: '' };\n let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);\n if (this._isPushed) {\n overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition);\n }\n // We want to set either `top` or `bottom` based on whether the overlay wants to appear\n // above or below the origin and the direction in which the element will expand.\n if (position.overlayY === 'bottom') {\n // When using `bottom`, we adjust the y position such that it is the distance\n // from the bottom of the viewport rather than the top.\n const documentHeight = this._document.documentElement.clientHeight;\n styles.bottom = `${documentHeight - (overlayPoint.y + this._overlayRect.height)}px`;\n }\n else {\n styles.top = coerceCssPixelValue(overlayPoint.y);\n }\n return styles;\n }\n /** Gets the exact left/right for the overlay when not using flexible sizing or when pushing. */\n _getExactOverlayX(position, originPoint, scrollPosition) {\n // Reset any existing styles. This is necessary in case the preferred position has\n // changed since the last `apply`.\n let styles = { left: '', right: '' };\n let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);\n if (this._isPushed) {\n overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition);\n }\n // We want to set either `left` or `right` based on whether the overlay wants to appear \"before\"\n // or \"after\" the origin, which determines the direction in which the element will expand.\n // For the horizontal axis, the meaning of \"before\" and \"after\" change based on whether the\n // page is in RTL or LTR.\n let horizontalStyleProperty;\n if (this._isRtl()) {\n horizontalStyleProperty = position.overlayX === 'end' ? 'left' : 'right';\n }\n else {\n horizontalStyleProperty = position.overlayX === 'end' ? 'right' : 'left';\n }\n // When we're setting `right`, we adjust the x position such that it is the distance\n // from the right edge of the viewport rather than the left edge.\n if (horizontalStyleProperty === 'right') {\n const documentWidth = this._document.documentElement.clientWidth;\n styles.right = `${documentWidth - (overlayPoint.x + this._overlayRect.width)}px`;\n }\n else {\n styles.left = coerceCssPixelValue(overlayPoint.x);\n }\n return styles;\n }\n /**\n * Gets the view properties of the trigger and overlay, including whether they are clipped\n * or completely outside the view of any of the strategy's scrollables.\n */\n _getScrollVisibility() {\n // Note: needs fresh rects since the position could've changed.\n const originBounds = this._getOriginRect();\n const overlayBounds = this._pane.getBoundingClientRect();\n // TODO(jelbourn): instead of needing all of the client rects for these scrolling containers\n // every time, we should be able to use the scrollTop of the containers if the size of those\n // containers hasn't changed.\n const scrollContainerBounds = this._scrollables.map(scrollable => {\n return scrollable.getElementRef().nativeElement.getBoundingClientRect();\n });\n return {\n isOriginClipped: isElementClippedByScrolling(originBounds, scrollContainerBounds),\n isOriginOutsideView: isElementScrolledOutsideView(originBounds, scrollContainerBounds),\n isOverlayClipped: isElementClippedByScrolling(overlayBounds, scrollContainerBounds),\n isOverlayOutsideView: isElementScrolledOutsideView(overlayBounds, scrollContainerBounds),\n };\n }\n /** Subtracts the amount that an element is overflowing on an axis from its length. */\n _subtractOverflows(length, ...overflows) {\n return overflows.reduce((currentValue, currentOverflow) => {\n return currentValue - Math.max(currentOverflow, 0);\n }, length);\n }\n /** Narrows the given viewport rect by the current _viewportMargin. */\n _getNarrowedViewportRect() {\n // We recalculate the viewport rect here ourselves, rather than using the ViewportRuler,\n // because we want to use the `clientWidth` and `clientHeight` as the base. The difference\n // being that the client properties don't include the scrollbar, as opposed to `innerWidth`\n // and `innerHeight` that do. This is necessary, because the overlay container uses\n // 100% `width` and `height` which don't include the scrollbar either.\n const width = this._document.documentElement.clientWidth;\n const height = this._document.documentElement.clientHeight;\n const scrollPosition = this._viewportRuler.getViewportScrollPosition();\n return {\n top: scrollPosition.top + this._viewportMargin,\n left: scrollPosition.left + this._viewportMargin,\n right: scrollPosition.left + width - this._viewportMargin,\n bottom: scrollPosition.top + height - this._viewportMargin,\n width: width - 2 * this._viewportMargin,\n height: height - 2 * this._viewportMargin,\n };\n }\n /** Whether the we're dealing with an RTL context */\n _isRtl() {\n return this._overlayRef.getDirection() === 'rtl';\n }\n /** Determines whether the overlay uses exact or flexible positioning. */\n _hasExactPosition() {\n return !this._hasFlexibleDimensions || this._isPushed;\n }\n /** Retrieves the offset of a position along the x or y axis. */\n _getOffset(position, axis) {\n if (axis === 'x') {\n // We don't do something like `position['offset' + axis]` in\n // order to avoid breaking minifiers that rename properties.\n return position.offsetX == null ? this._offsetX : position.offsetX;\n }\n return position.offsetY == null ? this._offsetY : position.offsetY;\n }\n /** Validates that the current position match the expected values. */\n _validatePositions() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._preferredPositions.length) {\n throw Error('FlexibleConnectedPositionStrategy: At least one position is required.');\n }\n // TODO(crisbeto): remove these once Angular's template type\n // checking is advanced enough to catch these cases.\n this._preferredPositions.forEach(pair => {\n validateHorizontalPosition('originX', pair.originX);\n validateVerticalPosition('originY', pair.originY);\n validateHorizontalPosition('overlayX', pair.overlayX);\n validateVerticalPosition('overlayY', pair.overlayY);\n });\n }\n }\n /** Adds a single CSS class or an array of classes on the overlay panel. */\n _addPanelClasses(cssClasses) {\n if (this._pane) {\n coerceArray(cssClasses).forEach(cssClass => {\n if (cssClass !== '' && this._appliedPanelClasses.indexOf(cssClass) === -1) {\n this._appliedPanelClasses.push(cssClass);\n this._pane.classList.add(cssClass);\n }\n });\n }\n }\n /** Clears the classes that the position strategy has applied from the overlay panel. */\n _clearPanelClasses() {\n if (this._pane) {\n this._appliedPanelClasses.forEach(cssClass => {\n this._pane.classList.remove(cssClass);\n });\n this._appliedPanelClasses = [];\n }\n }\n /** Returns the ClientRect of the current origin. */\n _getOriginRect() {\n const origin = this._origin;\n if (origin instanceof ElementRef) {\n return origin.nativeElement.getBoundingClientRect();\n }\n // Check for Element so SVG elements are also supported.\n if (origin instanceof Element) {\n return origin.getBoundingClientRect();\n }\n const width = origin.width || 0;\n const height = origin.height || 0;\n // If the origin is a point, return a client rect as if it was a 0x0 element at the point.\n return {\n top: origin.y,\n bottom: origin.y + height,\n left: origin.x,\n right: origin.x + width,\n height,\n width,\n };\n }\n}\n/** Shallow-extends a stylesheet object with another stylesheet object. */\nfunction extendStyles(destination, source) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n destination[key] = source[key];\n }\n }\n return destination;\n}\n/**\n * Extracts the pixel value as a number from a value, if it's a number\n * or a CSS pixel string (e.g. `1337px`). Otherwise returns null.\n */\nfunction getPixelValue(input) {\n if (typeof input !== 'number' && input != null) {\n const [value, units] = input.split(cssUnitPattern);\n return !units || units === 'px' ? parseFloat(value) : null;\n }\n return input || null;\n}\n/**\n * Gets a version of an element's bounding `ClientRect` where all the values are rounded down to\n * the nearest pixel. This allows us to account for the cases where there may be sub-pixel\n * deviations in the `ClientRect` returned by the browser (e.g. when zoomed in with a percentage\n * size, see #21350).\n */\nfunction getRoundedBoundingClientRect(clientRect) {\n return {\n top: Math.floor(clientRect.top),\n right: Math.floor(clientRect.right),\n bottom: Math.floor(clientRect.bottom),\n left: Math.floor(clientRect.left),\n width: Math.floor(clientRect.width),\n height: Math.floor(clientRect.height),\n };\n}\nconst STANDARD_DROPDOWN_BELOW_POSITIONS = [\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' },\n];\nconst STANDARD_DROPDOWN_ADJACENT_POSITIONS = [\n { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top' },\n { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom' },\n { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top' },\n { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom' },\n];\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Class to be added to the overlay pane wrapper. */\nconst wrapperClass = 'cdk-global-overlay-wrapper';\n/**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * explicit position relative to the browser's viewport. We use flexbox, instead of\n * transforms, in order to avoid issues with subpixel rendering which can cause the\n * element to become blurry.\n */\nclass GlobalPositionStrategy {\n constructor() {\n this._cssPosition = 'static';\n this._topOffset = '';\n this._bottomOffset = '';\n this._alignItems = '';\n this._xPosition = '';\n this._xOffset = '';\n this._width = '';\n this._height = '';\n this._isDisposed = false;\n }\n attach(overlayRef) {\n const config = overlayRef.getConfig();\n this._overlayRef = overlayRef;\n if (this._width && !config.width) {\n overlayRef.updateSize({ width: this._width });\n }\n if (this._height && !config.height) {\n overlayRef.updateSize({ height: this._height });\n }\n overlayRef.hostElement.classList.add(wrapperClass);\n this._isDisposed = false;\n }\n /**\n * Sets the top position of the overlay. Clears any previously set vertical position.\n * @param value New top offset.\n */\n top(value = '') {\n this._bottomOffset = '';\n this._topOffset = value;\n this._alignItems = 'flex-start';\n return this;\n }\n /**\n * Sets the left position of the overlay. Clears any previously set horizontal position.\n * @param value New left offset.\n */\n left(value = '') {\n this._xOffset = value;\n this._xPosition = 'left';\n return this;\n }\n /**\n * Sets the bottom position of the overlay. Clears any previously set vertical position.\n * @param value New bottom offset.\n */\n bottom(value = '') {\n this._topOffset = '';\n this._bottomOffset = value;\n this._alignItems = 'flex-end';\n return this;\n }\n /**\n * Sets the right position of the overlay. Clears any previously set horizontal position.\n * @param value New right offset.\n */\n right(value = '') {\n this._xOffset = value;\n this._xPosition = 'right';\n return this;\n }\n /**\n * Sets the overlay to the start of the viewport, depending on the overlay direction.\n * This will be to the left in LTR layouts and to the right in RTL.\n * @param offset Offset from the edge of the screen.\n */\n start(value = '') {\n this._xOffset = value;\n this._xPosition = 'start';\n return this;\n }\n /**\n * Sets the overlay to the end of the viewport, depending on the overlay direction.\n * This will be to the right in LTR layouts and to the left in RTL.\n * @param offset Offset from the edge of the screen.\n */\n end(value = '') {\n this._xOffset = value;\n this._xPosition = 'end';\n return this;\n }\n /**\n * Sets the overlay width and clears any previously set width.\n * @param value New width for the overlay\n * @deprecated Pass the `width` through the `OverlayConfig`.\n * @breaking-change 8.0.0\n */\n width(value = '') {\n if (this._overlayRef) {\n this._overlayRef.updateSize({ width: value });\n }\n else {\n this._width = value;\n }\n return this;\n }\n /**\n * Sets the overlay height and clears any previously set height.\n * @param value New height for the overlay\n * @deprecated Pass the `height` through the `OverlayConfig`.\n * @breaking-change 8.0.0\n */\n height(value = '') {\n if (this._overlayRef) {\n this._overlayRef.updateSize({ height: value });\n }\n else {\n this._height = value;\n }\n return this;\n }\n /**\n * Centers the overlay horizontally with an optional offset.\n * Clears any previously set horizontal position.\n *\n * @param offset Overlay offset from the horizontal center.\n */\n centerHorizontally(offset = '') {\n this.left(offset);\n this._xPosition = 'center';\n return this;\n }\n /**\n * Centers the overlay vertically with an optional offset.\n * Clears any previously set vertical position.\n *\n * @param offset Overlay offset from the vertical center.\n */\n centerVertically(offset = '') {\n this.top(offset);\n this._alignItems = 'center';\n return this;\n }\n /**\n * Apply the position to the element.\n * @docs-private\n */\n apply() {\n // Since the overlay ref applies the strategy asynchronously, it could\n // have been disposed before it ends up being applied. If that is the\n // case, we shouldn't do anything.\n if (!this._overlayRef || !this._overlayRef.hasAttached()) {\n return;\n }\n const styles = this._overlayRef.overlayElement.style;\n const parentStyles = this._overlayRef.hostElement.style;\n const config = this._overlayRef.getConfig();\n const { width, height, maxWidth, maxHeight } = config;\n const shouldBeFlushHorizontally = (width === '100%' || width === '100vw') &&\n (!maxWidth || maxWidth === '100%' || maxWidth === '100vw');\n const shouldBeFlushVertically = (height === '100%' || height === '100vh') &&\n (!maxHeight || maxHeight === '100%' || maxHeight === '100vh');\n const xPosition = this._xPosition;\n const xOffset = this._xOffset;\n const isRtl = this._overlayRef.getConfig().direction === 'rtl';\n let marginLeft = '';\n let marginRight = '';\n let justifyContent = '';\n if (shouldBeFlushHorizontally) {\n justifyContent = 'flex-start';\n }\n else if (xPosition === 'center') {\n justifyContent = 'center';\n if (isRtl) {\n marginRight = xOffset;\n }\n else {\n marginLeft = xOffset;\n }\n }\n else if (isRtl) {\n if (xPosition === 'left' || xPosition === 'end') {\n justifyContent = 'flex-end';\n marginLeft = xOffset;\n }\n else if (xPosition === 'right' || xPosition === 'start') {\n justifyContent = 'flex-start';\n marginRight = xOffset;\n }\n }\n else if (xPosition === 'left' || xPosition === 'start') {\n justifyContent = 'flex-start';\n marginLeft = xOffset;\n }\n else if (xPosition === 'right' || xPosition === 'end') {\n justifyContent = 'flex-end';\n marginRight = xOffset;\n }\n styles.position = this._cssPosition;\n styles.marginLeft = shouldBeFlushHorizontally ? '0' : marginLeft;\n styles.marginTop = shouldBeFlushVertically ? '0' : this._topOffset;\n styles.marginBottom = this._bottomOffset;\n styles.marginRight = shouldBeFlushHorizontally ? '0' : marginRight;\n parentStyles.justifyContent = justifyContent;\n parentStyles.alignItems = shouldBeFlushVertically ? 'flex-start' : this._alignItems;\n }\n /**\n * Cleans up the DOM changes from the position strategy.\n * @docs-private\n */\n dispose() {\n if (this._isDisposed || !this._overlayRef) {\n return;\n }\n const styles = this._overlayRef.overlayElement.style;\n const parent = this._overlayRef.hostElement;\n const parentStyles = parent.style;\n parent.classList.remove(wrapperClass);\n parentStyles.justifyContent =\n parentStyles.alignItems =\n styles.marginTop =\n styles.marginBottom =\n styles.marginLeft =\n styles.marginRight =\n styles.position =\n '';\n this._overlayRef = null;\n this._isDisposed = 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/** Builder for overlay position strategy. */\nclass OverlayPositionBuilder {\n constructor(_viewportRuler, _document, _platform, _overlayContainer) {\n this._viewportRuler = _viewportRuler;\n this._document = _document;\n this._platform = _platform;\n this._overlayContainer = _overlayContainer;\n }\n /**\n * Creates a global position strategy.\n */\n global() {\n return new GlobalPositionStrategy();\n }\n /**\n * Creates a flexible position strategy.\n * @param origin Origin relative to which to position the overlay.\n */\n flexibleConnectedTo(origin) {\n return new FlexibleConnectedPositionStrategy(origin, this._viewportRuler, this._document, this._platform, this._overlayContainer);\n }\n}\nOverlayPositionBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: OverlayPositionBuilder, deps: [{ token: i1.ViewportRuler }, { token: DOCUMENT }, { token: i1$1.Platform }, { token: OverlayContainer }], target: i0.ɵɵFactoryTarget.Injectable });\nOverlayPositionBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: OverlayPositionBuilder, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: OverlayPositionBuilder, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.ViewportRuler }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i1$1.Platform }, { type: OverlayContainer }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Next overlay unique ID. */\nlet nextUniqueId = 0;\n// Note that Overlay is *not* scoped to the app root because of the ComponentFactoryResolver\n// which needs to be different depending on where OverlayModule is imported.\n/**\n * Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be\n * used as a low-level building block for other components. Dialogs, tooltips, menus,\n * selects, etc. can all be built using overlays. The service should primarily be used by authors\n * of re-usable components rather than developers building end-user applications.\n *\n * An overlay *is* a PortalOutlet, so any kind of Portal can be loaded into one.\n */\nclass Overlay {\n constructor(\n /** Scrolling strategies that can be used when creating an overlay. */\n scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, _location, _outsideClickDispatcher, _animationsModuleType) {\n this.scrollStrategies = scrollStrategies;\n this._overlayContainer = _overlayContainer;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._positionBuilder = _positionBuilder;\n this._keyboardDispatcher = _keyboardDispatcher;\n this._injector = _injector;\n this._ngZone = _ngZone;\n this._document = _document;\n this._directionality = _directionality;\n this._location = _location;\n this._outsideClickDispatcher = _outsideClickDispatcher;\n this._animationsModuleType = _animationsModuleType;\n }\n /**\n * Creates an overlay.\n * @param config Configuration applied to the overlay.\n * @returns Reference to the created overlay.\n */\n create(config) {\n const host = this._createHostElement();\n const pane = this._createPaneElement(host);\n const portalOutlet = this._createPortalOutlet(pane);\n const overlayConfig = new OverlayConfig(config);\n overlayConfig.direction = overlayConfig.direction || this._directionality.value;\n return new OverlayRef(portalOutlet, host, pane, overlayConfig, this._ngZone, this._keyboardDispatcher, this._document, this._location, this._outsideClickDispatcher, this._animationsModuleType === 'NoopAnimations');\n }\n /**\n * Gets a position builder that can be used, via fluent API,\n * to construct and configure a position strategy.\n * @returns An overlay position builder.\n */\n position() {\n return this._positionBuilder;\n }\n /**\n * Creates the DOM element for an overlay and appends it to the overlay container.\n * @returns Newly-created pane element\n */\n _createPaneElement(host) {\n const pane = this._document.createElement('div');\n pane.id = `cdk-overlay-${nextUniqueId++}`;\n pane.classList.add('cdk-overlay-pane');\n host.appendChild(pane);\n return pane;\n }\n /**\n * Creates the host element that wraps around an overlay\n * and can be used for advanced positioning.\n * @returns Newly-create host element.\n */\n _createHostElement() {\n const host = this._document.createElement('div');\n this._overlayContainer.getContainerElement().appendChild(host);\n return host;\n }\n /**\n * Create a DomPortalOutlet into which the overlay content can be loaded.\n * @param pane The DOM element to turn into a portal outlet.\n * @returns A portal outlet for the given DOM element.\n */\n _createPortalOutlet(pane) {\n // We have to resolve the ApplicationRef later in order to allow people\n // to use overlay-based providers during app initialization.\n if (!this._appRef) {\n this._appRef = this._injector.get(ApplicationRef);\n }\n return new DomPortalOutlet(pane, this._componentFactoryResolver, this._appRef, this._injector, this._document);\n }\n}\nOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Overlay, deps: [{ token: ScrollStrategyOptions }, { token: OverlayContainer }, { token: i0.ComponentFactoryResolver }, { token: OverlayPositionBuilder }, { token: OverlayKeyboardDispatcher }, { token: i0.Injector }, { token: i0.NgZone }, { token: DOCUMENT }, { token: i5.Directionality }, { token: i6.Location }, { token: OverlayOutsideClickDispatcher }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nOverlay.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Overlay });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Overlay, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: ScrollStrategyOptions }, { type: OverlayContainer }, { type: i0.ComponentFactoryResolver }, { type: OverlayPositionBuilder }, { type: OverlayKeyboardDispatcher }, { type: i0.Injector }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i5.Directionality }, { type: i6.Location }, { type: OverlayOutsideClickDispatcher }, { type: undefined, decorators: [{\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }, {\n type: Optional\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Default set of positions for the overlay. Follows the behavior of a dropdown. */\nconst defaultPositionList = [\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n },\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n },\n];\n/** Injection token that determines the scroll handling while the connected overlay is open. */\nconst CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY = new InjectionToken('cdk-connected-overlay-scroll-strategy');\n/**\n * Directive applied to an element to make it usable as an origin for an Overlay using a\n * ConnectedPositionStrategy.\n */\nclass CdkOverlayOrigin {\n constructor(\n /** Reference to the element on which the directive is applied. */\n elementRef) {\n this.elementRef = elementRef;\n }\n}\nCdkOverlayOrigin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkOverlayOrigin, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkOverlayOrigin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkOverlayOrigin, selector: \"[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]\", exportAs: [\"cdkOverlayOrigin\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkOverlayOrigin, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]',\n exportAs: 'cdkOverlayOrigin',\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });\n/**\n * Directive to facilitate declarative creation of an\n * Overlay using a FlexibleConnectedPositionStrategy.\n */\nclass CdkConnectedOverlay {\n // TODO(jelbourn): inputs for size, scroll behavior, animation, etc.\n constructor(_overlay, templateRef, viewContainerRef, scrollStrategyFactory, _dir) {\n this._overlay = _overlay;\n this._dir = _dir;\n this._hasBackdrop = false;\n this._lockPosition = false;\n this._growAfterOpen = false;\n this._flexibleDimensions = false;\n this._push = false;\n this._backdropSubscription = Subscription.EMPTY;\n this._attachSubscription = Subscription.EMPTY;\n this._detachSubscription = Subscription.EMPTY;\n this._positionSubscription = Subscription.EMPTY;\n /** Margin between the overlay and the viewport edges. */\n this.viewportMargin = 0;\n /** Whether the overlay is open. */\n this.open = false;\n /** Whether the overlay can be closed by user interaction. */\n this.disableClose = false;\n /** Event emitted when the backdrop is clicked. */\n this.backdropClick = new EventEmitter();\n /** Event emitted when the position has changed. */\n this.positionChange = new EventEmitter();\n /** Event emitted when the overlay has been attached. */\n this.attach = new EventEmitter();\n /** Event emitted when the overlay has been detached. */\n this.detach = new EventEmitter();\n /** Emits when there are keyboard events that are targeted at the overlay. */\n this.overlayKeydown = new EventEmitter();\n /** Emits when there are mouse outside click events that are targeted at the overlay. */\n this.overlayOutsideClick = new EventEmitter();\n this._templatePortal = new TemplatePortal(templateRef, viewContainerRef);\n this._scrollStrategyFactory = scrollStrategyFactory;\n this.scrollStrategy = this._scrollStrategyFactory();\n }\n /** The offset in pixels for the overlay connection point on the x-axis */\n get offsetX() {\n return this._offsetX;\n }\n set offsetX(offsetX) {\n this._offsetX = offsetX;\n if (this._position) {\n this._updatePositionStrategy(this._position);\n }\n }\n /** The offset in pixels for the overlay connection point on the y-axis */\n get offsetY() {\n return this._offsetY;\n }\n set offsetY(offsetY) {\n this._offsetY = offsetY;\n if (this._position) {\n this._updatePositionStrategy(this._position);\n }\n }\n /** Whether or not the overlay should attach a backdrop. */\n get hasBackdrop() {\n return this._hasBackdrop;\n }\n set hasBackdrop(value) {\n this._hasBackdrop = coerceBooleanProperty(value);\n }\n /** Whether or not the overlay should be locked when scrolling. */\n get lockPosition() {\n return this._lockPosition;\n }\n set lockPosition(value) {\n this._lockPosition = coerceBooleanProperty(value);\n }\n /** Whether the overlay's width and height can be constrained to fit within the viewport. */\n get flexibleDimensions() {\n return this._flexibleDimensions;\n }\n set flexibleDimensions(value) {\n this._flexibleDimensions = coerceBooleanProperty(value);\n }\n /** Whether the overlay can grow after the initial open when flexible positioning is turned on. */\n get growAfterOpen() {\n return this._growAfterOpen;\n }\n set growAfterOpen(value) {\n this._growAfterOpen = coerceBooleanProperty(value);\n }\n /** Whether the overlay can be pushed on-screen if none of the provided positions fit. */\n get push() {\n return this._push;\n }\n set push(value) {\n this._push = coerceBooleanProperty(value);\n }\n /** The associated overlay reference. */\n get overlayRef() {\n return this._overlayRef;\n }\n /** The element's layout direction. */\n get dir() {\n return this._dir ? this._dir.value : 'ltr';\n }\n ngOnDestroy() {\n this._attachSubscription.unsubscribe();\n this._detachSubscription.unsubscribe();\n this._backdropSubscription.unsubscribe();\n this._positionSubscription.unsubscribe();\n if (this._overlayRef) {\n this._overlayRef.dispose();\n }\n }\n ngOnChanges(changes) {\n if (this._position) {\n this._updatePositionStrategy(this._position);\n this._overlayRef.updateSize({\n width: this.width,\n minWidth: this.minWidth,\n height: this.height,\n minHeight: this.minHeight,\n });\n if (changes['origin'] && this.open) {\n this._position.apply();\n }\n }\n if (changes['open']) {\n this.open ? this._attachOverlay() : this._detachOverlay();\n }\n }\n /** Creates an overlay */\n _createOverlay() {\n if (!this.positions || !this.positions.length) {\n this.positions = defaultPositionList;\n }\n const overlayRef = (this._overlayRef = this._overlay.create(this._buildConfig()));\n this._attachSubscription = overlayRef.attachments().subscribe(() => this.attach.emit());\n this._detachSubscription = overlayRef.detachments().subscribe(() => this.detach.emit());\n overlayRef.keydownEvents().subscribe((event) => {\n this.overlayKeydown.next(event);\n if (event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)) {\n event.preventDefault();\n this._detachOverlay();\n }\n });\n this._overlayRef.outsidePointerEvents().subscribe((event) => {\n this.overlayOutsideClick.next(event);\n });\n }\n /** Builds the overlay config based on the directive's inputs */\n _buildConfig() {\n const positionStrategy = (this._position =\n this.positionStrategy || this._createPositionStrategy());\n const overlayConfig = new OverlayConfig({\n direction: this._dir,\n positionStrategy,\n scrollStrategy: this.scrollStrategy,\n hasBackdrop: this.hasBackdrop,\n });\n if (this.width || this.width === 0) {\n overlayConfig.width = this.width;\n }\n if (this.height || this.height === 0) {\n overlayConfig.height = this.height;\n }\n if (this.minWidth || this.minWidth === 0) {\n overlayConfig.minWidth = this.minWidth;\n }\n if (this.minHeight || this.minHeight === 0) {\n overlayConfig.minHeight = this.minHeight;\n }\n if (this.backdropClass) {\n overlayConfig.backdropClass = this.backdropClass;\n }\n if (this.panelClass) {\n overlayConfig.panelClass = this.panelClass;\n }\n return overlayConfig;\n }\n /** Updates the state of a position strategy, based on the values of the directive inputs. */\n _updatePositionStrategy(positionStrategy) {\n const positions = this.positions.map(currentPosition => ({\n originX: currentPosition.originX,\n originY: currentPosition.originY,\n overlayX: currentPosition.overlayX,\n overlayY: currentPosition.overlayY,\n offsetX: currentPosition.offsetX || this.offsetX,\n offsetY: currentPosition.offsetY || this.offsetY,\n panelClass: currentPosition.panelClass || undefined,\n }));\n return positionStrategy\n .setOrigin(this._getFlexibleConnectedPositionStrategyOrigin())\n .withPositions(positions)\n .withFlexibleDimensions(this.flexibleDimensions)\n .withPush(this.push)\n .withGrowAfterOpen(this.growAfterOpen)\n .withViewportMargin(this.viewportMargin)\n .withLockedPosition(this.lockPosition)\n .withTransformOriginOn(this.transformOriginSelector);\n }\n /** Returns the position strategy of the overlay to be set on the overlay config */\n _createPositionStrategy() {\n const strategy = this._overlay\n .position()\n .flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());\n this._updatePositionStrategy(strategy);\n return strategy;\n }\n _getFlexibleConnectedPositionStrategyOrigin() {\n if (this.origin instanceof CdkOverlayOrigin) {\n return this.origin.elementRef;\n }\n else {\n return this.origin;\n }\n }\n /** Attaches the overlay and subscribes to backdrop clicks if backdrop exists */\n _attachOverlay() {\n if (!this._overlayRef) {\n this._createOverlay();\n }\n else {\n // Update the overlay size, in case the directive's inputs have changed\n this._overlayRef.getConfig().hasBackdrop = this.hasBackdrop;\n }\n if (!this._overlayRef.hasAttached()) {\n this._overlayRef.attach(this._templatePortal);\n }\n if (this.hasBackdrop) {\n this._backdropSubscription = this._overlayRef.backdropClick().subscribe(event => {\n this.backdropClick.emit(event);\n });\n }\n else {\n this._backdropSubscription.unsubscribe();\n }\n this._positionSubscription.unsubscribe();\n // Only subscribe to `positionChanges` if requested, because putting\n // together all the information for it can be expensive.\n if (this.positionChange.observers.length > 0) {\n this._positionSubscription = this._position.positionChanges\n .pipe(takeWhile(() => this.positionChange.observers.length > 0))\n .subscribe(position => {\n this.positionChange.emit(position);\n if (this.positionChange.observers.length === 0) {\n this._positionSubscription.unsubscribe();\n }\n });\n }\n }\n /** Detaches the overlay and unsubscribes to backdrop clicks if backdrop exists */\n _detachOverlay() {\n if (this._overlayRef) {\n this._overlayRef.detach();\n }\n this._backdropSubscription.unsubscribe();\n this._positionSubscription.unsubscribe();\n }\n}\nCdkConnectedOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkConnectedOverlay, deps: [{ token: Overlay }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY }, { token: i5.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkConnectedOverlay.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkConnectedOverlay, selector: \"[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]\", inputs: { origin: [\"cdkConnectedOverlayOrigin\", \"origin\"], positions: [\"cdkConnectedOverlayPositions\", \"positions\"], positionStrategy: [\"cdkConnectedOverlayPositionStrategy\", \"positionStrategy\"], offsetX: [\"cdkConnectedOverlayOffsetX\", \"offsetX\"], offsetY: [\"cdkConnectedOverlayOffsetY\", \"offsetY\"], width: [\"cdkConnectedOverlayWidth\", \"width\"], height: [\"cdkConnectedOverlayHeight\", \"height\"], minWidth: [\"cdkConnectedOverlayMinWidth\", \"minWidth\"], minHeight: [\"cdkConnectedOverlayMinHeight\", \"minHeight\"], backdropClass: [\"cdkConnectedOverlayBackdropClass\", \"backdropClass\"], panelClass: [\"cdkConnectedOverlayPanelClass\", \"panelClass\"], viewportMargin: [\"cdkConnectedOverlayViewportMargin\", \"viewportMargin\"], scrollStrategy: [\"cdkConnectedOverlayScrollStrategy\", \"scrollStrategy\"], open: [\"cdkConnectedOverlayOpen\", \"open\"], disableClose: [\"cdkConnectedOverlayDisableClose\", \"disableClose\"], transformOriginSelector: [\"cdkConnectedOverlayTransformOriginOn\", \"transformOriginSelector\"], hasBackdrop: [\"cdkConnectedOverlayHasBackdrop\", \"hasBackdrop\"], lockPosition: [\"cdkConnectedOverlayLockPosition\", \"lockPosition\"], flexibleDimensions: [\"cdkConnectedOverlayFlexibleDimensions\", \"flexibleDimensions\"], growAfterOpen: [\"cdkConnectedOverlayGrowAfterOpen\", \"growAfterOpen\"], push: [\"cdkConnectedOverlayPush\", \"push\"] }, outputs: { backdropClick: \"backdropClick\", positionChange: \"positionChange\", attach: \"attach\", detach: \"detach\", overlayKeydown: \"overlayKeydown\", overlayOutsideClick: \"overlayOutsideClick\" }, exportAs: [\"cdkConnectedOverlay\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkConnectedOverlay, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]',\n exportAs: 'cdkConnectedOverlay',\n }]\n }], ctorParameters: function () { return [{ type: Overlay }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY]\n }] }, { type: i5.Directionality, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { origin: [{\n type: Input,\n args: ['cdkConnectedOverlayOrigin']\n }], positions: [{\n type: Input,\n args: ['cdkConnectedOverlayPositions']\n }], positionStrategy: [{\n type: Input,\n args: ['cdkConnectedOverlayPositionStrategy']\n }], offsetX: [{\n type: Input,\n args: ['cdkConnectedOverlayOffsetX']\n }], offsetY: [{\n type: Input,\n args: ['cdkConnectedOverlayOffsetY']\n }], width: [{\n type: Input,\n args: ['cdkConnectedOverlayWidth']\n }], height: [{\n type: Input,\n args: ['cdkConnectedOverlayHeight']\n }], minWidth: [{\n type: Input,\n args: ['cdkConnectedOverlayMinWidth']\n }], minHeight: [{\n type: Input,\n args: ['cdkConnectedOverlayMinHeight']\n }], backdropClass: [{\n type: Input,\n args: ['cdkConnectedOverlayBackdropClass']\n }], panelClass: [{\n type: Input,\n args: ['cdkConnectedOverlayPanelClass']\n }], viewportMargin: [{\n type: Input,\n args: ['cdkConnectedOverlayViewportMargin']\n }], scrollStrategy: [{\n type: Input,\n args: ['cdkConnectedOverlayScrollStrategy']\n }], open: [{\n type: Input,\n args: ['cdkConnectedOverlayOpen']\n }], disableClose: [{\n type: Input,\n args: ['cdkConnectedOverlayDisableClose']\n }], transformOriginSelector: [{\n type: Input,\n args: ['cdkConnectedOverlayTransformOriginOn']\n }], hasBackdrop: [{\n type: Input,\n args: ['cdkConnectedOverlayHasBackdrop']\n }], lockPosition: [{\n type: Input,\n args: ['cdkConnectedOverlayLockPosition']\n }], flexibleDimensions: [{\n type: Input,\n args: ['cdkConnectedOverlayFlexibleDimensions']\n }], growAfterOpen: [{\n type: Input,\n args: ['cdkConnectedOverlayGrowAfterOpen']\n }], push: [{\n type: Input,\n args: ['cdkConnectedOverlayPush']\n }], backdropClick: [{\n type: Output\n }], positionChange: [{\n type: Output\n }], attach: [{\n type: Output\n }], detach: [{\n type: Output\n }], overlayKeydown: [{\n type: Output\n }], overlayOutsideClick: [{\n type: Output\n }] } });\n/** @docs-private */\nfunction CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n return () => overlay.scrollStrategies.reposition();\n}\n/** @docs-private */\nconst CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {\n provide: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 OverlayModule {\n}\nOverlayModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: OverlayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nOverlayModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: OverlayModule, declarations: [CdkConnectedOverlay, CdkOverlayOrigin], imports: [BidiModule, PortalModule, ScrollingModule], exports: [CdkConnectedOverlay, CdkOverlayOrigin, ScrollingModule] });\nOverlayModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: OverlayModule, providers: [Overlay, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER], imports: [BidiModule, PortalModule, ScrollingModule, ScrollingModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: OverlayModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [BidiModule, PortalModule, ScrollingModule],\n exports: [CdkConnectedOverlay, CdkOverlayOrigin, ScrollingModule],\n declarations: [CdkConnectedOverlay, CdkOverlayOrigin],\n providers: [Overlay, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER],\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 * Alternative to OverlayContainer that supports correct displaying of overlay elements in\n * Fullscreen mode\n * https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen\n *\n * Should be provided in the root component.\n */\nclass FullscreenOverlayContainer extends OverlayContainer {\n constructor(_document, platform) {\n super(_document, platform);\n }\n ngOnDestroy() {\n super.ngOnDestroy();\n if (this._fullScreenEventName && this._fullScreenListener) {\n this._document.removeEventListener(this._fullScreenEventName, this._fullScreenListener);\n }\n }\n _createContainer() {\n super._createContainer();\n this._adjustParentForFullscreenChange();\n this._addFullscreenChangeListener(() => this._adjustParentForFullscreenChange());\n }\n _adjustParentForFullscreenChange() {\n if (!this._containerElement) {\n return;\n }\n const fullscreenElement = this.getFullscreenElement();\n const parent = fullscreenElement || this._document.body;\n parent.appendChild(this._containerElement);\n }\n _addFullscreenChangeListener(fn) {\n const eventName = this._getEventName();\n if (eventName) {\n if (this._fullScreenListener) {\n this._document.removeEventListener(eventName, this._fullScreenListener);\n }\n this._document.addEventListener(eventName, fn);\n this._fullScreenListener = fn;\n }\n }\n _getEventName() {\n if (!this._fullScreenEventName) {\n const _document = this._document;\n if (_document.fullscreenEnabled) {\n this._fullScreenEventName = 'fullscreenchange';\n }\n else if (_document.webkitFullscreenEnabled) {\n this._fullScreenEventName = 'webkitfullscreenchange';\n }\n else if (_document.mozFullScreenEnabled) {\n this._fullScreenEventName = 'mozfullscreenchange';\n }\n else if (_document.msFullscreenEnabled) {\n this._fullScreenEventName = 'MSFullscreenChange';\n }\n }\n return this._fullScreenEventName;\n }\n /**\n * When the page is put into fullscreen mode, a specific element is specified.\n * Only that element and its children are visible when in fullscreen mode.\n */\n getFullscreenElement() {\n const _document = this._document;\n return (_document.fullscreenElement ||\n _document.webkitFullscreenElement ||\n _document.mozFullScreenElement ||\n _document.msFullscreenElement ||\n null);\n }\n}\nFullscreenOverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: FullscreenOverlayContainer, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }], target: i0.ɵɵFactoryTarget.Injectable });\nFullscreenOverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: FullscreenOverlayContainer, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: FullscreenOverlayContainer, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i1$1.Platform }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Generated bundle index. Do not edit.\n */\n\nexport { BlockScrollStrategy, CdkConnectedOverlay, CdkOverlayOrigin, CloseScrollStrategy, ConnectedOverlayPositionChange, ConnectionPositionPair, FlexibleConnectedPositionStrategy, FullscreenOverlayContainer, GlobalPositionStrategy, NoopScrollStrategy, Overlay, OverlayConfig, OverlayContainer, OverlayKeyboardDispatcher, OverlayModule, OverlayOutsideClickDispatcher, OverlayPositionBuilder, OverlayRef, RepositionScrollStrategy, STANDARD_DROPDOWN_ADJACENT_POSITIONS, STANDARD_DROPDOWN_BELOW_POSITIONS, ScrollStrategyOptions, ScrollingVisibility, validateHorizontalPosition, validateVerticalPosition };\n","import * as i1 from '@angular/cdk/a11y';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport * as i1$1 from '@angular/cdk/overlay';\nimport { Overlay, OverlayConfig, OverlayRef, OverlayModule } from '@angular/cdk/overlay';\nimport { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';\nimport * as i3 from '@angular/cdk/portal';\nimport { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, ViewChild, InjectionToken, Injector, TemplateRef, InjectFlags, Injectable, SkipSelf, NgModule } from '@angular/core';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { Subject, defer, of } from 'rxjs';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { startWith } 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/** Configuration for opening a modal dialog. */\nclass DialogConfig {\n constructor() {\n /** The ARIA role of the dialog element. */\n this.role = 'dialog';\n /** Optional CSS class or classes applied to the overlay panel. */\n this.panelClass = '';\n /** Whether the dialog has a backdrop. */\n this.hasBackdrop = true;\n /** Optional CSS class or classes applied to the overlay backdrop. */\n this.backdropClass = '';\n /** Whether the dialog closes with the escape key or pointer events outside the panel element. */\n this.disableClose = false;\n /** Width of the dialog. */\n this.width = '';\n /** Height of the dialog. */\n this.height = '';\n /** Data being injected into the child component. */\n this.data = null;\n /** ID of the element that describes the dialog. */\n this.ariaDescribedBy = null;\n /** ID of the element that labels the dialog. */\n this.ariaLabelledBy = null;\n /** Dialog label applied via `aria-label` */\n this.ariaLabel = null;\n /** Whether this a modal dialog. Used to set the `aria-modal` attribute. */\n this.ariaModal = true;\n /**\n * Where the dialog should focus on open.\n * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n * AutoFocusTarget instead.\n */\n this.autoFocus = 'first-tabbable';\n /**\n * Whether the dialog should restore focus to the previously-focused element upon closing.\n * Has the following behavior based on the type that is passed in:\n * - `boolean` - when true, will return focus to the element that was focused before the dialog\n * was opened, otherwise won't restore focus at all.\n * - `string` - focus will be restored to the first element that matches the CSS selector.\n * - `HTMLElement` - focus will be restored to the specific element.\n */\n this.restoreFocus = true;\n /**\n * Whether the dialog should close when the user navigates backwards or forwards through browser\n * history. This does not apply to navigation via anchor element unless using URL-hash based\n * routing (`HashLocationStrategy` in the Angular router).\n */\n this.closeOnNavigation = true;\n /**\n * Whether the dialog should close when the dialog service is destroyed. This is useful if\n * another service is wrapping the dialog and is managing the destruction instead.\n */\n this.closeOnDestroy = 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 */\nfunction throwDialogContentAlreadyAttachedError() {\n throw Error('Attempting to attach dialog content after content is already attached');\n}\n/**\n * Internal component that wraps user-provided dialog content.\n * @docs-private\n */\nclass CdkDialogContainer extends BasePortalOutlet {\n constructor(_elementRef, _focusTrapFactory, _document, _config, _interactivityChecker, _ngZone, _overlayRef, _focusMonitor) {\n super();\n this._elementRef = _elementRef;\n this._focusTrapFactory = _focusTrapFactory;\n this._config = _config;\n this._interactivityChecker = _interactivityChecker;\n this._ngZone = _ngZone;\n this._overlayRef = _overlayRef;\n this._focusMonitor = _focusMonitor;\n /** Element that was focused before the dialog was opened. Save this to restore upon close. */\n this._elementFocusedBeforeDialogWasOpened = null;\n /**\n * Type of interaction that led to the dialog being closed. This is used to determine\n * whether the focus style will be applied when returning focus to its original location\n * after the dialog is closed.\n */\n this._closeInteractionType = null;\n /**\n * Attaches a DOM portal to the dialog container.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n this.attachDomPortal = (portal) => {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n const result = this._portalOutlet.attachDomPortal(portal);\n this._contentAttached();\n return result;\n };\n this._ariaLabelledBy = this._config.ariaLabelledBy || null;\n this._document = _document;\n }\n _contentAttached() {\n this._initializeFocusTrap();\n this._handleBackdropClicks();\n this._captureInitialFocus();\n }\n /**\n * Can be used by child classes to customize the initial focus\n * capturing behavior (e.g. if it's tied to an animation).\n */\n _captureInitialFocus() {\n this._trapFocus();\n }\n ngOnDestroy() {\n this._restoreFocus();\n }\n /**\n * Attach a ComponentPortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachComponentPortal(portal) {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n const result = this._portalOutlet.attachComponentPortal(portal);\n this._contentAttached();\n return result;\n }\n /**\n * Attach a TemplatePortal as content to this dialog container.\n * @param portal Portal to be attached as the dialog content.\n */\n attachTemplatePortal(portal) {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwDialogContentAlreadyAttachedError();\n }\n const result = this._portalOutlet.attachTemplatePortal(portal);\n this._contentAttached();\n return result;\n }\n // TODO(crisbeto): this shouldn't be exposed, but there are internal references to it.\n /** Captures focus if it isn't already inside the dialog. */\n _recaptureFocus() {\n if (!this._containsFocus()) {\n this._trapFocus();\n }\n }\n /**\n * Focuses the provided element. If the element is not focusable, it will add a tabIndex\n * attribute to forcefully focus it. The attribute is removed after focus is moved.\n * @param element The element to focus.\n */\n _forceFocus(element, options) {\n if (!this._interactivityChecker.isFocusable(element)) {\n element.tabIndex = -1;\n // The tabindex attribute should be removed to avoid navigating to that element again\n this._ngZone.runOutsideAngular(() => {\n const callback = () => {\n element.removeEventListener('blur', callback);\n element.removeEventListener('mousedown', callback);\n element.removeAttribute('tabindex');\n };\n element.addEventListener('blur', callback);\n element.addEventListener('mousedown', callback);\n });\n }\n element.focus(options);\n }\n /**\n * Focuses the first element that matches the given selector within the focus trap.\n * @param selector The CSS selector for the element to set focus to.\n */\n _focusByCssSelector(selector, options) {\n let elementToFocus = this._elementRef.nativeElement.querySelector(selector);\n if (elementToFocus) {\n this._forceFocus(elementToFocus, options);\n }\n }\n /**\n * Moves the focus inside the focus trap. When autoFocus is not set to 'dialog', if focus\n * cannot be moved then focus will go to the dialog container.\n */\n _trapFocus() {\n const element = this._elementRef.nativeElement;\n // If were to attempt to focus immediately, then the content of the dialog would not yet be\n // ready in instances where change detection has to run first. To deal with this, we simply\n // wait for the microtask queue to be empty when setting focus when autoFocus isn't set to\n // dialog. If the element inside the dialog can't be focused, then the container is focused\n // so the user can't tab into other elements behind it.\n switch (this._config.autoFocus) {\n case false:\n case 'dialog':\n // Ensure that focus is on the dialog container. It's possible that a different\n // component tried to move focus while the open animation was running. See:\n // https://github.com/angular/components/issues/16215. Note that we only want to do this\n // if the focus isn't inside the dialog already, because it's possible that the consumer\n // turned off `autoFocus` in order to move focus themselves.\n if (!this._containsFocus()) {\n element.focus();\n }\n break;\n case true:\n case 'first-tabbable':\n this._focusTrap.focusInitialElementWhenReady().then(focusedSuccessfully => {\n // If we weren't able to find a focusable element in the dialog, then focus the dialog\n // container instead.\n if (!focusedSuccessfully) {\n this._focusDialogContainer();\n }\n });\n break;\n case 'first-heading':\n this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role=\"heading\"]');\n break;\n default:\n this._focusByCssSelector(this._config.autoFocus);\n break;\n }\n }\n /** Restores focus to the element that was focused before the dialog opened. */\n _restoreFocus() {\n const focusConfig = this._config.restoreFocus;\n let focusTargetElement = null;\n if (typeof focusConfig === 'string') {\n focusTargetElement = this._document.querySelector(focusConfig);\n }\n else if (typeof focusConfig === 'boolean') {\n focusTargetElement = focusConfig ? this._elementFocusedBeforeDialogWasOpened : null;\n }\n else if (focusConfig) {\n focusTargetElement = focusConfig;\n }\n // We need the extra check, because IE can set the `activeElement` to null in some cases.\n if (this._config.restoreFocus &&\n focusTargetElement &&\n typeof focusTargetElement.focus === 'function') {\n const activeElement = _getFocusedElementPierceShadowDom();\n const element = this._elementRef.nativeElement;\n // Make sure that focus is still inside the dialog or is on the body (usually because a\n // non-focusable element like the backdrop was clicked) before moving it. It's possible that\n // the consumer moved it themselves before the animation was done, in which case we shouldn't\n // do anything.\n if (!activeElement ||\n activeElement === this._document.body ||\n activeElement === element ||\n element.contains(activeElement)) {\n if (this._focusMonitor) {\n this._focusMonitor.focusVia(focusTargetElement, this._closeInteractionType);\n this._closeInteractionType = null;\n }\n else {\n focusTargetElement.focus();\n }\n }\n }\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n /** Focuses the dialog container. */\n _focusDialogContainer() {\n // Note that there is no focus method when rendering on the server.\n if (this._elementRef.nativeElement.focus) {\n this._elementRef.nativeElement.focus();\n }\n }\n /** Returns whether focus is inside the dialog. */\n _containsFocus() {\n const element = this._elementRef.nativeElement;\n const activeElement = _getFocusedElementPierceShadowDom();\n return element === activeElement || element.contains(activeElement);\n }\n /** Sets up the focus trap. */\n _initializeFocusTrap() {\n this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);\n // Save the previously focused element. This element will be re-focused\n // when the dialog closes.\n if (this._document) {\n this._elementFocusedBeforeDialogWasOpened = _getFocusedElementPierceShadowDom();\n }\n }\n /** Sets up the listener that handles clicks on the dialog backdrop. */\n _handleBackdropClicks() {\n // Clicking on the backdrop will move focus out of dialog.\n // Recapture it if closing via the backdrop is disabled.\n this._overlayRef.backdropClick().subscribe(() => {\n if (this._config.disableClose) {\n this._recaptureFocus();\n }\n });\n }\n}\nCdkDialogContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkDialogContainer, deps: [{ token: i0.ElementRef }, { token: i1.FocusTrapFactory }, { token: DOCUMENT, optional: true }, { token: DialogConfig }, { token: i1.InteractivityChecker }, { token: i0.NgZone }, { token: i1$1.OverlayRef }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });\nCdkDialogContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkDialogContainer, selector: \"cdk-dialog-container\", host: { attributes: { \"tabindex\": \"-1\" }, properties: { \"attr.id\": \"_config.id || null\", \"attr.role\": \"_config.role\", \"attr.aria-modal\": \"_config.ariaModal\", \"attr.aria-labelledby\": \"_config.ariaLabel ? null : _ariaLabelledBy\", \"attr.aria-label\": \"_config.ariaLabel\", \"attr.aria-describedby\": \"_config.ariaDescribedBy || null\" }, classAttribute: \"cdk-dialog-container\" }, viewQueries: [{ propertyName: \"_portalOutlet\", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: \"<ng-template cdkPortalOutlet></ng-template>\\n\", styles: [\".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}\"], dependencies: [{ kind: \"directive\", type: i3.CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: [\"cdkPortalOutlet\"], outputs: [\"attached\"], exportAs: [\"cdkPortalOutlet\"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkDialogContainer, decorators: [{\n type: Component,\n args: [{ selector: 'cdk-dialog-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, host: {\n 'class': 'cdk-dialog-container',\n 'tabindex': '-1',\n '[attr.id]': '_config.id || null',\n '[attr.role]': '_config.role',\n '[attr.aria-modal]': '_config.ariaModal',\n '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',\n '[attr.aria-label]': '_config.ariaLabel',\n '[attr.aria-describedby]': '_config.ariaDescribedBy || null',\n }, template: \"<ng-template cdkPortalOutlet></ng-template>\\n\", styles: [\".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FocusTrapFactory }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DialogConfig]\n }] }, { type: i1.InteractivityChecker }, { type: i0.NgZone }, { type: i1$1.OverlayRef }, { type: i1.FocusMonitor }]; }, propDecorators: { _portalOutlet: [{\n type: ViewChild,\n args: [CdkPortalOutlet, { static: 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 * Reference to a dialog opened via the Dialog service.\n */\nclass DialogRef {\n constructor(overlayRef, config) {\n this.overlayRef = overlayRef;\n this.config = config;\n /** Emits when the dialog has been closed. */\n this.closed = new Subject();\n this.disableClose = config.disableClose;\n this.backdropClick = overlayRef.backdropClick();\n this.keydownEvents = overlayRef.keydownEvents();\n this.outsidePointerEvents = overlayRef.outsidePointerEvents();\n this.id = config.id; // By the time the dialog is created we are guaranteed to have an ID.\n this.keydownEvents.subscribe(event => {\n if (event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)) {\n event.preventDefault();\n this.close(undefined, { focusOrigin: 'keyboard' });\n }\n });\n this.backdropClick.subscribe(() => {\n if (!this.disableClose) {\n this.close(undefined, { focusOrigin: 'mouse' });\n }\n });\n }\n /**\n * Close the dialog.\n * @param result Optional result to return to the dialog opener.\n * @param options Additional options to customize the closing behavior.\n */\n close(result, options) {\n if (this.containerInstance) {\n const closedSubject = this.closed;\n this.containerInstance._closeInteractionType = options?.focusOrigin || 'program';\n this.overlayRef.dispose();\n closedSubject.next(result);\n closedSubject.complete();\n this.componentInstance = this.containerInstance = null;\n }\n }\n /** Updates the position of the dialog based on the current position strategy. */\n updatePosition() {\n this.overlayRef.updatePosition();\n return this;\n }\n /**\n * Updates the dialog's width and height.\n * @param width New width of the dialog.\n * @param height New height of the dialog.\n */\n updateSize(width = '', height = '') {\n this.overlayRef.updateSize({ width, height });\n return this;\n }\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes) {\n this.overlayRef.addPanelClass(classes);\n return this;\n }\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes) {\n this.overlayRef.removePanelClass(classes);\n return this;\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/** Injection token for the Dialog's ScrollStrategy. */\nconst DIALOG_SCROLL_STRATEGY = new InjectionToken('DialogScrollStrategy');\n/** Injection token for the Dialog's Data. */\nconst DIALOG_DATA = new InjectionToken('DialogData');\n/** Injection token that can be used to provide default options for the dialog module. */\nconst DEFAULT_DIALOG_CONFIG = new InjectionToken('DefaultDialogConfig');\n/** @docs-private */\nfunction DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n return () => overlay.scrollStrategies.block();\n}\n/** @docs-private */\nconst DIALOG_SCROLL_STRATEGY_PROVIDER = {\n provide: DIALOG_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Unique id for the created dialog. */\nlet uniqueId = 0;\nclass Dialog {\n constructor(_overlay, _injector, _defaultOptions, _parentDialog, _overlayContainer, scrollStrategy) {\n this._overlay = _overlay;\n this._injector = _injector;\n this._defaultOptions = _defaultOptions;\n this._parentDialog = _parentDialog;\n this._overlayContainer = _overlayContainer;\n this._openDialogsAtThisLevel = [];\n this._afterAllClosedAtThisLevel = new Subject();\n this._afterOpenedAtThisLevel = new Subject();\n this._ariaHiddenElements = new Map();\n /**\n * Stream that emits when all open dialog have finished closing.\n * Will emit on subscribe if there are no open dialogs to begin with.\n */\n this.afterAllClosed = defer(() => this.openDialogs.length\n ? this._getAfterAllClosed()\n : this._getAfterAllClosed().pipe(startWith(undefined)));\n this._scrollStrategy = scrollStrategy;\n }\n /** Keeps track of the currently-open dialogs. */\n get openDialogs() {\n return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n }\n /** Stream that emits when a dialog has been opened. */\n get afterOpened() {\n return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n }\n open(componentOrTemplateRef, config) {\n const defaults = (this._defaultOptions || new DialogConfig());\n config = { ...defaults, ...config };\n config.id = config.id || `cdk-dialog-${uniqueId++}`;\n if (config.id &&\n this.getDialogById(config.id) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Dialog with id \"${config.id}\" exists already. The dialog id must be unique.`);\n }\n const overlayConfig = this._getOverlayConfig(config);\n const overlayRef = this._overlay.create(overlayConfig);\n const dialogRef = new DialogRef(overlayRef, config);\n const dialogContainer = this._attachContainer(overlayRef, dialogRef, config);\n dialogRef.containerInstance = dialogContainer;\n this._attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config);\n // If this is the first dialog that we're opening, hide all the non-overlay content.\n if (!this.openDialogs.length) {\n this._hideNonDialogContentFromAssistiveTechnology();\n }\n this.openDialogs.push(dialogRef);\n dialogRef.closed.subscribe(() => this._removeOpenDialog(dialogRef, true));\n this.afterOpened.next(dialogRef);\n return dialogRef;\n }\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll() {\n reverseForEach(this.openDialogs, dialog => dialog.close());\n }\n /**\n * Finds an open dialog by its id.\n * @param id ID to use when looking up the dialog.\n */\n getDialogById(id) {\n return this.openDialogs.find(dialog => dialog.id === id);\n }\n ngOnDestroy() {\n // Make one pass over all the dialogs that need to be untracked, but should not be closed. We\n // want to stop tracking the open dialog even if it hasn't been closed, because the tracking\n // determines when `aria-hidden` is removed from elements outside the dialog.\n reverseForEach(this._openDialogsAtThisLevel, dialog => {\n // Check for `false` specifically since we want `undefined` to be interpreted as `true`.\n if (dialog.config.closeOnDestroy === false) {\n this._removeOpenDialog(dialog, false);\n }\n });\n // Make a second pass and close the remaining dialogs. We do this second pass in order to\n // correctly dispatch the `afterAllClosed` event in case we have a mixed array of dialogs\n // that should be closed and dialogs that should not.\n reverseForEach(this._openDialogsAtThisLevel, dialog => dialog.close());\n this._afterAllClosedAtThisLevel.complete();\n this._afterOpenedAtThisLevel.complete();\n this._openDialogsAtThisLevel = [];\n }\n /**\n * Creates an overlay config from a dialog config.\n * @param config The dialog configuration.\n * @returns The overlay configuration.\n */\n _getOverlayConfig(config) {\n const state = new OverlayConfig({\n positionStrategy: config.positionStrategy ||\n this._overlay.position().global().centerHorizontally().centerVertically(),\n scrollStrategy: config.scrollStrategy || this._scrollStrategy(),\n panelClass: config.panelClass,\n hasBackdrop: config.hasBackdrop,\n direction: config.direction,\n minWidth: config.minWidth,\n minHeight: config.minHeight,\n maxWidth: config.maxWidth,\n maxHeight: config.maxHeight,\n width: config.width,\n height: config.height,\n disposeOnNavigation: config.closeOnNavigation,\n });\n if (config.backdropClass) {\n state.backdropClass = config.backdropClass;\n }\n return state;\n }\n /**\n * Attaches a dialog container to a dialog's already-created overlay.\n * @param overlay Reference to the dialog's underlying overlay.\n * @param config The dialog configuration.\n * @returns A promise resolving to a ComponentRef for the attached container.\n */\n _attachContainer(overlay, dialogRef, config) {\n const userInjector = config.injector ?? config.viewContainerRef?.injector;\n const providers = [\n { provide: DialogConfig, useValue: config },\n { provide: DialogRef, useValue: dialogRef },\n { provide: OverlayRef, useValue: overlay },\n ];\n let containerType;\n if (config.container) {\n if (typeof config.container === 'function') {\n containerType = config.container;\n }\n else {\n containerType = config.container.type;\n providers.push(...config.container.providers(config));\n }\n }\n else {\n containerType = CdkDialogContainer;\n }\n const containerPortal = new ComponentPortal(containerType, config.viewContainerRef, Injector.create({ parent: userInjector || this._injector, providers }), config.componentFactoryResolver);\n const containerRef = overlay.attach(containerPortal);\n return containerRef.instance;\n }\n /**\n * Attaches the user-provided component to the already-created dialog container.\n * @param componentOrTemplateRef The type of component being loaded into the dialog,\n * or a TemplateRef to instantiate as the content.\n * @param dialogRef Reference to the dialog being opened.\n * @param dialogContainer Component that is going to wrap the dialog content.\n * @param config Configuration used to open the dialog.\n */\n _attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config) {\n const injector = this._createInjector(config, dialogRef, dialogContainer);\n if (componentOrTemplateRef instanceof TemplateRef) {\n let context = { $implicit: config.data, dialogRef };\n if (config.templateContext) {\n context = {\n ...context,\n ...(typeof config.templateContext === 'function'\n ? config.templateContext()\n : config.templateContext),\n };\n }\n dialogContainer.attachTemplatePortal(new TemplatePortal(componentOrTemplateRef, null, context, injector));\n }\n else {\n const contentRef = dialogContainer.attachComponentPortal(new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector, config.componentFactoryResolver));\n dialogRef.componentInstance = contentRef.instance;\n }\n }\n /**\n * Creates a custom injector to be used inside the dialog. This allows a component loaded inside\n * of a dialog to close itself and, optionally, to return a value.\n * @param config Config object that is used to construct the dialog.\n * @param dialogRef Reference to the dialog being opened.\n * @param dialogContainer Component that is going to wrap the dialog content.\n * @returns The custom injector that can be used inside the dialog.\n */\n _createInjector(config, dialogRef, dialogContainer) {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const providers = [\n { provide: DIALOG_DATA, useValue: config.data },\n { provide: DialogRef, useValue: dialogRef },\n ];\n if (config.providers) {\n if (typeof config.providers === 'function') {\n providers.push(...config.providers(dialogRef, config, dialogContainer));\n }\n else {\n providers.push(...config.providers);\n }\n }\n if (config.direction &&\n (!userInjector ||\n !userInjector.get(Directionality, null, InjectFlags.Optional))) {\n providers.push({\n provide: Directionality,\n useValue: { value: config.direction, change: of() },\n });\n }\n return Injector.create({ parent: userInjector || this._injector, providers });\n }\n /**\n * Removes a dialog from the array of open dialogs.\n * @param dialogRef Dialog to be removed.\n * @param emitEvent Whether to emit an event if this is the last dialog.\n */\n _removeOpenDialog(dialogRef, emitEvent) {\n const index = this.openDialogs.indexOf(dialogRef);\n if (index > -1) {\n this.openDialogs.splice(index, 1);\n // If all the dialogs were closed, remove/restore the `aria-hidden`\n // to a the siblings and emit to the `afterAllClosed` stream.\n if (!this.openDialogs.length) {\n this._ariaHiddenElements.forEach((previousValue, element) => {\n if (previousValue) {\n element.setAttribute('aria-hidden', previousValue);\n }\n else {\n element.removeAttribute('aria-hidden');\n }\n });\n this._ariaHiddenElements.clear();\n if (emitEvent) {\n this._getAfterAllClosed().next();\n }\n }\n }\n }\n /** Hides all of the content that isn't an overlay from assistive technology. */\n _hideNonDialogContentFromAssistiveTechnology() {\n const overlayContainer = this._overlayContainer.getContainerElement();\n // Ensure that the overlay container is attached to the DOM.\n if (overlayContainer.parentElement) {\n const siblings = overlayContainer.parentElement.children;\n for (let i = siblings.length - 1; i > -1; i--) {\n const sibling = siblings[i];\n if (sibling !== overlayContainer &&\n sibling.nodeName !== 'SCRIPT' &&\n sibling.nodeName !== 'STYLE' &&\n !sibling.hasAttribute('aria-live')) {\n this._ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));\n sibling.setAttribute('aria-hidden', 'true');\n }\n }\n }\n }\n _getAfterAllClosed() {\n const parent = this._parentDialog;\n return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;\n }\n}\nDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Dialog, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: DEFAULT_DIALOG_CONFIG, optional: true }, { token: Dialog, optional: true, skipSelf: true }, { token: i1$1.OverlayContainer }, { token: DIALOG_SCROLL_STRATEGY }], target: i0.ɵɵFactoryTarget.Injectable });\nDialog.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Dialog });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Dialog, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: DialogConfig, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DEFAULT_DIALOG_CONFIG]\n }] }, { type: Dialog, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }] }, { type: i1$1.OverlayContainer }, { type: undefined, decorators: [{\n type: Inject,\n args: [DIALOG_SCROLL_STRATEGY]\n }] }]; } });\n/**\n * Executes a callback against all elements in an array while iterating in reverse.\n * Useful if the array is being modified as it is being iterated.\n */\nfunction reverseForEach(items, callback) {\n let i = items.length;\n while (i--) {\n callback(items[i]);\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 DialogModule {\n}\nDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: DialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: DialogModule, declarations: [CdkDialogContainer], imports: [OverlayModule, PortalModule, A11yModule], exports: [\n // Re-export the PortalModule so that people extending the `CdkDialogContainer`\n // don't have to remember to import it or be faced with an unhelpful error.\n PortalModule,\n CdkDialogContainer] });\nDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: DialogModule, providers: [Dialog, DIALOG_SCROLL_STRATEGY_PROVIDER], imports: [OverlayModule, PortalModule, A11yModule, \n // Re-export the PortalModule so that people extending the `CdkDialogContainer`\n // don't have to remember to import it or be faced with an unhelpful error.\n PortalModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: DialogModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [OverlayModule, PortalModule, A11yModule],\n exports: [\n // Re-export the PortalModule so that people extending the `CdkDialogContainer`\n // don't have to remember to import it or be faced with an unhelpful error.\n PortalModule,\n CdkDialogContainer,\n ],\n declarations: [CdkDialogContainer],\n providers: [Dialog, DIALOG_SCROLL_STRATEGY_PROVIDER],\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 * Generated bundle index. Do not edit.\n */\n\nexport { CdkDialogContainer, DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_SCROLL_STRATEGY, DIALOG_SCROLL_STRATEGY_PROVIDER, DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, Dialog, DialogConfig, DialogModule, DialogRef, throwDialogContentAlreadyAttachedError };\n","/**\n * @license Angular v14.1.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * An injectable service that produces an animation sequence programmatically within an\n * Angular component or directive.\n * Provided by the `BrowserAnimationsModule` or `NoopAnimationsModule`.\n *\n * @usageNotes\n *\n * To use this service, add it to your component or directive as a dependency.\n * The service is instantiated along with your component.\n *\n * Apps do not typically need to create their own animation players, but if you\n * do need to, follow these steps:\n *\n * 1. Use the <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code> method\n * to create a programmatic animation. The method returns an `AnimationFactory` instance.\n *\n * 2. Use the factory object to create an `AnimationPlayer` and attach it to a DOM element.\n *\n * 3. Use the player object to control the animation programmatically.\n *\n * For example:\n *\n * ```ts\n * // import the service from BrowserAnimationsModule\n * import {AnimationBuilder} from '@angular/animations';\n * // require the service as a dependency\n * class MyCmp {\n * constructor(private _builder: AnimationBuilder) {}\n *\n * makeAnimation(element: any) {\n * // first define a reusable animation\n * const myAnimation = this._builder.build([\n * style({ width: 0 }),\n * animate(1000, style({ width: '100px' }))\n * ]);\n *\n * // use the returned factory object to create a player\n * const player = myAnimation.create(element);\n *\n * player.play();\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass AnimationBuilder {\n}\n/**\n * A factory object returned from the\n * <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code>\n * method.\n *\n * @publicApi\n */\nclass AnimationFactory {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Specifies automatic styling.\n *\n * @publicApi\n */\nconst AUTO_STYLE = '*';\n/**\n * Creates a named animation trigger, containing a list of [`state()`](api/animations/state)\n * and `transition()` entries to be evaluated when the expression\n * bound to the trigger changes.\n *\n * @param name An identifying string.\n * @param definitions An animation definition object, containing an array of\n * [`state()`](api/animations/state) and `transition()` declarations.\n *\n * @return An object that encapsulates the trigger data.\n *\n * @usageNotes\n * Define an animation trigger in the `animations` section of `@Component` metadata.\n * In the template, reference the trigger by name and bind it to a trigger expression that\n * evaluates to a defined animation state, using the following format:\n *\n * `[@triggerName]=\"expression\"`\n *\n * Animation trigger bindings convert all values to strings, and then match the\n * previous and current values against any linked transitions.\n * Booleans can be specified as `1` or `true` and `0` or `false`.\n *\n * ### Usage Example\n *\n * The following example creates an animation trigger reference based on the provided\n * name value.\n * The provided animation value is expected to be an array consisting of state and\n * transition declarations.\n *\n * ```typescript\n * @Component({\n * selector: \"my-component\",\n * templateUrl: \"my-component-tpl.html\",\n * animations: [\n * trigger(\"myAnimationTrigger\", [\n * state(...),\n * state(...),\n * transition(...),\n * transition(...)\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"something\";\n * }\n * ```\n *\n * The template associated with this component makes use of the defined trigger\n * by binding to an element within its template code.\n *\n * ```html\n * <!-- somewhere inside of my-component-tpl.html -->\n * <div [@myAnimationTrigger]=\"myStatusExp\">...</div>\n * ```\n *\n * ### Using an inline function\n * The `transition` animation method also supports reading an inline function which can decide\n * if its associated animation should be run.\n *\n * ```typescript\n * // this method is run each time the `myAnimationTrigger` trigger value changes.\n * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key:\n string]: any}): boolean {\n * // notice that `element` and `params` are also available here\n * return toState == 'yes-please-animate';\n * }\n *\n * @Component({\n * selector: 'my-component',\n * templateUrl: 'my-component-tpl.html',\n * animations: [\n * trigger('myAnimationTrigger', [\n * transition(myInlineMatcherFn, [\n * // the animation sequence code\n * ]),\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"yes-please-animate\";\n * }\n * ```\n *\n * ### Disabling Animations\n * When true, the special animation control binding `@.disabled` binding prevents\n * all animations from rendering.\n * Place the `@.disabled` binding on an element to disable\n * animations on the element itself, as well as any inner animation triggers\n * within the element.\n *\n * The following example shows how to use this feature:\n *\n * ```typescript\n * @Component({\n * selector: 'my-component',\n * template: `\n * <div [@.disabled]=\"isDisabled\">\n * <div [@childAnimation]=\"exp\"></div>\n * </div>\n * `,\n * animations: [\n * trigger(\"childAnimation\", [\n * // ...\n * ])\n * ]\n * })\n * class MyComponent {\n * isDisabled = true;\n * exp = '...';\n * }\n * ```\n *\n * When `@.disabled` is true, it prevents the `@childAnimation` trigger from animating,\n * along with any inner animations.\n *\n * ### Disable animations application-wide\n * When an area of the template is set to have animations disabled,\n * **all** inner components have their animations disabled as well.\n * This means that you can disable all animations for an app\n * by placing a host binding set on `@.disabled` on the topmost Angular component.\n *\n * ```typescript\n * import {Component, HostBinding} from '@angular/core';\n *\n * @Component({\n * selector: 'app-component',\n * templateUrl: 'app.component.html',\n * })\n * class AppComponent {\n * @HostBinding('@.disabled')\n * public animationsDisabled = true;\n * }\n * ```\n *\n * ### Overriding disablement of inner animations\n * Despite inner animations being disabled, a parent animation can `query()`\n * for inner elements located in disabled areas of the template and still animate\n * them if needed. This is also the case for when a sub animation is\n * queried by a parent and then later animated using `animateChild()`.\n *\n * ### Detecting when an animation is disabled\n * If a region of the DOM (or the entire application) has its animations disabled, the animation\n * trigger callbacks still fire, but for zero seconds. When the callback fires, it provides\n * an instance of an `AnimationEvent`. If animations are disabled,\n * the `.disabled` flag on the event is true.\n *\n * @publicApi\n */\nfunction trigger(name, definitions) {\n return { type: 7 /* AnimationMetadataType.Trigger */, name, definitions, options: {} };\n}\n/**\n * Defines an animation step that combines styling information with timing information.\n *\n * @param timings Sets `AnimateTimings` for the parent animation.\n * A string in the format \"duration [delay] [easing]\".\n * - Duration and delay are expressed as a number and optional time unit,\n * such as \"1s\" or \"10ms\" for one second and 10 milliseconds, respectively.\n * The default unit is milliseconds.\n * - The easing value controls how the animation accelerates and decelerates\n * during its runtime. Value is one of `ease`, `ease-in`, `ease-out`,\n * `ease-in-out`, or a `cubic-bezier()` function call.\n * If not supplied, no easing is applied.\n *\n * For example, the string \"1s 100ms ease-out\" specifies a duration of\n * 1000 milliseconds, and delay of 100 ms, and the \"ease-out\" easing style,\n * which decelerates near the end of the duration.\n * @param styles Sets AnimationStyles for the parent animation.\n * A function call to either `style()` or `keyframes()`\n * that returns a collection of CSS style entries to be applied to the parent animation.\n * When null, uses the styles from the destination state.\n * This is useful when describing an animation step that will complete an animation;\n * see \"Animating to the final state\" in `transitions()`.\n * @returns An object that encapsulates the animation step.\n *\n * @usageNotes\n * Call within an animation `sequence()`, `{@link animations/group group()}`, or\n * `transition()` call to specify an animation step\n * that applies given style data to the parent animation for a given amount of time.\n *\n * ### Syntax Examples\n * **Timing examples**\n *\n * The following examples show various `timings` specifications.\n * - `animate(500)` : Duration is 500 milliseconds.\n * - `animate(\"1s\")` : Duration is 1000 milliseconds.\n * - `animate(\"100ms 0.5s\")` : Duration is 100 milliseconds, delay is 500 milliseconds.\n * - `animate(\"5s ease-in\")` : Duration is 5000 milliseconds, easing in.\n * - `animate(\"5s 10ms cubic-bezier(.17,.67,.88,.1)\")` : Duration is 5000 milliseconds, delay is 10\n * milliseconds, easing according to a bezier curve.\n *\n * **Style examples**\n *\n * The following example calls `style()` to set a single CSS style.\n * ```typescript\n * animate(500, style({ background: \"red\" }))\n * ```\n * The following example calls `keyframes()` to set a CSS style\n * to different values for successive keyframes.\n * ```typescript\n * animate(500, keyframes(\n * [\n * style({ background: \"blue\" }),\n * style({ background: \"red\" })\n * ])\n * ```\n *\n * @publicApi\n */\nfunction animate(timings, styles = null) {\n return { type: 4 /* AnimationMetadataType.Animate */, styles, timings };\n}\n/**\n * @description Defines a list of animation steps to be run in parallel.\n *\n * @param steps An array of animation step objects.\n * - When steps are defined by `style()` or `animate()`\n * function calls, each call within the group is executed instantly.\n * - To specify offset styles to be applied at a later time, define steps with\n * `keyframes()`, or use `animate()` calls with a delay value.\n * For example:\n *\n * ```typescript\n * group([\n * animate(\"1s\", style({ background: \"black\" })),\n * animate(\"2s\", style({ color: \"white\" }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the group data.\n *\n * @usageNotes\n * Grouped animations are useful when a series of styles must be\n * animated at different starting times and closed off at different ending times.\n *\n * When called within a `sequence()` or a\n * `transition()` call, does not continue to the next\n * instruction until all of the inner animation steps have completed.\n *\n * @publicApi\n */\nfunction group(steps, options = null) {\n return { type: 3 /* AnimationMetadataType.Group */, steps, options };\n}\n/**\n * Defines a list of animation steps to be run sequentially, one by one.\n *\n * @param steps An array of animation step objects.\n * - Steps defined by `style()` calls apply the styling data immediately.\n * - Steps defined by `animate()` calls apply the styling data over time\n * as specified by the timing data.\n *\n * ```typescript\n * sequence([\n * style({ opacity: 0 }),\n * animate(\"1s\", style({ opacity: 1 }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the sequence data.\n *\n * @usageNotes\n * When you pass an array of steps to a\n * `transition()` call, the steps run sequentially by default.\n * Compare this to the `{@link animations/group group()}` call, which runs animation steps in\n *parallel.\n *\n * When a sequence is used within a `{@link animations/group group()}` or a `transition()` call,\n * execution continues to the next instruction only after each of the inner animation\n * steps have completed.\n *\n * @publicApi\n **/\nfunction sequence(steps, options = null) {\n return { type: 2 /* AnimationMetadataType.Sequence */, steps, options };\n}\n/**\n * Declares a key/value object containing CSS properties/styles that\n * can then be used for an animation [`state`](api/animations/state), within an animation\n *`sequence`, or as styling data for calls to `animate()` and `keyframes()`.\n *\n * @param tokens A set of CSS styles or HTML styles associated with an animation state.\n * The value can be any of the following:\n * - A key-value style pair associating a CSS property with a value.\n * - An array of key-value style pairs.\n * - An asterisk (*), to use auto-styling, where styles are derived from the element\n * being animated and applied to the animation when it starts.\n *\n * Auto-styling can be used to define a state that depends on layout or other\n * environmental factors.\n *\n * @return An object that encapsulates the style data.\n *\n * @usageNotes\n * The following examples create animation styles that collect a set of\n * CSS property values:\n *\n * ```typescript\n * // string values for CSS properties\n * style({ background: \"red\", color: \"blue\" })\n *\n * // numerical pixel values\n * style({ width: 100, height: 0 })\n * ```\n *\n * The following example uses auto-styling to allow an element to animate from\n * a height of 0 up to its full height:\n *\n * ```\n * style({ height: 0 }),\n * animate(\"1s\", style({ height: \"*\" }))\n * ```\n *\n * @publicApi\n **/\nfunction style(tokens) {\n return { type: 6 /* AnimationMetadataType.Style */, styles: tokens, offset: null };\n}\n/**\n * Declares an animation state within a trigger attached to an element.\n *\n * @param name One or more names for the defined state in a comma-separated string.\n * The following reserved state names can be supplied to define a style for specific use\n * cases:\n *\n * - `void` You can associate styles with this name to be used when\n * the element is detached from the application. For example, when an `ngIf` evaluates\n * to false, the state of the associated element is void.\n * - `*` (asterisk) Indicates the default state. You can associate styles with this name\n * to be used as the fallback when the state that is being animated is not declared\n * within the trigger.\n *\n * @param styles A set of CSS styles associated with this state, created using the\n * `style()` function.\n * This set of styles persists on the element once the state has been reached.\n * @param options Parameters that can be passed to the state when it is invoked.\n * 0 or more key-value pairs.\n * @return An object that encapsulates the new state data.\n *\n * @usageNotes\n * Use the `trigger()` function to register states to an animation trigger.\n * Use the `transition()` function to animate between states.\n * When a state is active within a component, its associated styles persist on the element,\n * even when the animation ends.\n *\n * @publicApi\n **/\nfunction state(name, styles, options) {\n return { type: 0 /* AnimationMetadataType.State */, name, styles, options };\n}\n/**\n * Defines a set of animation styles, associating each style with an optional `offset` value.\n *\n * @param steps A set of animation styles with optional offset data.\n * The optional `offset` value for a style specifies a percentage of the total animation\n * time at which that style is applied.\n * @returns An object that encapsulates the keyframes data.\n *\n * @usageNotes\n * Use with the `animate()` call. Instead of applying animations\n * from the current state\n * to the destination state, keyframes describe how each style entry is applied and at what point\n * within the animation arc.\n * Compare [CSS Keyframe Animations](https://www.w3schools.com/css/css3_animations.asp).\n *\n * ### Usage\n *\n * In the following example, the offset values describe\n * when each `backgroundColor` value is applied. The color is red at the start, and changes to\n * blue when 20% of the total time has elapsed.\n *\n * ```typescript\n * // the provided offset values\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\", offset: 0 }),\n * style({ backgroundColor: \"blue\", offset: 0.2 }),\n * style({ backgroundColor: \"orange\", offset: 0.3 }),\n * style({ backgroundColor: \"black\", offset: 1 })\n * ]))\n * ```\n *\n * If there are no `offset` values specified in the style entries, the offsets\n * are calculated automatically.\n *\n * ```typescript\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\" }) // offset = 0\n * style({ backgroundColor: \"blue\" }) // offset = 0.33\n * style({ backgroundColor: \"orange\" }) // offset = 0.66\n * style({ backgroundColor: \"black\" }) // offset = 1\n * ]))\n *```\n\n * @publicApi\n */\nfunction keyframes(steps) {\n return { type: 5 /* AnimationMetadataType.Keyframes */, steps };\n}\n/**\n * Declares an animation transition which is played when a certain specified condition is met.\n *\n * @param stateChangeExpr A string with a specific format or a function that specifies when the\n * animation transition should occur (see [State Change Expression](#state-change-expression)).\n *\n * @param steps One or more animation objects that represent the animation's instructions.\n *\n * @param options An options object that can be used to specify a delay for the animation or provide\n * custom parameters for it.\n *\n * @returns An object that encapsulates the transition data.\n *\n * @usageNotes\n *\n * ### State Change Expression\n *\n * The State Change Expression instructs Angular when to run the transition's animations, it can\n *either be\n * - a string with a specific syntax\n * - or a function that compares the previous and current state (value of the expression bound to\n * the element's trigger) and returns `true` if the transition should occur or `false` otherwise\n *\n * The string format can be:\n * - `fromState => toState`, which indicates that the transition's animations should occur then the\n * expression bound to the trigger's element goes from `fromState` to `toState`\n *\n * _Example:_\n * ```typescript\n * transition('open => closed', animate('.5s ease-out', style({ height: 0 }) ))\n * ```\n *\n * - `fromState <=> toState`, which indicates that the transition's animations should occur then\n * the expression bound to the trigger's element goes from `fromState` to `toState` or vice versa\n *\n * _Example:_\n * ```typescript\n * transition('enabled <=> disabled', animate('1s cubic-bezier(0.8,0.3,0,1)'))\n * ```\n *\n * - `:enter`/`:leave`, which indicates that the transition's animations should occur when the\n * element enters or exists the DOM\n *\n * _Example:_\n * ```typescript\n * transition(':enter', [\n * style({ opacity: 0 }),\n * animate('500ms', style({ opacity: 1 }))\n * ])\n * ```\n *\n * - `:increment`/`:decrement`, which indicates that the transition's animations should occur when\n * the numerical expression bound to the trigger's element has increased in value or decreased\n *\n * _Example:_\n * ```typescript\n * transition(':increment', query('@counter', animateChild()))\n * ```\n *\n * - a sequence of any of the above divided by commas, which indicates that transition's animations\n * should occur whenever one of the state change expressions matches\n *\n * _Example:_\n * ```typescript\n * transition(':increment, * => enabled, :enter', animate('1s ease', keyframes([\n * style({ transform: 'scale(1)', offset: 0}),\n * style({ transform: 'scale(1.1)', offset: 0.7}),\n * style({ transform: 'scale(1)', offset: 1})\n * ]))),\n * ```\n *\n * Also note that in such context:\n * - `void` can be used to indicate the absence of the element\n * - asterisks can be used as wildcards that match any state\n * - (as a consequence of the above, `void => *` is equivalent to `:enter` and `* => void` is\n * equivalent to `:leave`)\n * - `true` and `false` also match expression values of `1` and `0` respectively (but do not match\n * _truthy_ and _falsy_ values)\n *\n * <div class=\"alert is-helpful\">\n *\n * Be careful about entering end leaving elements as their transitions present a common\n * pitfall for developers.\n *\n * Note that when an element with a trigger enters the DOM its `:enter` transition always\n * gets executed, but its `:leave` transition will not be executed if the element is removed\n * alongside its parent (as it will be removed \"without warning\" before its transition has\n * a chance to be executed, the only way that such transition can occur is if the element\n * is exiting the DOM on its own).\n *\n *\n * </div>\n *\n * ### Animating to a Final State\n *\n * If the final step in a transition is a call to `animate()` that uses a timing value\n * with no `style` data, that step is automatically considered the final animation arc,\n * for the element to reach the final state, in such case Angular automatically adds or removes\n * CSS styles to ensure that the element is in the correct final state.\n *\n *\n * ### Usage Examples\n *\n * - Transition animations applied based on\n * the trigger's expression value\n *\n * ```HTML\n * <div [@myAnimationTrigger]=\"myStatusExp\">\n * ...\n * </div>\n * ```\n *\n * ```typescript\n * trigger(\"myAnimationTrigger\", [\n * ..., // states\n * transition(\"on => off, open => closed\", animate(500)),\n * transition(\"* <=> error\", query('.indicator', animateChild()))\n * ])\n * ```\n *\n * - Transition animations applied based on custom logic dependent\n * on the trigger's expression value and provided parameters\n *\n * ```HTML\n * <div [@myAnimationTrigger]=\"{\n * value: stepName,\n * params: { target: currentTarget }\n * }\">\n * ...\n * </div>\n * ```\n *\n * ```typescript\n * trigger(\"myAnimationTrigger\", [\n * ..., // states\n * transition(\n * (fromState, toState, _element, params) =>\n * ['firststep', 'laststep'].includes(fromState.toLowerCase())\n * && toState === params?.['target'],\n * animate('1s')\n * )\n * ])\n * ```\n *\n * @publicApi\n **/\nfunction transition(stateChangeExpr, steps, options = null) {\n return { type: 1 /* AnimationMetadataType.Transition */, expr: stateChangeExpr, animation: steps, options };\n}\n/**\n * Produces a reusable animation that can be invoked in another animation or sequence,\n * by calling the `useAnimation()` function.\n *\n * @param steps One or more animation objects, as returned by the `animate()`\n * or `sequence()` function, that form a transformation from one state to another.\n * A sequence is used by default when you pass an array.\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional developer-defined parameters.\n * Provided values for additional parameters are used as defaults,\n * and override values can be passed to the caller on invocation.\n * @returns An object that encapsulates the animation data.\n *\n * @usageNotes\n * The following example defines a reusable animation, providing some default parameter\n * values.\n *\n * ```typescript\n * var fadeAnimation = animation([\n * style({ opacity: '{{ start }}' }),\n * animate('{{ time }}',\n * style({ opacity: '{{ end }}'}))\n * ],\n * { params: { time: '1000ms', start: 0, end: 1 }});\n * ```\n *\n * The following invokes the defined animation with a call to `useAnimation()`,\n * passing in override parameter values.\n *\n * ```js\n * useAnimation(fadeAnimation, {\n * params: {\n * time: '2s',\n * start: 1,\n * end: 0\n * }\n * })\n * ```\n *\n * If any of the passed-in parameter values are missing from this call,\n * the default values are used. If one or more parameter values are missing before a step is\n * animated, `useAnimation()` throws an error.\n *\n * @publicApi\n */\nfunction animation(steps, options = null) {\n return { type: 8 /* AnimationMetadataType.Reference */, animation: steps, options };\n}\n/**\n * Executes a queried inner animation element within an animation sequence.\n *\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional override values for developer-defined parameters.\n * @return An object that encapsulates the child animation data.\n *\n * @usageNotes\n * Each time an animation is triggered in Angular, the parent animation\n * has priority and any child animations are blocked. In order\n * for a child animation to run, the parent animation must query each of the elements\n * containing child animations, and run them using this function.\n *\n * Note that this feature is designed to be used with `query()` and it will only work\n * with animations that are assigned using the Angular animation library. CSS keyframes\n * and transitions are not handled by this API.\n *\n * @publicApi\n */\nfunction animateChild(options = null) {\n return { type: 9 /* AnimationMetadataType.AnimateChild */, options };\n}\n/**\n * Starts a reusable animation that is created using the `animation()` function.\n *\n * @param animation The reusable animation to start.\n * @param options An options object that can contain a delay value for the start of\n * the animation, and additional override values for developer-defined parameters.\n * @return An object that contains the animation parameters.\n *\n * @publicApi\n */\nfunction useAnimation(animation, options = null) {\n return { type: 10 /* AnimationMetadataType.AnimateRef */, animation, options };\n}\n/**\n * Finds one or more inner elements within the current element that is\n * being animated within a sequence. Use with `animate()`.\n *\n * @param selector The element to query, or a set of elements that contain Angular-specific\n * characteristics, specified with one or more of the following tokens.\n * - `query(\":enter\")` or `query(\":leave\")` : Query for newly inserted/removed elements (not\n * all elements can be queried via these tokens, see\n * [Entering and Leaving Elements](#entering-and-leaving-elements))\n * - `query(\":animating\")` : Query all currently animating elements.\n * - `query(\"@triggerName\")` : Query elements that contain an animation trigger.\n * - `query(\"@*\")` : Query all elements that contain an animation triggers.\n * - `query(\":self\")` : Include the current element into the animation sequence.\n *\n * @param animation One or more animation steps to apply to the queried element or elements.\n * An array is treated as an animation sequence.\n * @param options An options object. Use the 'limit' field to limit the total number of\n * items to collect.\n * @return An object that encapsulates the query data.\n *\n * @usageNotes\n *\n * ### Multiple Tokens\n *\n * Tokens can be merged into a combined query selector string. For example:\n *\n * ```typescript\n * query(':self, .record:enter, .record:leave, @subTrigger', [...])\n * ```\n *\n * The `query()` function collects multiple elements and works internally by using\n * `element.querySelectorAll`. Use the `limit` field of an options object to limit\n * the total number of items to be collected. For example:\n *\n * ```js\n * query('div', [\n * animate(...),\n * animate(...)\n * ], { limit: 1 })\n * ```\n *\n * By default, throws an error when zero items are found. Set the\n * `optional` flag to ignore this error. For example:\n *\n * ```js\n * query('.some-element-that-may-not-be-there', [\n * animate(...),\n * animate(...)\n * ], { optional: true })\n * ```\n *\n * ### Entering and Leaving Elements\n *\n * Not all elements can be queried via the `:enter` and `:leave` tokens, the only ones\n * that can are those that Angular assumes can enter/leave based on their own logic\n * (if their insertion/removal is simply a consequence of that of their parent they\n * should be queried via a different token in their parent's `:enter`/`:leave` transitions).\n *\n * The only elements Angular assumes can enter/leave based on their own logic (thus the only\n * ones that can be queried via the `:enter` and `:leave` tokens) are:\n * - Those inserted dynamically (via `ViewContainerRef`)\n * - Those that have a structural directive (which, under the hood, are a subset of the above ones)\n *\n * <div class=\"alert is-helpful\">\n *\n * Note that elements will be successfully queried via `:enter`/`:leave` even if their\n * insertion/removal is not done manually via `ViewContainerRef`or caused by their structural\n * directive (e.g. they enter/exit alongside their parent).\n *\n * </div>\n *\n * <div class=\"alert is-important\">\n *\n * There is an exception to what previously mentioned, besides elements entering/leaving based on\n * their own logic, elements with an animation trigger can always be queried via `:leave` when\n * their parent is also leaving.\n *\n * </div>\n *\n * ### Usage Example\n *\n * The following example queries for inner elements and animates them\n * individually using `animate()`.\n *\n * ```typescript\n * @Component({\n * selector: 'inner',\n * template: `\n * <div [@queryAnimation]=\"exp\">\n * <h1>Title</h1>\n * <div class=\"content\">\n * Blah blah blah\n * </div>\n * </div>\n * `,\n * animations: [\n * trigger('queryAnimation', [\n * transition('* => goAnimate', [\n * // hide the inner elements\n * query('h1', style({ opacity: 0 })),\n * query('.content', style({ opacity: 0 })),\n *\n * // animate the inner elements in, one by one\n * query('h1', animate(1000, style({ opacity: 1 }))),\n * query('.content', animate(1000, style({ opacity: 1 }))),\n * ])\n * ])\n * ]\n * })\n * class Cmp {\n * exp = '';\n *\n * goAnimate() {\n * this.exp = 'goAnimate';\n * }\n * }\n * ```\n *\n * @publicApi\n */\nfunction query(selector, animation, options = null) {\n return { type: 11 /* AnimationMetadataType.Query */, selector, animation, options };\n}\n/**\n * Use within an animation `query()` call to issue a timing gap after\n * each queried item is animated.\n *\n * @param timings A delay value.\n * @param animation One ore more animation steps.\n * @returns An object that encapsulates the stagger data.\n *\n * @usageNotes\n * In the following example, a container element wraps a list of items stamped out\n * by an `ngFor`. The container element contains an animation trigger that will later be set\n * to query for each of the inner items.\n *\n * Each time items are added, the opacity fade-in animation runs,\n * and each removed item is faded out.\n * When either of these animations occur, the stagger effect is\n * applied after each item's animation is started.\n *\n * ```html\n * <!-- list.component.html -->\n * <button (click)=\"toggle()\">Show / Hide Items</button>\n * <hr />\n * <div [@listAnimation]=\"items.length\">\n * <div *ngFor=\"let item of items\">\n * {{ item }}\n * </div>\n * </div>\n * ```\n *\n * Here is the component code:\n *\n * ```typescript\n * import {trigger, transition, style, animate, query, stagger} from '@angular/animations';\n * @Component({\n * templateUrl: 'list.component.html',\n * animations: [\n * trigger('listAnimation', [\n * ...\n * ])\n * ]\n * })\n * class ListComponent {\n * items = [];\n *\n * showItems() {\n * this.items = [0,1,2,3,4];\n * }\n *\n * hideItems() {\n * this.items = [];\n * }\n *\n * toggle() {\n * this.items.length ? this.hideItems() : this.showItems();\n * }\n * }\n * ```\n *\n * Here is the animation trigger code:\n *\n * ```typescript\n * trigger('listAnimation', [\n * transition('* => *', [ // each time the binding value changes\n * query(':leave', [\n * stagger(100, [\n * animate('0.5s', style({ opacity: 0 }))\n * ])\n * ]),\n * query(':enter', [\n * style({ opacity: 0 }),\n * stagger(100, [\n * animate('0.5s', style({ opacity: 1 }))\n * ])\n * ])\n * ])\n * ])\n * ```\n *\n * @publicApi\n */\nfunction stagger(timings, animation) {\n return { type: 12 /* AnimationMetadataType.Stagger */, timings, animation };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 scheduleMicroTask(cb) {\n Promise.resolve(null).then(cb);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 empty programmatic controller for reusable animations.\n * Used internally when animations are disabled, to avoid\n * checking for the null case when an animation player is expected.\n *\n * @see `animate()`\n * @see `AnimationPlayer`\n * @see `GroupPlayer`\n *\n * @publicApi\n */\nclass NoopAnimationPlayer {\n constructor(duration = 0, delay = 0) {\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._originalOnDoneFns = [];\n this._originalOnStartFns = [];\n this._started = false;\n this._destroyed = false;\n this._finished = false;\n this._position = 0;\n this.parentPlayer = null;\n this.totalTime = duration + delay;\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n onStart(fn) {\n this._originalOnStartFns.push(fn);\n this._onStartFns.push(fn);\n }\n onDone(fn) {\n this._originalOnDoneFns.push(fn);\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n hasStarted() {\n return this._started;\n }\n init() { }\n play() {\n if (!this.hasStarted()) {\n this._onStart();\n this.triggerMicrotask();\n }\n this._started = true;\n }\n /** @internal */\n triggerMicrotask() {\n scheduleMicroTask(() => this._onFinish());\n }\n _onStart() {\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n }\n pause() { }\n restart() { }\n finish() {\n this._onFinish();\n }\n destroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n if (!this.hasStarted()) {\n this._onStart();\n }\n this.finish();\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n reset() {\n this._started = false;\n this._finished = false;\n this._onStartFns = this._originalOnStartFns;\n this._onDoneFns = this._originalOnDoneFns;\n }\n setPosition(position) {\n this._position = this.totalTime ? position * this.totalTime : 1;\n }\n getPosition() {\n return this.totalTime ? this._position / this.totalTime : 1;\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(fn => fn());\n methods.length = 0;\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 programmatic controller for a group of reusable animations.\n * Used internally to control animations.\n *\n * @see `AnimationPlayer`\n * @see `{@link animations/group group()}`\n *\n */\nclass AnimationGroupPlayer {\n constructor(_players) {\n this._onDoneFns = [];\n this._onStartFns = [];\n this._finished = false;\n this._started = false;\n this._destroyed = false;\n this._onDestroyFns = [];\n this.parentPlayer = null;\n this.totalTime = 0;\n this.players = _players;\n let doneCount = 0;\n let destroyCount = 0;\n let startCount = 0;\n const total = this.players.length;\n if (total == 0) {\n scheduleMicroTask(() => this._onFinish());\n }\n else {\n this.players.forEach(player => {\n player.onDone(() => {\n if (++doneCount == total) {\n this._onFinish();\n }\n });\n player.onDestroy(() => {\n if (++destroyCount == total) {\n this._onDestroy();\n }\n });\n player.onStart(() => {\n if (++startCount == total) {\n this._onStart();\n }\n });\n });\n }\n this.totalTime = this.players.reduce((time, player) => Math.max(time, player.totalTime), 0);\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n init() {\n this.players.forEach(player => player.init());\n }\n onStart(fn) {\n this._onStartFns.push(fn);\n }\n _onStart() {\n if (!this.hasStarted()) {\n this._started = true;\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n }\n }\n onDone(fn) {\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n hasStarted() {\n return this._started;\n }\n play() {\n if (!this.parentPlayer) {\n this.init();\n }\n this._onStart();\n this.players.forEach(player => player.play());\n }\n pause() {\n this.players.forEach(player => player.pause());\n }\n restart() {\n this.players.forEach(player => player.restart());\n }\n finish() {\n this._onFinish();\n this.players.forEach(player => player.finish());\n }\n destroy() {\n this._onDestroy();\n }\n _onDestroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n this._onFinish();\n this.players.forEach(player => player.destroy());\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n reset() {\n this.players.forEach(player => player.reset());\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n }\n setPosition(p) {\n const timeAtPosition = p * this.totalTime;\n this.players.forEach(player => {\n const position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1;\n player.setPosition(position);\n });\n }\n getPosition() {\n const longestPlayer = this.players.reduce((longestSoFar, player) => {\n const newPlayerIsLongest = longestSoFar === null || player.totalTime > longestSoFar.totalTime;\n return newPlayerIsLongest ? player : longestSoFar;\n }, null);\n return longestPlayer != null ? longestPlayer.getPosition() : 0;\n }\n beforeDestroy() {\n this.players.forEach(player => {\n if (player.beforeDestroy) {\n player.beforeDestroy();\n }\n });\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(fn => fn());\n methods.length = 0;\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 ɵPRE_STYLE = '!';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AUTO_STYLE, AnimationBuilder, AnimationFactory, NoopAnimationPlayer, animate, animateChild, animation, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation, AnimationGroupPlayer as ɵAnimationGroupPlayer, ɵPRE_STYLE };\n","import { CdkDialogContainer, Dialog, DialogConfig, DialogModule } from '@angular/cdk/dialog';\nimport * as i1$1 from '@angular/cdk/overlay';\nimport { Overlay, OverlayModule } from '@angular/cdk/overlay';\nimport * as i4 from '@angular/cdk/portal';\nimport { PortalModule } from '@angular/cdk/portal';\nimport * as i0 from '@angular/core';\nimport { EventEmitter, Component, Optional, Inject, ViewEncapsulation, ChangeDetectionStrategy, InjectionToken, Injectable, SkipSelf, Directive, Input, NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport * as i2 from '@angular/common';\nimport { DOCUMENT } from '@angular/common';\nimport { Subject, merge, defer } from 'rxjs';\nimport { filter, take, startWith } from 'rxjs/operators';\nimport { trigger, state, style, transition, group, animate, query, animateChild } from '@angular/animations';\nimport * as i1 from '@angular/cdk/a11y';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Default parameters for the animation for backwards compatibility.\n * @docs-private\n */\nconst defaultParams = {\n params: { enterAnimationDuration: '150ms', exitAnimationDuration: '75ms' },\n};\n/**\n * Animations used by MatDialog.\n * @docs-private\n */\nconst matDialogAnimations = {\n /** Animation that is applied on the dialog container by default. */\n dialogContainer: trigger('dialogContainer', [\n // Note: The `enter` animation transitions to `transform: none`, because for some reason\n // specifying the transform explicitly, causes IE both to blur the dialog content and\n // decimate the animation performance. Leaving it as `none` solves both issues.\n state('void, exit', style({ opacity: 0, transform: 'scale(0.7)' })),\n state('enter', style({ transform: 'none' })),\n transition('* => enter', group([\n animate('{{enterAnimationDuration}} cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'none', opacity: 1 })),\n query('@*', animateChild(), { optional: true }),\n ]), defaultParams),\n transition('* => void, * => exit', group([\n animate('{{exitAnimationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)', style({ opacity: 0 })),\n query('@*', animateChild(), { optional: true }),\n ]), defaultParams),\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 * Configuration for opening a modal dialog with the MatDialog service.\n */\nclass MatDialogConfig {\n constructor() {\n /** The ARIA role of the dialog element. */\n this.role = 'dialog';\n /** Custom class for the overlay pane. */\n this.panelClass = '';\n /** Whether the dialog has a backdrop. */\n this.hasBackdrop = true;\n /** Custom class for the backdrop. */\n this.backdropClass = '';\n /** Whether the user can use escape or clicking on the backdrop to close the modal. */\n this.disableClose = false;\n /** Width of the dialog. */\n this.width = '';\n /** Height of the dialog. */\n this.height = '';\n /** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */\n this.maxWidth = '80vw';\n /** Data being injected into the child component. */\n this.data = null;\n /** ID of the element that describes the dialog. */\n this.ariaDescribedBy = null;\n /** ID of the element that labels the dialog. */\n this.ariaLabelledBy = null;\n /** Aria label to assign to the dialog element. */\n this.ariaLabel = null;\n /**\n * Where the dialog should focus on open.\n * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n * AutoFocusTarget instead.\n */\n this.autoFocus = 'first-tabbable';\n /**\n * Whether the dialog should restore focus to the\n * previously-focused element, after it's closed.\n */\n this.restoreFocus = true;\n /** Whether to wait for the opening animation to finish before trapping focus. */\n this.delayFocusTrap = true;\n /**\n * Whether the dialog should close when the user goes backwards/forwards in history.\n * Note that this usually doesn't include clicking on links (unless the user is using\n * the `HashLocationStrategy`).\n */\n this.closeOnNavigation = true;\n /** Duration of the enter animation. Has to be a valid CSS value (e.g. 100ms). */\n this.enterAnimationDuration = defaultParams.params.enterAnimationDuration;\n /** Duration of the exit animation. Has to be a valid CSS value (e.g. 50ms). */\n this.exitAnimationDuration = defaultParams.params.exitAnimationDuration;\n // TODO(jelbourn): add configuration for lifecycle hooks, ARIA labelling.\n }\n}\n\n/**\n * Base class for the `MatDialogContainer`. The base class does not implement\n * animations as these are left to implementers of the dialog container.\n */\n// tslint:disable-next-line:validate-decorators\nclass _MatDialogContainerBase extends CdkDialogContainer {\n constructor(elementRef, focusTrapFactory, _document, dialogConfig, interactivityChecker, ngZone, overlayRef, focusMonitor) {\n super(elementRef, focusTrapFactory, _document, dialogConfig, interactivityChecker, ngZone, overlayRef, focusMonitor);\n /** Emits when an animation state changes. */\n this._animationStateChanged = new EventEmitter();\n }\n _captureInitialFocus() {\n if (!this._config.delayFocusTrap) {\n this._trapFocus();\n }\n }\n /**\n * Callback for when the open dialog animation has finished. Intended to\n * be called by sub-classes that use different animation implementations.\n */\n _openAnimationDone(totalTime) {\n if (this._config.delayFocusTrap) {\n this._trapFocus();\n }\n this._animationStateChanged.next({ state: 'opened', totalTime });\n }\n}\n_MatDialogContainerBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatDialogContainerBase, deps: [{ token: i0.ElementRef }, { token: i1.FocusTrapFactory }, { token: DOCUMENT, optional: true }, { token: MatDialogConfig }, { token: i1.InteractivityChecker }, { token: i0.NgZone }, { token: i1$1.OverlayRef }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });\n_MatDialogContainerBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _MatDialogContainerBase, selector: \"ng-component\", usesInheritance: true, ngImport: i0, template: '', isInline: true });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatDialogContainerBase, decorators: [{\n type: Component,\n args: [{ template: '' }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FocusTrapFactory }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: MatDialogConfig }, { type: i1.InteractivityChecker }, { type: i0.NgZone }, { type: i1$1.OverlayRef }, { type: i1.FocusMonitor }]; } });\n/**\n * Internal component that wraps user-provided dialog content.\n * Animation is based on https://material.io/guidelines/motion/choreography.html.\n * @docs-private\n */\nclass MatDialogContainer extends _MatDialogContainerBase {\n constructor(elementRef, focusTrapFactory, document, dialogConfig, checker, ngZone, overlayRef, _changeDetectorRef, focusMonitor) {\n super(elementRef, focusTrapFactory, document, dialogConfig, checker, ngZone, overlayRef, focusMonitor);\n this._changeDetectorRef = _changeDetectorRef;\n /** State of the dialog animation. */\n this._state = 'enter';\n }\n /** Callback, invoked whenever an animation on the host completes. */\n _onAnimationDone({ toState, totalTime }) {\n if (toState === 'enter') {\n this._openAnimationDone(totalTime);\n }\n else if (toState === 'exit') {\n this._animationStateChanged.next({ state: 'closed', totalTime });\n }\n }\n /** Callback, invoked when an animation on the host starts. */\n _onAnimationStart({ toState, totalTime }) {\n if (toState === 'enter') {\n this._animationStateChanged.next({ state: 'opening', totalTime });\n }\n else if (toState === 'exit' || toState === 'void') {\n this._animationStateChanged.next({ state: 'closing', totalTime });\n }\n }\n /** Starts the dialog exit animation. */\n _startExitAnimation() {\n this._state = 'exit';\n // Mark the container for check so it can react if the\n // view container is using OnPush change detection.\n this._changeDetectorRef.markForCheck();\n }\n _getAnimationState() {\n return {\n value: this._state,\n params: {\n 'enterAnimationDuration': this._config.enterAnimationDuration || defaultParams.params.enterAnimationDuration,\n 'exitAnimationDuration': this._config.exitAnimationDuration || defaultParams.params.exitAnimationDuration,\n },\n };\n }\n}\nMatDialogContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialogContainer, deps: [{ token: i0.ElementRef }, { token: i1.FocusTrapFactory }, { token: DOCUMENT, optional: true }, { token: MatDialogConfig }, { token: i1.InteractivityChecker }, { token: i0.NgZone }, { token: i1$1.OverlayRef }, { token: i0.ChangeDetectorRef }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });\nMatDialogContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatDialogContainer, selector: \"mat-dialog-container\", host: { attributes: { \"tabindex\": \"-1\" }, listeners: { \"@dialogContainer.start\": \"_onAnimationStart($event)\", \"@dialogContainer.done\": \"_onAnimationDone($event)\" }, properties: { \"attr.aria-modal\": \"_config.ariaModal\", \"id\": \"_config.id\", \"attr.role\": \"_config.role\", \"attr.aria-labelledby\": \"_config.ariaLabel ? null : _ariaLabelledBy\", \"attr.aria-label\": \"_config.ariaLabel\", \"attr.aria-describedby\": \"_config.ariaDescribedBy || null\", \"@dialogContainer\": \"_getAnimationState()\" }, classAttribute: \"mat-dialog-container\" }, usesInheritance: true, ngImport: i0, template: \"<ng-template cdkPortalOutlet></ng-template>\\n\", styles: [\".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions.mat-dialog-actions-align-center,.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions.mat-dialog-actions-align-end,.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\"], dependencies: [{ kind: \"directive\", type: i4.CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: [\"cdkPortalOutlet\"], outputs: [\"attached\"], exportAs: [\"cdkPortalOutlet\"] }], animations: [matDialogAnimations.dialogContainer], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialogContainer, decorators: [{\n type: Component,\n args: [{ selector: 'mat-dialog-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, animations: [matDialogAnimations.dialogContainer], host: {\n 'class': 'mat-dialog-container',\n 'tabindex': '-1',\n '[attr.aria-modal]': '_config.ariaModal',\n '[id]': '_config.id',\n '[attr.role]': '_config.role',\n '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',\n '[attr.aria-label]': '_config.ariaLabel',\n '[attr.aria-describedby]': '_config.ariaDescribedBy || null',\n '[@dialogContainer]': `_getAnimationState()`,\n '(@dialogContainer.start)': '_onAnimationStart($event)',\n '(@dialogContainer.done)': '_onAnimationDone($event)',\n }, template: \"<ng-template cdkPortalOutlet></ng-template>\\n\", styles: [\".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions.mat-dialog-actions-align-center,.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions.mat-dialog-actions-align-end,.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FocusTrapFactory }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: MatDialogConfig }, { type: i1.InteractivityChecker }, { type: i0.NgZone }, { type: i1$1.OverlayRef }, { type: i0.ChangeDetectorRef }, { type: i1.FocusMonitor }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Reference to a dialog opened via the MatDialog service.\n */\nclass MatDialogRef {\n constructor(_ref, config, _containerInstance) {\n this._ref = _ref;\n this._containerInstance = _containerInstance;\n /** Subject for notifying the user that the dialog has finished opening. */\n this._afterOpened = new Subject();\n /** Subject for notifying the user that the dialog has started closing. */\n this._beforeClosed = new Subject();\n /** Current state of the dialog. */\n this._state = 0 /* MatDialogState.OPEN */;\n this.disableClose = config.disableClose;\n this.id = _ref.id;\n // Emit when opening animation completes\n _containerInstance._animationStateChanged\n .pipe(filter(event => event.state === 'opened'), take(1))\n .subscribe(() => {\n this._afterOpened.next();\n this._afterOpened.complete();\n });\n // Dispose overlay when closing animation is complete\n _containerInstance._animationStateChanged\n .pipe(filter(event => event.state === 'closed'), take(1))\n .subscribe(() => {\n clearTimeout(this._closeFallbackTimeout);\n this._finishDialogClose();\n });\n _ref.overlayRef.detachments().subscribe(() => {\n this._beforeClosed.next(this._result);\n this._beforeClosed.complete();\n this._finishDialogClose();\n });\n merge(this.backdropClick(), this.keydownEvents().pipe(filter(event => event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)))).subscribe(event => {\n if (!this.disableClose) {\n event.preventDefault();\n _closeDialogVia(this, event.type === 'keydown' ? 'keyboard' : 'mouse');\n }\n });\n }\n /**\n * Close the dialog.\n * @param dialogResult Optional result to return to the dialog opener.\n */\n close(dialogResult) {\n this._result = dialogResult;\n // Transition the backdrop in parallel to the dialog.\n this._containerInstance._animationStateChanged\n .pipe(filter(event => event.state === 'closing'), take(1))\n .subscribe(event => {\n this._beforeClosed.next(dialogResult);\n this._beforeClosed.complete();\n this._ref.overlayRef.detachBackdrop();\n // The logic that disposes of the overlay depends on the exit animation completing, however\n // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback\n // timeout which will clean everything up if the animation hasn't fired within the specified\n // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the\n // vast majority of cases the timeout will have been cleared before it has the chance to fire.\n this._closeFallbackTimeout = setTimeout(() => this._finishDialogClose(), event.totalTime + 100);\n });\n this._state = 1 /* MatDialogState.CLOSING */;\n this._containerInstance._startExitAnimation();\n }\n /**\n * Gets an observable that is notified when the dialog is finished opening.\n */\n afterOpened() {\n return this._afterOpened;\n }\n /**\n * Gets an observable that is notified when the dialog is finished closing.\n */\n afterClosed() {\n return this._ref.closed;\n }\n /**\n * Gets an observable that is notified when the dialog has started closing.\n */\n beforeClosed() {\n return this._beforeClosed;\n }\n /**\n * Gets an observable that emits when the overlay's backdrop has been clicked.\n */\n backdropClick() {\n return this._ref.backdropClick;\n }\n /**\n * Gets an observable that emits when keydown events are targeted on the overlay.\n */\n keydownEvents() {\n return this._ref.keydownEvents;\n }\n /**\n * Updates the dialog's position.\n * @param position New dialog position.\n */\n updatePosition(position) {\n let strategy = this._ref.config.positionStrategy;\n if (position && (position.left || position.right)) {\n position.left ? strategy.left(position.left) : strategy.right(position.right);\n }\n else {\n strategy.centerHorizontally();\n }\n if (position && (position.top || position.bottom)) {\n position.top ? strategy.top(position.top) : strategy.bottom(position.bottom);\n }\n else {\n strategy.centerVertically();\n }\n this._ref.updatePosition();\n return this;\n }\n /**\n * Updates the dialog's width and height.\n * @param width New width of the dialog.\n * @param height New height of the dialog.\n */\n updateSize(width = '', height = '') {\n this._ref.updateSize(width, height);\n return this;\n }\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes) {\n this._ref.addPanelClass(classes);\n return this;\n }\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes) {\n this._ref.removePanelClass(classes);\n return this;\n }\n /** Gets the current state of the dialog's lifecycle. */\n getState() {\n return this._state;\n }\n /**\n * Finishes the dialog close by updating the state of the dialog\n * and disposing the overlay.\n */\n _finishDialogClose() {\n this._state = 2 /* MatDialogState.CLOSED */;\n this._ref.close(this._result, { focusOrigin: this._closeInteractionType });\n this.componentInstance = null;\n }\n}\n/**\n * Closes the dialog with the specified interaction type. This is currently not part of\n * `MatDialogRef` as that would conflict with custom dialog ref mocks provided in tests.\n * More details. See: https://github.com/angular/components/pull/9257#issuecomment-651342226.\n */\n// TODO: Move this back into `MatDialogRef` when we provide an official mock dialog ref.\nfunction _closeDialogVia(ref, interactionType, result) {\n ref._closeInteractionType = interactionType;\n return ref.close(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/** Injection token that can be used to access the data that was passed in to a dialog. */\nconst MAT_DIALOG_DATA = new InjectionToken('MatDialogData');\n/** Injection token that can be used to specify default dialog options. */\nconst MAT_DIALOG_DEFAULT_OPTIONS = new InjectionToken('mat-dialog-default-options');\n/** Injection token that determines the scroll handling while the dialog is open. */\nconst MAT_DIALOG_SCROLL_STRATEGY = new InjectionToken('mat-dialog-scroll-strategy');\n/** @docs-private */\nfunction MAT_DIALOG_SCROLL_STRATEGY_FACTORY(overlay) {\n return () => overlay.scrollStrategies.block();\n}\n/** @docs-private */\nfunction MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n return () => overlay.scrollStrategies.block();\n}\n/** @docs-private */\nconst MAT_DIALOG_SCROLL_STRATEGY_PROVIDER = {\n provide: MAT_DIALOG_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n// Counter for unique dialog ids.\nlet uniqueId = 0;\n/**\n * Base class for dialog services. The base dialog service allows\n * for arbitrary dialog refs and dialog container components.\n */\nclass _MatDialogBase {\n constructor(_overlay, injector, _defaultOptions, _parentDialog, \n /**\n * @deprecated No longer used. To be removed.\n * @breaking-change 15.0.0\n */\n _overlayContainer, scrollStrategy, _dialogRefConstructor, _dialogContainerType, _dialogDataToken, \n /**\n * @deprecated No longer used. To be removed.\n * @breaking-change 14.0.0\n */\n _animationMode) {\n this._overlay = _overlay;\n this._defaultOptions = _defaultOptions;\n this._parentDialog = _parentDialog;\n this._dialogRefConstructor = _dialogRefConstructor;\n this._dialogContainerType = _dialogContainerType;\n this._dialogDataToken = _dialogDataToken;\n this._openDialogsAtThisLevel = [];\n this._afterAllClosedAtThisLevel = new Subject();\n this._afterOpenedAtThisLevel = new Subject();\n this._idPrefix = 'mat-dialog-';\n /**\n * Stream that emits when all open dialog have finished closing.\n * Will emit on subscribe if there are no open dialogs to begin with.\n */\n this.afterAllClosed = defer(() => this.openDialogs.length\n ? this._getAfterAllClosed()\n : this._getAfterAllClosed().pipe(startWith(undefined)));\n this._scrollStrategy = scrollStrategy;\n this._dialog = injector.get(Dialog);\n }\n /** Keeps track of the currently-open dialogs. */\n get openDialogs() {\n return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n }\n /** Stream that emits when a dialog has been opened. */\n get afterOpened() {\n return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n }\n _getAfterAllClosed() {\n const parent = this._parentDialog;\n return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;\n }\n open(componentOrTemplateRef, config) {\n let dialogRef;\n config = { ...(this._defaultOptions || new MatDialogConfig()), ...config };\n config.id = config.id || `${this._idPrefix}${uniqueId++}`;\n config.scrollStrategy = config.scrollStrategy || this._scrollStrategy();\n const cdkRef = this._dialog.open(componentOrTemplateRef, {\n ...config,\n positionStrategy: this._overlay.position().global().centerHorizontally().centerVertically(),\n // Disable closing since we need to sync it up to the animation ourselves.\n disableClose: true,\n // Disable closing on destroy, because this service cleans up its open dialogs as well.\n // We want to do the cleanup here, rather than the CDK service, because the CDK destroys\n // the dialogs immediately whereas we want it to wait for the animations to finish.\n closeOnDestroy: false,\n container: {\n type: this._dialogContainerType,\n providers: () => [\n // Provide our config as the CDK config as well since it has the same interface as the\n // CDK one, but it contains the actual values passed in by the user for things like\n // `disableClose` which we disable for the CDK dialog since we handle it ourselves.\n { provide: MatDialogConfig, useValue: config },\n { provide: DialogConfig, useValue: config },\n ],\n },\n templateContext: () => ({ dialogRef }),\n providers: (ref, cdkConfig, dialogContainer) => {\n dialogRef = new this._dialogRefConstructor(ref, config, dialogContainer);\n dialogRef.updatePosition(config?.position);\n return [\n { provide: this._dialogContainerType, useValue: dialogContainer },\n { provide: this._dialogDataToken, useValue: cdkConfig.data },\n { provide: this._dialogRefConstructor, useValue: dialogRef },\n ];\n },\n });\n // This can't be assigned in the `providers` callback, because\n // the instance hasn't been assigned to the CDK ref yet.\n dialogRef.componentInstance = cdkRef.componentInstance;\n this.openDialogs.push(dialogRef);\n this.afterOpened.next(dialogRef);\n dialogRef.afterClosed().subscribe(() => {\n const index = this.openDialogs.indexOf(dialogRef);\n if (index > -1) {\n this.openDialogs.splice(index, 1);\n if (!this.openDialogs.length) {\n this._getAfterAllClosed().next();\n }\n }\n });\n return dialogRef;\n }\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll() {\n this._closeDialogs(this.openDialogs);\n }\n /**\n * Finds an open dialog by its id.\n * @param id ID to use when looking up the dialog.\n */\n getDialogById(id) {\n return this.openDialogs.find(dialog => dialog.id === id);\n }\n ngOnDestroy() {\n // Only close the dialogs at this level on destroy\n // since the parent service may still be active.\n this._closeDialogs(this._openDialogsAtThisLevel);\n this._afterAllClosedAtThisLevel.complete();\n this._afterOpenedAtThisLevel.complete();\n }\n _closeDialogs(dialogs) {\n let i = dialogs.length;\n while (i--) {\n dialogs[i].close();\n }\n }\n}\n_MatDialogBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatDialogBase, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Injectable });\n_MatDialogBase.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatDialogBase });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatDialogBase, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: undefined }, { type: undefined }, { type: i1$1.OverlayContainer }, { type: undefined }, { type: i0.Type }, { type: i0.Type }, { type: i0.InjectionToken }, { type: undefined }]; } });\n/**\n * Service to open Material Design modal dialogs.\n */\nclass MatDialog extends _MatDialogBase {\n constructor(overlay, injector, \n /**\n * @deprecated `_location` parameter to be removed.\n * @breaking-change 10.0.0\n */\n _location, defaultOptions, scrollStrategy, parentDialog, \n /**\n * @deprecated No longer used. To be removed.\n * @breaking-change 15.0.0\n */\n overlayContainer, \n /**\n * @deprecated No longer used. To be removed.\n * @breaking-change 14.0.0\n */\n animationMode) {\n super(overlay, injector, defaultOptions, parentDialog, overlayContainer, scrollStrategy, MatDialogRef, MatDialogContainer, MAT_DIALOG_DATA, animationMode);\n }\n}\nMatDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialog, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: i2.Location, optional: true }, { token: MAT_DIALOG_DEFAULT_OPTIONS, optional: true }, { token: MAT_DIALOG_SCROLL_STRATEGY }, { token: MatDialog, optional: true, skipSelf: true }, { token: i1$1.OverlayContainer }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nMatDialog.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialog });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialog, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: i2.Location, decorators: [{\n type: Optional\n }] }, { type: MatDialogConfig, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_DIALOG_DEFAULT_OPTIONS]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_DIALOG_SCROLL_STRATEGY]\n }] }, { type: MatDialog, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }] }, { type: i1$1.OverlayContainer }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_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/** Counter used to generate unique IDs for dialog elements. */\nlet dialogElementUid = 0;\n/**\n * Button that will close the current dialog.\n */\nclass MatDialogClose {\n constructor(\n /**\n * Reference to the containing dialog.\n * @deprecated `dialogRef` property to become private.\n * @breaking-change 13.0.0\n */\n // The dialog title directive is always used in combination with a `MatDialogRef`.\n // tslint:disable-next-line: lightweight-tokens\n dialogRef, _elementRef, _dialog) {\n this.dialogRef = dialogRef;\n this._elementRef = _elementRef;\n this._dialog = _dialog;\n /** Default to \"button\" to prevents accidental form submits. */\n this.type = 'button';\n }\n ngOnInit() {\n if (!this.dialogRef) {\n // When this directive is included in a dialog via TemplateRef (rather than being\n // in a Component), the DialogRef isn't available via injection because embedded\n // views cannot be given a custom injector. Instead, we look up the DialogRef by\n // ID. This must occur in `onInit`, as the ID binding for the dialog container won't\n // be resolved at constructor time.\n this.dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs);\n }\n }\n ngOnChanges(changes) {\n const proxiedChange = changes['_matDialogClose'] || changes['_matDialogCloseResult'];\n if (proxiedChange) {\n this.dialogResult = proxiedChange.currentValue;\n }\n }\n _onButtonClick(event) {\n // Determinate the focus origin using the click event, because using the FocusMonitor will\n // result in incorrect origins. Most of the time, close buttons will be auto focused in the\n // dialog, and therefore clicking the button won't result in a focus change. This means that\n // the FocusMonitor won't detect any origin change, and will always output `program`.\n _closeDialogVia(this.dialogRef, event.screenX === 0 && event.screenY === 0 ? 'keyboard' : 'mouse', this.dialogResult);\n }\n}\nMatDialogClose.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialogClose, deps: [{ token: MatDialogRef, optional: true }, { token: i0.ElementRef }, { token: MatDialog }], target: i0.ɵɵFactoryTarget.Directive });\nMatDialogClose.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatDialogClose, selector: \"[mat-dialog-close], [matDialogClose]\", inputs: { ariaLabel: [\"aria-label\", \"ariaLabel\"], type: \"type\", dialogResult: [\"mat-dialog-close\", \"dialogResult\"], _matDialogClose: [\"matDialogClose\", \"_matDialogClose\"] }, host: { listeners: { \"click\": \"_onButtonClick($event)\" }, properties: { \"attr.aria-label\": \"ariaLabel || null\", \"attr.type\": \"type\" } }, exportAs: [\"matDialogClose\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialogClose, decorators: [{\n type: Directive,\n args: [{\n selector: '[mat-dialog-close], [matDialogClose]',\n exportAs: 'matDialogClose',\n host: {\n '(click)': '_onButtonClick($event)',\n '[attr.aria-label]': 'ariaLabel || null',\n '[attr.type]': 'type',\n },\n }]\n }], ctorParameters: function () { return [{ type: MatDialogRef, decorators: [{\n type: Optional\n }] }, { type: i0.ElementRef }, { type: MatDialog }]; }, propDecorators: { ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], type: [{\n type: Input\n }], dialogResult: [{\n type: Input,\n args: ['mat-dialog-close']\n }], _matDialogClose: [{\n type: Input,\n args: ['matDialogClose']\n }] } });\n/**\n * Title of a dialog element. Stays fixed to the top of the dialog when scrolling.\n */\nclass MatDialogTitle {\n constructor(\n // The dialog title directive is always used in combination with a `MatDialogRef`.\n // tslint:disable-next-line: lightweight-tokens\n _dialogRef, _elementRef, _dialog) {\n this._dialogRef = _dialogRef;\n this._elementRef = _elementRef;\n this._dialog = _dialog;\n /** Unique id for the dialog title. If none is supplied, it will be auto-generated. */\n this.id = `mat-dialog-title-${dialogElementUid++}`;\n }\n ngOnInit() {\n if (!this._dialogRef) {\n this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs);\n }\n if (this._dialogRef) {\n Promise.resolve().then(() => {\n const container = this._dialogRef._containerInstance;\n if (container && !container._ariaLabelledBy) {\n container._ariaLabelledBy = this.id;\n }\n });\n }\n }\n}\nMatDialogTitle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialogTitle, deps: [{ token: MatDialogRef, optional: true }, { token: i0.ElementRef }, { token: MatDialog }], target: i0.ɵɵFactoryTarget.Directive });\nMatDialogTitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatDialogTitle, selector: \"[mat-dialog-title], [matDialogTitle]\", inputs: { id: \"id\" }, host: { properties: { \"id\": \"id\" }, classAttribute: \"mat-dialog-title\" }, exportAs: [\"matDialogTitle\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialogTitle, decorators: [{\n type: Directive,\n args: [{\n selector: '[mat-dialog-title], [matDialogTitle]',\n exportAs: 'matDialogTitle',\n host: {\n 'class': 'mat-dialog-title',\n '[id]': 'id',\n },\n }]\n }], ctorParameters: function () { return [{ type: MatDialogRef, decorators: [{\n type: Optional\n }] }, { type: i0.ElementRef }, { type: MatDialog }]; }, propDecorators: { id: [{\n type: Input\n }] } });\n/**\n * Scrollable content container of a dialog.\n */\nclass MatDialogContent {\n}\nMatDialogContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatDialogContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatDialogContent, selector: \"[mat-dialog-content], mat-dialog-content, [matDialogContent]\", host: { classAttribute: \"mat-dialog-content\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialogContent, decorators: [{\n type: Directive,\n args: [{\n selector: `[mat-dialog-content], mat-dialog-content, [matDialogContent]`,\n host: { 'class': 'mat-dialog-content' },\n }]\n }] });\n/**\n * Container for the bottom action buttons in a dialog.\n * Stays fixed to the bottom when scrolling.\n */\nclass MatDialogActions {\n constructor() {\n /**\n * Horizontal alignment of action buttons.\n */\n this.align = 'start';\n }\n}\nMatDialogActions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialogActions, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatDialogActions.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatDialogActions, selector: \"[mat-dialog-actions], mat-dialog-actions, [matDialogActions]\", inputs: { align: \"align\" }, host: { properties: { \"class.mat-dialog-actions-align-center\": \"align === \\\"center\\\"\", \"class.mat-dialog-actions-align-end\": \"align === \\\"end\\\"\" }, classAttribute: \"mat-dialog-actions\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialogActions, decorators: [{\n type: Directive,\n args: [{\n selector: `[mat-dialog-actions], mat-dialog-actions, [matDialogActions]`,\n host: {\n 'class': 'mat-dialog-actions',\n '[class.mat-dialog-actions-align-center]': 'align === \"center\"',\n '[class.mat-dialog-actions-align-end]': 'align === \"end\"',\n },\n }]\n }], propDecorators: { align: [{\n type: Input\n }] } });\n// TODO(crisbeto): this utility shouldn't be necessary anymore, because the dialog ref is provided\n// both to component and template dialogs through DI. We need to keep it around, because there are\n// some internal wrappers around `MatDialog` that happened to work by accident, because we had this\n// fallback logic in place.\n/**\n * Finds the closest MatDialogRef to an element by looking at the DOM.\n * @param element Element relative to which to look for a dialog.\n * @param openDialogs References to the currently-open dialogs.\n */\nfunction getClosestDialog(element, openDialogs) {\n let parent = element.nativeElement.parentElement;\n while (parent && !parent.classList.contains('mat-dialog-container')) {\n parent = parent.parentElement;\n }\n return parent ? openDialogs.find(dialog => dialog.id === parent.id) : 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 MatDialogModule {\n}\nMatDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialogModule, declarations: [MatDialogContainer,\n MatDialogClose,\n MatDialogTitle,\n MatDialogActions,\n MatDialogContent], imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule], exports: [MatDialogContainer,\n MatDialogClose,\n MatDialogTitle,\n MatDialogContent,\n MatDialogActions,\n MatCommonModule] });\nMatDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialogModule, providers: [MatDialog, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER], imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDialogModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule],\n exports: [\n MatDialogContainer,\n MatDialogClose,\n MatDialogTitle,\n MatDialogContent,\n MatDialogActions,\n MatCommonModule,\n ],\n declarations: [\n MatDialogContainer,\n MatDialogClose,\n MatDialogTitle,\n MatDialogActions,\n MatDialogContent,\n ],\n providers: [MatDialog, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER],\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 * Generated bundle index. Do not edit.\n */\n\nexport { MAT_DIALOG_DATA, MAT_DIALOG_DEFAULT_OPTIONS, MAT_DIALOG_SCROLL_STRATEGY, MAT_DIALOG_SCROLL_STRATEGY_FACTORY, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, MatDialog, MatDialogActions, MatDialogClose, MatDialogConfig, MatDialogContainer, MatDialogContent, MatDialogModule, MatDialogRef, MatDialogTitle, _MatDialogBase, _MatDialogContainerBase, _closeDialogVia, matDialogAnimations };\n","import { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Injectable, Inject, InjectionToken, EventEmitter, Directive, Optional, Input, Output, NgModule } 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 * A pending copy-to-clipboard operation.\n *\n * The implementation of copying text to the clipboard modifies the DOM and\n * forces a re-layout. This re-layout can take too long if the string is large,\n * causing the execCommand('copy') to happen too long after the user clicked.\n * This results in the browser refusing to copy. This object lets the\n * re-layout happen in a separate tick from copying by providing a copy function\n * that can be called later.\n *\n * Destroy must be called when no longer in use, regardless of whether `copy` is\n * called.\n */\nclass PendingCopy {\n constructor(text, _document) {\n this._document = _document;\n const textarea = (this._textarea = this._document.createElement('textarea'));\n const styles = textarea.style;\n // Hide the element for display and accessibility. Set a fixed position so the page layout\n // isn't affected. We use `fixed` with `top: 0`, because focus is moved into the textarea\n // for a split second and if it's off-screen, some browsers will attempt to scroll it into view.\n styles.position = 'fixed';\n styles.top = styles.opacity = '0';\n styles.left = '-999em';\n textarea.setAttribute('aria-hidden', 'true');\n textarea.value = text;\n // Making the textarea `readonly` prevents the screen from jumping on iOS Safari (see #25169).\n textarea.readOnly = true;\n this._document.body.appendChild(textarea);\n }\n /** Finishes copying the text. */\n copy() {\n const textarea = this._textarea;\n let successful = false;\n try {\n // Older browsers could throw if copy is not supported.\n if (textarea) {\n const currentFocus = this._document.activeElement;\n textarea.select();\n textarea.setSelectionRange(0, textarea.value.length);\n successful = this._document.execCommand('copy');\n if (currentFocus) {\n currentFocus.focus();\n }\n }\n }\n catch {\n // Discard error.\n // Initial setting of {@code successful} will represent failure here.\n }\n return successful;\n }\n /** Cleans up DOM changes used to perform the copy operation. */\n destroy() {\n const textarea = this._textarea;\n if (textarea) {\n textarea.remove();\n this._textarea = undefined;\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 service for copying text to the clipboard.\n */\nclass Clipboard {\n constructor(document) {\n this._document = document;\n }\n /**\n * Copies the provided text into the user's clipboard.\n *\n * @param text The string to copy.\n * @returns Whether the operation was successful.\n */\n copy(text) {\n const pendingCopy = this.beginCopy(text);\n const successful = pendingCopy.copy();\n pendingCopy.destroy();\n return successful;\n }\n /**\n * Prepares a string to be copied later. This is useful for large strings\n * which take too long to successfully render and be copied in the same tick.\n *\n * The caller must call `destroy` on the returned `PendingCopy`.\n *\n * @param text The string to copy.\n * @returns the pending copy operation.\n */\n beginCopy(text) {\n return new PendingCopy(text, this._document);\n }\n}\nClipboard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Clipboard, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nClipboard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Clipboard, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: Clipboard, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [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/** Injection token that can be used to provide the default options to `CdkCopyToClipboard`. */\nconst CDK_COPY_TO_CLIPBOARD_CONFIG = new InjectionToken('CDK_COPY_TO_CLIPBOARD_CONFIG');\n/**\n * Provides behavior for a button that when clicked copies content into user's\n * clipboard.\n */\nclass CdkCopyToClipboard {\n constructor(_clipboard, _ngZone, config) {\n this._clipboard = _clipboard;\n this._ngZone = _ngZone;\n /** Content to be copied. */\n this.text = '';\n /**\n * How many times to attempt to copy the text. This may be necessary for longer text, because\n * the browser needs time to fill an intermediate textarea element and copy the content.\n */\n this.attempts = 1;\n /**\n * Emits when some text is copied to the clipboard. The\n * emitted value indicates whether copying was successful.\n */\n this.copied = new EventEmitter();\n /** Copies that are currently being attempted. */\n this._pending = new Set();\n if (config && config.attempts != null) {\n this.attempts = config.attempts;\n }\n }\n /** Copies the current text to the clipboard. */\n copy(attempts = this.attempts) {\n if (attempts > 1) {\n let remainingAttempts = attempts;\n const pending = this._clipboard.beginCopy(this.text);\n this._pending.add(pending);\n const attempt = () => {\n const successful = pending.copy();\n if (!successful && --remainingAttempts && !this._destroyed) {\n // We use 1 for the timeout since it's more predictable when flushing in unit tests.\n this._currentTimeout = this._ngZone.runOutsideAngular(() => setTimeout(attempt, 1));\n }\n else {\n this._currentTimeout = null;\n this._pending.delete(pending);\n pending.destroy();\n this.copied.emit(successful);\n }\n };\n attempt();\n }\n else {\n this.copied.emit(this._clipboard.copy(this.text));\n }\n }\n ngOnDestroy() {\n if (this._currentTimeout) {\n clearTimeout(this._currentTimeout);\n }\n this._pending.forEach(copy => copy.destroy());\n this._pending.clear();\n this._destroyed = true;\n }\n}\nCdkCopyToClipboard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkCopyToClipboard, deps: [{ token: Clipboard }, { token: i0.NgZone }, { token: CDK_COPY_TO_CLIPBOARD_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkCopyToClipboard.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkCopyToClipboard, selector: \"[cdkCopyToClipboard]\", inputs: { text: [\"cdkCopyToClipboard\", \"text\"], attempts: [\"cdkCopyToClipboardAttempts\", \"attempts\"] }, outputs: { copied: \"cdkCopyToClipboardCopied\" }, host: { listeners: { \"click\": \"copy()\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkCopyToClipboard, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkCopyToClipboard]',\n host: {\n '(click)': 'copy()',\n },\n }]\n }], ctorParameters: function () { return [{ type: Clipboard }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [CDK_COPY_TO_CLIPBOARD_CONFIG]\n }] }]; }, propDecorators: { text: [{\n type: Input,\n args: ['cdkCopyToClipboard']\n }], attempts: [{\n type: Input,\n args: ['cdkCopyToClipboardAttempts']\n }], copied: [{\n type: Output,\n args: ['cdkCopyToClipboardCopied']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 ClipboardModule {\n}\nClipboardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ClipboardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nClipboardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: ClipboardModule, declarations: [CdkCopyToClipboard], exports: [CdkCopyToClipboard] });\nClipboardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ClipboardModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: ClipboardModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [CdkCopyToClipboard],\n exports: [CdkCopyToClipboard],\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 * Generated bundle index. Do not edit.\n */\n\nexport { CDK_COPY_TO_CLIPBOARD_CONFIG, CdkCopyToClipboard, Clipboard, ClipboardModule, PendingCopy };\n","import * as i1 from '@angular/cdk/a11y';\nimport { FocusKeyManager, isFakeTouchstartFromScreenReader, isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { UP_ARROW, DOWN_ARROW, RIGHT_ARROW, LEFT_ARROW, ESCAPE, hasModifierKey, ENTER, SPACE } from '@angular/cdk/keycodes';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Directive, Inject, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, Input, QueryList, EventEmitter, TemplateRef, ContentChildren, ViewChild, ContentChild, Output, Self, NgModule } from '@angular/core';\nimport { Subject, Subscription, merge, of, asapScheduler } from 'rxjs';\nimport { startWith, switchMap, take, takeUntil, filter, delay } from 'rxjs/operators';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\nimport { TemplatePortal, DomPortalOutlet } from '@angular/cdk/portal';\nimport * as i2 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i3 from '@angular/material/core';\nimport { mixinDisableRipple, mixinDisabled, MatCommonModule, MatRippleModule } from '@angular/material/core';\nimport * as i3$1 from '@angular/cdk/bidi';\nimport * as i1$1 from '@angular/cdk/overlay';\nimport { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';\nimport { normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Animations used by the mat-menu component.\n * Animation duration and timing values are based on:\n * https://material.io/guidelines/components/menus.html#menus-usage\n * @docs-private\n */\nconst matMenuAnimations = {\n /**\n * This animation controls the menu panel's entry and exit from the page.\n *\n * When the menu panel is added to the DOM, it scales in and fades in its border.\n *\n * When the menu panel is removed from the DOM, it simply fades out after a brief\n * delay to display the ripple.\n */\n transformMenu: trigger('transformMenu', [\n state('void', style({\n opacity: 0,\n transform: 'scale(0.8)',\n })),\n transition('void => enter', animate('120ms cubic-bezier(0, 0, 0.2, 1)', style({\n opacity: 1,\n transform: 'scale(1)',\n }))),\n transition('* => void', animate('100ms 25ms linear', style({ opacity: 0 }))),\n ]),\n /**\n * This animation fades in the background color and content of the menu panel\n * after its containing element is scaled in.\n */\n fadeInItems: trigger('fadeInItems', [\n // TODO(crisbeto): this is inside the `transformMenu`\n // now. Remove next time we do breaking changes.\n state('showing', style({ opacity: 1 })),\n transition('void => *', [\n style({ opacity: 0 }),\n animate('400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)'),\n ]),\n ]),\n};\n/**\n * @deprecated\n * @breaking-change 8.0.0\n * @docs-private\n */\nconst fadeInItems = matMenuAnimations.fadeInItems;\n/**\n * @deprecated\n * @breaking-change 8.0.0\n * @docs-private\n */\nconst transformMenu = matMenuAnimations.transformMenu;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 token that can be used to reference instances of `MatMenuContent`. It serves\n * as alternative token to the actual `MatMenuContent` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_MENU_CONTENT = new InjectionToken('MatMenuContent');\nclass _MatMenuContentBase {\n constructor(_template, _componentFactoryResolver, _appRef, _injector, _viewContainerRef, _document, _changeDetectorRef) {\n this._template = _template;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._appRef = _appRef;\n this._injector = _injector;\n this._viewContainerRef = _viewContainerRef;\n this._document = _document;\n this._changeDetectorRef = _changeDetectorRef;\n /** Emits when the menu content has been attached. */\n this._attached = new Subject();\n }\n /**\n * Attaches the content with a particular context.\n * @docs-private\n */\n attach(context = {}) {\n if (!this._portal) {\n this._portal = new TemplatePortal(this._template, this._viewContainerRef);\n }\n this.detach();\n if (!this._outlet) {\n this._outlet = new DomPortalOutlet(this._document.createElement('div'), this._componentFactoryResolver, this._appRef, this._injector);\n }\n const element = this._template.elementRef.nativeElement;\n // Because we support opening the same menu from different triggers (which in turn have their\n // own `OverlayRef` panel), we have to re-insert the host element every time, otherwise we\n // risk it staying attached to a pane that's no longer in the DOM.\n element.parentNode.insertBefore(this._outlet.outletElement, element);\n // When `MatMenuContent` is used in an `OnPush` component, the insertion of the menu\n // content via `createEmbeddedView` does not cause the content to be seen as \"dirty\"\n // by Angular. This causes the `@ContentChildren` for menu items within the menu to\n // not be updated by Angular. By explicitly marking for check here, we tell Angular that\n // it needs to check for new menu items and update the `@ContentChild` in `MatMenu`.\n // @breaking-change 9.0.0 Make change detector ref required\n this._changeDetectorRef?.markForCheck();\n this._portal.attach(this._outlet, context);\n this._attached.next();\n }\n /**\n * Detaches the content.\n * @docs-private\n */\n detach() {\n if (this._portal.isAttached) {\n this._portal.detach();\n }\n }\n ngOnDestroy() {\n if (this._outlet) {\n this._outlet.dispose();\n }\n }\n}\n_MatMenuContentBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatMenuContentBase, deps: [{ token: i0.TemplateRef }, { token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }, { token: i0.ViewContainerRef }, { token: DOCUMENT }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });\n_MatMenuContentBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _MatMenuContentBase, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatMenuContentBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.ChangeDetectorRef }]; } });\n/**\n * Menu content that will be rendered lazily once the menu is opened.\n */\nclass MatMenuContent extends _MatMenuContentBase {\n}\nMatMenuContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatMenuContent, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatMenuContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatMenuContent, selector: \"ng-template[matMenuContent]\", providers: [{ provide: MAT_MENU_CONTENT, useExisting: MatMenuContent }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatMenuContent, decorators: [{\n type: Directive,\n args: [{\n selector: 'ng-template[matMenuContent]',\n providers: [{ provide: MAT_MENU_CONTENT, useExisting: MatMenuContent }],\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 * Throws an exception for the case when menu's x-position value isn't valid.\n * In other words, it doesn't match 'before' or 'after'.\n * @docs-private\n */\nfunction throwMatMenuInvalidPositionX() {\n throw Error(`xPosition value must be either 'before' or after'.\n Example: <mat-menu xPosition=\"before\" #menu=\"matMenu\"></mat-menu>`);\n}\n/**\n * Throws an exception for the case when menu's y-position value isn't valid.\n * In other words, it doesn't match 'above' or 'below'.\n * @docs-private\n */\nfunction throwMatMenuInvalidPositionY() {\n throw Error(`yPosition value must be either 'above' or below'.\n Example: <mat-menu yPosition=\"above\" #menu=\"matMenu\"></mat-menu>`);\n}\n/**\n * Throws an exception for the case when a menu is assigned\n * to a trigger that is placed inside the same menu.\n * @docs-private\n */\nfunction throwMatMenuRecursiveError() {\n throw Error(`matMenuTriggerFor: menu cannot contain its own trigger. Assign a menu that is ` +\n `not a parent of the trigger or move the trigger outside of the menu.`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 token used to provide the parent menu to menu-specific components.\n * @docs-private\n */\nconst MAT_MENU_PANEL = new InjectionToken('MAT_MENU_PANEL');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Boilerplate for applying mixins to MatMenuItem.\n/** @docs-private */\nconst _MatMenuItemBase = mixinDisableRipple(mixinDisabled(class {\n}));\n/**\n * Single item inside of a `mat-menu`. Provides the menu item styling and accessibility treatment.\n */\nclass MatMenuItem extends _MatMenuItemBase {\n constructor(_elementRef, _document, _focusMonitor, _parentMenu, _changeDetectorRef) {\n super();\n this._elementRef = _elementRef;\n this._document = _document;\n this._focusMonitor = _focusMonitor;\n this._parentMenu = _parentMenu;\n this._changeDetectorRef = _changeDetectorRef;\n /** ARIA role for the menu item. */\n this.role = 'menuitem';\n /** Stream that emits when the menu item is hovered. */\n this._hovered = new Subject();\n /** Stream that emits when the menu item is focused. */\n this._focused = new Subject();\n /** Whether the menu item is highlighted. */\n this._highlighted = false;\n /** Whether the menu item acts as a trigger for a sub-menu. */\n this._triggersSubmenu = false;\n _parentMenu?.addItem?.(this);\n }\n /** Focuses the menu item. */\n focus(origin, options) {\n if (this._focusMonitor && origin) {\n this._focusMonitor.focusVia(this._getHostElement(), origin, options);\n }\n else {\n this._getHostElement().focus(options);\n }\n this._focused.next(this);\n }\n ngAfterViewInit() {\n if (this._focusMonitor) {\n // Start monitoring the element so it gets the appropriate focused classes. We want\n // to show the focus style for menu items only when the focus was not caused by a\n // mouse or touch interaction.\n this._focusMonitor.monitor(this._elementRef, false);\n }\n }\n ngOnDestroy() {\n if (this._focusMonitor) {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n if (this._parentMenu && this._parentMenu.removeItem) {\n this._parentMenu.removeItem(this);\n }\n this._hovered.complete();\n this._focused.complete();\n }\n /** Used to set the `tabindex`. */\n _getTabIndex() {\n return this.disabled ? '-1' : '0';\n }\n /** Returns the host DOM element. */\n _getHostElement() {\n return this._elementRef.nativeElement;\n }\n /** Prevents the default element actions if it is disabled. */\n _checkDisabled(event) {\n if (this.disabled) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n /** Emits to the hover stream. */\n _handleMouseEnter() {\n this._hovered.next(this);\n }\n /** Gets the label to be used when determining whether the option should be focused. */\n getLabel() {\n const clone = this._elementRef.nativeElement.cloneNode(true);\n const icons = clone.querySelectorAll('mat-icon, .material-icons');\n // Strip away icons so they don't show up in the text.\n for (let i = 0; i < icons.length; i++) {\n icons[i].remove();\n }\n return clone.textContent?.trim() || '';\n }\n _setHighlighted(isHighlighted) {\n // We need to mark this for check for the case where the content is coming from a\n // `matMenuContent` whose change detection tree is at the declaration position,\n // not the insertion position. See #23175.\n // @breaking-change 12.0.0 Remove null check for `_changeDetectorRef`.\n this._highlighted = isHighlighted;\n this._changeDetectorRef?.markForCheck();\n }\n _hasFocus() {\n return this._document && this._document.activeElement === this._getHostElement();\n }\n}\nMatMenuItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatMenuItem, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }, { token: i1.FocusMonitor }, { token: MAT_MENU_PANEL, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nMatMenuItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatMenuItem, selector: \"[mat-menu-item]\", inputs: { disabled: \"disabled\", disableRipple: \"disableRipple\", role: \"role\" }, host: { listeners: { \"click\": \"_checkDisabled($event)\", \"mouseenter\": \"_handleMouseEnter()\" }, properties: { \"attr.role\": \"role\", \"class.mat-menu-item\": \"true\", \"class.mat-menu-item-highlighted\": \"_highlighted\", \"class.mat-menu-item-submenu-trigger\": \"_triggersSubmenu\", \"attr.tabindex\": \"_getTabIndex()\", \"attr.aria-disabled\": \"disabled.toString()\", \"attr.disabled\": \"disabled || null\" }, classAttribute: \"mat-focus-indicator\" }, exportAs: [\"matMenuItem\"], usesInheritance: true, ngImport: i0, template: \"<ng-content></ng-content>\\n<div class=\\\"mat-menu-ripple\\\" matRipple\\n [matRippleDisabled]=\\\"disableRipple || disabled\\\"\\n [matRippleTrigger]=\\\"_getHostElement()\\\">\\n</div>\\n\\n<svg\\n *ngIf=\\\"_triggersSubmenu\\\"\\n class=\\\"mat-menu-submenu-icon\\\"\\n viewBox=\\\"0 0 5 10\\\"\\n focusable=\\\"false\\\"><polygon points=\\\"0,0 5,5 0,10\\\"/></svg>\\n\", dependencies: [{ kind: \"directive\", type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i3.MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatMenuItem, decorators: [{\n type: Component,\n args: [{ selector: '[mat-menu-item]', exportAs: 'matMenuItem', inputs: ['disabled', 'disableRipple'], host: {\n '[attr.role]': 'role',\n '[class.mat-menu-item]': 'true',\n '[class.mat-menu-item-highlighted]': '_highlighted',\n '[class.mat-menu-item-submenu-trigger]': '_triggersSubmenu',\n '[attr.tabindex]': '_getTabIndex()',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[attr.disabled]': 'disabled || null',\n 'class': 'mat-focus-indicator',\n '(click)': '_checkDisabled($event)',\n '(mouseenter)': '_handleMouseEnter()',\n }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: \"<ng-content></ng-content>\\n<div class=\\\"mat-menu-ripple\\\" matRipple\\n [matRippleDisabled]=\\\"disableRipple || disabled\\\"\\n [matRippleTrigger]=\\\"_getHostElement()\\\">\\n</div>\\n\\n<svg\\n *ngIf=\\\"_triggersSubmenu\\\"\\n class=\\\"mat-menu-submenu-icon\\\"\\n viewBox=\\\"0 0 5 10\\\"\\n focusable=\\\"false\\\"><polygon points=\\\"0,0 5,5 0,10\\\"/></svg>\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i1.FocusMonitor }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_MENU_PANEL]\n }, {\n type: Optional\n }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { role: [{\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/** Injection token to be used to override the default options for `mat-menu`. */\nconst MAT_MENU_DEFAULT_OPTIONS = new InjectionToken('mat-menu-default-options', {\n providedIn: 'root',\n factory: MAT_MENU_DEFAULT_OPTIONS_FACTORY,\n});\n/** @docs-private */\nfunction MAT_MENU_DEFAULT_OPTIONS_FACTORY() {\n return {\n overlapTrigger: false,\n xPosition: 'after',\n yPosition: 'below',\n backdropClass: 'cdk-overlay-transparent-backdrop',\n };\n}\nlet menuPanelUid = 0;\n/** Base class with all of the `MatMenu` functionality. */\nclass _MatMenuBase {\n constructor(_elementRef, _ngZone, _defaultOptions, \n // @breaking-change 15.0.0 `_changeDetectorRef` to become a required parameter.\n _changeDetectorRef) {\n this._elementRef = _elementRef;\n this._ngZone = _ngZone;\n this._defaultOptions = _defaultOptions;\n this._changeDetectorRef = _changeDetectorRef;\n this._xPosition = this._defaultOptions.xPosition;\n this._yPosition = this._defaultOptions.yPosition;\n /** Only the direct descendant menu items. */\n this._directDescendantItems = new QueryList();\n /** Subscription to tab events on the menu panel */\n this._tabSubscription = Subscription.EMPTY;\n /** Config object to be passed into the menu's ngClass */\n this._classList = {};\n /** Current state of the panel animation. */\n this._panelAnimationState = 'void';\n /** Emits whenever an animation on the menu completes. */\n this._animationDone = new Subject();\n /** Class or list of classes to be added to the overlay panel. */\n this.overlayPanelClass = this._defaultOptions.overlayPanelClass || '';\n /** Class to be added to the backdrop element. */\n this.backdropClass = this._defaultOptions.backdropClass;\n this._overlapTrigger = this._defaultOptions.overlapTrigger;\n this._hasBackdrop = this._defaultOptions.hasBackdrop;\n /** Event emitted when the menu is closed. */\n this.closed = new EventEmitter();\n /**\n * Event emitted when the menu is closed.\n * @deprecated Switch to `closed` instead\n * @breaking-change 8.0.0\n */\n this.close = this.closed;\n this.panelId = `mat-menu-panel-${menuPanelUid++}`;\n }\n /** Position of the menu in the X axis. */\n get xPosition() {\n return this._xPosition;\n }\n set xPosition(value) {\n if (value !== 'before' &&\n value !== 'after' &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwMatMenuInvalidPositionX();\n }\n this._xPosition = value;\n this.setPositionClasses();\n }\n /** Position of the menu in the Y axis. */\n get yPosition() {\n return this._yPosition;\n }\n set yPosition(value) {\n if (value !== 'above' && value !== 'below' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwMatMenuInvalidPositionY();\n }\n this._yPosition = value;\n this.setPositionClasses();\n }\n /** Whether the menu should overlap its trigger. */\n get overlapTrigger() {\n return this._overlapTrigger;\n }\n set overlapTrigger(value) {\n this._overlapTrigger = coerceBooleanProperty(value);\n }\n /** Whether the menu has a backdrop. */\n get hasBackdrop() {\n return this._hasBackdrop;\n }\n set hasBackdrop(value) {\n this._hasBackdrop = coerceBooleanProperty(value);\n }\n /**\n * This method takes classes set on the host mat-menu element and applies them on the\n * menu template that displays in the overlay container. Otherwise, it's difficult\n * to style the containing menu from outside the component.\n * @param classes list of class names\n */\n set panelClass(classes) {\n const previousPanelClass = this._previousPanelClass;\n if (previousPanelClass && previousPanelClass.length) {\n previousPanelClass.split(' ').forEach((className) => {\n this._classList[className] = false;\n });\n }\n this._previousPanelClass = classes;\n if (classes && classes.length) {\n classes.split(' ').forEach((className) => {\n this._classList[className] = true;\n });\n this._elementRef.nativeElement.className = '';\n }\n }\n /**\n * This method takes classes set on the host mat-menu element and applies them on the\n * menu template that displays in the overlay container. Otherwise, it's difficult\n * to style the containing menu from outside the component.\n * @deprecated Use `panelClass` instead.\n * @breaking-change 8.0.0\n */\n get classList() {\n return this.panelClass;\n }\n set classList(classes) {\n this.panelClass = classes;\n }\n ngOnInit() {\n this.setPositionClasses();\n }\n ngAfterContentInit() {\n this._updateDirectDescendants();\n this._keyManager = new FocusKeyManager(this._directDescendantItems)\n .withWrap()\n .withTypeAhead()\n .withHomeAndEnd();\n this._tabSubscription = this._keyManager.tabOut.subscribe(() => this.closed.emit('tab'));\n // If a user manually (programmatically) focuses a menu item, we need to reflect that focus\n // change back to the key manager. Note that we don't need to unsubscribe here because _focused\n // is internal and we know that it gets completed on destroy.\n this._directDescendantItems.changes\n .pipe(startWith(this._directDescendantItems), switchMap(items => merge(...items.map((item) => item._focused))))\n .subscribe(focusedItem => this._keyManager.updateActiveItem(focusedItem));\n this._directDescendantItems.changes.subscribe((itemsList) => {\n // Move focus to another item, if the active item is removed from the list.\n // We need to debounce the callback, because multiple items might be removed\n // in quick succession.\n const manager = this._keyManager;\n if (this._panelAnimationState === 'enter' && manager.activeItem?._hasFocus()) {\n const items = itemsList.toArray();\n const index = Math.max(0, Math.min(items.length - 1, manager.activeItemIndex || 0));\n if (items[index] && !items[index].disabled) {\n manager.setActiveItem(index);\n }\n else {\n manager.setNextItemActive();\n }\n }\n });\n }\n ngOnDestroy() {\n this._directDescendantItems.destroy();\n this._tabSubscription.unsubscribe();\n this.closed.complete();\n }\n /** Stream that emits whenever the hovered menu item changes. */\n _hovered() {\n // Coerce the `changes` property because Angular types it as `Observable<any>`\n const itemChanges = this._directDescendantItems.changes;\n return itemChanges.pipe(startWith(this._directDescendantItems), switchMap(items => merge(...items.map((item) => item._hovered))));\n }\n /*\n * Registers a menu item with the menu.\n * @docs-private\n * @deprecated No longer being used. To be removed.\n * @breaking-change 9.0.0\n */\n addItem(_item) { }\n /**\n * Removes an item from the menu.\n * @docs-private\n * @deprecated No longer being used. To be removed.\n * @breaking-change 9.0.0\n */\n removeItem(_item) { }\n /** Handle a keyboard event from the menu, delegating to the appropriate action. */\n _handleKeydown(event) {\n const keyCode = event.keyCode;\n const manager = this._keyManager;\n switch (keyCode) {\n case ESCAPE:\n if (!hasModifierKey(event)) {\n event.preventDefault();\n this.closed.emit('keydown');\n }\n break;\n case LEFT_ARROW:\n if (this.parentMenu && this.direction === 'ltr') {\n this.closed.emit('keydown');\n }\n break;\n case RIGHT_ARROW:\n if (this.parentMenu && this.direction === 'rtl') {\n this.closed.emit('keydown');\n }\n break;\n default:\n if (keyCode === UP_ARROW || keyCode === DOWN_ARROW) {\n manager.setFocusOrigin('keyboard');\n }\n manager.onKeydown(event);\n return;\n }\n // Don't allow the event to propagate if we've already handled it, or it may\n // end up reaching other overlays that were opened earlier (see #22694).\n event.stopPropagation();\n }\n /**\n * Focus the first item in the menu.\n * @param origin Action from which the focus originated. Used to set the correct styling.\n */\n focusFirstItem(origin = 'program') {\n // Wait for `onStable` to ensure iOS VoiceOver screen reader focuses the first item (#24735).\n this._ngZone.onStable.pipe(take(1)).subscribe(() => {\n let menuPanel = null;\n if (this._directDescendantItems.length) {\n // Because the `mat-menuPanel` is at the DOM insertion point, not inside the overlay, we don't\n // have a nice way of getting a hold of the menuPanel panel. We can't use a `ViewChild` either\n // because the panel is inside an `ng-template`. We work around it by starting from one of\n // the items and walking up the DOM.\n menuPanel = this._directDescendantItems.first._getHostElement().closest('[role=\"menu\"]');\n }\n // If an item in the menuPanel is already focused, avoid overriding the focus.\n if (!menuPanel || !menuPanel.contains(document.activeElement)) {\n const manager = this._keyManager;\n manager.setFocusOrigin(origin).setFirstItemActive();\n // If there's no active item at this point, it means that all the items are disabled.\n // Move focus to the menuPanel panel so keyboard events like Escape still work. Also this will\n // give _some_ feedback to screen readers.\n if (!manager.activeItem && menuPanel) {\n menuPanel.focus();\n }\n }\n });\n }\n /**\n * Resets the active item in the menu. This is used when the menu is opened, allowing\n * the user to start from the first option when pressing the down arrow.\n */\n resetActiveItem() {\n this._keyManager.setActiveItem(-1);\n }\n /**\n * Sets the menu panel elevation.\n * @param depth Number of parent menus that come before the menu.\n */\n setElevation(depth) {\n // The elevation starts at the base and increases by one for each level.\n // Capped at 24 because that's the maximum elevation defined in the Material design spec.\n const elevation = Math.min(this._baseElevation + depth, 24);\n const newElevation = `${this._elevationPrefix}${elevation}`;\n const customElevation = Object.keys(this._classList).find(className => {\n return className.startsWith(this._elevationPrefix);\n });\n if (!customElevation || customElevation === this._previousElevation) {\n if (this._previousElevation) {\n this._classList[this._previousElevation] = false;\n }\n this._classList[newElevation] = true;\n this._previousElevation = newElevation;\n }\n }\n /**\n * Adds classes to the menu panel based on its position. Can be used by\n * consumers to add specific styling based on the position.\n * @param posX Position of the menu along the x axis.\n * @param posY Position of the menu along the y axis.\n * @docs-private\n */\n setPositionClasses(posX = this.xPosition, posY = this.yPosition) {\n const classes = this._classList;\n classes['mat-menu-before'] = posX === 'before';\n classes['mat-menu-after'] = posX === 'after';\n classes['mat-menu-above'] = posY === 'above';\n classes['mat-menu-below'] = posY === 'below';\n // @breaking-change 15.0.0 Remove null check for `_changeDetectorRef`.\n this._changeDetectorRef?.markForCheck();\n }\n /** Starts the enter animation. */\n _startAnimation() {\n // @breaking-change 8.0.0 Combine with _resetAnimation.\n this._panelAnimationState = 'enter';\n }\n /** Resets the panel animation to its initial state. */\n _resetAnimation() {\n // @breaking-change 8.0.0 Combine with _startAnimation.\n this._panelAnimationState = 'void';\n }\n /** Callback that is invoked when the panel animation completes. */\n _onAnimationDone(event) {\n this._animationDone.next(event);\n this._isAnimating = false;\n }\n _onAnimationStart(event) {\n this._isAnimating = true;\n // Scroll the content element to the top as soon as the animation starts. This is necessary,\n // because we move focus to the first item while it's still being animated, which can throw\n // the browser off when it determines the scroll position. Alternatively we can move focus\n // when the animation is done, however moving focus asynchronously will interrupt screen\n // readers which are in the process of reading out the menu already. We take the `element`\n // from the `event` since we can't use a `ViewChild` to access the pane.\n if (event.toState === 'enter' && this._keyManager.activeItemIndex === 0) {\n event.element.scrollTop = 0;\n }\n }\n /**\n * Sets up a stream that will keep track of any newly-added menu items and will update the list\n * of direct descendants. We collect the descendants this way, because `_allItems` can include\n * items that are part of child menus, and using a custom way of registering items is unreliable\n * when it comes to maintaining the item order.\n */\n _updateDirectDescendants() {\n this._allItems.changes\n .pipe(startWith(this._allItems))\n .subscribe((items) => {\n this._directDescendantItems.reset(items.filter(item => item._parentMenu === this));\n this._directDescendantItems.notifyOnChanges();\n });\n }\n}\n_MatMenuBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatMenuBase, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: MAT_MENU_DEFAULT_OPTIONS }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });\n_MatMenuBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _MatMenuBase, inputs: { backdropClass: \"backdropClass\", ariaLabel: [\"aria-label\", \"ariaLabel\"], ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"], ariaDescribedby: [\"aria-describedby\", \"ariaDescribedby\"], xPosition: \"xPosition\", yPosition: \"yPosition\", overlapTrigger: \"overlapTrigger\", hasBackdrop: \"hasBackdrop\", panelClass: [\"class\", \"panelClass\"], classList: \"classList\" }, outputs: { closed: \"closed\", close: \"close\" }, queries: [{ propertyName: \"lazyContent\", first: true, predicate: MAT_MENU_CONTENT, descendants: true }, { propertyName: \"_allItems\", predicate: MatMenuItem, descendants: true }, { propertyName: \"items\", predicate: MatMenuItem }], viewQueries: [{ propertyName: \"templateRef\", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatMenuBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_MENU_DEFAULT_OPTIONS]\n }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { _allItems: [{\n type: ContentChildren,\n args: [MatMenuItem, { descendants: true }]\n }], backdropClass: [{\n type: Input\n }], ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], ariaLabelledby: [{\n type: Input,\n args: ['aria-labelledby']\n }], ariaDescribedby: [{\n type: Input,\n args: ['aria-describedby']\n }], xPosition: [{\n type: Input\n }], yPosition: [{\n type: Input\n }], templateRef: [{\n type: ViewChild,\n args: [TemplateRef]\n }], items: [{\n type: ContentChildren,\n args: [MatMenuItem, { descendants: false }]\n }], lazyContent: [{\n type: ContentChild,\n args: [MAT_MENU_CONTENT]\n }], overlapTrigger: [{\n type: Input\n }], hasBackdrop: [{\n type: Input\n }], panelClass: [{\n type: Input,\n args: ['class']\n }], classList: [{\n type: Input\n }], closed: [{\n type: Output\n }], close: [{\n type: Output\n }] } });\n/** @docs-public MatMenu */\nclass MatMenu extends _MatMenuBase {\n constructor(elementRef, ngZone, defaultOptions, changeDetectorRef) {\n super(elementRef, ngZone, defaultOptions, changeDetectorRef);\n this._elevationPrefix = 'mat-elevation-z';\n this._baseElevation = 4;\n }\n}\nMatMenu.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatMenu, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: MAT_MENU_DEFAULT_OPTIONS }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nMatMenu.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatMenu, selector: \"mat-menu\", host: { properties: { \"attr.aria-label\": \"null\", \"attr.aria-labelledby\": \"null\", \"attr.aria-describedby\": \"null\" } }, providers: [{ provide: MAT_MENU_PANEL, useExisting: MatMenu }], exportAs: [\"matMenu\"], usesInheritance: true, ngImport: i0, template: \"<ng-template>\\n <div\\n class=\\\"mat-menu-panel\\\"\\n [id]=\\\"panelId\\\"\\n [ngClass]=\\\"_classList\\\"\\n (keydown)=\\\"_handleKeydown($event)\\\"\\n (click)=\\\"closed.emit('click')\\\"\\n [@transformMenu]=\\\"_panelAnimationState\\\"\\n (@transformMenu.start)=\\\"_onAnimationStart($event)\\\"\\n (@transformMenu.done)=\\\"_onAnimationDone($event)\\\"\\n tabindex=\\\"-1\\\"\\n role=\\\"menu\\\"\\n [attr.aria-label]=\\\"ariaLabel || null\\\"\\n [attr.aria-labelledby]=\\\"ariaLabelledby || null\\\"\\n [attr.aria-describedby]=\\\"ariaDescribedby || null\\\">\\n <div class=\\\"mat-menu-content\\\">\\n <ng-content></ng-content>\\n </div>\\n </div>\\n</ng-template>\\n\", styles: [\"mat-menu{display:none}.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px;position:relative}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]::after{display:block;position:absolute;content:\\\"\\\";top:0;left:0;bottom:0;right:0}.cdk-high-contrast-active .mat-menu-item{margin-top:1px}.mat-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.mat-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-menu-submenu-icon{fill:CanvasText}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\"], dependencies: [{ kind: \"directive\", type: i2.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }], animations: [matMenuAnimations.transformMenu, matMenuAnimations.fadeInItems], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatMenu, decorators: [{\n type: Component,\n args: [{ selector: 'mat-menu', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, exportAs: 'matMenu', host: {\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n }, animations: [matMenuAnimations.transformMenu, matMenuAnimations.fadeInItems], providers: [{ provide: MAT_MENU_PANEL, useExisting: MatMenu }], template: \"<ng-template>\\n <div\\n class=\\\"mat-menu-panel\\\"\\n [id]=\\\"panelId\\\"\\n [ngClass]=\\\"_classList\\\"\\n (keydown)=\\\"_handleKeydown($event)\\\"\\n (click)=\\\"closed.emit('click')\\\"\\n [@transformMenu]=\\\"_panelAnimationState\\\"\\n (@transformMenu.start)=\\\"_onAnimationStart($event)\\\"\\n (@transformMenu.done)=\\\"_onAnimationDone($event)\\\"\\n tabindex=\\\"-1\\\"\\n role=\\\"menu\\\"\\n [attr.aria-label]=\\\"ariaLabel || null\\\"\\n [attr.aria-labelledby]=\\\"ariaLabelledby || null\\\"\\n [attr.aria-describedby]=\\\"ariaDescribedby || null\\\">\\n <div class=\\\"mat-menu-content\\\">\\n <ng-content></ng-content>\\n </div>\\n </div>\\n</ng-template>\\n\", styles: [\"mat-menu{display:none}.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px;position:relative}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]::after{display:block;position:absolute;content:\\\"\\\";top:0;left:0;bottom:0;right:0}.cdk-high-contrast-active .mat-menu-item{margin-top:1px}.mat-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.mat-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-menu-submenu-icon{fill:CanvasText}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_MENU_DEFAULT_OPTIONS]\n }] }, { type: i0.ChangeDetectorRef }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token that determines the scroll handling while the menu is open. */\nconst MAT_MENU_SCROLL_STRATEGY = new InjectionToken('mat-menu-scroll-strategy');\n/** @docs-private */\nfunction MAT_MENU_SCROLL_STRATEGY_FACTORY(overlay) {\n return () => overlay.scrollStrategies.reposition();\n}\n/** @docs-private */\nconst MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MAT_MENU_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_MENU_SCROLL_STRATEGY_FACTORY,\n};\n/**\n * Default top padding of the menu panel.\n * @deprecated No longer being used. Will be removed.\n * @breaking-change 15.0.0\n */\nconst MENU_PANEL_TOP_PADDING = 8;\n/** Options for binding a passive event listener. */\nconst passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });\n// TODO(andrewseguin): Remove the kebab versions in favor of camelCased attribute selectors\nclass _MatMenuTriggerBase {\n constructor(_overlay, _element, _viewContainerRef, scrollStrategy, parentMenu, \n // `MatMenuTrigger` is commonly used in combination with a `MatMenuItem`.\n // tslint:disable-next-line: lightweight-tokens\n _menuItemInstance, _dir, _focusMonitor, _ngZone) {\n this._overlay = _overlay;\n this._element = _element;\n this._viewContainerRef = _viewContainerRef;\n this._menuItemInstance = _menuItemInstance;\n this._dir = _dir;\n this._focusMonitor = _focusMonitor;\n this._ngZone = _ngZone;\n this._overlayRef = null;\n this._menuOpen = false;\n this._closingActionsSubscription = Subscription.EMPTY;\n this._hoverSubscription = Subscription.EMPTY;\n this._menuCloseSubscription = Subscription.EMPTY;\n /**\n * Handles touch start events on the trigger.\n * Needs to be an arrow function so we can easily use addEventListener and removeEventListener.\n */\n this._handleTouchStart = (event) => {\n if (!isFakeTouchstartFromScreenReader(event)) {\n this._openedBy = 'touch';\n }\n };\n // Tracking input type is necessary so it's possible to only auto-focus\n // the first item of the list when the menu is opened via the keyboard\n this._openedBy = undefined;\n /**\n * Whether focus should be restored when the menu is closed.\n * Note that disabling this option can have accessibility implications\n * and it's up to you to manage focus, if you decide to turn it off.\n */\n this.restoreFocus = true;\n /** Event emitted when the associated menu is opened. */\n this.menuOpened = new EventEmitter();\n /**\n * Event emitted when the associated menu is opened.\n * @deprecated Switch to `menuOpened` instead\n * @breaking-change 8.0.0\n */\n // tslint:disable-next-line:no-output-on-prefix\n this.onMenuOpen = this.menuOpened;\n /** Event emitted when the associated menu is closed. */\n this.menuClosed = new EventEmitter();\n /**\n * Event emitted when the associated menu is closed.\n * @deprecated Switch to `menuClosed` instead\n * @breaking-change 8.0.0\n */\n // tslint:disable-next-line:no-output-on-prefix\n this.onMenuClose = this.menuClosed;\n this._scrollStrategy = scrollStrategy;\n this._parentMaterialMenu = parentMenu instanceof _MatMenuBase ? parentMenu : undefined;\n _element.nativeElement.addEventListener('touchstart', this._handleTouchStart, passiveEventListenerOptions);\n if (_menuItemInstance) {\n _menuItemInstance._triggersSubmenu = this.triggersSubmenu();\n }\n }\n /**\n * @deprecated\n * @breaking-change 8.0.0\n */\n get _deprecatedMatMenuTriggerFor() {\n return this.menu;\n }\n set _deprecatedMatMenuTriggerFor(v) {\n this.menu = v;\n }\n /** References the menu instance that the trigger is associated with. */\n get menu() {\n return this._menu;\n }\n set menu(menu) {\n if (menu === this._menu) {\n return;\n }\n this._menu = menu;\n this._menuCloseSubscription.unsubscribe();\n if (menu) {\n if (menu === this._parentMaterialMenu && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwMatMenuRecursiveError();\n }\n this._menuCloseSubscription = menu.close.subscribe((reason) => {\n this._destroyMenu(reason);\n // If a click closed the menu, we should close the entire chain of nested menus.\n if ((reason === 'click' || reason === 'tab') && this._parentMaterialMenu) {\n this._parentMaterialMenu.closed.emit(reason);\n }\n });\n }\n }\n ngAfterContentInit() {\n this._handleHover();\n }\n ngOnDestroy() {\n if (this._overlayRef) {\n this._overlayRef.dispose();\n this._overlayRef = null;\n }\n this._element.nativeElement.removeEventListener('touchstart', this._handleTouchStart, passiveEventListenerOptions);\n this._menuCloseSubscription.unsubscribe();\n this._closingActionsSubscription.unsubscribe();\n this._hoverSubscription.unsubscribe();\n }\n /** Whether the menu is open. */\n get menuOpen() {\n return this._menuOpen;\n }\n /** The text direction of the containing app. */\n get dir() {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n /** Whether the menu triggers a sub-menu or a top-level one. */\n triggersSubmenu() {\n return !!(this._menuItemInstance && this._parentMaterialMenu);\n }\n /** Toggles the menu between the open and closed states. */\n toggleMenu() {\n return this._menuOpen ? this.closeMenu() : this.openMenu();\n }\n /** Opens the menu. */\n openMenu() {\n const menu = this.menu;\n if (this._menuOpen || !menu) {\n return;\n }\n const overlayRef = this._createOverlay(menu);\n const overlayConfig = overlayRef.getConfig();\n const positionStrategy = overlayConfig.positionStrategy;\n this._setPosition(menu, positionStrategy);\n overlayConfig.hasBackdrop =\n menu.hasBackdrop == null ? !this.triggersSubmenu() : menu.hasBackdrop;\n overlayRef.attach(this._getPortal(menu));\n if (menu.lazyContent) {\n menu.lazyContent.attach(this.menuData);\n }\n this._closingActionsSubscription = this._menuClosingActions().subscribe(() => this.closeMenu());\n this._initMenu(menu);\n if (menu instanceof _MatMenuBase) {\n menu._startAnimation();\n menu._directDescendantItems.changes.pipe(takeUntil(menu.close)).subscribe(() => {\n // Re-adjust the position without locking when the amount of items\n // changes so that the overlay is allowed to pick a new optimal position.\n positionStrategy.withLockedPosition(false).reapplyLastPosition();\n positionStrategy.withLockedPosition(true);\n });\n }\n }\n /** Closes the menu. */\n closeMenu() {\n this.menu?.close.emit();\n }\n /**\n * Focuses the menu trigger.\n * @param origin Source of the menu trigger's focus.\n */\n focus(origin, options) {\n if (this._focusMonitor && origin) {\n this._focusMonitor.focusVia(this._element, origin, options);\n }\n else {\n this._element.nativeElement.focus(options);\n }\n }\n /**\n * Updates the position of the menu to ensure that it fits all options within the viewport.\n */\n updatePosition() {\n this._overlayRef?.updatePosition();\n }\n /** Closes the menu and does the necessary cleanup. */\n _destroyMenu(reason) {\n if (!this._overlayRef || !this.menuOpen) {\n return;\n }\n const menu = this.menu;\n this._closingActionsSubscription.unsubscribe();\n this._overlayRef.detach();\n // Always restore focus if the user is navigating using the keyboard or the menu was opened\n // programmatically. We don't restore for non-root triggers, because it can prevent focus\n // from making it back to the root trigger when closing a long chain of menus by clicking\n // on the backdrop.\n if (this.restoreFocus && (reason === 'keydown' || !this._openedBy || !this.triggersSubmenu())) {\n this.focus(this._openedBy);\n }\n this._openedBy = undefined;\n if (menu instanceof _MatMenuBase) {\n menu._resetAnimation();\n if (menu.lazyContent) {\n // Wait for the exit animation to finish before detaching the content.\n menu._animationDone\n .pipe(filter(event => event.toState === 'void'), take(1), \n // Interrupt if the content got re-attached.\n takeUntil(menu.lazyContent._attached))\n .subscribe({\n next: () => menu.lazyContent.detach(),\n // No matter whether the content got re-attached, reset the menu.\n complete: () => this._setIsMenuOpen(false),\n });\n }\n else {\n this._setIsMenuOpen(false);\n }\n }\n else {\n this._setIsMenuOpen(false);\n menu?.lazyContent?.detach();\n }\n }\n /**\n * This method sets the menu state to open and focuses the first item if\n * the menu was opened via the keyboard.\n */\n _initMenu(menu) {\n menu.parentMenu = this.triggersSubmenu() ? this._parentMaterialMenu : undefined;\n menu.direction = this.dir;\n this._setMenuElevation(menu);\n menu.focusFirstItem(this._openedBy || 'program');\n this._setIsMenuOpen(true);\n }\n /** Updates the menu elevation based on the amount of parent menus that it has. */\n _setMenuElevation(menu) {\n if (menu.setElevation) {\n let depth = 0;\n let parentMenu = menu.parentMenu;\n while (parentMenu) {\n depth++;\n parentMenu = parentMenu.parentMenu;\n }\n menu.setElevation(depth);\n }\n }\n // set state rather than toggle to support triggers sharing a menu\n _setIsMenuOpen(isOpen) {\n this._menuOpen = isOpen;\n this._menuOpen ? this.menuOpened.emit() : this.menuClosed.emit();\n if (this.triggersSubmenu()) {\n this._menuItemInstance._setHighlighted(isOpen);\n }\n }\n /**\n * This method creates the overlay from the provided menu's template and saves its\n * OverlayRef so that it can be attached to the DOM when openMenu is called.\n */\n _createOverlay(menu) {\n if (!this._overlayRef) {\n const config = this._getOverlayConfig(menu);\n this._subscribeToPositions(menu, config.positionStrategy);\n this._overlayRef = this._overlay.create(config);\n // Consume the `keydownEvents` in order to prevent them from going to another overlay.\n // Ideally we'd also have our keyboard event logic in here, however doing so will\n // break anybody that may have implemented the `MatMenuPanel` themselves.\n this._overlayRef.keydownEvents().subscribe();\n }\n return this._overlayRef;\n }\n /**\n * This method builds the configuration object needed to create the overlay, the OverlayState.\n * @returns OverlayConfig\n */\n _getOverlayConfig(menu) {\n return new OverlayConfig({\n positionStrategy: this._overlay\n .position()\n .flexibleConnectedTo(this._element)\n .withLockedPosition()\n .withGrowAfterOpen()\n .withTransformOriginOn('.mat-menu-panel, .mat-mdc-menu-panel'),\n backdropClass: menu.backdropClass || 'cdk-overlay-transparent-backdrop',\n panelClass: menu.overlayPanelClass,\n scrollStrategy: this._scrollStrategy(),\n direction: this._dir,\n });\n }\n /**\n * Listens to changes in the position of the overlay and sets the correct classes\n * on the menu based on the new position. This ensures the animation origin is always\n * correct, even if a fallback position is used for the overlay.\n */\n _subscribeToPositions(menu, position) {\n if (menu.setPositionClasses) {\n position.positionChanges.subscribe(change => {\n const posX = change.connectionPair.overlayX === 'start' ? 'after' : 'before';\n const posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';\n // @breaking-change 15.0.0 Remove null check for `ngZone`.\n // `positionChanges` fires outside of the `ngZone` and `setPositionClasses` might be\n // updating something in the view so we need to bring it back in.\n if (this._ngZone) {\n this._ngZone.run(() => menu.setPositionClasses(posX, posY));\n }\n else {\n menu.setPositionClasses(posX, posY);\n }\n });\n }\n }\n /**\n * Sets the appropriate positions on a position strategy\n * so the overlay connects with the trigger correctly.\n * @param positionStrategy Strategy whose position to update.\n */\n _setPosition(menu, positionStrategy) {\n let [originX, originFallbackX] = menu.xPosition === 'before' ? ['end', 'start'] : ['start', 'end'];\n let [overlayY, overlayFallbackY] = menu.yPosition === 'above' ? ['bottom', 'top'] : ['top', 'bottom'];\n let [originY, originFallbackY] = [overlayY, overlayFallbackY];\n let [overlayX, overlayFallbackX] = [originX, originFallbackX];\n let offsetY = 0;\n if (this.triggersSubmenu()) {\n // When the menu is a sub-menu, it should always align itself\n // to the edges of the trigger, instead of overlapping it.\n overlayFallbackX = originX = menu.xPosition === 'before' ? 'start' : 'end';\n originFallbackX = overlayX = originX === 'end' ? 'start' : 'end';\n if (this._parentMaterialMenu) {\n if (this._parentInnerPadding == null) {\n const firstItem = this._parentMaterialMenu.items.first;\n this._parentInnerPadding = firstItem ? firstItem._getHostElement().offsetTop : 0;\n }\n offsetY = overlayY === 'bottom' ? this._parentInnerPadding : -this._parentInnerPadding;\n }\n }\n else if (!menu.overlapTrigger) {\n originY = overlayY === 'top' ? 'bottom' : 'top';\n originFallbackY = overlayFallbackY === 'top' ? 'bottom' : 'top';\n }\n positionStrategy.withPositions([\n { originX, originY, overlayX, overlayY, offsetY },\n { originX: originFallbackX, originY, overlayX: overlayFallbackX, overlayY, offsetY },\n {\n originX,\n originY: originFallbackY,\n overlayX,\n overlayY: overlayFallbackY,\n offsetY: -offsetY,\n },\n {\n originX: originFallbackX,\n originY: originFallbackY,\n overlayX: overlayFallbackX,\n overlayY: overlayFallbackY,\n offsetY: -offsetY,\n },\n ]);\n }\n /** Returns a stream that emits whenever an action that should close the menu occurs. */\n _menuClosingActions() {\n const backdrop = this._overlayRef.backdropClick();\n const detachments = this._overlayRef.detachments();\n const parentClose = this._parentMaterialMenu ? this._parentMaterialMenu.closed : of();\n const hover = this._parentMaterialMenu\n ? this._parentMaterialMenu._hovered().pipe(filter(active => active !== this._menuItemInstance), filter(() => this._menuOpen))\n : of();\n return merge(backdrop, parentClose, hover, detachments);\n }\n /** Handles mouse presses on the trigger. */\n _handleMousedown(event) {\n if (!isFakeMousedownFromScreenReader(event)) {\n // Since right or middle button clicks won't trigger the `click` event,\n // we shouldn't consider the menu as opened by mouse in those cases.\n this._openedBy = event.button === 0 ? 'mouse' : undefined;\n // Since clicking on the trigger won't close the menu if it opens a sub-menu,\n // we should prevent focus from moving onto it via click to avoid the\n // highlight from lingering on the menu item.\n if (this.triggersSubmenu()) {\n event.preventDefault();\n }\n }\n }\n /** Handles key presses on the trigger. */\n _handleKeydown(event) {\n const keyCode = event.keyCode;\n // Pressing enter on the trigger will trigger the click handler later.\n if (keyCode === ENTER || keyCode === SPACE) {\n this._openedBy = 'keyboard';\n }\n if (this.triggersSubmenu() &&\n ((keyCode === RIGHT_ARROW && this.dir === 'ltr') ||\n (keyCode === LEFT_ARROW && this.dir === 'rtl'))) {\n this._openedBy = 'keyboard';\n this.openMenu();\n }\n }\n /** Handles click events on the trigger. */\n _handleClick(event) {\n if (this.triggersSubmenu()) {\n // Stop event propagation to avoid closing the parent menu.\n event.stopPropagation();\n this.openMenu();\n }\n else {\n this.toggleMenu();\n }\n }\n /** Handles the cases where the user hovers over the trigger. */\n _handleHover() {\n // Subscribe to changes in the hovered item in order to toggle the panel.\n if (!this.triggersSubmenu() || !this._parentMaterialMenu) {\n return;\n }\n this._hoverSubscription = this._parentMaterialMenu\n ._hovered()\n // Since we might have multiple competing triggers for the same menu (e.g. a sub-menu\n // with different data and triggers), we have to delay it by a tick to ensure that\n // it won't be closed immediately after it is opened.\n .pipe(filter(active => active === this._menuItemInstance && !active.disabled), delay(0, asapScheduler))\n .subscribe(() => {\n this._openedBy = 'mouse';\n // If the same menu is used between multiple triggers, it might still be animating\n // while the new trigger tries to re-open it. Wait for the animation to finish\n // before doing so. Also interrupt if the user moves to another item.\n if (this.menu instanceof _MatMenuBase && this.menu._isAnimating) {\n // We need the `delay(0)` here in order to avoid\n // 'changed after checked' errors in some cases. See #12194.\n this.menu._animationDone\n .pipe(take(1), delay(0, asapScheduler), takeUntil(this._parentMaterialMenu._hovered()))\n .subscribe(() => this.openMenu());\n }\n else {\n this.openMenu();\n }\n });\n }\n /** Gets the portal that should be attached to the overlay. */\n _getPortal(menu) {\n // Note that we can avoid this check by keeping the portal on the menu panel.\n // While it would be cleaner, we'd have to introduce another required method on\n // `MatMenuPanel`, making it harder to consume.\n if (!this._portal || this._portal.templateRef !== menu.templateRef) {\n this._portal = new TemplatePortal(menu.templateRef, this._viewContainerRef);\n }\n return this._portal;\n }\n}\n_MatMenuTriggerBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatMenuTriggerBase, deps: [{ token: i1$1.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: MAT_MENU_SCROLL_STRATEGY }, { token: MAT_MENU_PANEL, optional: true }, { token: MatMenuItem, optional: true, self: true }, { token: i3$1.Directionality, optional: true }, { token: i1.FocusMonitor }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });\n_MatMenuTriggerBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _MatMenuTriggerBase, inputs: { _deprecatedMatMenuTriggerFor: [\"mat-menu-trigger-for\", \"_deprecatedMatMenuTriggerFor\"], menu: [\"matMenuTriggerFor\", \"menu\"], menuData: [\"matMenuTriggerData\", \"menuData\"], restoreFocus: [\"matMenuTriggerRestoreFocus\", \"restoreFocus\"] }, outputs: { menuOpened: \"menuOpened\", onMenuOpen: \"onMenuOpen\", menuClosed: \"menuClosed\", onMenuClose: \"onMenuClose\" }, host: { listeners: { \"click\": \"_handleClick($event)\", \"mousedown\": \"_handleMousedown($event)\", \"keydown\": \"_handleKeydown($event)\" }, properties: { \"attr.aria-haspopup\": \"menu ? \\\"menu\\\" : null\", \"attr.aria-expanded\": \"menuOpen || null\", \"attr.aria-controls\": \"menuOpen ? menu.panelId : null\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatMenuTriggerBase, decorators: [{\n type: Directive,\n args: [{\n host: {\n '[attr.aria-haspopup]': 'menu ? \"menu\" : null',\n '[attr.aria-expanded]': 'menuOpen || null',\n '[attr.aria-controls]': 'menuOpen ? menu.panelId : null',\n '(click)': '_handleClick($event)',\n '(mousedown)': '_handleMousedown($event)',\n '(keydown)': '_handleKeydown($event)',\n },\n }]\n }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_MENU_SCROLL_STRATEGY]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_MENU_PANEL]\n }, {\n type: Optional\n }] }, { type: MatMenuItem, decorators: [{\n type: Optional\n }, {\n type: Self\n }] }, { type: i3$1.Directionality, decorators: [{\n type: Optional\n }] }, { type: i1.FocusMonitor }, { type: i0.NgZone }]; }, propDecorators: { _deprecatedMatMenuTriggerFor: [{\n type: Input,\n args: ['mat-menu-trigger-for']\n }], menu: [{\n type: Input,\n args: ['matMenuTriggerFor']\n }], menuData: [{\n type: Input,\n args: ['matMenuTriggerData']\n }], restoreFocus: [{\n type: Input,\n args: ['matMenuTriggerRestoreFocus']\n }], menuOpened: [{\n type: Output\n }], onMenuOpen: [{\n type: Output\n }], menuClosed: [{\n type: Output\n }], onMenuClose: [{\n type: Output\n }] } });\n/** Directive applied to an element that should trigger a `mat-menu`. */\nclass MatMenuTrigger extends _MatMenuTriggerBase {\n}\nMatMenuTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatMenuTrigger, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatMenuTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatMenuTrigger, selector: \"[mat-menu-trigger-for], [matMenuTriggerFor]\", host: { classAttribute: \"mat-menu-trigger\" }, exportAs: [\"matMenuTrigger\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatMenuTrigger, decorators: [{\n type: Directive,\n args: [{\n selector: `[mat-menu-trigger-for], [matMenuTriggerFor]`,\n host: {\n 'class': 'mat-menu-trigger',\n },\n exportAs: 'matMenuTrigger',\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 MatMenuModule {\n}\nMatMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatMenuModule, declarations: [MatMenu, MatMenuItem, MatMenuTrigger, MatMenuContent], imports: [CommonModule, MatCommonModule, MatRippleModule, OverlayModule], exports: [CdkScrollableModule,\n MatCommonModule,\n MatMenu,\n MatMenuItem,\n MatMenuTrigger,\n MatMenuContent] });\nMatMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatMenuModule, providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [CommonModule, MatCommonModule, MatRippleModule, OverlayModule, CdkScrollableModule,\n MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatMenuModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule, MatCommonModule, MatRippleModule, OverlayModule],\n exports: [\n CdkScrollableModule,\n MatCommonModule,\n MatMenu,\n MatMenuItem,\n MatMenuTrigger,\n MatMenuContent,\n ],\n declarations: [MatMenu, MatMenuItem, MatMenuTrigger, MatMenuContent],\n providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER],\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/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_MENU_CONTENT, MAT_MENU_DEFAULT_OPTIONS, MAT_MENU_PANEL, MAT_MENU_SCROLL_STRATEGY, MatMenu, MatMenuContent, MatMenuItem, MatMenuModule, MatMenuTrigger, _MatMenuBase, _MatMenuContentBase, _MatMenuTriggerBase, fadeInItems, matMenuAnimations, transformMenu };\n","import * as i1 from '@angular/cdk/overlay';\nimport { Overlay, OverlayModule } from '@angular/cdk/overlay';\nimport * as i4 from '@angular/cdk/a11y';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport * as i7 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Directive, Inject, Input, Optional, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport * as i2 from '@angular/cdk/scrolling';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\nimport * as i5 from '@angular/cdk/bidi';\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport * as i6 from '@angular/cdk/layout';\nimport { Breakpoints } from '@angular/cdk/layout';\nimport * as i3 from '@angular/cdk/platform';\nimport { normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\nimport { Subject } from 'rxjs';\nimport { takeUntil, take } from 'rxjs/operators';\nimport { trigger, state, style, transition, animate, keyframes } from '@angular/animations';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Time in ms to throttle repositioning after scroll events. */\nconst SCROLL_THROTTLE_MS = 20;\n/**\n * CSS class that will be attached to the overlay panel.\n * @deprecated\n * @breaking-change 13.0.0 remove this variable\n */\nconst TOOLTIP_PANEL_CLASS = 'mat-tooltip-panel';\nconst PANEL_CLASS = 'tooltip-panel';\n/** Options used to bind passive event listeners. */\nconst passiveListenerOptions = normalizePassiveListenerOptions({ passive: true });\n/**\n * Time between the user putting the pointer on a tooltip\n * trigger and the long press event being fired.\n */\nconst LONGPRESS_DELAY = 500;\n/**\n * Creates an error to be thrown if the user supplied an invalid tooltip position.\n * @docs-private\n */\nfunction getMatTooltipInvalidPositionError(position) {\n return Error(`Tooltip position \"${position}\" is invalid.`);\n}\n/** Injection token that determines the scroll handling while a tooltip is visible. */\nconst MAT_TOOLTIP_SCROLL_STRATEGY = new InjectionToken('mat-tooltip-scroll-strategy');\n/** @docs-private */\nfunction MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY(overlay) {\n return () => overlay.scrollStrategies.reposition({ scrollThrottle: SCROLL_THROTTLE_MS });\n}\n/** @docs-private */\nconst MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MAT_TOOLTIP_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY,\n};\n/** Injection token to be used to override the default options for `matTooltip`. */\nconst MAT_TOOLTIP_DEFAULT_OPTIONS = new InjectionToken('mat-tooltip-default-options', {\n providedIn: 'root',\n factory: MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY,\n});\n/** @docs-private */\nfunction MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY() {\n return {\n showDelay: 0,\n hideDelay: 0,\n touchendHideDelay: 1500,\n };\n}\nclass _MatTooltipBase {\n constructor(_overlay, _elementRef, _scrollDispatcher, _viewContainerRef, _ngZone, _platform, _ariaDescriber, _focusMonitor, scrollStrategy, _dir, _defaultOptions, _document) {\n this._overlay = _overlay;\n this._elementRef = _elementRef;\n this._scrollDispatcher = _scrollDispatcher;\n this._viewContainerRef = _viewContainerRef;\n this._ngZone = _ngZone;\n this._platform = _platform;\n this._ariaDescriber = _ariaDescriber;\n this._focusMonitor = _focusMonitor;\n this._dir = _dir;\n this._defaultOptions = _defaultOptions;\n this._position = 'below';\n this._disabled = false;\n this._viewInitialized = false;\n this._pointerExitEventsInitialized = false;\n this._viewportMargin = 8;\n this._cssClassPrefix = 'mat';\n this._showDelay = this._defaultOptions.showDelay;\n this._hideDelay = this._defaultOptions.hideDelay;\n /**\n * How touch gestures should be handled by the tooltip. On touch devices the tooltip directive\n * uses a long press gesture to show and hide, however it can conflict with the native browser\n * gestures. To work around the conflict, Angular Material disables native gestures on the\n * trigger, but that might not be desirable on particular elements (e.g. inputs and draggable\n * elements). The different values for this option configure the touch event handling as follows:\n * - `auto` - Enables touch gestures for all elements, but tries to avoid conflicts with native\n * browser gestures on particular elements. In particular, it allows text selection on inputs\n * and textareas, and preserves the native browser dragging on elements marked as `draggable`.\n * - `on` - Enables touch gestures for all elements and disables native\n * browser gestures with no exceptions.\n * - `off` - Disables touch gestures. Note that this will prevent the tooltip from\n * showing on touch devices.\n */\n this.touchGestures = 'auto';\n this._message = '';\n /** Manually-bound passive event listeners. */\n this._passiveListeners = [];\n /** Emits when the component is destroyed. */\n this._destroyed = new Subject();\n this._scrollStrategy = scrollStrategy;\n this._document = _document;\n if (_defaultOptions) {\n if (_defaultOptions.position) {\n this.position = _defaultOptions.position;\n }\n if (_defaultOptions.touchGestures) {\n this.touchGestures = _defaultOptions.touchGestures;\n }\n }\n _dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {\n if (this._overlayRef) {\n this._updatePosition(this._overlayRef);\n }\n });\n }\n /** Allows the user to define the position of the tooltip relative to the parent element */\n get position() {\n return this._position;\n }\n set position(value) {\n if (value !== this._position) {\n this._position = value;\n if (this._overlayRef) {\n this._updatePosition(this._overlayRef);\n this._tooltipInstance?.show(0);\n this._overlayRef.updatePosition();\n }\n }\n }\n /** Disables the display of the tooltip. */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n // If tooltip is disabled, hide immediately.\n if (this._disabled) {\n this.hide(0);\n }\n else {\n this._setupPointerEnterEventsIfNeeded();\n }\n }\n /** The default delay in ms before showing the tooltip after show is called */\n get showDelay() {\n return this._showDelay;\n }\n set showDelay(value) {\n this._showDelay = coerceNumberProperty(value);\n }\n /** The default delay in ms before hiding the tooltip after hide is called */\n get hideDelay() {\n return this._hideDelay;\n }\n set hideDelay(value) {\n this._hideDelay = coerceNumberProperty(value);\n if (this._tooltipInstance) {\n this._tooltipInstance._mouseLeaveHideDelay = this._hideDelay;\n }\n }\n /** The message to be displayed in the tooltip */\n get message() {\n return this._message;\n }\n set message(value) {\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this._message, 'tooltip');\n // If the message is not a string (e.g. number), convert it to a string and trim it.\n // Must convert with `String(value)`, not `${value}`, otherwise Closure Compiler optimises\n // away the string-conversion: https://github.com/angular/components/issues/20684\n this._message = value != null ? String(value).trim() : '';\n if (!this._message && this._isTooltipVisible()) {\n this.hide(0);\n }\n else {\n this._setupPointerEnterEventsIfNeeded();\n this._updateTooltipMessage();\n this._ngZone.runOutsideAngular(() => {\n // The `AriaDescriber` has some functionality that avoids adding a description if it's the\n // same as the `aria-label` of an element, however we can't know whether the tooltip trigger\n // has a data-bound `aria-label` or when it'll be set for the first time. We can avoid the\n // issue by deferring the description by a tick so Angular has time to set the `aria-label`.\n Promise.resolve().then(() => {\n this._ariaDescriber.describe(this._elementRef.nativeElement, this.message, 'tooltip');\n });\n });\n }\n }\n /** Classes to be passed to the tooltip. Supports the same syntax as `ngClass`. */\n get tooltipClass() {\n return this._tooltipClass;\n }\n set tooltipClass(value) {\n this._tooltipClass = value;\n if (this._tooltipInstance) {\n this._setTooltipClass(this._tooltipClass);\n }\n }\n ngAfterViewInit() {\n // This needs to happen after view init so the initial values for all inputs have been set.\n this._viewInitialized = true;\n this._setupPointerEnterEventsIfNeeded();\n this._focusMonitor\n .monitor(this._elementRef)\n .pipe(takeUntil(this._destroyed))\n .subscribe(origin => {\n // Note that the focus monitor runs outside the Angular zone.\n if (!origin) {\n this._ngZone.run(() => this.hide(0));\n }\n else if (origin === 'keyboard') {\n this._ngZone.run(() => this.show());\n }\n });\n }\n /**\n * Dispose the tooltip when destroyed.\n */\n ngOnDestroy() {\n const nativeElement = this._elementRef.nativeElement;\n clearTimeout(this._touchstartTimeout);\n if (this._overlayRef) {\n this._overlayRef.dispose();\n this._tooltipInstance = null;\n }\n // Clean up the event listeners set in the constructor\n this._passiveListeners.forEach(([event, listener]) => {\n nativeElement.removeEventListener(event, listener, passiveListenerOptions);\n });\n this._passiveListeners.length = 0;\n this._destroyed.next();\n this._destroyed.complete();\n this._ariaDescriber.removeDescription(nativeElement, this.message, 'tooltip');\n this._focusMonitor.stopMonitoring(nativeElement);\n }\n /** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */\n show(delay = this.showDelay) {\n if (this.disabled ||\n !this.message ||\n (this._isTooltipVisible() &&\n !this._tooltipInstance._showTimeoutId &&\n !this._tooltipInstance._hideTimeoutId)) {\n return;\n }\n const overlayRef = this._createOverlay();\n this._detach();\n this._portal =\n this._portal || new ComponentPortal(this._tooltipComponent, this._viewContainerRef);\n const instance = (this._tooltipInstance = overlayRef.attach(this._portal).instance);\n instance._triggerElement = this._elementRef.nativeElement;\n instance._mouseLeaveHideDelay = this._hideDelay;\n instance\n .afterHidden()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._detach());\n this._setTooltipClass(this._tooltipClass);\n this._updateTooltipMessage();\n instance.show(delay);\n }\n /** Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input */\n hide(delay = this.hideDelay) {\n if (this._tooltipInstance) {\n this._tooltipInstance.hide(delay);\n }\n }\n /** Shows/hides the tooltip */\n toggle() {\n this._isTooltipVisible() ? this.hide() : this.show();\n }\n /** Returns true if the tooltip is currently visible to the user */\n _isTooltipVisible() {\n return !!this._tooltipInstance && this._tooltipInstance.isVisible();\n }\n /** Create the overlay config and position strategy */\n _createOverlay() {\n if (this._overlayRef) {\n return this._overlayRef;\n }\n const scrollableAncestors = this._scrollDispatcher.getAncestorScrollContainers(this._elementRef);\n // Create connected position strategy that listens for scroll events to reposition.\n const strategy = this._overlay\n .position()\n .flexibleConnectedTo(this._elementRef)\n .withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`)\n .withFlexibleDimensions(false)\n .withViewportMargin(this._viewportMargin)\n .withScrollableContainers(scrollableAncestors);\n strategy.positionChanges.pipe(takeUntil(this._destroyed)).subscribe(change => {\n this._updateCurrentPositionClass(change.connectionPair);\n if (this._tooltipInstance) {\n if (change.scrollableViewProperties.isOverlayClipped && this._tooltipInstance.isVisible()) {\n // After position changes occur and the overlay is clipped by\n // a parent scrollable then close the tooltip.\n this._ngZone.run(() => this.hide(0));\n }\n }\n });\n this._overlayRef = this._overlay.create({\n direction: this._dir,\n positionStrategy: strategy,\n panelClass: `${this._cssClassPrefix}-${PANEL_CLASS}`,\n scrollStrategy: this._scrollStrategy(),\n });\n this._updatePosition(this._overlayRef);\n this._overlayRef\n .detachments()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._detach());\n this._overlayRef\n .outsidePointerEvents()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._tooltipInstance?._handleBodyInteraction());\n this._overlayRef\n .keydownEvents()\n .pipe(takeUntil(this._destroyed))\n .subscribe(event => {\n if (this._isTooltipVisible() && event.keyCode === ESCAPE && !hasModifierKey(event)) {\n event.preventDefault();\n event.stopPropagation();\n this._ngZone.run(() => this.hide(0));\n }\n });\n if (this._defaultOptions?.disableTooltipInteractivity) {\n this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`);\n }\n return this._overlayRef;\n }\n /** Detaches the currently-attached tooltip. */\n _detach() {\n if (this._overlayRef && this._overlayRef.hasAttached()) {\n this._overlayRef.detach();\n }\n this._tooltipInstance = null;\n }\n /** Updates the position of the current tooltip. */\n _updatePosition(overlayRef) {\n const position = overlayRef.getConfig().positionStrategy;\n const origin = this._getOrigin();\n const overlay = this._getOverlayPosition();\n position.withPositions([\n this._addOffset({ ...origin.main, ...overlay.main }),\n this._addOffset({ ...origin.fallback, ...overlay.fallback }),\n ]);\n }\n /** Adds the configured offset to a position. Used as a hook for child classes. */\n _addOffset(position) {\n return position;\n }\n /**\n * Returns the origin position and a fallback position based on the user's position preference.\n * The fallback position is the inverse of the origin (e.g. `'below' -> 'above'`).\n */\n _getOrigin() {\n const isLtr = !this._dir || this._dir.value == 'ltr';\n const position = this.position;\n let originPosition;\n if (position == 'above' || position == 'below') {\n originPosition = { originX: 'center', originY: position == 'above' ? 'top' : 'bottom' };\n }\n else if (position == 'before' ||\n (position == 'left' && isLtr) ||\n (position == 'right' && !isLtr)) {\n originPosition = { originX: 'start', originY: 'center' };\n }\n else if (position == 'after' ||\n (position == 'right' && isLtr) ||\n (position == 'left' && !isLtr)) {\n originPosition = { originX: 'end', originY: 'center' };\n }\n else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throw getMatTooltipInvalidPositionError(position);\n }\n const { x, y } = this._invertPosition(originPosition.originX, originPosition.originY);\n return {\n main: originPosition,\n fallback: { originX: x, originY: y },\n };\n }\n /** Returns the overlay position and a fallback position based on the user's preference */\n _getOverlayPosition() {\n const isLtr = !this._dir || this._dir.value == 'ltr';\n const position = this.position;\n let overlayPosition;\n if (position == 'above') {\n overlayPosition = { overlayX: 'center', overlayY: 'bottom' };\n }\n else if (position == 'below') {\n overlayPosition = { overlayX: 'center', overlayY: 'top' };\n }\n else if (position == 'before' ||\n (position == 'left' && isLtr) ||\n (position == 'right' && !isLtr)) {\n overlayPosition = { overlayX: 'end', overlayY: 'center' };\n }\n else if (position == 'after' ||\n (position == 'right' && isLtr) ||\n (position == 'left' && !isLtr)) {\n overlayPosition = { overlayX: 'start', overlayY: 'center' };\n }\n else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throw getMatTooltipInvalidPositionError(position);\n }\n const { x, y } = this._invertPosition(overlayPosition.overlayX, overlayPosition.overlayY);\n return {\n main: overlayPosition,\n fallback: { overlayX: x, overlayY: y },\n };\n }\n /** Updates the tooltip message and repositions the overlay according to the new message length */\n _updateTooltipMessage() {\n // Must wait for the message to be painted to the tooltip so that the overlay can properly\n // calculate the correct positioning based on the size of the text.\n if (this._tooltipInstance) {\n this._tooltipInstance.message = this.message;\n this._tooltipInstance._markForCheck();\n this._ngZone.onMicrotaskEmpty.pipe(take(1), takeUntil(this._destroyed)).subscribe(() => {\n if (this._tooltipInstance) {\n this._overlayRef.updatePosition();\n }\n });\n }\n }\n /** Updates the tooltip class */\n _setTooltipClass(tooltipClass) {\n if (this._tooltipInstance) {\n this._tooltipInstance.tooltipClass = tooltipClass;\n this._tooltipInstance._markForCheck();\n }\n }\n /** Inverts an overlay position. */\n _invertPosition(x, y) {\n if (this.position === 'above' || this.position === 'below') {\n if (y === 'top') {\n y = 'bottom';\n }\n else if (y === 'bottom') {\n y = 'top';\n }\n }\n else {\n if (x === 'end') {\n x = 'start';\n }\n else if (x === 'start') {\n x = 'end';\n }\n }\n return { x, y };\n }\n /** Updates the class on the overlay panel based on the current position of the tooltip. */\n _updateCurrentPositionClass(connectionPair) {\n const { overlayY, originX, originY } = connectionPair;\n let newPosition;\n // If the overlay is in the middle along the Y axis,\n // it means that it's either before or after.\n if (overlayY === 'center') {\n // Note that since this information is used for styling, we want to\n // resolve `start` and `end` to their real values, otherwise consumers\n // would have to remember to do it themselves on each consumption.\n if (this._dir && this._dir.value === 'rtl') {\n newPosition = originX === 'end' ? 'left' : 'right';\n }\n else {\n newPosition = originX === 'start' ? 'left' : 'right';\n }\n }\n else {\n newPosition = overlayY === 'bottom' && originY === 'top' ? 'above' : 'below';\n }\n if (newPosition !== this._currentPosition) {\n const overlayRef = this._overlayRef;\n if (overlayRef) {\n const classPrefix = `${this._cssClassPrefix}-${PANEL_CLASS}-`;\n overlayRef.removePanelClass(classPrefix + this._currentPosition);\n overlayRef.addPanelClass(classPrefix + newPosition);\n }\n this._currentPosition = newPosition;\n }\n }\n /** Binds the pointer events to the tooltip trigger. */\n _setupPointerEnterEventsIfNeeded() {\n // Optimization: Defer hooking up events if there's no message or the tooltip is disabled.\n if (this._disabled ||\n !this.message ||\n !this._viewInitialized ||\n this._passiveListeners.length) {\n return;\n }\n // The mouse events shouldn't be bound on mobile devices, because they can prevent the\n // first tap from firing its click event or can cause the tooltip to open for clicks.\n if (this._platformSupportsMouseEvents()) {\n this._passiveListeners.push([\n 'mouseenter',\n () => {\n this._setupPointerExitEventsIfNeeded();\n this.show();\n },\n ]);\n }\n else if (this.touchGestures !== 'off') {\n this._disableNativeGesturesIfNecessary();\n this._passiveListeners.push([\n 'touchstart',\n () => {\n // Note that it's important that we don't `preventDefault` here,\n // because it can prevent click events from firing on the element.\n this._setupPointerExitEventsIfNeeded();\n clearTimeout(this._touchstartTimeout);\n this._touchstartTimeout = setTimeout(() => this.show(), LONGPRESS_DELAY);\n },\n ]);\n }\n this._addListeners(this._passiveListeners);\n }\n _setupPointerExitEventsIfNeeded() {\n if (this._pointerExitEventsInitialized) {\n return;\n }\n this._pointerExitEventsInitialized = true;\n const exitListeners = [];\n if (this._platformSupportsMouseEvents()) {\n exitListeners.push([\n 'mouseleave',\n event => {\n const newTarget = event.relatedTarget;\n if (!newTarget || !this._overlayRef?.overlayElement.contains(newTarget)) {\n this.hide();\n }\n },\n ], ['wheel', event => this._wheelListener(event)]);\n }\n else if (this.touchGestures !== 'off') {\n this._disableNativeGesturesIfNecessary();\n const touchendListener = () => {\n clearTimeout(this._touchstartTimeout);\n this.hide(this._defaultOptions.touchendHideDelay);\n };\n exitListeners.push(['touchend', touchendListener], ['touchcancel', touchendListener]);\n }\n this._addListeners(exitListeners);\n this._passiveListeners.push(...exitListeners);\n }\n _addListeners(listeners) {\n listeners.forEach(([event, listener]) => {\n this._elementRef.nativeElement.addEventListener(event, listener, passiveListenerOptions);\n });\n }\n _platformSupportsMouseEvents() {\n return !this._platform.IOS && !this._platform.ANDROID;\n }\n /** Listener for the `wheel` event on the element. */\n _wheelListener(event) {\n if (this._isTooltipVisible()) {\n const elementUnderPointer = this._document.elementFromPoint(event.clientX, event.clientY);\n const element = this._elementRef.nativeElement;\n // On non-touch devices we depend on the `mouseleave` event to close the tooltip, but it\n // won't fire if the user scrolls away using the wheel without moving their cursor. We\n // work around it by finding the element under the user's cursor and closing the tooltip\n // if it's not the trigger.\n if (elementUnderPointer !== element && !element.contains(elementUnderPointer)) {\n this.hide();\n }\n }\n }\n /** Disables the native browser gestures, based on how the tooltip has been configured. */\n _disableNativeGesturesIfNecessary() {\n const gestures = this.touchGestures;\n if (gestures !== 'off') {\n const element = this._elementRef.nativeElement;\n const style = element.style;\n // If gestures are set to `auto`, we don't disable text selection on inputs and\n // textareas, because it prevents the user from typing into them on iOS Safari.\n if (gestures === 'on' || (element.nodeName !== 'INPUT' && element.nodeName !== 'TEXTAREA')) {\n style.userSelect =\n style.msUserSelect =\n style.webkitUserSelect =\n style.MozUserSelect =\n 'none';\n }\n // If we have `auto` gestures and the element uses native HTML dragging,\n // we don't set `-webkit-user-drag` because it prevents the native behavior.\n if (gestures === 'on' || !element.draggable) {\n style.webkitUserDrag = 'none';\n }\n style.touchAction = 'none';\n style.webkitTapHighlightColor = 'transparent';\n }\n }\n}\n_MatTooltipBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatTooltipBase, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Directive });\n_MatTooltipBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _MatTooltipBase, inputs: { position: [\"matTooltipPosition\", \"position\"], disabled: [\"matTooltipDisabled\", \"disabled\"], showDelay: [\"matTooltipShowDelay\", \"showDelay\"], hideDelay: [\"matTooltipHideDelay\", \"hideDelay\"], touchGestures: [\"matTooltipTouchGestures\", \"touchGestures\"], message: [\"matTooltip\", \"message\"], tooltipClass: [\"matTooltipClass\", \"tooltipClass\"] }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatTooltipBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i1.Overlay }, { type: i0.ElementRef }, { type: i2.ScrollDispatcher }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i3.Platform }, { type: i4.AriaDescriber }, { type: i4.FocusMonitor }, { type: undefined }, { type: i5.Directionality }, { type: undefined }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, propDecorators: { position: [{\n type: Input,\n args: ['matTooltipPosition']\n }], disabled: [{\n type: Input,\n args: ['matTooltipDisabled']\n }], showDelay: [{\n type: Input,\n args: ['matTooltipShowDelay']\n }], hideDelay: [{\n type: Input,\n args: ['matTooltipHideDelay']\n }], touchGestures: [{\n type: Input,\n args: ['matTooltipTouchGestures']\n }], message: [{\n type: Input,\n args: ['matTooltip']\n }], tooltipClass: [{\n type: Input,\n args: ['matTooltipClass']\n }] } });\n/**\n * Directive that attaches a material design tooltip to the host element. Animates the showing and\n * hiding of a tooltip provided position (defaults to below the element).\n *\n * https://material.io/design/components/tooltips.html\n */\nclass MatTooltip extends _MatTooltipBase {\n constructor(overlay, elementRef, scrollDispatcher, viewContainerRef, ngZone, platform, ariaDescriber, focusMonitor, scrollStrategy, dir, defaultOptions, _document) {\n super(overlay, elementRef, scrollDispatcher, viewContainerRef, ngZone, platform, ariaDescriber, focusMonitor, scrollStrategy, dir, defaultOptions, _document);\n this._tooltipComponent = TooltipComponent;\n }\n}\nMatTooltip.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTooltip, deps: [{ token: i1.Overlay }, { token: i0.ElementRef }, { token: i2.ScrollDispatcher }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i3.Platform }, { token: i4.AriaDescriber }, { token: i4.FocusMonitor }, { token: MAT_TOOLTIP_SCROLL_STRATEGY }, { token: i5.Directionality, optional: true }, { token: MAT_TOOLTIP_DEFAULT_OPTIONS, optional: true }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });\nMatTooltip.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTooltip, selector: \"[matTooltip]\", host: { classAttribute: \"mat-tooltip-trigger\" }, exportAs: [\"matTooltip\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTooltip, decorators: [{\n type: Directive,\n args: [{\n selector: '[matTooltip]',\n exportAs: 'matTooltip',\n host: {\n 'class': 'mat-tooltip-trigger',\n },\n }]\n }], ctorParameters: function () { return [{ type: i1.Overlay }, { type: i0.ElementRef }, { type: i2.ScrollDispatcher }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i3.Platform }, { type: i4.AriaDescriber }, { type: i4.FocusMonitor }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_TOOLTIP_SCROLL_STRATEGY]\n }] }, { type: i5.Directionality, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_TOOLTIP_DEFAULT_OPTIONS]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\nclass _TooltipComponentBase {\n constructor(_changeDetectorRef, animationMode) {\n this._changeDetectorRef = _changeDetectorRef;\n /** Property watched by the animation framework to show or hide the tooltip */\n this._visibility = 'initial';\n /** Whether interactions on the page should close the tooltip */\n this._closeOnInteraction = false;\n /** Whether the tooltip is currently visible. */\n this._isVisible = false;\n /** Subject for notifying that the tooltip has been hidden from the view */\n this._onHide = new Subject();\n this._animationsDisabled = animationMode === 'NoopAnimations';\n }\n /**\n * Shows the tooltip with an animation originating from the provided origin\n * @param delay Amount of milliseconds to the delay showing the tooltip.\n */\n show(delay) {\n // Cancel the delayed hide if it is scheduled\n clearTimeout(this._hideTimeoutId);\n this._showTimeoutId = setTimeout(() => {\n this._toggleVisibility(true);\n this._showTimeoutId = undefined;\n }, delay);\n }\n /**\n * Begins the animation to hide the tooltip after the provided delay in ms.\n * @param delay Amount of milliseconds to delay showing the tooltip.\n */\n hide(delay) {\n // Cancel the delayed show if it is scheduled\n clearTimeout(this._showTimeoutId);\n this._hideTimeoutId = setTimeout(() => {\n this._toggleVisibility(false);\n this._hideTimeoutId = undefined;\n }, delay);\n }\n /** Returns an observable that notifies when the tooltip has been hidden from view. */\n afterHidden() {\n return this._onHide;\n }\n /** Whether the tooltip is being displayed. */\n isVisible() {\n return this._isVisible;\n }\n ngOnDestroy() {\n clearTimeout(this._showTimeoutId);\n clearTimeout(this._hideTimeoutId);\n this._onHide.complete();\n this._triggerElement = null;\n }\n /**\n * Interactions on the HTML body should close the tooltip immediately as defined in the\n * material design spec.\n * https://material.io/design/components/tooltips.html#behavior\n */\n _handleBodyInteraction() {\n if (this._closeOnInteraction) {\n this.hide(0);\n }\n }\n /**\n * Marks that the tooltip needs to be checked in the next change detection run.\n * Mainly used for rendering the initial text before positioning a tooltip, which\n * can be problematic in components with OnPush change detection.\n */\n _markForCheck() {\n this._changeDetectorRef.markForCheck();\n }\n _handleMouseLeave({ relatedTarget }) {\n if (!relatedTarget || !this._triggerElement.contains(relatedTarget)) {\n this.hide(this._mouseLeaveHideDelay);\n }\n }\n /**\n * Callback for when the timeout in this.show() gets completed.\n * This method is only needed by the mdc-tooltip, and so it is only implemented\n * in the mdc-tooltip, not here.\n */\n _onShow() { }\n /** Event listener dispatched when an animation on the tooltip finishes. */\n _handleAnimationEnd({ animationName }) {\n if (animationName === this._showAnimation || animationName === this._hideAnimation) {\n this._finalizeAnimation(animationName === this._showAnimation);\n }\n }\n /** Handles the cleanup after an animation has finished. */\n _finalizeAnimation(toVisible) {\n if (toVisible) {\n this._closeOnInteraction = true;\n }\n else if (!this.isVisible()) {\n this._onHide.next();\n }\n }\n /** Toggles the visibility of the tooltip element. */\n _toggleVisibility(isVisible) {\n // We set the classes directly here ourselves so that toggling the tooltip state\n // isn't bound by change detection. This allows us to hide it even if the\n // view ref has been detached from the CD tree.\n const tooltip = this._tooltip.nativeElement;\n const showClass = this._showAnimation;\n const hideClass = this._hideAnimation;\n tooltip.classList.remove(isVisible ? hideClass : showClass);\n tooltip.classList.add(isVisible ? showClass : hideClass);\n this._isVisible = isVisible;\n // It's common for internal apps to disable animations using `* { animation: none !important }`\n // which can break the opening sequence. Try to detect such cases and work around them.\n if (isVisible && !this._animationsDisabled && typeof getComputedStyle === 'function') {\n const styles = getComputedStyle(tooltip);\n // Use `getPropertyValue` to avoid issues with property renaming.\n if (styles.getPropertyValue('animation-duration') === '0s' ||\n styles.getPropertyValue('animation-name') === 'none') {\n this._animationsDisabled = true;\n }\n }\n if (isVisible) {\n this._onShow();\n }\n if (this._animationsDisabled) {\n tooltip.classList.add('_mat-animation-noopable');\n this._finalizeAnimation(isVisible);\n }\n }\n}\n_TooltipComponentBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _TooltipComponentBase, deps: [{ token: i0.ChangeDetectorRef }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n_TooltipComponentBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _TooltipComponentBase, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _TooltipComponentBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; } });\n/**\n * Internal component that wraps the tooltip's content.\n * @docs-private\n */\nclass TooltipComponent extends _TooltipComponentBase {\n constructor(changeDetectorRef, _breakpointObserver, animationMode) {\n super(changeDetectorRef, animationMode);\n this._breakpointObserver = _breakpointObserver;\n /** Stream that emits whether the user has a handset-sized display. */\n this._isHandset = this._breakpointObserver.observe(Breakpoints.Handset);\n this._showAnimation = 'mat-tooltip-show';\n this._hideAnimation = 'mat-tooltip-hide';\n }\n}\nTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i6.BreakpointObserver }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: TooltipComponent, selector: \"mat-tooltip-component\", host: { attributes: { \"aria-hidden\": \"true\" }, listeners: { \"mouseleave\": \"_handleMouseLeave($event)\" }, properties: { \"style.zoom\": \"isVisible() ? 1 : null\" } }, viewQueries: [{ propertyName: \"_tooltip\", first: true, predicate: [\"tooltip\"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: \"<div #tooltip\\n class=\\\"mat-tooltip\\\"\\n (animationend)=\\\"_handleAnimationEnd($event)\\\"\\n [ngClass]=\\\"tooltipClass\\\"\\n [class.mat-tooltip-handset]=\\\"(_isHandset | async)?.matches\\\">{{message}}</div>\\n\", styles: [\".mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis;transform:scale(0)}.mat-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}.mat-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-tooltip-show{0%{opacity:0;transform:scale(0)}50%{opacity:.5;transform:scale(0.99)}100%{opacity:1;transform:scale(1)}}@keyframes mat-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1)}}.mat-tooltip-show{animation:mat-tooltip-show 200ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-tooltip-hide{animation:mat-tooltip-hide 100ms cubic-bezier(0, 0, 0.2, 1) forwards}\"], dependencies: [{ kind: \"directive\", type: i7.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"pipe\", type: i7.AsyncPipe, name: \"async\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: TooltipComponent, decorators: [{\n type: Component,\n args: [{ selector: 'mat-tooltip-component', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {\n // Forces the element to have a layout in IE and Edge. This fixes issues where the element\n // won't be rendered if the animations are disabled or there is no web animations polyfill.\n '[style.zoom]': 'isVisible() ? 1 : null',\n '(mouseleave)': '_handleMouseLeave($event)',\n 'aria-hidden': 'true',\n }, template: \"<div #tooltip\\n class=\\\"mat-tooltip\\\"\\n (animationend)=\\\"_handleAnimationEnd($event)\\\"\\n [ngClass]=\\\"tooltipClass\\\"\\n [class.mat-tooltip-handset]=\\\"(_isHandset | async)?.matches\\\">{{message}}</div>\\n\", styles: [\".mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis;transform:scale(0)}.mat-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}.mat-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-tooltip-show{0%{opacity:0;transform:scale(0)}50%{opacity:.5;transform:scale(0.99)}100%{opacity:1;transform:scale(1)}}@keyframes mat-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1)}}.mat-tooltip-show{animation:mat-tooltip-show 200ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-tooltip-hide{animation:mat-tooltip-hide 100ms cubic-bezier(0, 0, 0.2, 1) forwards}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i6.BreakpointObserver }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { _tooltip: [{\n type: ViewChild,\n args: ['tooltip', {\n // Use a static query here since we interact directly with\n // the DOM which can happen before `ngAfterViewInit`.\n static: 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 MatTooltipModule {\n}\nMatTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTooltipModule, declarations: [MatTooltip, TooltipComponent], imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule], exports: [MatTooltip, TooltipComponent, MatCommonModule, CdkScrollableModule] });\nMatTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTooltipModule, providers: [MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule, MatCommonModule, CdkScrollableModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTooltipModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule],\n exports: [MatTooltip, TooltipComponent, MatCommonModule, CdkScrollableModule],\n declarations: [MatTooltip, TooltipComponent],\n providers: [MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER],\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 * Animations used by MatTooltip.\n * @docs-private\n */\nconst matTooltipAnimations = {\n /** Animation that transitions a tooltip in and out. */\n tooltipState: trigger('state', [\n state('initial, void, hidden', style({ opacity: 0, transform: 'scale(0)' })),\n state('visible', style({ transform: 'scale(1)' })),\n transition('* => visible', animate('200ms cubic-bezier(0, 0, 0.2, 1)', keyframes([\n style({ opacity: 0, transform: 'scale(0)', offset: 0 }),\n style({ opacity: 0.5, transform: 'scale(0.99)', offset: 0.5 }),\n style({ opacity: 1, transform: 'scale(1)', offset: 1 }),\n ]))),\n transition('* => hidden', animate('100ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 0 }))),\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 * Generated bundle index. Do not edit.\n */\n\nexport { MAT_TOOLTIP_DEFAULT_OPTIONS, MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY, MAT_TOOLTIP_SCROLL_STRATEGY, MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY, MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER, MatTooltip, MatTooltipModule, SCROLL_THROTTLE_MS, TOOLTIP_PANEL_CLASS, TooltipComponent, _MatTooltipBase, _TooltipComponentBase, getMatTooltipInvalidPositionError, matTooltipAnimations };\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 { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { innerFrom } from './innerFrom';\nimport { popResultSelector } from '../util/args';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { createObject } from '../util/createObject';\nexport function forkJoin(...args) {\n const resultSelector = popResultSelector(args);\n const { args: sources, keys } = argsArgArrayOrObject(args);\n const result = new Observable((subscriber) => {\n const { length } = sources;\n if (!length) {\n subscriber.complete();\n return;\n }\n const values = new Array(length);\n let remainingCompletions = length;\n let remainingEmissions = length;\n for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) {\n let hasValue = false;\n innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, (value) => {\n if (!hasValue) {\n hasValue = true;\n remainingEmissions--;\n }\n values[sourceIndex] = value;\n }, () => remainingCompletions--, undefined, () => {\n if (!remainingCompletions || !hasValue) {\n if (!remainingEmissions) {\n subscriber.next(keys ? createObject(keys, values) : values);\n }\n subscriber.complete();\n }\n }));\n }\n });\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\n","/**\n * @license Angular v14.1.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { Directive, InjectionToken, forwardRef, Optional, Inject, ɵisPromise, ɵisObservable, ɵRuntimeError, Self, EventEmitter, Input, Host, SkipSelf, ɵcoerceToBoolean, ChangeDetectorRef, Output, NgModule, Injectable, inject, 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 */\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BaseControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nBaseControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: BaseControlValueAccessor, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BaseControlValueAccessor, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BuiltInControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nBuiltInControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: BuiltInControlValueAccessor, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BuiltInControlValueAccessor, decorators: [{\n type: Directive\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: CheckboxControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nCheckboxControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: CheckboxControlValueAccessor, selector: \"input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]\", host: { listeners: { \"change\": \"onChange($event.target.checked)\", \"blur\": \"onTouched()\" } }, providers: [CHECKBOX_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: CheckboxControlValueAccessor, decorators: [{\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 }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DefaultValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: COMPOSITION_BUFFER_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nDefaultValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: DefaultValueAccessor, selector: \"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]\", host: { listeners: { \"input\": \"$any(this)._handleInput($event.target.value)\", \"blur\": \"onTouched()\", \"compositionstart\": \"$any(this)._compositionStart()\", \"compositionend\": \"$any(this)._compositionEnd($event.target.value)\" } }, providers: [DEFAULT_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DefaultValueAccessor, decorators: [{\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 }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [COMPOSITION_BUFFER_MODE]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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$1 = typeof ngDevMode === 'undefined' || !!ngDevMode;\nfunction isEmptyInputValue(value) {\n /**\n * Check if the object is a string or array before evaluating the length attribute.\n * This avoids falsely rejecting objects that contain a custom length attribute.\n * For example, the object {id: 1, length: 0, width: 0} should not be returned as empty.\n */\n return value == null ||\n ((typeof value === 'string' || Array.isArray(value)) && 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 * @usageNotes\n *\n * ### Provide a custom async validator directive\n *\n * The following example implements the `AsyncValidator` interface to create an\n * async validator directive with a custom error key.\n *\n * ```typescript\n * @Directive({\n * selector: '[customAsyncValidator]',\n * providers: [{provide: NG_ASYNC_VALIDATORS, useExisting: CustomAsyncValidatorDirective, multi:\n * true}]\n * })\n * class CustomAsyncValidatorDirective implements AsyncValidator {\n * validate(control: AbstractControl): Promise<ValidationErrors|null> {\n * return Promise.resolve({'custom': true});\n * }\n * }\n * ```\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('some value', 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 use cases. 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(value) {\n const obs = ɵisPromise(value) ? from(value) : value;\n if (NG_DEV_MODE$1 && !(ɵisObservable(obs))) {\n let errorMessage = `Expected async validator to return Promise or Observable.`;\n // A synchronous validator will return object or null.\n if (typeof value === 'object') {\n errorMessage +=\n ' Are you using a synchronous validator where an async validator is expected?';\n }\n throw new ɵRuntimeError(-1101 /* RuntimeErrorCode.WRONG_VALIDATOR_RETURN_TYPE */, errorMessage);\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 ? { ...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 current 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 validators.\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}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 */\n// DO NOT REFACTOR!\n// Each status is represented by a separate function to make sure that\n// advanced Closure Compiler optimizations related to property renaming\n// can work correctly.\nclass AbstractControlStatus {\n constructor(cd) {\n this._cd = cd;\n }\n get isTouched() {\n return !!this._cd?.control?.touched;\n }\n get isUntouched() {\n return !!this._cd?.control?.untouched;\n }\n get isPristine() {\n return !!this._cd?.control?.pristine;\n }\n get isDirty() {\n return !!this._cd?.control?.dirty;\n }\n get isValid() {\n return !!this._cd?.control?.valid;\n }\n get isInvalid() {\n return !!this._cd?.control?.invalid;\n }\n get isPending() {\n return !!this._cd?.control?.pending;\n }\n get isSubmitted() {\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 !!this._cd?.submitted;\n }\n}\nconst ngControlStatusHost = {\n '[class.ng-untouched]': 'isUntouched',\n '[class.ng-touched]': 'isTouched',\n '[class.ng-pristine]': 'isPristine',\n '[class.ng-dirty]': 'isDirty',\n '[class.ng-valid]': 'isValid',\n '[class.ng-invalid]': 'isInvalid',\n '[class.ng-pending]': 'isPending',\n};\nconst ngGroupStatusHost = {\n ...ngControlStatusHost,\n '[class.ng-submitted]': 'isSubmitted',\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgControlStatus, deps: [{ token: NgControl, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgControlStatus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\", host: { properties: { \"class.ng-untouched\": \"isUntouched\", \"class.ng-touched\": \"isTouched\", \"class.ng-pristine\": \"isPristine\", \"class.ng-dirty\": \"isDirty\", \"class.ng-valid\": \"isValid\", \"class.ng-invalid\": \"isInvalid\", \"class.ng-pending\": \"isPending\" } }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgControlStatus, decorators: [{\n type: Directive,\n args: [{ selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost }]\n }], ctorParameters: function () { return [{ type: NgControl, decorators: [{\n type: Self\n }] }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgControlStatusGroup, deps: [{ token: ControlContainer, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgControlStatusGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgControlStatusGroup, selector: \"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]\", host: { properties: { \"class.ng-untouched\": \"isUntouched\", \"class.ng-touched\": \"isTouched\", \"class.ng-pristine\": \"isPristine\", \"class.ng-dirty\": \"isDirty\", \"class.ng-valid\": \"isValid\", \"class.ng-invalid\": \"isInvalid\", \"class.ng-pending\": \"isPending\", \"class.ng-submitted\": \"isSubmitted\" } }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgControlStatusGroup, decorators: [{\n type: Directive,\n args: [{\n selector: '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',\n host: ngGroupStatusHost\n }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Self\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 ɵRuntimeError(1050 /* RuntimeErrorCode.FORM_CONTROL_NAME_MISSING_PARENT */, `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 ɵRuntimeError(1051 /* RuntimeErrorCode.FORM_CONTROL_NAME_INSIDE_MODEL_GROUP */, `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 ɵRuntimeError(1052 /* RuntimeErrorCode.FORM_GROUP_MISSING_INSTANCE */, `formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n ${formControlNameExample}`);\n}\nfunction groupParentException() {\n return new ɵRuntimeError(1053 /* RuntimeErrorCode.FORM_GROUP_NAME_MISSING_PARENT */, `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 ɵRuntimeError(1054 /* RuntimeErrorCode.FORM_ARRAY_NAME_MISSING_PARENT */, `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`;\nconst asyncValidatorsDroppedWithOptsWarning = `\n It looks like you're constructing using a FormControl with both an options argument and an\n async validators argument. Mixing these arguments will cause your async validators to be dropped.\n You should either put all your validators in the options object, or in separate validators\n arguments. For example:\n\n // Using validators arguments\n fc = new FormControl(42, Validators.required, myAsyncValidator);\n\n // Using AbstractControlOptions\n fc = new FormControl(42, {validators: Validators.required, asyncValidators: myAV});\n\n // Do NOT mix them: async validators will be dropped!\n fc = new FormControl(42, {validators: Validators.required}, /* Oops! */ myAsyncValidator);\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}\nfunction describeKey(isFormGroup, key) {\n return isFormGroup ? `with name: '${key}'` : `at index: ${key}`;\n}\nfunction noControlsError(isFormGroup) {\n return `\n There are no form controls registered with this ${isFormGroup ? 'group' : 'array'} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `;\n}\nfunction missingControlError(isFormGroup, key) {\n return `Cannot find form control ${describeKey(isFormGroup, key)}`;\n}\nfunction missingControlValueError(isFormGroup, key) {\n return `Must supply a value for form control ${describeKey(isFormGroup, 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 */\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\n/**\n * Reports that a control is valid, meaning that no errors exist in the input value.\n *\n * @see `status`\n */\nconst VALID = 'VALID';\n/**\n * Reports that a control is invalid, meaning that an error exists in the input value.\n *\n * @see `status`\n */\nconst INVALID = 'INVALID';\n/**\n * Reports that a control 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 control 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';\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 if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (isOptionsObj(validatorOrOpts) && asyncValidator) {\n console.warn(asyncValidatorsDroppedWithOptsWarning);\n }\n }\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}\nfunction assertControlPresent(parent, isGroup, key) {\n const controls = parent.controls;\n const collection = isGroup ? Object.keys(controls) : controls;\n if (!collection.length) {\n throw new ɵRuntimeError(1000 /* RuntimeErrorCode.NO_CONTROLS */, NG_DEV_MODE ? noControlsError(isGroup) : '');\n }\n if (!controls[key]) {\n throw new ɵRuntimeError(1001 /* RuntimeErrorCode.MISSING_CONTROL */, NG_DEV_MODE ? missingControlError(isGroup, key) : '');\n }\n}\nfunction assertAllValuesPresent(control, isGroup, value) {\n control._forEachChild((_, key) => {\n if (value[key] === undefined) {\n throw new ɵRuntimeError(1002 /* RuntimeErrorCode.MISSING_CONTROL_VALUE */, NG_DEV_MODE ? missingControlValueError(isGroup, key) : '');\n }\n });\n}\n// clang-format on\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 * The first type parameter TValue represents the value type of the control (`control.value`).\n * The optional type parameter TRawValue represents the raw value type (`control.getRawValue()`).\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 /** @internal */\n this._pendingDirty = false;\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._pendingTouched = 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 * @usageNotes\n *\n * ### Reference to a ValidatorFn\n *\n * ```\n * // Reference to the RequiredValidator\n * const ctrl = new FormControl<string | null>('', Validators.required);\n * ctrl.removeValidators(Validators.required);\n *\n * // Reference to anonymous function inside MinValidator\n * const minValidator = Validators.min(3);\n * const ctrl = new FormControl<string | null>('', minValidator);\n * expect(ctrl.hasValidator(minValidator)).toEqual(true)\n * expect(ctrl.hasValidator(Validators.min(3)).toEqual(false)\n *\n * ctrl.removeValidators(minValidator);\n * ```\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 * @usageNotes\n *\n * ### Reference to a ValidatorFn\n *\n * ```\n * // Reference to the RequiredValidator\n * const ctrl = new FormControl<number | null>(0, Validators.required);\n * expect(ctrl.hasValidator(Validators.required)).toEqual(true)\n *\n * // Reference to anonymous function inside MinValidator\n * const minValidator = Validators.min(3);\n * const ctrl = new FormControl<number | null>(0, minValidator);\n * expect(ctrl.hasValidator(minValidator)).toEqual(true)\n * expect(ctrl.hasValidator(Validators.min(3)).toEqual(false)\n * ```\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({ ...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({ ...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({ ...opts, onlySelf: true });\n });\n this.updateValueAndValidity({ onlySelf: true, emitEvent: opts.emitEvent });\n this._updateAncestors({ ...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 * Sets the parent of the control\n *\n * @param parent The new parent.\n */\n setParent(parent) {\n this._parent = parent;\n }\n /**\n * The raw value of this control. For most control implementations, the raw value will include\n * disabled children.\n */\n getRawValue() {\n return this.value;\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. If a string is provided, passing it as a string literal will result in improved type\n * information. Likewise, if an array is provided, passing it `as const` will cause improved type\n * information to be available.\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'] as const);` // `as const` gives improved typings\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 let currPath = path;\n if (currPath == null)\n return null;\n if (!Array.isArray(currPath))\n currPath = currPath.split('.');\n if (currPath.length === 0)\n return null;\n return currPath.reduce((control, name) => control && control._find(name), this);\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 _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 /** @internal */\n _find(name) {\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 */\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 four fundamental building blocks used to define forms in Angular,\n * along with `FormControl`, `FormArray`, and `FormRecord`.\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 * `FormGroup` is intended for use cases where the keys are known ahead of time.\n * If you need to dynamically add and remove controls, use {@link FormRecord} instead.\n *\n * `FormGroup` accepts an optional type parameter `TControl`, which is an object type with inner\n * control types as values.\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 * ### The type argument, and optional controls\n *\n * `FormGroup` accepts one generic argument, which is an object containing its inner controls.\n * This type will usually be inferred automatically, but you can always specify it explicitly if you\n * wish.\n *\n * If you have controls that are optional (i.e. they can be removed, you can use the `?` in the\n * type):\n *\n * ```\n * const form = new FormGroup<{\n * first: FormControl<string|null>,\n * middle?: FormControl<string|null>, // Middle name is optional.\n * last: FormControl<string|null>,\n * }>({\n * first: new FormControl('Nancy'),\n * last: new FormControl('Drew'),\n * });\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 * ### Using a FormGroup with optional controls\n *\n * It is possible to have optional controls in a FormGroup. An optional control can be removed later\n * using `removeControl`, and can be omitted when calling `reset`. Optional controls must be\n * declared optional in the group's type.\n *\n * ```ts\n * const c = new FormGroup<{one?: FormControl<string>}>({\n * one: new FormControl('')\n * });\n * ```\n *\n * Notice that `c.value.one` has type `string|null|undefined`. This is because calling `c.reset({})`\n * without providing the optional key `one` will cause it to become `null`.\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 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 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. In a strongly-typed group, required controls cannot be\n * removed.\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 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 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 assertAllValuesPresent(this, true, value);\n Object.keys(value).forEach(name => {\n assertControlPresent(this, true, 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 // The compiler cannot see through the uninstantiated conditional type of `this.controls`, so\n // `as any` is required.\n const control = this.controls[name];\n if (control) {\n control.patchValue(\n /* Guaranteed to be present, due to the outer forEach. */ 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 their default values, or null if no defaults were provided.\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 */\n getRawValue() {\n return this._reduceChildren({}, (acc, control, name) => {\n acc[name] = 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 _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, control] of Object.entries(this.controls)) {\n if (this.contains(controlName) && condition(control)) {\n return true;\n }\n }\n return false;\n }\n /** @internal */\n _reduceValue() {\n let acc = {};\n return this._reduceChildren(acc, (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 _find(name) {\n return this.controls.hasOwnProperty(name) ?\n this.controls[name] :\n null;\n }\n}\nconst UntypedFormGroup = FormGroup;\nconst isFormGroup = (control) => control instanceof FormGroup;\n/**\n * Tracks the value and validity state of a collection of `FormControl` instances, each of which has\n * the same value type.\n *\n * `FormRecord` is very similar to {@link FormGroup}, except it can be used with a dynamic keys,\n * with controls added and removed as needed.\n *\n * `FormRecord` accepts one generic argument, which describes the type of the controls it contains.\n *\n * @usageNotes\n *\n * ```\n * let numbers = new FormRecord({bill: new FormControl('415-123-456')});\n * numbers.addControl('bob', new FormControl('415-234-567'));\n * numbers.removeControl('bill');\n * ```\n *\n * @publicApi\n */\nclass FormRecord extends FormGroup {\n}\nconst isFormRecord = (control) => control instanceof FormRecord;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 if (control.disabled) {\n dir.valueAccessor.setDisabledState?.(true);\n }\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 const messageEnd = _describeControlLocation(dir);\n throw new Error(`${message} ${messageEnd}`);\n}\nfunction _describeControlLocation(dir) {\n const path = dir.path;\n if (path && path.length > 1)\n return `path: '${path.join(' -> ')}'`;\n if (path?.[0])\n return `name: '${path}'`;\n return 'unspecified name attribute';\n}\nfunction _throwInvalidValueAccessorError(dir) {\n const loc = _describeControlLocation(dir);\n throw new ɵRuntimeError(1200 /* RuntimeErrorCode.NG_VALUE_ACCESSOR_NOT_PROVIDED */, `Value accessor was not provided as an array for form control with ${loc}. ` +\n `Check that the \\`NG_VALUE_ACCESSOR\\` token is configured as a \\`multi: true\\` provider.`);\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 _throwInvalidValueAccessorError(dir);\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$1(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 */\nconst formDirectiveProvider$1 = {\n provide: ControlContainer,\n useExisting: forwardRef(() => NgForm)\n};\nconst resolvedPromise$1 = (() => Promise.resolve(null))();\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 = new Set();\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$1.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.add(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$1.then(() => {\n const container = this._findContainer(dir.path);\n if (container) {\n container.removeControl(dir.name);\n }\n this._directives.delete(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$1.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$1.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$1.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 _findContainer(path) {\n path.pop();\n return path.length ? this.form.get(path) : this.form;\n }\n}\nNgForm.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgForm, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgForm.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgForm, selector: \"form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]\", inputs: { options: [\"ngFormOptions\", \"options\"] }, outputs: { ngSubmit: \"ngSubmit\" }, host: { listeners: { \"submit\": \"onSubmit($event)\", \"reset\": \"onReset()\" } }, providers: [formDirectiveProvider$1], exportAs: [\"ngForm\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgForm, decorators: [{\n type: Directive,\n args: [{\n selector: 'form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]',\n providers: [formDirectiveProvider$1],\n host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },\n outputs: ['ngSubmit'],\n exportAs: 'ngForm'\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }]; }, propDecorators: { 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 */\nfunction removeListItem(list, el) {\n const index = list.indexOf(el);\n if (index > -1)\n list.splice(index, 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 */\nfunction isFormControlState(formState) {\n return typeof formState === 'object' && formState !== null &&\n Object.keys(formState).length === 2 && 'value' in formState && 'disabled' in formState;\n}\nconst FormControl = (class FormControl extends AbstractControl {\n constructor(\n // formState and defaultValue will only be null if T is nullable\n formState = null, validatorOrOpts, asyncValidator) {\n super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n /** @publicApi */\n this.defaultValue = null;\n /** @internal */\n this._onChange = [];\n /** @internal */\n this._pendingChange = false;\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\n // `emitEvent` to `true` to allow that during the control creation process.\n emitEvent: !!this.asyncValidator\n });\n if (isOptionsObj(validatorOrOpts) &&\n (validatorOrOpts.nonNullable || validatorOrOpts.initialValueIsDefault)) {\n if (isFormControlState(formState)) {\n this.defaultValue = formState.value;\n }\n else {\n this.defaultValue = formState;\n }\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 patchValue(value, options = {}) {\n this.setValue(value, options);\n }\n reset(formState = this.defaultValue, 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 /** @internal */\n _updateValue() { }\n /** @internal */\n _anyControls(condition) {\n return false;\n }\n /** @internal */\n _allControlsDisabled() {\n return this.disabled;\n }\n registerOnChange(fn) {\n this._onChange.push(fn);\n }\n /** @internal */\n _unregisterOnChange(fn) {\n removeListItem(this._onChange, fn);\n }\n registerOnDisabledChange(fn) {\n this._onDisabledChange.push(fn);\n }\n /** @internal */\n _unregisterOnDisabledChange(fn) {\n removeListItem(this._onDisabledChange, fn);\n }\n /** @internal */\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 (isFormControlState(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});\nconst UntypedFormControl = FormControl;\nconst isFormControl = (control) => control instanceof FormControl;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: AbstractFormGroupDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nAbstractFormGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: AbstractFormGroupDirective, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: AbstractFormGroupDirective, decorators: [{\n type: 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 */\nfunction modelParentException() {\n return new ɵRuntimeError(1350 /* RuntimeErrorCode.NGMODEL_IN_FORM_GROUP */, `\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 ɵRuntimeError(1351 /* RuntimeErrorCode.NGMODEL_IN_FORM_GROUP_NAME */, `\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 ɵRuntimeError(1352 /* RuntimeErrorCode.NGMODEL_WITHOUT_NAME */, `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 ɵRuntimeError(1353 /* RuntimeErrorCode.NGMODELGROUP_IN_FORM_GROUP */, `\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgModelGroup, deps: [{ token: ControlContainer, host: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgModelGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgModelGroup, selector: \"[ngModelGroup]\", inputs: { name: [\"ngModelGroup\", \"name\"] }, providers: [modelGroupProvider], exportAs: [\"ngModelGroup\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgModelGroup, decorators: [{\n type: Directive,\n args: [{ selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup' }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Host\n }, {\n type: SkipSelf\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }]; }, propDecorators: { 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$1 = {\n provide: NgControl,\n useExisting: forwardRef(() => NgModel)\n};\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 = (() => Promise.resolve(null))();\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, _changeDetectorRef) {\n super();\n this._changeDetectorRef = _changeDetectorRef;\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 || 'name' in changes) {\n if (this._registered) {\n this._checkName();\n if (this.formDirective) {\n // We can't call `formDirective.removeControl(this)`, because the `name` has already been\n // changed. We also can't reset the name temporarily since the logic in `removeControl`\n // is inside a promise and it won't run immediately. We work around it by giving it an\n // object with the same shape instead.\n const oldName = changes['name'].previousValue;\n this.formDirective.removeControl({ name: oldName, path: this._getPath(oldName) });\n }\n }\n this._setUpControl();\n }\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._getPath(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.then(() => {\n this.control.setValue(value, { emitViewToModelChange: false });\n this._changeDetectorRef?.markForCheck();\n });\n }\n _updateDisabled(changes) {\n const disabledValue = changes['isDisabled'].currentValue;\n // checking for 0 to avoid breaking change\n const isDisabled = disabledValue !== 0 && ɵcoerceToBoolean(disabledValue);\n resolvedPromise.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 this._changeDetectorRef?.markForCheck();\n });\n }\n _getPath(controlName) {\n return this._parent ? controlPath(controlName, this._parent) : [controlName];\n }\n}\nNgModel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgModel, deps: [{ token: ControlContainer, host: true, optional: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: ChangeDetectorRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgModel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgModel, selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: { name: \"name\", isDisabled: [\"disabled\", \"isDisabled\"], model: [\"ngModel\", \"model\"], options: [\"ngModelOptions\", \"options\"] }, outputs: { update: \"ngModelChange\" }, providers: [formControlBinding$1], exportAs: [\"ngModel\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgModel, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngModel]:not([formControlName]):not([formControl])',\n providers: [formControlBinding$1],\n exportAs: 'ngModel'\n }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALUE_ACCESSOR]\n }] }, { type: i0.ChangeDetectorRef, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ChangeDetectorRef]\n }] }]; }, propDecorators: { 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 }], update: [{\n type: Output,\n args: ['ngModelChange']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: ɵNgNoValidate, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nɵNgNoValidate.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: ɵNgNoValidate, selector: \"form:not([ngNoForm]):not([ngNativeValidate])\", host: { attributes: { \"novalidate\": \"\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: ɵNgNoValidate, decorators: [{\n type: Directive,\n args: [{\n selector: 'form:not([ngNoForm]):not([ngNativeValidate])',\n host: { 'novalidate': '' },\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 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NumberValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nNumberValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NumberValueAccessor, selector: \"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]\", host: { listeners: { \"input\": \"onChange($event.target.value)\", \"blur\": \"onTouched()\" } }, providers: [NUMBER_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NumberValueAccessor, decorators: [{\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 }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 ɵRuntimeError(1202 /* RuntimeErrorCode.NAME_AND_FORM_CONTROL_NAME_MUST_MATCH */, `\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RadioControlRegistryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nRadioControlRegistryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: RadioControlRegistryModule });\nRadioControlRegistryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RadioControlRegistryModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RadioControlRegistryModule, decorators: [{\n type: NgModule\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RadioControlRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nRadioControlRegistry.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RadioControlRegistry, providedIn: RadioControlRegistryModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RadioControlRegistry, decorators: [{\n type: Injectable,\n args: [{ providedIn: RadioControlRegistryModule }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RadioControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: RadioControlRegistry }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });\nRadioControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: RadioControlValueAccessor, selector: \"input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]\", inputs: { name: \"name\", formControlName: \"formControlName\", value: \"value\" }, host: { listeners: { \"change\": \"onChange()\", \"blur\": \"onTouched()\" } }, providers: [RADIO_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RadioControlValueAccessor, decorators: [{\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 }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: RadioControlRegistry }, { type: i0.Injector }]; }, propDecorators: { 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RangeValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nRangeValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: RangeValueAccessor, selector: \"input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]\", host: { listeners: { \"change\": \"onChange($event.target.value)\", \"input\": \"onChange($event.target.value)\", \"blur\": \"onTouched()\" } }, providers: [RANGE_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RangeValueAccessor, decorators: [{\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 }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 = {\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 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}\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.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: FormControlDirective, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: NG_MODEL_WITH_FORM_CONTROL_WARNING, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nFormControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: FormControlDirective, selector: \"[formControl]\", inputs: { form: [\"formControl\", \"form\"], isDisabled: [\"disabled\", \"isDisabled\"], model: [\"ngModel\", \"model\"] }, outputs: { update: \"ngModelChange\" }, providers: [formControlBinding], exportAs: [\"ngForm\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: FormControlDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[formControl]', providers: [formControlBinding], exportAs: 'ngForm' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALUE_ACCESSOR]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]\n }] }]; }, propDecorators: { form: [{\n type: Input,\n args: ['formControl']\n }], isDisabled: [{\n type: Input,\n args: ['disabled']\n }], model: [{\n type: Input,\n args: ['ngModel']\n }], update: [{\n type: Output,\n args: ['ngModelChange']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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(() => FormGroupDirective)\n};\n/**\n * @description\n *\n * Binds an existing `FormGroup` or `FormRecord` 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`/`FormRecord`,\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$1(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 (isFormControl(newCtrl)) {\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: FormGroupDirective, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nFormGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: FormGroupDirective, selector: \"[formGroup]\", inputs: { form: [\"formGroup\", \"form\"] }, outputs: { ngSubmit: \"ngSubmit\" }, host: { listeners: { \"submit\": \"onSubmit($event)\", \"reset\": \"onReset()\" } }, providers: [formDirectiveProvider], exportAs: [\"ngForm\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: FormGroupDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[formGroup]',\n providers: [formDirectiveProvider],\n host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },\n exportAs: 'ngForm'\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }]; }, propDecorators: { 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` or `FormRecord` 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` or `FormRecord` to link, and\n * looks for a `FormGroup` or `FormRecord` 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 `AbstractControl.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 `AbstractControl.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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: FormGroupName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nFormGroupName.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: FormGroupName, selector: \"[formGroupName]\", inputs: { name: [\"formGroupName\", \"name\"] }, providers: [formGroupNameProvider], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: FormGroupName, decorators: [{\n type: Directive,\n args: [{ selector: '[formGroupName]', providers: [formGroupNameProvider] }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Host\n }, {\n type: SkipSelf\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }]; }, propDecorators: { 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: FormArrayName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\nFormArrayName.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: FormArrayName, selector: \"[formArrayName]\", inputs: { name: [\"formArrayName\", \"name\"] }, providers: [formArrayNameProvider], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: FormArrayName, decorators: [{\n type: Directive,\n args: [{ selector: '[formArrayName]', providers: [formArrayNameProvider] }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Host\n }, {\n type: SkipSelf\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }]; }, propDecorators: { 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 this._added = true;\n }\n}\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.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: FormControlName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: NG_MODEL_WITH_FORM_CONTROL_WARNING, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nFormControlName.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: FormControlName, selector: \"[formControlName]\", inputs: { name: [\"formControlName\", \"name\"], isDisabled: [\"disabled\", \"isDisabled\"], model: [\"ngModel\", \"model\"] }, outputs: { update: \"ngModelChange\" }, providers: [controlNameBinding], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: FormControlName, decorators: [{\n type: Directive,\n args: [{ selector: '[formControlName]', providers: [controlNameBinding] }]\n }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Host\n }, {\n type: SkipSelf\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALUE_ACCESSOR]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]\n }] }]; }, propDecorators: { name: [{\n type: Input,\n args: ['formControlName']\n }], isDisabled: [{\n type: Input,\n args: ['disabled']\n }], model: [{\n type: Input,\n args: ['ngModel']\n }], update: [{\n type: Output,\n args: ['ngModelChange']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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$1(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$1(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 ɵRuntimeError(1201 /* RuntimeErrorCode.COMPAREWITH_NOT_A_FN */, `compareWith must be a function, but received ${JSON.stringify(fn)}`);\n }\n this._compareWith = fn;\n }\n /**\n * Sets the \"value\" property on the select element.\n * @nodoc\n */\n writeValue(value) {\n this.value = value;\n const id = this._getOptionId(value);\n const valueString = _buildValueString$1(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$1(valueString);\n return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;\n }\n}\nSelectControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: SelectControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nSelectControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: SelectControlValueAccessor, selector: \"select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]\", inputs: { compareWith: \"compareWith\" }, host: { listeners: { \"change\": \"onChange($event.target.value)\", \"blur\": \"onTouched()\" } }, providers: [SELECT_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: SelectControlValueAccessor, decorators: [{\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 }], propDecorators: { 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$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 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgSelectOption, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SelectControlValueAccessor, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgSelectOption.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgSelectOption, selector: \"option\", inputs: { ngValue: \"ngValue\", value: \"value\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgSelectOption, decorators: [{\n type: Directive,\n args: [{ selector: 'option' }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SelectControlValueAccessor, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }]; }, propDecorators: { 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(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(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 ɵRuntimeError(1201 /* RuntimeErrorCode.COMPAREWITH_NOT_A_FN */, `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 = (element) => {\n const selected = [];\n const selectedOptions = element.selectedOptions;\n if (selectedOptions !== undefined) {\n const options = selectedOptions;\n for (let i = 0; i < options.length; i++) {\n const opt = options[i];\n const val = this._getOptionValue(opt.value);\n selected.push(val);\n }\n }\n // Degrade to use `options` when `selectedOptions` property is not available.\n // Note: the `selectedOptions` is available in all supported browsers, but the Domino lib\n // doesn't have it currently, see https://github.com/fgnass/domino/issues/177.\n else {\n const options = element.options;\n for (let i = 0; i < options.length; i++) {\n const opt = options[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(valueString);\n return this._optionMap.has(id) ? this._optionMap.get(id)._value : valueString;\n }\n}\nSelectMultipleControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: SelectMultipleControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nSelectMultipleControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: SelectMultipleControlValueAccessor, selector: \"select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]\", inputs: { compareWith: \"compareWith\" }, host: { listeners: { \"change\": \"onChange($event.target)\", \"blur\": \"onTouched()\" } }, providers: [SELECT_MULTIPLE_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: SelectMultipleControlValueAccessor, decorators: [{\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 }], propDecorators: { 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(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(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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: ɵNgSelectMultipleOption, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SelectMultipleControlValueAccessor, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nɵNgSelectMultipleOption.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: ɵNgSelectMultipleOption, selector: \"option\", inputs: { ngValue: \"ngValue\", value: \"value\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: ɵNgSelectMultipleOption, decorators: [{\n type: Directive,\n args: [{ selector: 'option' }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SelectMultipleControlValueAccessor, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }]; }, propDecorators: { 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 * Method that updates string to integer if not already a number\n *\n * @param value The value to convert to integer.\n * @returns value of parameter converted to number or integer.\n */\nfunction toInteger(value) {\n return typeof value === 'number' ? value : parseInt(value, 10);\n}\n/**\n * Method that ensures that provided value is a float (and converts it to float if needed).\n *\n * @param value The value to convert to float.\n * @returns value of parameter converted to number or float.\n */\nfunction toFloat(value) {\n return typeof value === 'number' ? value : parseFloat(value);\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 /** @nodoc */\n ngOnChanges(changes) {\n if (this.inputName in changes) {\n const input = this.normalizeInput(changes[this.inputName].currentValue);\n this._enabled = this.enabled(input);\n this._validator = this._enabled ? this.createValidator(input) : nullValidator;\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 /**\n * @description\n * Determines whether this validator should be active or not based on an input.\n * Base class implementation checks whether an input is defined (if the value is different from\n * `null` and `undefined`). Validator classes that extend this base class can override this\n * function with the logic specific to a particular validator directive.\n */\n enabled(input) {\n return input != null /* both `null` and `undefined` */;\n }\n}\nAbstractValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: AbstractValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nAbstractValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: AbstractValidatorDirective, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: AbstractValidatorDirective, decorators: [{\n type: Directive\n }] });\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) => toFloat(input);\n /** @internal */\n this.createValidator = (max) => maxValidator(max);\n }\n}\nMaxValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: MaxValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMaxValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: MaxValidator, selector: \"input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]\", inputs: { max: \"max\" }, host: { properties: { \"attr.max\": \"_enabled ? max : null\" } }, providers: [MAX_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: MaxValidator, decorators: [{\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]': '_enabled ? max : null' }\n }]\n }], propDecorators: { 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) => toFloat(input);\n /** @internal */\n this.createValidator = (min) => minValidator(min);\n }\n}\nMinValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: MinValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMinValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: MinValidator, selector: \"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]\", inputs: { min: \"min\" }, host: { properties: { \"attr.min\": \"_enabled ? min : null\" } }, providers: [MIN_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: MinValidator, decorators: [{\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]': '_enabled ? min : null' }\n }]\n }], propDecorators: { 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 extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'required';\n /** @internal */\n this.normalizeInput = ɵcoerceToBoolean;\n /** @internal */\n this.createValidator = (input) => requiredValidator;\n }\n /** @nodoc */\n enabled(input) {\n return input;\n }\n}\nRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: RequiredValidator, selector: \":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]\", inputs: { required: \"required\" }, host: { properties: { \"attr.required\": \"_enabled ? \\\"\\\" : null\" } }, providers: [REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: RequiredValidator, decorators: [{\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]': '_enabled ? \"\" : null' }\n }]\n }], propDecorators: { 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 constructor() {\n super(...arguments);\n /** @internal */\n this.createValidator = (input) => requiredTrueValidator;\n }\n}\nCheckboxRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: CheckboxRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nCheckboxRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: CheckboxRequiredValidator, selector: \"input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]\", host: { properties: { \"attr.required\": \"_enabled ? \\\"\\\" : null\" } }, providers: [CHECKBOX_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: CheckboxRequiredValidator, decorators: [{\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]': '_enabled ? \"\" : null' }\n }]\n }] });\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 * The email validation is based on the WHATWG HTML specification with some enhancements to\n * incorporate more RFC rules. More information can be found on the [Validators.email\n * page](api/forms/Validators#email).\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 extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'email';\n /** @internal */\n this.normalizeInput = ɵcoerceToBoolean;\n /** @internal */\n this.createValidator = (input) => emailValidator;\n }\n /** @nodoc */\n enabled(input) {\n return input;\n }\n}\nEmailValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: EmailValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nEmailValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: EmailValidator, selector: \"[email][formControlName],[email][formControl],[email][ngModel]\", inputs: { email: \"email\" }, providers: [EMAIL_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: EmailValidator, decorators: [{\n type: Directive,\n args: [{\n selector: '[email][formControlName],[email][formControl],[email][ngModel]',\n providers: [EMAIL_VALIDATOR]\n }]\n }], propDecorators: { 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 extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'minlength';\n /** @internal */\n this.normalizeInput = (input) => toInteger(input);\n /** @internal */\n this.createValidator = (minlength) => minLengthValidator(minlength);\n }\n}\nMinLengthValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: MinLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMinLengthValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: MinLengthValidator, selector: \"[minlength][formControlName],[minlength][formControl],[minlength][ngModel]\", inputs: { minlength: \"minlength\" }, host: { properties: { \"attr.minlength\": \"_enabled ? minlength : null\" } }, providers: [MIN_LENGTH_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: MinLengthValidator, decorators: [{\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 }], propDecorators: { 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 extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'maxlength';\n /** @internal */\n this.normalizeInput = (input) => toInteger(input);\n /** @internal */\n this.createValidator = (maxlength) => maxLengthValidator(maxlength);\n }\n}\nMaxLengthValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: MaxLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMaxLengthValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: MaxLengthValidator, selector: \"[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]\", inputs: { maxlength: \"maxlength\" }, host: { properties: { \"attr.maxlength\": \"_enabled ? maxlength : null\" } }, providers: [MAX_LENGTH_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: MaxLengthValidator, decorators: [{\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 }], propDecorators: { 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 extends AbstractValidatorDirective {\n constructor() {\n super(...arguments);\n /** @internal */\n this.inputName = 'pattern';\n /** @internal */\n this.normalizeInput = (input) => input;\n /** @internal */\n this.createValidator = (input) => patternValidator(input);\n }\n}\nPatternValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: PatternValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nPatternValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: PatternValidator, selector: \"[pattern][formControlName],[pattern][formControl],[pattern][ngModel]\", inputs: { pattern: \"pattern\" }, host: { properties: { \"attr.pattern\": \"_enabled ? pattern : null\" } }, providers: [PATTERN_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: PatternValidator, decorators: [{\n type: Directive,\n args: [{\n selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',\n providers: [PATTERN_VALIDATOR],\n host: { '[attr.pattern]': '_enabled ? pattern : null' }\n }]\n }], propDecorators: { 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: ɵInternalFormsSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nɵInternalFormsSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: ɵInternalFormsSharedModule, declarations: [ɵ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], imports: [RadioControlRegistryModule], exports: [ɵ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ɵInternalFormsSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: ɵInternalFormsSharedModule, imports: [RadioControlRegistryModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: ɵInternalFormsSharedModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: SHARED_FORM_DIRECTIVES,\n imports: [RadioControlRegistryModule],\n exports: SHARED_FORM_DIRECTIVES,\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 * 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: FormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: FormsModule, declarations: [NgModel, NgModelGroup, NgForm], exports: [ɵInternalFormsSharedModule, NgModel, NgModelGroup, NgForm] });\nFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: FormsModule, imports: [ɵInternalFormsSharedModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: FormsModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: TEMPLATE_DRIVEN_DIRECTIVES,\n exports: [ɵInternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]\n }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: ReactiveFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nReactiveFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: ReactiveFormsModule, declarations: [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName], exports: [ɵInternalFormsSharedModule, FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName] });\nReactiveFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: ReactiveFormsModule, imports: [ɵInternalFormsSharedModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: ReactiveFormsModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [REACTIVE_DRIVEN_DIRECTIVES],\n exports: [ɵInternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]\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 * 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` accepts one generic argument, which is the type of the controls inside.\n * If you need a heterogenous array, use {@link UntypedFormArray}.\n *\n * `FormArray` is one of the four fundamental building blocks used to define forms in Angular,\n * along with `FormControl`, `FormGroup`, and `FormRecord`.\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. If `index` is negative, it will wrap\n * around from the back, and if index is greatly negative (less than `-length`), the result is\n * undefined. This behavior is the same as `Array.at(index)`.\n */\n at(index) {\n return this.controls[this._adjustIndex(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. If `index` is negative, wraps around\n * from the back. If `index` is greatly negative (less than `-length`), prepends to the array.\n * This behavior is the same as `Array.splice(index, 0, 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. If `index` is negative, wraps around\n * from the back. If `index` is greatly negative (less than `-length`), removes the first\n * element. This behavior is the same as `Array.splice(index, 1)`.\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 // Adjust the index, then clamp it at no less than 0 to prevent undesired underflows.\n let adjustedIndex = this._adjustIndex(index);\n if (adjustedIndex < 0)\n adjustedIndex = 0;\n if (this.controls[adjustedIndex])\n this.controls[adjustedIndex]._registerOnCollectionChange(() => { });\n this.controls.splice(adjustedIndex, 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. If `index` is negative, wraps around\n * from the back. If `index` is greatly negative (less than `-length`), replaces the first\n * element. This behavior is the same as `Array.splice(index, 1, 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 // Adjust the index, then clamp it at no less than 0 to prevent undesired underflows.\n let adjustedIndex = this._adjustIndex(index);\n if (adjustedIndex < 0)\n adjustedIndex = 0;\n if (this.controls[adjustedIndex])\n this.controls[adjustedIndex]._registerOnCollectionChange(() => { });\n this.controls.splice(adjustedIndex, 1);\n if (control) {\n this.controls.splice(adjustedIndex, 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 assertAllValuesPresent(this, false, value);\n value.forEach((newValue, index) => {\n assertControlPresent(this, false, 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\n * value 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,\n // so 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 */\n getRawValue() {\n return this.controls.map((control) => control.getRawValue());\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 /**\n * Adjusts a negative index by summing it with the length of the array. For very negative\n * indices, the result may remain negative.\n * @internal\n */\n _adjustIndex(index) {\n return index < 0 ? index + this.length : index;\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 _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 _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 /** @internal */\n _find(name) {\n return this.at(name) ?? null;\n }\n}\nconst UntypedFormArray = FormArray;\nconst isFormArray = (control) => control instanceof FormArray;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 &&\n (options.asyncValidators !== undefined ||\n options.validators !== undefined ||\n options.updateOn !== undefined);\n}\n// clang-format on\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\n * `FormControl`, `FormGroup`, or `FormArray`. It reduces the amount of boilerplate needed to\n * build complex forms.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n *\n * @publicApi\n */\nclass FormBuilder {\n constructor() {\n this.useNonNullable = false;\n }\n /**\n * @description\n * Returns a FormBuilder in which automatically constructed @see FormControl} elements\n * have `{nonNullable: true}` and are non-nullable.\n *\n * **Constructing non-nullable controls**\n *\n * When constructing a control, it will be non-nullable, and will reset to its initial value.\n *\n * ```ts\n * let nnfb = new FormBuilder().nonNullable;\n * let name = nnfb.control('Alex'); // FormControl<string>\n * name.reset();\n * console.log(name); // 'Alex'\n * ```\n *\n * **Constructing non-nullable groups or arrays**\n *\n * When constructing a group or array, all automatically created inner controls will be\n * non-nullable, and will reset to their initial values.\n *\n * ```ts\n * let nnfb = new FormBuilder().nonNullable;\n * let name = nnfb.group({who: 'Alex'}); // FormGroup<{who: FormControl<string>}>\n * name.reset();\n * console.log(name); // {who: 'Alex'}\n * ```\n * **Constructing *nullable* fields on groups or arrays**\n *\n * It is still possible to have a nullable field. In particular, any `FormControl` which is\n * *already* constructed will not be altered. For example:\n *\n * ```ts\n * let nnfb = new FormBuilder().nonNullable;\n * // FormGroup<{who: FormControl<string|null>}>\n * let name = nnfb.group({who: new FormControl('Alex')});\n * name.reset(); console.log(name); // {who: null}\n * ```\n *\n * Because the inner control is constructed explicitly by the caller, the builder has\n * no control over how it is created, and cannot exclude the `null`.\n */\n get nonNullable() {\n const nnfb = new FormBuilder();\n nnfb.useNonNullable = true;\n return nnfb;\n }\n group(controls, options = null) {\n const reducedControls = this._reduceControls(controls);\n let newOptions = {};\n if (isAbstractControlOptions(options)) {\n // `options` are `AbstractControlOptions`\n newOptions = options;\n }\n else if (options !== null) {\n // `options` are legacy form group options\n newOptions.validators = options.validator;\n newOptions.asyncValidators = options.asyncValidator;\n }\n return new FormGroup(reducedControls, newOptions);\n }\n /**\n * @description\n * Construct a new `FormControl` with the given state, validators and options. Set\n * `{nonNullable: true}` in the options to get a non-nullable control. Otherwise, the\n * control will be nullable. Accepts a single generic argument, which is the type of the\n * control's value.\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 a `FormControlOptions` 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 let newOptions = {};\n if (!this.useNonNullable) {\n return new FormControl(formState, validatorOrOpts, asyncValidator);\n }\n if (isAbstractControlOptions(validatorOrOpts)) {\n // If the second argument is options, then they are copied.\n newOptions = validatorOrOpts;\n }\n else {\n // If the other arguments are validators, they are copied into an options object.\n newOptions.validators = validatorOrOpts;\n newOptions.asyncValidators = asyncValidator;\n }\n return new FormControl(formState, { ...newOptions, nonNullable: true });\n }\n /**\n * Constructs a new `FormArray` from the given array of configurations,\n * validators and options. Accepts a single generic argument, which is the type of each control\n * inside the array.\n *\n * @param controls An array of child controls or control configs. Each child control is given an\n * index when it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of such functions, or an\n * `AbstractControlOptions` object that contains\n * validation functions and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions.\n */\n array(controls, validatorOrOpts, asyncValidator) {\n const createdControls = controls.map(c => this._createControl(c));\n // Cast to `any` because the inferred types are not as specific as Element.\n return new FormArray(createdControls, validatorOrOpts, asyncValidator);\n }\n /** @internal */\n _reduceControls(controls) {\n const createdControls = {};\n Object.keys(controls).forEach(controlName => {\n createdControls[controlName] = this._createControl(controls[controlName]);\n });\n return createdControls;\n }\n /** @internal */\n _createControl(controls) {\n if (controls instanceof FormControl) {\n return controls;\n }\n else if (controls instanceof AbstractControl) { // A control; just return it\n return controls;\n }\n else if (Array.isArray(controls)) { // ControlConfig Tuple\n const value = controls[0];\n const validator = controls.length > 1 ? controls[1] : null;\n const asyncValidator = controls.length > 2 ? controls[2] : null;\n return this.control(value, validator, asyncValidator);\n }\n else { // T or FormControlState<T>\n return this.control(controls);\n }\n }\n}\nFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: FormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: FormBuilder, providedIn: ReactiveFormsModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: FormBuilder, decorators: [{\n type: Injectable,\n args: [{ providedIn: ReactiveFormsModule }]\n }] });\n/**\n * @description\n * `NonNullableFormBuilder` is similar to {@link FormBuilder}, but automatically constructed\n * {@link FormControl} elements have `{nonNullable: true}` and are non-nullable.\n *\n * @publicApi\n */\nclass NonNullableFormBuilder {\n}\nNonNullableFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NonNullableFormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNonNullableFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NonNullableFormBuilder, providedIn: ReactiveFormsModule, useFactory: () => inject(FormBuilder).nonNullable });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NonNullableFormBuilder, decorators: [{\n type: Injectable,\n args: [{\n providedIn: ReactiveFormsModule,\n useFactory: () => inject(FormBuilder).nonNullable,\n }]\n }] });\n/**\n * UntypedFormBuilder is the same as @see FormBuilder, but it provides untyped controls.\n */\nclass UntypedFormBuilder extends FormBuilder {\n group(controlsConfig, options = null) {\n return super.group(controlsConfig, options);\n }\n /**\n * Like `FormBuilder#control`, except the resulting control is untyped.\n */\n control(formState, validatorOrOpts, asyncValidator) {\n return super.control(formState, validatorOrOpts, asyncValidator);\n }\n /**\n * Like `FormBuilder#array`, except the resulting array is untyped.\n */\n array(controlsConfig, validatorOrOpts, asyncValidator) {\n return super.array(controlsConfig, validatorOrOpts, asyncValidator);\n }\n}\nUntypedFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: UntypedFormBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nUntypedFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: UntypedFormBuilder, providedIn: ReactiveFormsModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: UntypedFormBuilder, decorators: [{\n type: Injectable,\n args: [{ providedIn: ReactiveFormsModule }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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('14.1.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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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, FormRecord, FormsModule, MaxLengthValidator, MaxValidator, MinLengthValidator, MinValidator, NG_ASYNC_VALIDATORS, NG_VALIDATORS, NG_VALUE_ACCESSOR, NgControl, NgControlStatus, NgControlStatusGroup, NgForm, NgModel, NgModelGroup, NgSelectOption, NonNullableFormBuilder, NumberValueAccessor, PatternValidator, RadioControlValueAccessor, RangeValueAccessor, ReactiveFormsModule, RequiredValidator, SelectControlValueAccessor, SelectMultipleControlValueAccessor, UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, VERSION, Validators, ɵInternalFormsSharedModule, ɵNgNoValidate, ɵNgSelectMultipleOption };\n","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","import * as i0 from '@angular/core';\nimport { Injectable, Directive, EventEmitter, Input, Output, ContentChildren, Component, ViewEncapsulation, Optional, Host, NgModule, ChangeDetectionStrategy, PLATFORM_ID, Inject, LOCALE_ID, ElementRef, ViewChild, forwardRef, ContentChild, TemplateRef, createComponent, Injector, Attribute, ViewChildren, HostBinding, InjectionToken } from '@angular/core';\nimport * as i2 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, finalize } from 'rxjs/operators';\nimport * as i3 from '@angular/forms';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule } from '@angular/forms';\nimport { flip, preventOverflow, arrow, createPopperLite, offset } from '@popperjs/core';\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 isPromise(v) {\n return v && v.then;\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}\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 next = (value) => zone.run(() => observer.next(value));\n const error = (e) => zone.run(() => observer.error(e));\n const complete = () => zone.run(() => observer.complete());\n return source.subscribe({ next, error, complete });\n });\n };\n}\nfunction removeAccents(str) {\n return str.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\n}\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 environment = {\n animation: true,\n transitionTimerDelayMs: 5,\n};\n\nconst 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 runningTransitions.get(element)?.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\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgbConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAccordionConfig, deps: [{ token: NgbConfig }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbAccordionConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAccordionConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAccordionConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: NgbConfig }]; } });\n\nlet nextId$3 = 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPanelHeader, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbPanelHeader.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbPanelHeader, selector: \"ng-template[ngbPanelHeader]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPanelHeader, decorators: [{\n type: Directive,\n args: [{ selector: 'ng-template[ngbPanelHeader]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPanelTitle, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbPanelTitle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbPanelTitle, selector: \"ng-template[ngbPanelTitle]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPanelTitle, decorators: [{\n type: Directive,\n args: [{ selector: 'ng-template[ngbPanelTitle]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/**\n * A directive that wraps the accordion panel content.\n */\nclass NgbPanelContent {\n constructor(templateRef) {\n this.templateRef = templateRef;\n }\n}\nNgbPanelContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPanelContent, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbPanelContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbPanelContent, selector: \"ng-template[ngbPanelContent]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPanelContent, decorators: [{\n type: Directive,\n args: [{ selector: 'ng-template[ngbPanelContent]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\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$3++}`;\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPanel, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nNgbPanel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbPanel, selector: \"ngb-panel\", inputs: { disabled: \"disabled\", id: \"id\", title: \"title\", type: \"type\", cardClass: \"cardClass\" }, outputs: { shown: \"shown\", hidden: \"hidden\" }, queries: [{ propertyName: \"titleTpls\", predicate: NgbPanelTitle }, { propertyName: \"headerTpls\", predicate: NgbPanelHeader }, { propertyName: \"contentTpls\", predicate: NgbPanelContent }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPanel, decorators: [{\n type: Directive,\n args: [{ selector: 'ngb-panel' }]\n }], propDecorators: { disabled: [{\n type: Input\n }], id: [{\n type: Input\n }], title: [{\n type: Input\n }], type: [{\n type: Input\n }], cardClass: [{\n type: Input\n }], shown: [{\n type: Output\n }], hidden: [{\n type: Output\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 }] } });\nclass NgbRefDirective {\n constructor(_El) {\n this._El = _El;\n this.ngbRef = new EventEmitter();\n }\n ngOnInit() { this.ngbRef.emit(this._El.nativeElement); }\n ngOnDestroy() { this.ngbRef.emit(null); }\n}\nNgbRefDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbRefDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbRefDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbRefDirective, selector: \"[ngbRef]\", outputs: { ngbRef: \"ngbRef\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbRefDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[ngbRef]' }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { ngbRef: [{\n type: Output\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, _ngZone, _changeDetector) {\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 = panel.panelDiv;\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 = panel.panelDiv;\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}\nNgbAccordion.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAccordion, deps: [{ token: NgbAccordionConfig }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nNgbAccordion.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbAccordion, selector: \"ngb-accordion\", inputs: { animation: \"animation\", activeIds: \"activeIds\", closeOtherPanels: [\"closeOthers\", \"closeOtherPanels\"], destroyOnHide: \"destroyOnHide\", type: \"type\" }, outputs: { panelChange: \"panelChange\", shown: \"shown\", hidden: \"hidden\" }, host: { attributes: { \"role\": \"tablist\" }, properties: { \"attr.aria-multiselectable\": \"!closeOtherPanels\" }, classAttribute: \"accordion\" }, queries: [{ propertyName: \"panels\", predicate: NgbPanel }], exportAs: [\"ngbAccordion\"], ngImport: i0, template: `\n <ng-template #t ngbPanelHeader let-panel>\n <button class=\"accordion-button\" [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]=\"'accordion-item ' + (panel.cardClass || '')\">\n <div role=\"tab\" id=\"{{panel.id}}-header\" [class]=\"'accordion-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}}\" (ngbRef)=\"panel.panelDiv = $event\" role=\"tabpanel\" [attr.aria-labelledby]=\"panel.id + '-header'\"\n *ngIf=\"!destroyOnHide || panel.isOpen || panel.transitionRunning\">\n <div class=\"accordion-body\">\n <ng-template [ngTemplateOutlet]=\"panel.contentTpl?.templateRef || null\"></ng-template>\n </div>\n </div>\n </div>\n </ng-template>\n `, isInline: true, dependencies: [{ kind: \"directive\", type: i0.forwardRef(function () { return i2.NgForOf; }), selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i2.NgIf; }), selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i2.NgTemplateOutlet; }), selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return NgbRefDirective; }), selector: \"[ngbRef]\", outputs: [\"ngbRef\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return NgbPanelHeader; }), selector: \"ng-template[ngbPanelHeader]\" }, { kind: \"directive\", type: i0.forwardRef(function () { return NgbPanelToggle; }), selector: \"button[ngbPanelToggle]\", inputs: [\"ngbPanelToggle\"] }], encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAccordion, decorators: [{\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=\"accordion-button\" [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]=\"'accordion-item ' + (panel.cardClass || '')\">\n <div role=\"tab\" id=\"{{panel.id}}-header\" [class]=\"'accordion-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}}\" (ngbRef)=\"panel.panelDiv = $event\" role=\"tabpanel\" [attr.aria-labelledby]=\"panel.id + '-header'\"\n *ngIf=\"!destroyOnHide || panel.isOpen || panel.transitionRunning\">\n <div class=\"accordion-body\">\n <ng-template [ngTemplateOutlet]=\"panel.contentTpl?.templateRef || null\"></ng-template>\n </div>\n </div>\n </div>\n </ng-template>\n `\n }]\n }], ctorParameters: function () { return [{ type: NgbAccordionConfig }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { panels: [{\n type: ContentChildren,\n args: [NgbPanel]\n }], animation: [{\n type: Input\n }], activeIds: [{\n type: Input\n }], closeOtherPanels: [{\n type: Input,\n args: ['closeOthers']\n }], destroyOnHide: [{\n type: Input\n }], type: [{\n type: Input\n }], panelChange: [{\n type: Output\n }], shown: [{\n type: Output\n }], hidden: [{\n type: Output\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPanelToggle, deps: [{ token: NgbAccordion }, { token: NgbPanel, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgbPanelToggle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbPanelToggle, selector: \"button[ngbPanelToggle]\", inputs: { ngbPanelToggle: \"ngbPanelToggle\" }, host: { attributes: { \"type\": \"button\" }, listeners: { \"click\": \"accordion.toggle(panel.id)\" }, properties: { \"disabled\": \"panel.disabled\", \"class.collapsed\": \"!panel.isOpen\", \"attr.aria-expanded\": \"panel.isOpen\", \"attr.aria-controls\": \"panel.id\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPanelToggle, decorators: [{\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 }], ctorParameters: function () { return [{ type: NgbAccordion }, { type: NgbPanel, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }]; }, propDecorators: { ngbPanelToggle: [{\n type: Input\n }] } });\n\nconst NGB_ACCORDION_DIRECTIVES = [NgbAccordion, NgbPanel, NgbPanelTitle, NgbPanelContent, NgbPanelHeader, NgbPanelToggle];\nclass NgbAccordionModule {\n}\nNgbAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAccordionModule, declarations: [NgbRefDirective, NgbAccordion, NgbPanel, NgbPanelTitle, NgbPanelContent, NgbPanelHeader, NgbPanelToggle], imports: [CommonModule], exports: [NgbAccordion, NgbPanel, NgbPanelTitle, NgbPanelContent, NgbPanelHeader, NgbPanelToggle] });\nNgbAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAccordionModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAccordionModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [NgbRefDirective, ...NGB_ACCORDION_DIRECTIVES],\n exports: NGB_ACCORDION_DIRECTIVES,\n imports: [CommonModule]\n }]\n }] });\n\nconst ngbAlertFadingTransition = ({ classList }) => {\n classList.remove('show');\n};\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAlertConfig, deps: [{ token: NgbConfig }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbAlertConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAlertConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAlertConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: NgbConfig }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAlert, deps: [{ token: NgbAlertConfig }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });\nNgbAlert.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbAlert, selector: \"ngb-alert\", inputs: { animation: \"animation\", dismissible: \"dismissible\", type: \"type\" }, outputs: { closed: \"closed\" }, host: { attributes: { \"role\": \"alert\" }, properties: { \"class.fade\": \"animation\", \"class.alert-dismissible\": \"dismissible\" }, classAttribute: \"alert show\" }, exportAs: [\"ngbAlert\"], usesOnChanges: true, ngImport: i0, template: `\n <ng-content></ng-content>\n <button *ngIf=\"dismissible\" type=\"button\" class=\"btn-close\" aria-label=\"Close\" i18n-aria-label=\"@@ngb.alert.close\"\n (click)=\"close()\">\n </button>\n `, isInline: true, styles: [\"ngb-alert{display:block}\\n\"], dependencies: [{ kind: \"directive\", type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAlert, decorators: [{\n type: Component,\n args: [{ selector: 'ngb-alert', exportAs: 'ngbAlert', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'role': 'alert', 'class': 'alert show', '[class.fade]': 'animation', '[class.alert-dismissible]': 'dismissible' }, template: `\n <ng-content></ng-content>\n <button *ngIf=\"dismissible\" type=\"button\" class=\"btn-close\" aria-label=\"Close\" i18n-aria-label=\"@@ngb.alert.close\"\n (click)=\"close()\">\n </button>\n `, styles: [\"ngb-alert{display:block}\\n\"] }]\n }], ctorParameters: function () { return [{ type: NgbAlertConfig }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { animation: [{\n type: Input\n }], dismissible: [{\n type: Input\n }], type: [{\n type: Input\n }], closed: [{\n type: Output\n }] } });\n\nclass NgbAlertModule {\n}\nNgbAlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbAlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAlertModule, declarations: [NgbAlert], imports: [CommonModule], exports: [NgbAlert] });\nNgbAlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAlertModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbAlertModule, decorators: [{\n type: NgModule,\n args: [{ declarations: [NgbAlert], exports: [NgbAlert], imports: [CommonModule] }]\n }] });\n\n/**\n * Defines the carousel slide transition direction.\n */\nvar NgbSlideEventDirection;\n(function (NgbSlideEventDirection) {\n NgbSlideEventDirection[\"START\"] = \"start\";\n NgbSlideEventDirection[\"END\"] = \"end\";\n})(NgbSlideEventDirection || (NgbSlideEventDirection = {}));\nconst isBeingAnimated = ({ classList }) => {\n return classList.contains('carousel-item-start') || classList.contains('carousel-item-end');\n};\nconst removeDirectionClasses = (classList) => {\n classList.remove('carousel-item-start');\n classList.remove('carousel-item-end');\n};\nconst removeClasses = (classList) => {\n removeDirectionClasses(classList);\n classList.remove('carousel-item-prev');\n classList.remove('carousel-item-next');\n};\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.START ? '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\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCarouselConfig, deps: [{ token: NgbConfig }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbCarouselConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCarouselConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCarouselConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: NgbConfig }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbSlide, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbSlide.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbSlide, selector: \"ng-template[ngbSlide]\", inputs: { id: \"id\" }, outputs: { slid: \"slid\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbSlide, decorators: [{\n type: Directive,\n args: [{ selector: 'ng-template[ngbSlide]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { 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 this._transitionIds?.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.END, source);\n }\n /**\n * Navigates to the next slide.\n */\n next(source) {\n this._cycleToSelected(this._getNextSlide(this.activeId), NgbSlideEventDirection.START, source);\n }\n /**\n * Pauses cycling through the slides.\n */\n pause() { this._pause$.next(true); }\n /**\n * Restarts cycling through the slides from start to end.\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?.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.END : NgbSlideEventDirection.START;\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCarousel, deps: [{ token: NgbCarouselConfig }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nNgbCarousel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbCarousel, selector: \"ngb-carousel\", inputs: { animation: \"animation\", activeId: \"activeId\", interval: \"interval\", wrap: \"wrap\", keyboard: \"keyboard\", pauseOnHover: \"pauseOnHover\", pauseOnFocus: \"pauseOnFocus\", showNavigationArrows: \"showNavigationArrows\", showNavigationIndicators: \"showNavigationIndicators\" }, outputs: { slide: \"slide\", slid: \"slid\" }, host: { attributes: { \"tabIndex\": \"0\" }, listeners: { \"keydown.arrowLeft\": \"keyboard && arrowLeft()\", \"keydown.arrowRight\": \"keyboard && arrowRight()\", \"mouseenter\": \"mouseHover = true\", \"mouseleave\": \"mouseHover = false\", \"focusin\": \"focused = true\", \"focusout\": \"focused = false\" }, properties: { \"style.display\": \"\\\"block\\\"\", \"attr.aria-activedescendant\": \"'slide-' + activeId\" }, classAttribute: \"carousel slide\" }, queries: [{ propertyName: \"slides\", predicate: NgbSlide }], exportAs: [\"ngbCarousel\"], ngImport: i0, template: `\n <div class=\"carousel-indicators\" [class.visually-hidden]=\"!showNavigationIndicators\" role=\"tablist\">\n <button type=\"button\" data-bs-target *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);\"></button>\n </div>\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=\"visually-hidden\" 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 <button class=\"carousel-control-prev\" type=\"button\" (click)=\"arrowLeft()\" *ngIf=\"showNavigationArrows\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\" i18n=\"@@ngb.carousel.previous\">Previous</span>\n </button>\n <button class=\"carousel-control-next\" type=\"button\" (click)=\"arrowRight()\" *ngIf=\"showNavigationArrows\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\" i18n=\"@@ngb.carousel.next\">Next</span>\n </button>\n `, isInline: true, dependencies: [{ kind: \"directive\", type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i2.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCarousel, decorators: [{\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 <div class=\"carousel-indicators\" [class.visually-hidden]=\"!showNavigationIndicators\" role=\"tablist\">\n <button type=\"button\" data-bs-target *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);\"></button>\n </div>\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=\"visually-hidden\" 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 <button class=\"carousel-control-prev\" type=\"button\" (click)=\"arrowLeft()\" *ngIf=\"showNavigationArrows\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\" i18n=\"@@ngb.carousel.previous\">Previous</span>\n </button>\n <button class=\"carousel-control-next\" type=\"button\" (click)=\"arrowRight()\" *ngIf=\"showNavigationArrows\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\" i18n=\"@@ngb.carousel.next\">Next</span>\n </button>\n `\n }]\n }], ctorParameters: function () { return [{ type: NgbCarouselConfig }, { type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { slides: [{\n type: ContentChildren,\n args: [NgbSlide]\n }], animation: [{\n type: Input\n }], activeId: [{\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 }], slide: [{\n type: Output\n }], slid: [{\n type: Output\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCarouselModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbCarouselModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCarouselModule, declarations: [NgbCarousel, NgbSlide], imports: [CommonModule], exports: [NgbCarousel, NgbSlide] });\nNgbCarouselModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCarouselModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCarouselModule, decorators: [{\n type: NgModule,\n args: [{ declarations: NGB_CAROUSEL_DIRECTIVES, exports: NGB_CAROUSEL_DIRECTIVES, imports: [CommonModule] }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCollapseConfig, deps: [{ token: NgbConfig }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbCollapseConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCollapseConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCollapseConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: NgbConfig }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCollapse, deps: [{ token: i0.ElementRef }, { token: NgbCollapseConfig }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });\nNgbCollapse.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbCollapse, selector: \"[ngbCollapse]\", inputs: { animation: \"animation\", collapsed: [\"ngbCollapse\", \"collapsed\"] }, outputs: { ngbCollapseChange: \"ngbCollapseChange\", shown: \"shown\", hidden: \"hidden\" }, exportAs: [\"ngbCollapse\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCollapse, decorators: [{\n type: Directive,\n args: [{ selector: '[ngbCollapse]', exportAs: 'ngbCollapse' }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: NgbCollapseConfig }, { type: i0.NgZone }]; }, propDecorators: { animation: [{\n type: Input\n }], collapsed: [{\n type: Input,\n args: ['ngbCollapse']\n }], ngbCollapseChange: [{\n type: Output\n }], shown: [{\n type: Output\n }], hidden: [{\n type: Output\n }] } });\n\nclass NgbCollapseModule {\n}\nNgbCollapseModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCollapseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbCollapseModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCollapseModule, declarations: [NgbCollapse], exports: [NgbCollapse] });\nNgbCollapseModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCollapseModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCollapseModule, decorators: [{\n type: NgModule,\n args: [{ declarations: [NgbCollapse], exports: [NgbCollapse] }]\n }] });\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 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 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendar, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgbCalendar.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendar, providedIn: 'root', useFactory: NGB_DATEPICKER_CALENDAR_FACTORY });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendar, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: NGB_DATEPICKER_CALENDAR_FACTORY }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarGregorian, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nNgbCalendarGregorian.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarGregorian });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarGregorian, decorators: [{\n type: Injectable\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerI18n, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgbDatepickerI18n.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerI18n, providedIn: 'root', useFactory: NGB_DATEPICKER_18N_FACTORY, deps: [{ token: LOCALE_ID }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerI18n, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: NGB_DATEPICKER_18N_FACTORY, deps: [LOCALE_ID] }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerI18nDefault, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbDatepickerI18nDefault.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerI18nDefault });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerI18nDefault, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; } });\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) => ({ ...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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerService, deps: [{ token: NgbCalendar }, { token: NgbDatepickerI18n }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbDatepickerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerService });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerService, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: NgbCalendar }, { type: NgbDatepickerI18n }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgbDatepickerConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgbDateAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateAdapter, providedIn: 'root', useFactory: NGB_DATEPICKER_DATE_ADAPTER_FACTORY });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateAdapter, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: NGB_DATEPICKER_DATE_ADAPTER_FACTORY }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateStructAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nNgbDateStructAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateStructAdapter });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateStructAdapter, decorators: [{\n type: Injectable\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerNavigationSelect, deps: [{ token: NgbDatepickerI18n }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });\nNgbDatepickerNavigationSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbDatepickerNavigationSelect, selector: \"ngb-datepicker-navigation-select\", inputs: { date: \"date\", disabled: \"disabled\", months: \"months\", years: \"years\" }, outputs: { select: \"select\" }, viewQueries: [{ propertyName: \"monthSelect\", first: true, predicate: [\"month\"], descendants: true, read: ElementRef, static: true }, { propertyName: \"yearSelect\", first: true, predicate: [\"year\"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: `\n <select #month\n [disabled]=\"disabled\"\n class=\"form-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=\"form-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 `, isInline: true, styles: [\"ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important}\\n\"], dependencies: [{ kind: \"directive\", type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i3.NgSelectOption, selector: \"option\", inputs: [\"ngValue\", \"value\"] }, { kind: \"directive\", type: i3.ɵNgSelectMultipleOption, selector: \"option\", inputs: [\"ngValue\", \"value\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerNavigationSelect, decorators: [{\n type: Component,\n args: [{ selector: 'ngb-datepicker-navigation-select', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `\n <select #month\n [disabled]=\"disabled\"\n class=\"form-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=\"form-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 `, styles: [\"ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important}\\n\"] }]\n }], ctorParameters: function () { return [{ type: NgbDatepickerI18n }, { type: i0.Renderer2 }]; }, propDecorators: { date: [{\n type: Input\n }], disabled: [{\n type: Input\n }], months: [{\n type: Input\n }], years: [{\n type: Input\n }], select: [{\n type: Output\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 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerNavigation, deps: [{ token: NgbDatepickerI18n }], target: i0.ɵɵFactoryTarget.Component });\nNgbDatepickerNavigation.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbDatepickerNavigation, selector: \"ngb-datepicker-navigation\", inputs: { date: \"date\", disabled: \"disabled\", months: \"months\", showSelect: \"showSelect\", prevDisabled: \"prevDisabled\", nextDisabled: \"nextDisabled\", selectBoxes: \"selectBoxes\" }, outputs: { navigate: \"navigate\", select: \"select\" }, ngImport: i0, 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 `, isInline: true, 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 all and (-ms-high-contrast: none),(-ms-high-contrast: active){.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\"], dependencies: [{ kind: \"directive\", type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: NgbDatepickerNavigationSelect, selector: \"ngb-datepicker-navigation-select\", inputs: [\"date\", \"disabled\", \"months\", \"years\"], outputs: [\"select\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerNavigation, decorators: [{\n type: Component,\n args: [{ selector: 'ngb-datepicker-navigation', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, 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 `, 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 all and (-ms-high-contrast: none),(-ms-high-contrast: active){.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 }], ctorParameters: function () { return [{ type: NgbDatepickerI18n }]; }, propDecorators: { date: [{\n type: Input\n }], disabled: [{\n type: Input\n }], months: [{\n type: Input\n }], showSelect: [{\n type: Input\n }], prevDisabled: [{\n type: Input\n }], nextDisabled: [{\n type: Input\n }], selectBoxes: [{\n type: Input\n }], navigate: [{\n type: Output\n }], select: [{\n type: Output\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerDayView, deps: [{ token: NgbDatepickerI18n }], target: i0.ɵɵFactoryTarget.Component });\nNgbDatepickerDayView.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbDatepickerDayView, selector: \"[ngbDatepickerDayView]\", inputs: { currentMonth: \"currentMonth\", date: \"date\", disabled: \"disabled\", focused: \"focused\", selected: \"selected\" }, host: { properties: { \"class.bg-primary\": \"selected\", \"class.text-white\": \"selected\", \"class.text-muted\": \"isMuted()\", \"class.outside\": \"isMuted()\", \"class.active\": \"focused\" }, classAttribute: \"btn-light\" }, ngImport: i0, template: `{{ i18n.getDayNumerals(date) }}`, isInline: true, styles: [\"[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-btn-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5}\\n\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerDayView, decorators: [{\n type: Component,\n args: [{ selector: '[ngbDatepickerDayView]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, 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 }, template: `{{ i18n.getDayNumerals(date) }}`, styles: [\"[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-btn-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5}\\n\"] }]\n }], ctorParameters: function () { return [{ type: NgbDatepickerI18n }]; }, propDecorators: { 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\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 /* eslint-disable-next-line deprecation/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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerKeyboardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgbDatepickerKeyboardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerKeyboardService, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerKeyboardService, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerContent, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbDatepickerContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbDatepickerContent, selector: \"ng-template[ngbDatepickerContent]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerContent, decorators: [{\n type: Directive,\n args: [{ selector: 'ng-template[ngbDatepickerContent]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\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 : { ...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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepicker, deps: [{ token: NgbDatepickerService }, { token: NgbCalendar }, { token: NgbDatepickerI18n }, { token: NgbDatepickerConfig }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: NgbDateAdapter }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });\nNgbDatepicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbDatepicker, selector: \"ngb-datepicker\", 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\" }, host: { properties: { \"class.disabled\": \"model.disabled\" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbDatepicker), multi: true }, NgbDatepickerService], queries: [{ propertyName: \"contentTemplate\", first: true, predicate: NgbDatepickerContent, descendants: true, static: true }], viewQueries: [{ propertyName: \"_defaultDayTemplate\", first: true, predicate: [\"defaultDayTemplate\"], descendants: true, static: true }, { propertyName: \"_contentEl\", first: true, predicate: [\"content\"], descendants: true, static: true }], exportAs: [\"ngbDatepicker\"], usesOnChanges: true, ngImport: i0, 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 `, isInline: true, styles: [\"ngb-datepicker{border:1px solid var(--bs-border-color);border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}ngb-datepicker.disabled .ngb-dp-weekday,ngb-datepicker.disabled .ngb-dp-week-number,ngb-datepicker.disabled .ngb-dp-month-name{color:var(--bs-text-muted)}.ngb-dp-body{z-index:1055}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:var(--bs-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:var(--bs-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\"], dependencies: [{ kind: \"directive\", type: i0.forwardRef(function () { return i2.NgForOf; }), selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i2.NgIf; }), selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i0.forwardRef(function () { return i2.NgTemplateOutlet; }), selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"component\", type: i0.forwardRef(function () { return NgbDatepickerMonth; }), selector: \"ngb-datepicker-month\", inputs: [\"month\"] }, { kind: \"component\", type: i0.forwardRef(function () { return NgbDatepickerNavigation; }), selector: \"ngb-datepicker-navigation\", inputs: [\"date\", \"disabled\", \"months\", \"showSelect\", \"prevDisabled\", \"nextDisabled\", \"selectBoxes\"], outputs: [\"navigate\", \"select\"] }, { kind: \"component\", type: i0.forwardRef(function () { return NgbDatepickerDayView; }), selector: \"[ngbDatepickerDayView]\", inputs: [\"currentMonth\", \"date\", \"disabled\", \"focused\", \"selected\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepicker, decorators: [{\n type: Component,\n args: [{ exportAs: 'ngbDatepicker', selector: 'ngb-datepicker', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { '[class.disabled]': 'model.disabled' }, 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 `, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbDatepicker), multi: true }, NgbDatepickerService], styles: [\"ngb-datepicker{border:1px solid var(--bs-border-color);border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}ngb-datepicker.disabled .ngb-dp-weekday,ngb-datepicker.disabled .ngb-dp-week-number,ngb-datepicker.disabled .ngb-dp-month-name{color:var(--bs-text-muted)}.ngb-dp-body{z-index:1055}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:var(--bs-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:var(--bs-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 }], ctorParameters: function () { return [{ type: NgbDatepickerService }, { type: NgbCalendar }, { type: NgbDatepickerI18n }, { type: NgbDatepickerConfig }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: NgbDateAdapter }, { type: i0.NgZone }]; }, propDecorators: { _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 }], 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 }], 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 }], navigate: [{\n type: Output\n }], dateSelect: [{\n type: Output\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerMonth, deps: [{ token: NgbDatepickerI18n }, { token: NgbDatepicker }, { token: NgbDatepickerKeyboardService }, { token: NgbDatepickerService }], target: i0.ɵɵFactoryTarget.Component });\nNgbDatepickerMonth.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbDatepickerMonth, selector: \"ngb-datepicker-month\", inputs: { month: \"month\" }, host: { attributes: { \"role\": \"grid\" }, listeners: { \"keydown\": \"onKeyDown($event)\" } }, ngImport: i0, 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 `, isInline: true, styles: [\"ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-light)}.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{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\"], dependencies: [{ kind: \"directive\", type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i2.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }], encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerMonth, decorators: [{\n type: Component,\n args: [{ selector: 'ngb-datepicker-month', host: { 'role': 'grid', '(keydown)': 'onKeyDown($event)' }, encapsulation: ViewEncapsulation.None, 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 `, styles: [\"ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-light)}.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{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 }], ctorParameters: function () { return [{ type: NgbDatepickerI18n }, { type: NgbDatepicker }, { type: NgbDatepickerKeyboardService }, { type: NgbDatepickerService }]; }, propDecorators: { month: [{\n type: Input\n }] } });\n\nconst isContainedIn = (element, array) => array ? array.some(item => item.contains(element)) : false;\nconst matchesSelectorIfAny = (element, selector) => !selector || closest(element, selector) != null;\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 = (() => {\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// 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;\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 /* eslint-disable-next-line deprecation/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 /* SOURCE.ESCAPE */)), closeableClicks$.pipe(map(_ => 1 /* SOURCE.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 /* eslint-disable-next-line deprecation/deprecation */\n filter(e => e.which === Key.Tab), 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\nconst placementSeparator = /\\s+/;\nconst spacesRegExp = / +/gi;\nconst startPrimaryPlacement = /^start/;\nconst endPrimaryPlacement = /^end/;\nconst startSecondaryPlacement = /-(top|left)$/;\nconst endSecondaryPlacement = /-(bottom|right)$/;\nfunction getPopperClassPlacement(placement) {\n const newPlacement = placement.replace(startPrimaryPlacement, 'left')\n .replace(endPrimaryPlacement, 'right')\n .replace(startSecondaryPlacement, '-start')\n .replace(endSecondaryPlacement, '-end');\n return newPlacement;\n}\nconst popperStartPrimaryPlacement = /^left/;\nconst popperEndPrimaryPlacement = /^right/;\nconst popperStartSecondaryPlacement = /^start/;\nconst popperEndSecondaryPlacement = /^end/;\nfunction getBootstrapBaseClassPlacement(baseClass, placement) {\n let [primary, secondary] = placement.split('-');\n const newPrimary = primary.replace(popperStartPrimaryPlacement, 'start').replace(popperEndPrimaryPlacement, 'end');\n let classnames = [newPrimary];\n if (secondary) {\n let newSecondary = secondary;\n if (primary === 'left' || primary === 'right') {\n newSecondary =\n newSecondary.replace(popperStartSecondaryPlacement, 'top').replace(popperEndSecondaryPlacement, 'bottom');\n }\n classnames.push(`${newPrimary}-${newSecondary}`);\n }\n if (baseClass) {\n classnames = classnames.map((classname) => `${baseClass}-${classname}`);\n }\n return classnames.join(' ');\n}\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', 'start', 'end',\n * 'top-start', 'top-end',\n * 'bottom-start', 'bottom-end',\n * 'start-top', 'start-bottom',\n * 'end-top', 'end-bottom'.\n * */\nfunction getPopperOptions({ placement, baseClass }) {\n let placementVals = Array.isArray(placement) ? placement : placement.split(placementSeparator);\n // No need to consider left and right here, as start and end are enough, and it is used for 'auto' placement only\n const allowedPlacements = [\n 'top', 'bottom', 'start', 'end', 'top-start', 'top-end', 'bottom-start', 'bottom-end', 'start-top', 'start-bottom',\n 'end-top', 'end-bottom'\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 const popperPlacements = placementVals.map((_placement) => { return getPopperClassPlacement(_placement); });\n let mainPlacement = popperPlacements.shift();\n const bsModifier = {\n name: 'bootstrapClasses',\n enabled: !!baseClass,\n phase: 'write',\n fn({ state }) {\n const bsClassRegExp = new RegExp(baseClass + '(-[a-z]+)*', 'gi');\n const popperElement = state.elements.popper;\n const popperPlacement = state.placement;\n let className = popperElement.className;\n // Remove old bootstrap classes\n className = className.replace(bsClassRegExp, '');\n // Add current placements\n className += ` ${getBootstrapBaseClassPlacement(baseClass, popperPlacement)}`;\n // Remove multiple spaces\n className = className.trim().replace(spacesRegExp, ' ');\n // Reassign\n popperElement.className = className;\n },\n };\n return {\n placement: mainPlacement,\n modifiers: [\n bsModifier,\n flip,\n preventOverflow,\n arrow,\n {\n enabled: true,\n name: 'flip',\n options: {\n fallbackPlacements: popperPlacements,\n },\n },\n {\n enabled: true,\n name: 'preventOverflow',\n phase: 'main',\n fn: function () { },\n },\n ]\n };\n}\nfunction noop(arg) {\n return arg;\n}\nfunction ngbPositioning() {\n let popperInstance = null;\n return {\n createPopper(positioningOption) {\n if (!popperInstance) {\n const updatePopperOptions = positioningOption.updatePopperOptions || noop;\n let popperOptions = updatePopperOptions(getPopperOptions(positioningOption));\n popperInstance =\n createPopperLite(positioningOption.hostElement, positioningOption.targetElement, popperOptions);\n }\n },\n update() {\n if (popperInstance) {\n popperInstance.update();\n }\n },\n setOptions(positioningOption) {\n if (popperInstance) {\n const updatePopperOptions = positioningOption.updatePopperOptions || noop;\n let popperOptions = updatePopperOptions(getPopperOptions(positioningOption));\n popperInstance.setOptions(popperOptions);\n }\n },\n destroy() {\n if (popperInstance) {\n popperInstance.destroy();\n popperInstance = null;\n }\n }\n };\n}\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-start', 'bottom-end', 'top-start', 'top-end'];\n this.restoreFocus = true;\n }\n}\nNgbInputDatepickerConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbInputDatepickerConfig, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nNgbInputDatepickerConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbInputDatepickerConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbInputDatepickerConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\nfunction addPopperOffset(offset$1) {\n return (options) => {\n options.modifiers.push(offset, {\n name: 'offset',\n options: {\n offset: () => offset$1,\n },\n });\n return options;\n };\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateParserFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgbDateParserFormatter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateParserFormatter, providedIn: 'root', useFactory: NGB_DATEPICKER_PARSER_FORMATTER_FACTORY });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateParserFormatter, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: NGB_DATEPICKER_PARSER_FORMATTER_FACTORY }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateISOParserFormatter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nNgbDateISOParserFormatter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateISOParserFormatter });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateISOParserFormatter, decorators: [{\n type: Injectable\n }] });\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, _ngZone, _calendar, _dateAdapter, _document, _changeDetector, config) {\n this._parserFormatter = _parserFormatter;\n this._elRef = _elRef;\n this._vcRef = _vcRef;\n this._renderer = _renderer;\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 this._positioning = ngbPositioning();\n this._destroyCloseHandlers$ = new Subject();\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 }\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 this._cRef = this._vcRef.createComponent(NgbDatepicker);\n this._applyPopupStyling(this._cRef.location.nativeElement);\n this._applyDatepickerInputs(this._cRef);\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 setTimeout(() => this._cRef?.instance.focus());\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 // Setting up popper and scheduling updates when zone is stable\n this._ngZone.runOutsideAngular(() => {\n if (this._cRef) {\n this._positioning.createPopper({\n hostElement,\n targetElement: this._cRef.location.nativeElement,\n placement: this.placement,\n appendToBody: this.container === 'body',\n updatePopperOptions: addPopperOffset([0, 2])\n });\n this._zoneSubscription = this._ngZone.onStable.subscribe(() => this._positioning.update());\n }\n });\n if (this.positionTarget && !hostElement) {\n throw new Error('ngbDatepicker could not find element declared in [positionTarget] to position against.');\n }\n this._setCloseHandlers();\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._positioning.destroy();\n this._zoneSubscription?.unsubscribe();\n this._destroyCloseHandlers$.next();\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 if (changes['autoClose'] && this.isOpen()) {\n this._setCloseHandlers();\n }\n }\n ngOnDestroy() { this.close(); }\n _applyDatepickerInputs(datepickerComponentRef) {\n ['dayTemplate', 'dayTemplateData', 'displayMonths', 'firstDayOfWeek', 'footerTemplate', 'markDisabled', 'minDate',\n 'maxDate', 'navigation', 'outsideDays', 'showNavigation', 'showWeekNumbers', 'weekdays']\n .forEach((inputName) => {\n if (this[inputName] !== undefined) {\n datepickerComponentRef.setInput(inputName, this[inputName]);\n }\n });\n datepickerComponentRef.setInput('startDate', this.startDate || this._model);\n }\n _applyPopupClass(newClass, oldClass) {\n const popupEl = this._cRef?.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 _setCloseHandlers() {\n this._destroyCloseHandlers$.next();\n ngbAutoClose(this._ngZone, this._document, this.autoClose, () => this.close(), this._destroyCloseHandlers$, [], [this._elRef.nativeElement, this._cRef.location.nativeElement]);\n }\n}\nNgbInputDatepicker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbInputDatepicker, deps: [{ token: NgbDateParserFormatter }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: NgbCalendar }, { token: NgbDateAdapter }, { token: DOCUMENT }, { token: i0.ChangeDetectorRef }, { token: NgbInputDatepickerConfig }], target: i0.ɵɵFactoryTarget.Directive });\nNgbInputDatepicker.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbInputDatepicker, selector: \"input[ngbDatepicker]\", inputs: { 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\", disabled: \"disabled\" }, outputs: { dateSelect: \"dateSelect\", navigate: \"navigate\", closed: \"closed\" }, host: { listeners: { \"input\": \"manualDateChange($event.target.value)\", \"change\": \"manualDateChange($event.target.value, true)\", \"focus\": \"onFocus()\", \"blur\": \"onBlur()\" }, properties: { \"disabled\": \"disabled\" } }, 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 ], exportAs: [\"ngbDatepicker\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbInputDatepicker, decorators: [{\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 }], ctorParameters: function () { return [{ type: NgbDateParserFormatter }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: NgbCalendar }, { type: NgbDateAdapter }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.ChangeDetectorRef }, { type: NgbInputDatepickerConfig }]; }, propDecorators: { 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 }], dateSelect: [{\n type: Output\n }], navigate: [{\n type: Output\n }], closed: [{\n type: Output\n }], disabled: [{\n type: Input\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarHijri, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nNgbCalendarHijri.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarHijri });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarHijri, decorators: [{\n type: Injectable\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarIslamicCivil, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nNgbCalendarIslamicCivil.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarIslamicCivil });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarIslamicCivil, decorators: [{\n type: Injectable\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarIslamicUmalqura, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nNgbCalendarIslamicUmalqura.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarIslamicUmalqura });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarIslamicUmalqura, decorators: [{\n type: Injectable\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarPersian, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nNgbCalendarPersian.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarPersian });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarPersian, decorators: [{\n type: Injectable\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarHebrew, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nNgbCalendarHebrew.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarHebrew });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarHebrew, decorators: [{\n type: Injectable\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerI18nHebrew, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nNgbDatepickerI18nHebrew.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerI18nHebrew });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerI18nHebrew, decorators: [{\n type: Injectable\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarBuddhist, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nNgbCalendarBuddhist.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarBuddhist });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbCalendarBuddhist, decorators: [{\n type: Injectable\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateNativeAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nNgbDateNativeAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateNativeAdapter });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateNativeAdapter, decorators: [{\n type: Injectable\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateNativeUTCAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nNgbDateNativeUTCAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateNativeUTCAdapter });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDateNativeUTCAdapter, decorators: [{\n type: Injectable\n }] });\n\nclass NgbDatepickerModule {\n}\nNgbDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerModule, declarations: [NgbDatepicker, NgbDatepickerContent, NgbDatepickerMonth, NgbDatepickerNavigation, NgbDatepickerNavigationSelect,\n NgbDatepickerDayView, NgbInputDatepicker], imports: [CommonModule, FormsModule], exports: [NgbDatepicker, NgbDatepickerContent, NgbInputDatepicker, NgbDatepickerMonth] });\nNgbDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerModule, imports: [CommonModule, FormsModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDatepickerModule, decorators: [{\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 }]\n }] });\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-start', 'bottom-end', 'top-start', 'top-end'];\n }\n}\nNgbDropdownConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdownConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgbDropdownConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdownConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdownConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\nclass NgbNavbar {\n}\nNgbNavbar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavbar, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nNgbNavbar.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbNavbar, selector: \".navbar\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavbar, decorators: [{\n type: Directive,\n args: [{ selector: '.navbar' }]\n }] });\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, _renderer) {\n this.elementRef = elementRef;\n this._renderer = _renderer;\n this._disabled = false;\n }\n set disabled(value) {\n this._disabled = value === '' || value === true; // accept an empty attribute as true\n // note: we don't use a host binding for disabled because when used on links, it fails because links don't have a\n // disabled property\n // setting the property using the renderer, OTOH, works fine in both cases.\n this._renderer.setProperty(this.elementRef.nativeElement, 'disabled', this._disabled);\n }\n get disabled() { return this._disabled; }\n}\nNgbDropdownItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdownItem, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });\nNgbDropdownItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbDropdownItem, selector: \"[ngbDropdownItem]\", inputs: { disabled: \"disabled\" }, host: { properties: { \"class.disabled\": \"disabled\", \"tabIndex\": \"disabled ? -1 : 0\" }, classAttribute: \"dropdown-item\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdownItem, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngbDropdownItem]',\n host: { 'class': 'dropdown-item', '[class.disabled]': 'disabled', '[tabIndex]': 'disabled ? -1 : 0' }\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdownMenu, deps: [{ token: forwardRef(() => NgbDropdown) }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbDropdownMenu.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbDropdownMenu, selector: \"[ngbDropdownMenu]\", host: { listeners: { \"keydown.ArrowUp\": \"dropdown.onKeyDown($event)\", \"keydown.ArrowDown\": \"dropdown.onKeyDown($event)\", \"keydown.Home\": \"dropdown.onKeyDown($event)\", \"keydown.End\": \"dropdown.onKeyDown($event)\", \"keydown.Enter\": \"dropdown.onKeyDown($event)\", \"keydown.Space\": \"dropdown.onKeyDown($event)\", \"keydown.Tab\": \"dropdown.onKeyDown($event)\", \"keydown.Shift.Tab\": \"dropdown.onKeyDown($event)\" }, properties: { \"class.dropdown-menu\": \"true\", \"class.show\": \"dropdown.isOpen()\" } }, queries: [{ propertyName: \"menuItems\", predicate: NgbDropdownItem }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdownMenu, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngbDropdownMenu]',\n host: {\n '[class.dropdown-menu]': 'true',\n '[class.show]': 'dropdown.isOpen()',\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 }], ctorParameters: function () { return [{ type: NgbDropdown, decorators: [{\n type: Inject,\n args: [forwardRef(() => NgbDropdown)]\n }] }, { type: i0.ElementRef }]; }, propDecorators: { 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdownAnchor, deps: [{ token: forwardRef(() => NgbDropdown) }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbDropdownAnchor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbDropdownAnchor, selector: \"[ngbDropdownAnchor]\", host: { properties: { \"attr.aria-expanded\": \"dropdown.isOpen()\" }, classAttribute: \"dropdown-toggle\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdownAnchor, decorators: [{\n type: Directive,\n args: [{ selector: '[ngbDropdownAnchor]', host: { 'class': 'dropdown-toggle', '[attr.aria-expanded]': 'dropdown.isOpen()' } }]\n }], ctorParameters: function () { return [{ type: NgbDropdown, decorators: [{\n type: Inject,\n args: [forwardRef(() => NgbDropdown)]\n }] }, { type: i0.ElementRef }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdownToggle, deps: [{ token: forwardRef(() => NgbDropdown) }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbDropdownToggle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbDropdownToggle, selector: \"[ngbDropdownToggle]\", host: { listeners: { \"click\": \"dropdown.toggle()\", \"keydown.ArrowUp\": \"dropdown.onKeyDown($event)\", \"keydown.ArrowDown\": \"dropdown.onKeyDown($event)\", \"keydown.Home\": \"dropdown.onKeyDown($event)\", \"keydown.End\": \"dropdown.onKeyDown($event)\", \"keydown.Tab\": \"dropdown.onKeyDown($event)\", \"keydown.Shift.Tab\": \"dropdown.onKeyDown($event)\" }, properties: { \"attr.aria-expanded\": \"dropdown.isOpen()\" }, classAttribute: \"dropdown-toggle\" }, providers: [{ provide: NgbDropdownAnchor, useExisting: forwardRef(() => NgbDropdownToggle) }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdownToggle, decorators: [{\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 }], ctorParameters: function () { return [{ type: NgbDropdown, decorators: [{\n type: Inject,\n args: [forwardRef(() => NgbDropdown)]\n }] }, { type: i0.ElementRef }]; } });\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._destroyCloseHandlers$ = new Subject();\n this._bodyContainer = null;\n this._positioning = ngbPositioning();\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 }\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.firstChange) {\n this._positioning.setOptions({\n hostElement: this._anchor.nativeElement,\n targetElement: this._bodyContainer || this._menu.nativeElement,\n placement: this.placement,\n appendToBody: this.container === 'body',\n });\n this._applyPlacementClasses();\n }\n if (changes.dropdownClass) {\n const { currentValue, previousValue } = changes.dropdownClass;\n this._applyCustomDropdownClass(currentValue, previousValue);\n }\n if (changes.autoClose && this._open) {\n this.autoClose = changes.autoClose.currentValue;\n this._setCloseHandlers();\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 if (this.display === 'dynamic') {\n this._ngZone.runOutsideAngular(() => {\n this._positioning.createPopper({\n hostElement: this._anchor.nativeElement,\n targetElement: this._bodyContainer || this._menu.nativeElement,\n placement: this.placement,\n appendToBody: this.container === 'body',\n updatePopperOptions: addPopperOffset([0, 2]),\n });\n this._applyPlacementClasses();\n this._zoneSubscription = this._ngZone.onStable.subscribe(() => this._positionMenu());\n });\n }\n }\n }\n }\n _setCloseHandlers() {\n this._destroyCloseHandlers$.next(); // destroy any existing close handlers\n ngbAutoClose(this._ngZone, this._document, this.autoClose, (source) => {\n this.close();\n if (source === 0 /* SOURCE.ESCAPE */) {\n this._anchor.nativeElement.focus();\n }\n }, this._destroyCloseHandlers$, 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._positioning.destroy();\n this._zoneSubscription?.unsubscribe();\n this._destroyCloseHandlers$.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() { this.close(); }\n onKeyDown(event) {\n /* eslint-disable-next-line deprecation/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 if (this.display === 'dynamic') {\n this._positioning.update();\n this._applyPlacementClasses();\n }\n else {\n this._applyPlacementClasses(this._getFirstPlacement(this.placement));\n }\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 }\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', '1055');\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 const { nativeElement } = menu;\n if (this.display === 'static') {\n menu.placement = null;\n renderer.setAttribute(nativeElement, 'data-bs-popper', 'static');\n }\n else {\n menu.placement = placement;\n renderer.removeAttribute(nativeElement, 'data-bs-popper');\n }\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdown, deps: [{ token: i0.ChangeDetectorRef }, { token: NgbDropdownConfig }, { token: DOCUMENT }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: NgbNavbar, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgbDropdown.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbDropdown, selector: \"[ngbDropdown]\", inputs: { autoClose: \"autoClose\", dropdownClass: \"dropdownClass\", _open: [\"open\", \"_open\"], placement: \"placement\", container: \"container\", display: \"display\" }, outputs: { openChange: \"openChange\" }, host: { properties: { \"class.show\": \"isOpen()\" } }, queries: [{ propertyName: \"_menu\", first: true, predicate: NgbDropdownMenu, descendants: true }, { propertyName: \"_anchor\", first: true, predicate: NgbDropdownAnchor, descendants: true }], exportAs: [\"ngbDropdown\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdown, decorators: [{\n type: Directive,\n args: [{ selector: '[ngbDropdown]', exportAs: 'ngbDropdown', host: { '[class.show]': 'isOpen()' } }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: NgbDropdownConfig }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: NgbNavbar, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { _menu: [{\n type: ContentChild,\n args: [NgbDropdownMenu, { static: false }]\n }], _anchor: [{\n type: ContentChild,\n args: [NgbDropdownAnchor, { static: false }]\n }], autoClose: [{\n type: Input\n }], dropdownClass: [{\n type: Input\n }], _open: [{\n type: Input,\n args: ['open']\n }], placement: [{\n type: Input\n }], container: [{\n type: Input\n }], display: [{\n type: Input\n }], openChange: [{\n type: Output\n }] } });\n\nconst NGB_DROPDOWN_DIRECTIVES = [NgbDropdown, NgbDropdownAnchor, NgbDropdownToggle, NgbDropdownMenu, NgbDropdownItem, NgbNavbar];\nclass NgbDropdownModule {\n}\nNgbDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdownModule, declarations: [NgbDropdown, NgbDropdownAnchor, NgbDropdownToggle, NgbDropdownMenu, NgbDropdownItem, NgbNavbar], exports: [NgbDropdown, NgbDropdownAnchor, NgbDropdownToggle, NgbDropdownMenu, NgbDropdownItem, NgbNavbar] });\nNgbDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdownModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbDropdownModule, decorators: [{\n type: NgModule,\n args: [{ declarations: NGB_DROPDOWN_DIRECTIVES, exports: NGB_DROPDOWN_DIRECTIVES }]\n }] });\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(_componentType, _injector, _viewContainerRef, _renderer, _ngZone, _applicationRef) {\n this._componentType = _componentType;\n this._injector = _injector;\n this._viewContainerRef = _viewContainerRef;\n this._renderer = _renderer;\n this._ngZone = _ngZone;\n this._applicationRef = _applicationRef;\n this._windowRef = null;\n this._contentRef = null;\n }\n open(content, templateContext, animation = false) {\n if (!this._windowRef) {\n this._contentRef = this._getContentRef(content, templateContext);\n this._windowRef = this._viewContainerRef.createComponent(this._componentType, { injector: this._injector, projectableNodes: 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 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 (this._contentRef?.viewRef) {\n this._applicationRef.detachView(this._contentRef.viewRef);\n this._contentRef.viewRef.destroy();\n this._contentRef = null;\n }\n }));\n }\n _getContentRef(content, templateContext) {\n if (!content) {\n return new ContentRef([]);\n }\n else if (content instanceof TemplateRef) {\n const viewRef = content.createEmbeddedView(templateContext);\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\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModalBackdrop, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });\nNgbModalBackdrop.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbModalBackdrop, selector: \"ngb-modal-backdrop\", inputs: { animation: \"animation\", backdropClass: \"backdropClass\" }, host: { properties: { \"class\": \"\\\"modal-backdrop\\\" + (backdropClass ? \\\" \\\" + backdropClass : \\\"\\\")\", \"class.show\": \"!animation\", \"class.fade\": \"animation\" }, styleAttribute: \"z-index: 1055\" }, ngImport: i0, template: '', isInline: true, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModalBackdrop, decorators: [{\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: 1055'\n }\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { 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 (isPromise(dismiss)) {\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 get fullscreenClass() {\n return this.fullscreen === true ? ' modal-fullscreen' :\n isString(this.fullscreen) ? ` modal-fullscreen-${this.fullscreen}-down` : '';\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 /* eslint-disable-next-line deprecation/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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModalWindow, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });\nNgbModalWindow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbModalWindow, selector: \"ngb-modal-window\", inputs: { animation: \"animation\", ariaLabelledBy: \"ariaLabelledBy\", ariaDescribedBy: \"ariaDescribedBy\", backdrop: \"backdrop\", centered: \"centered\", fullscreen: \"fullscreen\", keyboard: \"keyboard\", scrollable: \"scrollable\", size: \"size\", windowClass: \"windowClass\", modalDialogClass: \"modalDialogClass\" }, outputs: { dismissEvent: \"dismiss\" }, host: { attributes: { \"role\": \"dialog\", \"tabindex\": \"-1\" }, properties: { \"class\": \"\\\"modal d-block\\\" + (windowClass ? \\\" \\\" + windowClass : \\\"\\\")\", \"class.fade\": \"animation\", \"attr.aria-modal\": \"true\", \"attr.aria-labelledby\": \"ariaLabelledBy\", \"attr.aria-describedby\": \"ariaDescribedBy\" } }, viewQueries: [{ propertyName: \"_dialogEl\", first: true, predicate: [\"dialog\"], descendants: true, static: true }], ngImport: i0, template: `\n <div #dialog [class]=\"'modal-dialog' + (size ? ' modal-' + size : '') + (centered ? ' modal-dialog-centered' : '') +\n fullscreenClass + (scrollable ? ' modal-dialog-scrollable' : '') + (modalDialogClass ? ' ' + modalDialogClass : '')\" role=\"document\">\n <div class=\"modal-content\"><ng-content></ng-content></div>\n </div>\n `, isInline: true, styles: [\"ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\\n\"], encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModalWindow, decorators: [{\n type: Component,\n args: [{ selector: 'ngb-modal-window', 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 }, template: `\n <div #dialog [class]=\"'modal-dialog' + (size ? ' modal-' + size : '') + (centered ? ' modal-dialog-centered' : '') +\n fullscreenClass + (scrollable ? ' modal-dialog-scrollable' : '') + (modalDialogClass ? ' ' + modalDialogClass : '')\" role=\"document\">\n <div class=\"modal-content\"><ng-content></ng-content></div>\n </div>\n `, encapsulation: ViewEncapsulation.None, styles: [\"ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\\n\"] }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { _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 }], backdrop: [{\n type: Input\n }], centered: [{\n type: Input\n }], fullscreen: [{\n type: Input\n }], keyboard: [{\n type: Input\n }], scrollable: [{\n type: Input\n }], size: [{\n type: Input\n }], windowClass: [{\n type: Input\n }], modalDialogClass: [{\n type: Input\n }], dismissEvent: [{\n type: Output,\n args: ['dismiss']\n }] } });\n\n/**\n * Utility to handle the scrollbar.\n *\n * It allows to hide the scrollbar and compensate the lack of a vertical scrollbar\n * by adding an equivalent padding on the right of the body, and to revert this change.\n */\nclass ScrollBar {\n constructor(_document) {\n this._document = _document;\n }\n /**\n * To be called to hide a potential vertical scrollbar:\n * - if a scrollbar is there and has a width greater than 0, adds some compensation\n * padding to the body to keep the same layout as when the scrollbar is there\n * - adds overflow: hidden\n *\n * @return a callback used to revert the change\n */\n hide() {\n const scrollbarWidth = Math.abs(window.innerWidth - this._document.documentElement.clientWidth);\n const body = this._document.body;\n const bodyStyle = body.style;\n const { overflow, paddingRight } = bodyStyle;\n if (scrollbarWidth > 0) {\n const actualPadding = parseFloat(window.getComputedStyle(body).paddingRight);\n bodyStyle.paddingRight = `${actualPadding + scrollbarWidth}px`;\n }\n bodyStyle.overflow = 'hidden';\n return () => {\n if (scrollbarWidth > 0) {\n bodyStyle.paddingRight = paddingRight;\n }\n bodyStyle.overflow = overflow;\n };\n }\n}\nScrollBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: ScrollBar, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nScrollBar.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: ScrollBar, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: ScrollBar, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\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._scrollBarRestoreFn = null;\n this._backdropAttributes = ['animation', 'backdropClass'];\n this._modalRefs = [];\n this._windowAttributes = [\n 'animation', 'ariaLabelledBy', 'ariaDescribedBy', 'backdrop', 'centered', 'fullscreen', 'keyboard', 'scrollable',\n 'size', '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 _restoreScrollBar() {\n const scrollBarRestoreFn = this._scrollBarRestoreFn;\n if (scrollBarRestoreFn) {\n this._scrollBarRestoreFn = null;\n scrollBarRestoreFn();\n }\n }\n _hideScrollBar() {\n if (!this._scrollBarRestoreFn) {\n this._scrollBarRestoreFn = this._scrollBar.hide();\n }\n }\n open(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 if (!containerEl) {\n throw new Error(`The specified modal container \"${options.container || 'body'}\" was not found in the DOM.`);\n }\n this._hideScrollBar();\n const activeModal = new NgbActiveModal();\n const contentRef = this._getContentRef(options.injector || contentInjector, content, activeModal, options);\n let backdropCmptRef = options.backdrop !== false ? this._attachBackdrop(containerEl) : undefined;\n let windowCmptRef = this._attachWindowComponent(containerEl, contentRef.nodes);\n let ngbModalRef = new NgbModalRef(windowCmptRef, contentRef, backdropCmptRef, options.beforeDismiss);\n this._registerModalRef(ngbModalRef);\n this._registerWindowCmpt(windowCmptRef);\n // We have to cleanup DOM after the last modal when BOTH 'hidden' was emitted and 'result' promise was resolved:\n // - with animations OFF, 'hidden' emits synchronously, then 'result' is resolved asynchronously\n // - with animations ON, 'result' is resolved asynchronously, then 'hidden' emits asynchronously\n ngbModalRef.hidden.pipe(take(1)).subscribe(() => Promise.resolve(true).then(() => {\n if (!this._modalRefs.length) {\n renderer.removeClass(this._document.body, 'modal-open');\n this._restoreScrollBar();\n this._revertAriaHidden();\n }\n }));\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(containerEl) {\n let backdropCmptRef = createComponent(NgbModalBackdrop, { environmentInjector: this._applicationRef.injector, elementInjector: this._injector });\n this._applicationRef.attachView(backdropCmptRef.hostView);\n containerEl.appendChild(backdropCmptRef.location.nativeElement);\n return backdropCmptRef;\n }\n _attachWindowComponent(containerEl, projectableNodes) {\n let windowCmptRef = createComponent(NgbModalWindow, { environmentInjector: this._applicationRef.injector, elementInjector: this._injector, projectableNodes });\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(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(contentInjector, content, activeModal, options);\n }\n }\n _createFromTemplateRef(templateRef, activeModal) {\n const context = {\n $implicit: activeModal,\n close(result) { activeModal.close(result); },\n dismiss(reason) { activeModal.dismiss(reason); }\n };\n const viewRef = templateRef.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(contentInjector, componentType, context, options) {\n const elementInjector = Injector.create({ providers: [{ provide: NgbActiveModal, useValue: context }], parent: contentInjector });\n const componentRef = createComponent(componentType, { environmentInjector: this._applicationRef.injector, elementInjector });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModalStack, deps: [{ token: i0.ApplicationRef }, { token: i0.Injector }, { token: DOCUMENT }, { token: ScrollBar }, { token: i0.RendererFactory2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbModalStack.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModalStack, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModalStack, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i0.ApplicationRef }, { type: i0.Injector }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: ScrollBar }, { type: i0.RendererFactory2 }, { type: i0.NgZone }]; } });\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.fullscreen = false;\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModalConfig, deps: [{ token: NgbConfig }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbModalConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModalConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModalConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: NgbConfig }]; } });\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(_injector, _modalStack, _config) {\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 = { ...this._config, animation: this._config.animation, ...options };\n return this._modalStack.open(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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModal, deps: [{ token: i0.Injector }, { token: NgbModalStack }, { token: NgbModalConfig }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbModal.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModal, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModal, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i0.Injector }, { type: NgbModalStack }, { type: NgbModalConfig }]; } });\n\nclass NgbModalModule {\n}\nNgbModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModalModule, declarations: [NgbModalBackdrop, NgbModalWindow] });\nNgbModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModalModule, providers: [NgbModal] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModalModule, decorators: [{\n type: NgModule,\n args: [{ declarations: [NgbModalBackdrop, NgbModalWindow], providers: [NgbModal] }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavConfig, deps: [{ token: NgbConfig }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbNavConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: NgbConfig }]; } });\n\nconst isValidNavId = (id) => isDefined(id) && id !== '';\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavContent, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbNavContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbNavContent, selector: \"ng-template[ngbNavContent]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavContent, decorators: [{\n type: Directive,\n args: [{ selector: 'ng-template[ngbNavContent]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\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._nav = _nav;\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 }\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavItem, deps: [{ token: forwardRef(() => NgbNav) }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbNavItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbNavItem, selector: \"[ngbNavItem]\", inputs: { destroyOnHide: \"destroyOnHide\", disabled: \"disabled\", domId: \"domId\", _id: [\"ngbNavItem\", \"_id\"] }, outputs: { shown: \"shown\", hidden: \"hidden\" }, host: { properties: { \"class.nav-item\": \"true\" } }, queries: [{ propertyName: \"contentTpls\", predicate: NgbNavContent }], exportAs: [\"ngbNavItem\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavItem, decorators: [{\n type: Directive,\n args: [{ selector: '[ngbNavItem]', exportAs: 'ngbNavItem', host: { '[class.nav-item]': 'true' } }]\n }], ctorParameters: function () { return [{ type: NgbNav, decorators: [{\n type: Inject,\n args: [forwardRef(() => NgbNav)]\n }] }, { type: i0.ElementRef }]; }, propDecorators: { destroyOnHide: [{\n type: Input\n }], disabled: [{\n type: Input\n }], domId: [{\n type: Input\n }], _id: [{\n type: Input,\n args: ['ngbNavItem']\n }], shown: [{\n type: Output\n }], hidden: [{\n type: Output\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 /* eslint-disable-next-line deprecation/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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNav, deps: [{ token: 'role', attribute: true }, { token: NgbNavConfig }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });\nNgbNav.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbNav, selector: \"[ngbNav]\", inputs: { activeId: \"activeId\", animation: \"animation\", destroyOnHide: \"destroyOnHide\", orientation: \"orientation\", roles: \"roles\", keyboard: \"keyboard\" }, outputs: { activeIdChange: \"activeIdChange\", shown: \"shown\", hidden: \"hidden\", navChange: \"navChange\" }, host: { listeners: { \"keydown.arrowLeft\": \"onKeyDown($event)\", \"keydown.arrowRight\": \"onKeyDown($event)\", \"keydown.arrowDown\": \"onKeyDown($event)\", \"keydown.arrowUp\": \"onKeyDown($event)\", \"keydown.Home\": \"onKeyDown($event)\", \"keydown.End\": \"onKeyDown($event)\" }, properties: { \"class.nav\": \"true\", \"class.flex-column\": \"orientation === 'vertical'\", \"attr.aria-orientation\": \"orientation === 'vertical' && roles === 'tablist' ? 'vertical' : undefined\", \"attr.role\": \"role ? role : roles ? 'tablist' : undefined\" } }, queries: [{ propertyName: \"items\", predicate: NgbNavItem }, { propertyName: \"links\", predicate: i0.forwardRef(function () { return NgbNavLink; }), descendants: true }], exportAs: [\"ngbNav\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNav, decorators: [{\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 }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Attribute,\n args: ['role']\n }] }, { type: NgbNavConfig }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, propDecorators: { activeId: [{\n type: Input\n }], activeIdChange: [{\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 }], shown: [{\n type: Output\n }], hidden: [{\n type: Output\n }], items: [{\n type: ContentChildren,\n args: [NgbNavItem]\n }], links: [{\n type: ContentChildren,\n args: [forwardRef(() => NgbNavLink), { descendants: true }]\n }], navChange: [{\n type: Output\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavLink, deps: [{ token: 'role', attribute: true }, { token: NgbNavItem }, { token: NgbNav }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbNavLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbNavLink, selector: \"a[ngbNavLink]\", host: { attributes: { \"href\": \"\" }, listeners: { \"click\": \"nav.click(navItem); $event.preventDefault()\" }, properties: { \"id\": \"navItem.domId\", \"class.nav-link\": \"true\", \"class.nav-item\": \"hasNavItemClass()\", \"attr.role\": \"role ? role : nav.roles ? 'tab' : undefined\", \"class.active\": \"navItem.active\", \"class.disabled\": \"navItem.disabled\", \"attr.tabindex\": \"navItem.disabled ? -1 : undefined\", \"attr.aria-controls\": \"navItem.isPanelInDom() ? navItem.panelDomId : null\", \"attr.aria-selected\": \"navItem.active\", \"attr.aria-disabled\": \"navItem.disabled\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavLink, decorators: [{\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 }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Attribute,\n args: ['role']\n }] }, { type: NgbNavItem }, { type: NgbNav }, { type: i0.ElementRef }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavPane, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbNavPane.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbNavPane, selector: \"[ngbNavPane]\", inputs: { item: \"item\", nav: \"nav\", role: \"role\" }, host: { properties: { \"id\": \"item.panelDomId\", \"class.fade\": \"nav.animation\", \"attr.role\": \"role ? role : nav.roles ? \\\"tabpanel\\\" : undefined\", \"attr.aria-labelledby\": \"item.domId\" }, classAttribute: \"tab-pane\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavPane, decorators: [{\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 }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { 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) { return this._activePane?.item === item; }\n ngAfterViewInit() {\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(this._activePane?.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 const activeItem = this._activePane?.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 this._activePane = this._getActivePane();\n this._activePane?.elRef.nativeElement.classList.add('show');\n this._activePane?.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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavOutlet, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });\nNgbNavOutlet.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbNavOutlet, selector: \"[ngbNavOutlet]\", inputs: { paneRole: \"paneRole\", nav: [\"ngbNavOutlet\", \"nav\"] }, host: { properties: { \"class.tab-content\": \"true\" } }, viewQueries: [{ propertyName: \"_panes\", predicate: NgbNavPane, descendants: true }], ngImport: i0, 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 `, isInline: true, dependencies: [{ kind: \"directive\", type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i2.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: NgbNavPane, selector: \"[ngbNavPane]\", inputs: [\"item\", \"nav\", \"role\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavOutlet, decorators: [{\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 }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }]; }, propDecorators: { _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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbNavModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavModule, declarations: [NgbNavContent, NgbNav, NgbNavItem, NgbNavLink, NgbNavOutlet, NgbNavPane], imports: [CommonModule], exports: [NgbNavContent, NgbNav, NgbNavItem, NgbNavLink, NgbNavOutlet, NgbNavPane] });\nNgbNavModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbNavModule, decorators: [{\n type: NgModule,\n args: [{ declarations: NGB_NAV_DIRECTIVES, exports: NGB_NAV_DIRECTIVES, imports: [CommonModule] }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgbPaginationConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationEllipsis, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbPaginationEllipsis.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbPaginationEllipsis, selector: \"ng-template[ngbPaginationEllipsis]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationEllipsis, decorators: [{\n type: Directive,\n args: [{ selector: 'ng-template[ngbPaginationEllipsis]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationFirst, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbPaginationFirst.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbPaginationFirst, selector: \"ng-template[ngbPaginationFirst]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationFirst, decorators: [{\n type: Directive,\n args: [{ selector: 'ng-template[ngbPaginationFirst]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationLast, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbPaginationLast.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbPaginationLast, selector: \"ng-template[ngbPaginationLast]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationLast, decorators: [{\n type: Directive,\n args: [{ selector: 'ng-template[ngbPaginationLast]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationNext, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbPaginationNext.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbPaginationNext, selector: \"ng-template[ngbPaginationNext]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationNext, decorators: [{\n type: Directive,\n args: [{ selector: 'ng-template[ngbPaginationNext]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationNumber, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbPaginationNumber.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbPaginationNumber, selector: \"ng-template[ngbPaginationNumber]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationNumber, decorators: [{\n type: Directive,\n args: [{ selector: 'ng-template[ngbPaginationNumber]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationPrevious, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbPaginationPrevious.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbPaginationPrevious, selector: \"ng-template[ngbPaginationPrevious]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationPrevious, decorators: [{\n type: Directive,\n args: [{ selector: 'ng-template[ngbPaginationPrevious]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationPages, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbPaginationPages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbPaginationPages, selector: \"ng-template[ngbPaginationPages]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationPages, decorators: [{\n type: Directive,\n args: [{ selector: 'ng-template[ngbPaginationPages]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPagination, deps: [{ token: NgbPaginationConfig }], target: i0.ɵɵFactoryTarget.Component });\nNgbPagination.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbPagination, selector: \"ngb-pagination\", inputs: { disabled: \"disabled\", boundaryLinks: \"boundaryLinks\", directionLinks: \"directionLinks\", ellipses: \"ellipses\", rotate: \"rotate\", collectionSize: \"collectionSize\", maxSize: \"maxSize\", page: \"page\", pageSize: \"pageSize\", size: \"size\" }, outputs: { pageChange: \"pageChange\" }, host: { attributes: { \"role\": \"navigation\" } }, queries: [{ propertyName: \"tplEllipsis\", first: true, predicate: NgbPaginationEllipsis, descendants: true }, { propertyName: \"tplFirst\", first: true, predicate: NgbPaginationFirst, descendants: true }, { propertyName: \"tplLast\", first: true, predicate: NgbPaginationLast, descendants: true }, { propertyName: \"tplNext\", first: true, predicate: NgbPaginationNext, descendants: true }, { propertyName: \"tplNumber\", first: true, predicate: NgbPaginationNumber, descendants: true }, { propertyName: \"tplPrevious\", first: true, predicate: NgbPaginationPrevious, descendants: true }, { propertyName: \"tplPages\", first: true, predicate: NgbPaginationPages, descendants: true }], usesOnChanges: true, ngImport: i0, template: `\n <ng-template #first><span aria-hidden=\"true\" i18n=\"@@ngb.pagination.first\">««</span></ng-template>\n <ng-template #previous><span aria-hidden=\"true\" i18n=\"@@ngb.pagination.previous\">«</span></ng-template>\n <ng-template #next><span aria-hidden=\"true\" i18n=\"@@ngb.pagination.next\">»</span></ng-template>\n <ng-template #last><span aria-hidden=\"true\" i18n=\"@@ngb.pagination.last\">»»</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=\"visually-hidden\">(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 `, isInline: true, dependencies: [{ kind: \"directive\", type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i2.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPagination, decorators: [{\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\">««</span></ng-template>\n <ng-template #previous><span aria-hidden=\"true\" i18n=\"@@ngb.pagination.previous\">«</span></ng-template>\n <ng-template #next><span aria-hidden=\"true\" i18n=\"@@ngb.pagination.next\">»</span></ng-template>\n <ng-template #last><span aria-hidden=\"true\" i18n=\"@@ngb.pagination.last\">»»</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=\"visually-hidden\">(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 }], ctorParameters: function () { return [{ type: NgbPaginationConfig }]; }, propDecorators: { 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 }], disabled: [{\n type: Input\n }], boundaryLinks: [{\n type: Input\n }], directionLinks: [{\n type: Input\n }], ellipses: [{\n type: Input\n }], rotate: [{\n type: Input\n }], collectionSize: [{\n type: Input\n }], maxSize: [{\n type: Input\n }], page: [{\n type: Input\n }], pageSize: [{\n type: Input\n }], pageChange: [{\n type: Output\n }], size: [{\n type: Input\n }] } });\n\nconst DIRECTIVES = [\n NgbPagination, NgbPaginationEllipsis, NgbPaginationFirst, NgbPaginationLast, NgbPaginationNext, NgbPaginationNumber,\n NgbPaginationPrevious, NgbPaginationPages\n];\nclass NgbPaginationModule {\n}\nNgbPaginationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbPaginationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationModule, declarations: [NgbPagination, NgbPaginationEllipsis, NgbPaginationFirst, NgbPaginationLast, NgbPaginationNext, NgbPaginationNumber,\n NgbPaginationPrevious, NgbPaginationPages], imports: [CommonModule], exports: [NgbPagination, NgbPaginationEllipsis, NgbPaginationFirst, NgbPaginationLast, NgbPaginationNext, NgbPaginationNumber,\n NgbPaginationPrevious, NgbPaginationPages] });\nNgbPaginationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPaginationModule, decorators: [{\n type: NgModule,\n args: [{ declarations: DIRECTIVES, exports: DIRECTIVES, imports: [CommonModule] }]\n }] });\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;\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPopoverConfig, deps: [{ token: NgbConfig }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbPopoverConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPopoverConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPopoverConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: NgbConfig }]; } });\n\nlet nextId$1 = 0;\nclass NgbPopoverWindow {\n isTitleTemplate() { return this.title instanceof TemplateRef; }\n}\nNgbPopoverWindow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPopoverWindow, deps: [], target: i0.ɵɵFactoryTarget.Component });\nNgbPopoverWindow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbPopoverWindow, selector: \"ngb-popover-window\", inputs: { animation: \"animation\", title: \"title\", id: \"id\", popoverClass: \"popoverClass\", context: \"context\" }, host: { attributes: { \"role\": \"tooltip\" }, properties: { \"class\": \"\\\"popover\\\" + (popoverClass ? \\\" \\\" + popoverClass : \\\"\\\")\", \"class.fade\": \"animation\", \"id\": \"id\" } }, ngImport: i0, template: `\n <div class=\"popover-arrow\" data-popper-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>`, isInline: true, dependencies: [{ kind: \"directive\", type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i2.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPopoverWindow, decorators: [{\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=\"popover-arrow\" data-popper-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 }]\n }], propDecorators: { 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, 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._positioning = ngbPositioning();\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, applicationRef);\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.setInput('animation', this.animation);\n this._windowRef.setInput('title', this.popoverTitle);\n this._windowRef.setInput('context', context);\n this._windowRef.setInput('popoverClass', this.popoverClass);\n this._windowRef.setInput('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 // Setting up popper and scheduling updates when zone is stable\n this._ngZone.runOutsideAngular(() => {\n this._positioning.createPopper({\n hostElement: this._elementRef.nativeElement,\n targetElement: this._windowRef.location.nativeElement,\n placement: this.placement,\n appendToBody: this.container === 'body',\n baseClass: 'bs-popover',\n updatePopperOptions: addPopperOffset([0, 8]),\n });\n Promise.resolve().then(() => {\n // This update is required for correct arrow placement\n this._positioning.update();\n this._zoneSubscription = this._ngZone.onStable.subscribe(() => this._positioning.update());\n });\n });\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(animation = this.animation) {\n if (this._windowRef) {\n this._renderer.removeAttribute(this._elementRef.nativeElement, 'aria-describedby');\n this._popupService.close(animation).subscribe(() => {\n this._windowRef = null;\n this._positioning.destroy();\n this._zoneSubscription?.unsubscribe();\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(false);\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 this._unregisterListenersFn?.();\n }\n}\nNgbPopover.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPopover, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: i0.ViewContainerRef }, { token: NgbPopoverConfig }, { token: i0.NgZone }, { token: DOCUMENT }, { token: i0.ChangeDetectorRef }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbPopover.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbPopover, selector: \"[ngbPopover]\", inputs: { animation: \"animation\", autoClose: \"autoClose\", ngbPopover: \"ngbPopover\", popoverTitle: \"popoverTitle\", placement: \"placement\", triggers: \"triggers\", container: \"container\", disablePopover: \"disablePopover\", popoverClass: \"popoverClass\", openDelay: \"openDelay\", closeDelay: \"closeDelay\" }, outputs: { shown: \"shown\", hidden: \"hidden\" }, exportAs: [\"ngbPopover\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPopover, decorators: [{\n type: Directive,\n args: [{ selector: '[ngbPopover]', exportAs: 'ngbPopover' }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.Injector }, { type: i0.ViewContainerRef }, { type: NgbPopoverConfig }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.ChangeDetectorRef }, { type: i0.ApplicationRef }]; }, propDecorators: { animation: [{\n type: Input\n }], autoClose: [{\n type: Input\n }], ngbPopover: [{\n type: Input\n }], popoverTitle: [{\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 }], shown: [{\n type: Output\n }], hidden: [{\n type: Output\n }] } });\n\nclass NgbPopoverModule {\n}\nNgbPopoverModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPopoverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbPopoverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPopoverModule, declarations: [NgbPopover, NgbPopoverWindow], imports: [CommonModule], exports: [NgbPopover] });\nNgbPopoverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPopoverModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbPopoverModule, decorators: [{\n type: NgModule,\n args: [{ declarations: [NgbPopover, NgbPopoverWindow], exports: [NgbPopover], imports: [CommonModule] }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbProgressbarConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgbProgressbarConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbProgressbarConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbProgressbarConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbProgressbar, deps: [{ token: NgbProgressbarConfig }], target: i0.ɵɵFactoryTarget.Component });\nNgbProgressbar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbProgressbar, selector: \"ngb-progressbar\", inputs: { max: \"max\", animated: \"animated\", striped: \"striped\", showValue: \"showValue\", textType: \"textType\", type: \"type\", value: \"value\", height: \"height\" }, host: { properties: { \"style.height\": \"this.height\" }, classAttribute: \"progress\" }, ngImport: i0, 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 `, isInline: true, dependencies: [{ kind: \"directive\", type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"pipe\", type: i2.PercentPipe, name: \"percent\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbProgressbar, decorators: [{\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 }], ctorParameters: function () { return [{ type: NgbProgressbarConfig }]; }, propDecorators: { max: [{\n type: Input\n }], animated: [{\n type: Input\n }], striped: [{\n type: Input\n }], showValue: [{\n type: Input\n }], textType: [{\n type: Input\n }], type: [{\n type: Input\n }], value: [{\n type: Input\n }], height: [{\n type: Input\n }, {\n type: HostBinding,\n args: ['style.height']\n }] } });\n\nclass NgbProgressbarModule {\n}\nNgbProgressbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbProgressbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbProgressbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbProgressbarModule, declarations: [NgbProgressbar], imports: [CommonModule], exports: [NgbProgressbar] });\nNgbProgressbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbProgressbarModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbProgressbarModule, decorators: [{\n type: NgModule,\n args: [{ declarations: [NgbProgressbar], exports: [NgbProgressbar], imports: [CommonModule] }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbRatingConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgbRatingConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbRatingConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbRatingConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\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 rating is changed.\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 /* eslint-disable-next-line deprecation/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 if (changes['max']) {\n this._updateMax();\n }\n }\n ngOnInit() {\n this._setupContexts();\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 _updateMax() {\n if (this.max > 0) {\n this._setupContexts();\n this.update(this.rate);\n }\n }\n _setupContexts() { this.contexts = Array.from({ length: this.max }, (v, k) => ({ fill: 0, index: k })); }\n}\nNgbRating.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbRating, deps: [{ token: NgbRatingConfig }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nNgbRating.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbRating, selector: \"ngb-rating\", inputs: { max: \"max\", rate: \"rate\", readonly: \"readonly\", resettable: \"resettable\", starTemplate: \"starTemplate\" }, outputs: { hover: \"hover\", leave: \"leave\", rateChange: \"rateChange\" }, host: { attributes: { \"role\": \"slider\", \"aria-valuemin\": \"0\" }, listeners: { \"blur\": \"handleBlur()\", \"keydown\": \"handleKeyDown($event)\", \"mouseleave\": \"reset()\" }, properties: { \"tabindex\": \"disabled ? -1 : 0\", \"attr.aria-valuemax\": \"max\", \"attr.aria-valuenow\": \"nextRate\", \"attr.aria-valuetext\": \"ariaValueText()\", \"attr.aria-disabled\": \"readonly ? true : null\" }, classAttribute: \"d-inline-flex\" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbRating), multi: true }], queries: [{ propertyName: \"starTemplateFromContent\", first: true, predicate: TemplateRef, descendants: true }], usesOnChanges: true, ngImport: i0, template: `\n <ng-template #t let-fill=\"fill\">{{ fill === 100 ? '★' : '☆' }}</ng-template>\n <ng-template ngFor [ngForOf]=\"contexts\" let-index=\"index\">\n <span class=\"visually-hidden\">({{ 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 `, isInline: true, dependencies: [{ kind: \"directive\", type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i2.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbRating, decorators: [{\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 ? '★' : '☆' }}</ng-template>\n <ng-template ngFor [ngForOf]=\"contexts\" let-index=\"index\">\n <span class=\"visually-hidden\">({{ 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 }], ctorParameters: function () { return [{ type: NgbRatingConfig }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { max: [{\n type: Input\n }], rate: [{\n type: Input\n }], readonly: [{\n type: Input\n }], resettable: [{\n type: Input\n }], starTemplate: [{\n type: Input\n }], starTemplateFromContent: [{\n type: ContentChild,\n args: [TemplateRef, { static: false }]\n }], hover: [{\n type: Output\n }], leave: [{\n type: Output\n }], rateChange: [{\n type: Output\n }] } });\n\nclass NgbRatingModule {\n}\nNgbRatingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbRatingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbRatingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbRatingModule, declarations: [NgbRating], imports: [CommonModule], exports: [NgbRating] });\nNgbRatingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbRatingModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbRatingModule, decorators: [{\n type: NgModule,\n args: [{ declarations: [NgbRating], exports: [NgbRating], imports: [CommonModule] }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimepickerConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgbTimepickerConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimepickerConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimepickerConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimeAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgbTimeAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimeAdapter, providedIn: 'root', useFactory: NGB_DATEPICKER_TIME_ADAPTER_FACTORY });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimeAdapter, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: NGB_DATEPICKER_TIME_ADAPTER_FACTORY }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimeStructAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\nNgbTimeStructAdapter.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimeStructAdapter });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimeStructAdapter, decorators: [{\n type: Injectable\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimepickerI18n, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgbTimepickerI18n.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimepickerI18n, providedIn: 'root', useFactory: NGB_TIMEPICKER_I18N_FACTORY, deps: [{ token: LOCALE_ID }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimepickerI18n, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: NGB_TIMEPICKER_I18N_FACTORY, deps: [LOCALE_ID] }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimepickerI18nDefault, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbTimepickerI18nDefault.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimepickerI18nDefault });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimepickerI18nDefault, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; } });\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 ? this.model.hour >= 12 : false;\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimepicker, deps: [{ token: NgbTimepickerConfig }, { token: NgbTimeAdapter }, { token: i0.ChangeDetectorRef }, { token: NgbTimepickerI18n }], target: i0.ɵɵFactoryTarget.Component });\nNgbTimepicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbTimepicker, selector: \"ngb-timepicker\", inputs: { meridian: \"meridian\", spinners: \"spinners\", seconds: \"seconds\", hourStep: \"hourStep\", minuteStep: \"minuteStep\", secondStep: \"secondStep\", readonlyInputs: \"readonlyInputs\", size: \"size\" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbTimepicker), multi: true }], usesOnChanges: true, ngImport: i0, 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=\"visually-hidden\" 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=\"visually-hidden\" 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=\"visually-hidden\" 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=\"visually-hidden\" 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=\"visually-hidden\" 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=\"visually-hidden\" 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 `, isInline: true, 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-minute,.ngb-tp-second,.ngb-tp-meridian{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}\\n\"], dependencies: [{ kind: \"directive\", type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimepicker, decorators: [{\n type: Component,\n args: [{ selector: 'ngb-timepicker', encapsulation: ViewEncapsulation.None, 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=\"visually-hidden\" 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=\"visually-hidden\" 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=\"visually-hidden\" 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=\"visually-hidden\" 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=\"visually-hidden\" 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=\"visually-hidden\" 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 `, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbTimepicker), multi: true }], 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-minute,.ngb-tp-second,.ngb-tp-meridian{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}\\n\"] }]\n }], ctorParameters: function () { return [{ type: NgbTimepickerConfig }, { type: NgbTimeAdapter }, { type: i0.ChangeDetectorRef }, { type: NgbTimepickerI18n }]; }, propDecorators: { 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbTimepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimepickerModule, declarations: [NgbTimepicker], imports: [CommonModule], exports: [NgbTimepicker] });\nNgbTimepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimepickerModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTimepickerModule, decorators: [{\n type: NgModule,\n args: [{ declarations: [NgbTimepicker], exports: [NgbTimepicker], imports: [CommonModule] }]\n }] });\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 * 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 = 5000;\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbToastConfig, deps: [{ token: NgbConfig }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbToastConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbToastConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbToastConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: NgbConfig }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbToastHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nNgbToastHeader.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbToastHeader, selector: \"[ngbToastHeader]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbToastHeader, decorators: [{\n type: Directive,\n args: [{ selector: '[ngbToastHeader]' }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbToast, deps: [{ token: 'aria-live', attribute: true }, { token: NgbToastConfig }, { token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });\nNgbToast.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbToast, selector: \"ngb-toast\", inputs: { animation: \"animation\", delay: \"delay\", autohide: \"autohide\", header: \"header\" }, outputs: { shown: \"shown\", hidden: \"hidden\" }, host: { attributes: { \"role\": \"alert\", \"aria-atomic\": \"true\" }, properties: { \"attr.aria-live\": \"ariaLive\", \"class.fade\": \"animation\" }, classAttribute: \"toast\" }, queries: [{ propertyName: \"contentHeaderTpl\", first: true, predicate: NgbToastHeader, descendants: true, read: TemplateRef, static: true }], exportAs: [\"ngbToast\"], usesOnChanges: true, ngImport: i0, template: `\n <ng-template #headerTpl>\n <strong class=\"me-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=\"btn-close\" aria-label=\"Close\" i18n-aria-label=\"@@ngb.toast.close-aria\" (click)=\"hide()\">\n </button>\n </div>\n </ng-template>\n <div class=\"toast-body\">\n <ng-content></ng-content>\n </div>\n `, isInline: true, styles: [\"ngb-toast{display:block}ngb-toast .toast-header .close{margin-left:auto;margin-bottom:.25rem}\\n\"], dependencies: [{ kind: \"directive\", type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i2.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }], encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbToast, decorators: [{\n type: Component,\n args: [{ selector: 'ngb-toast', exportAs: 'ngbToast', encapsulation: ViewEncapsulation.None, host: {\n 'role': 'alert',\n '[attr.aria-live]': 'ariaLive',\n 'aria-atomic': 'true',\n 'class': 'toast',\n '[class.fade]': 'animation',\n }, template: `\n <ng-template #headerTpl>\n <strong class=\"me-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=\"btn-close\" aria-label=\"Close\" i18n-aria-label=\"@@ngb.toast.close-aria\" (click)=\"hide()\">\n </button>\n </div>\n </ng-template>\n <div class=\"toast-body\">\n <ng-content></ng-content>\n </div>\n `, styles: [\"ngb-toast{display:block}ngb-toast .toast-header .close{margin-left:auto;margin-bottom:.25rem}\\n\"] }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Attribute,\n args: ['aria-live']\n }] }, { type: NgbToastConfig }, { type: i0.NgZone }, { type: i0.ElementRef }]; }, propDecorators: { animation: [{\n type: Input\n }], delay: [{\n type: Input\n }], autohide: [{\n type: Input\n }], header: [{\n type: Input\n }], contentHeaderTpl: [{\n type: ContentChild,\n args: [NgbToastHeader, { read: TemplateRef, static: true }]\n }], shown: [{\n type: Output\n }], hidden: [{\n type: Output\n }] } });\n\nclass NgbToastModule {\n}\nNgbToastModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbToastModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbToastModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbToastModule, declarations: [NgbToast, NgbToastHeader], imports: [CommonModule], exports: [NgbToast, NgbToastHeader] });\nNgbToastModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbToastModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbToastModule, decorators: [{\n type: NgModule,\n args: [{ declarations: [NgbToast, NgbToastHeader], imports: [CommonModule], exports: [NgbToast, NgbToastHeader] }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTooltipConfig, deps: [{ token: NgbConfig }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbTooltipConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTooltipConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTooltipConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: NgbConfig }]; } });\n\nlet nextId = 0;\nclass NgbTooltipWindow {\n}\nNgbTooltipWindow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTooltipWindow, deps: [], target: i0.ɵɵFactoryTarget.Component });\nNgbTooltipWindow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbTooltipWindow, selector: \"ngb-tooltip-window\", inputs: { animation: \"animation\", id: \"id\", tooltipClass: \"tooltipClass\" }, host: { attributes: { \"role\": \"tooltip\" }, properties: { \"class\": \"\\\"tooltip\\\" + (tooltipClass ? \\\" \\\" + tooltipClass : \\\"\\\")\", \"class.fade\": \"animation\", \"id\": \"id\" } }, ngImport: i0, template: `<div class=\"tooltip-arrow\" data-popper-arrow></div><div class=\"tooltip-inner\"><ng-content></ng-content></div>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTooltipWindow, decorators: [{\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=\"tooltip-arrow\" data-popper-arrow></div><div class=\"tooltip-inner\"><ng-content></ng-content></div>`\n }]\n }], propDecorators: { 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, 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._positioning = ngbPositioning();\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, applicationRef);\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.setInput('animation', this.animation);\n this._windowRef.setInput('tooltipClass', this.tooltipClass);\n this._windowRef.setInput('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 // Setting up popper and scheduling updates when zone is stable\n this._ngZone.runOutsideAngular(() => {\n this._positioning.createPopper({\n hostElement: this._elementRef.nativeElement,\n targetElement: this._windowRef.location.nativeElement,\n placement: this.placement,\n appendToBody: this.container === 'body',\n baseClass: 'bs-tooltip',\n });\n Promise.resolve().then(() => {\n // This update is required for correct arrow placement\n this._positioning.update();\n this._zoneSubscription = this._ngZone.onStable.subscribe(() => this._positioning.update());\n });\n });\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(animation = this.animation) {\n if (this._windowRef != null) {\n this._renderer.removeAttribute(this._elementRef.nativeElement, 'aria-describedby');\n this._popupService.close(animation).subscribe(() => {\n this._windowRef = null;\n this._positioning.destroy();\n this._zoneSubscription?.unsubscribe();\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(false);\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 this._unregisterListenersFn?.();\n }\n}\nNgbTooltip.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTooltip, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: i0.ViewContainerRef }, { token: NgbTooltipConfig }, { token: i0.NgZone }, { token: DOCUMENT }, { token: i0.ChangeDetectorRef }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbTooltip.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbTooltip, selector: \"[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\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTooltip, decorators: [{\n type: Directive,\n args: [{ selector: '[ngbTooltip]', exportAs: 'ngbTooltip' }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.Injector }, { type: i0.ViewContainerRef }, { type: NgbTooltipConfig }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.ChangeDetectorRef }, { type: i0.ApplicationRef }]; }, propDecorators: { 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 }], shown: [{\n type: Output\n }], hidden: [{\n type: Output\n }], ngbTooltip: [{\n type: Input\n }] } });\n\nclass NgbTooltipModule {\n}\nNgbTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTooltipModule, declarations: [NgbTooltip, NgbTooltipWindow], exports: [NgbTooltip] });\nNgbTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTooltipModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTooltipModule, decorators: [{\n type: NgModule,\n args: [{ declarations: [NgbTooltip, NgbTooltipWindow], exports: [NgbTooltip] }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbHighlight, deps: [], target: i0.ɵɵFactoryTarget.Component });\nNgbHighlight.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbHighlight, selector: \"ngb-highlight\", inputs: { highlightClass: \"highlightClass\", result: \"result\", term: \"term\", accentSensitive: \"accentSensitive\" }, usesOnChanges: true, ngImport: i0, template: \"<ng-template ngFor [ngForOf]=\\\"parts\\\" let-part let-isOdd=\\\"odd\\\"><span *ngIf=\\\"isOdd; else even\\\" [class]=\\\"highlightClass\\\">{{part}}</span><ng-template #even>{{part}}</ng-template></ng-template>\", isInline: true, styles: [\".ngb-highlight{font-weight:700}\\n\"], dependencies: [{ kind: \"directive\", type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbHighlight, decorators: [{\n type: Component,\n args: [{ selector: 'ngb-highlight', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, 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>`, styles: [\".ngb-highlight{font-weight:700}\\n\"] }]\n }], propDecorators: { highlightClass: [{\n type: Input\n }], result: [{\n type: Input\n }], term: [{\n type: Input\n }], accentSensitive: [{\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTypeaheadWindow, deps: [], target: i0.ɵɵFactoryTarget.Component });\nNgbTypeaheadWindow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbTypeaheadWindow, selector: \"ngb-typeahead-window\", inputs: { id: \"id\", focusFirst: \"focusFirst\", results: \"results\", term: \"term\", formatter: \"formatter\", resultTemplate: \"resultTemplate\", popupClass: \"popupClass\" }, outputs: { selectEvent: \"select\", activeChangeEvent: \"activeChange\" }, host: { attributes: { \"role\": \"listbox\" }, listeners: { \"mousedown\": \"$event.preventDefault()\" }, properties: { \"class\": \"\\\"dropdown-menu show\\\" + (popupClass ? \\\" \\\" + popupClass : \\\"\\\")\", \"id\": \"id\" } }, exportAs: [\"ngbTypeaheadWindow\"], ngImport: i0, 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 `, isInline: true, dependencies: [{ kind: \"directive\", type: i2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i2.NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"component\", type: NgbHighlight, selector: \"ngb-highlight\", inputs: [\"highlightClass\", \"result\", \"term\", \"accentSensitive\"] }], encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTypeaheadWindow, decorators: [{\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 }], propDecorators: { id: [{\n type: Input\n }], focusFirst: [{\n type: Input\n }], results: [{\n type: Input\n }], term: [{\n type: Input\n }], formatter: [{\n type: Input\n }], resultTemplate: [{\n type: Input\n }], popupClass: [{\n type: Input\n }], selectEvent: [{\n type: Output,\n args: ['select']\n }], activeChangeEvent: [{\n type: Output,\n args: ['activeChange']\n }] } });\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-start', 'bottom-end', 'top-start', 'top-end'];\n }\n}\nNgbTypeaheadConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTypeaheadConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgbTypeaheadConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTypeaheadConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTypeaheadConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\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('visually-hidden');\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: Live, deps: [{ token: DOCUMENT }, { token: ARIA_LIVE_DELAY }], target: i0.ɵɵFactoryTarget.Injectable });\nLive.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: Live, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: Live, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [ARIA_LIVE_DELAY]\n }] }]; } });\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, 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 this._positioning = ngbPositioning();\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, among the [possible values](#/guides/positioning#api).\n *\n * The default order of preference is `\"bottom-start bottom-end top-start top-end\"`\n *\n * Please see the [positioning overview](#/positioning) for more details.\n */\n this.placement = 'bottom-start';\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, applicationRef);\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 }\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 /* eslint-disable-next-line deprecation/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 }\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.setInput('id', this.popupId);\n this._windowRef.setInput('popupClass', this.popupClass);\n this._windowRef.instance.selectEvent.subscribe((result) => this._selectResultClosePopup(result));\n this._windowRef.instance.activeChangeEvent.subscribe((activeId) => this.activeDescendant = activeId);\n if (this.container === 'body') {\n this._renderer.setStyle(this._windowRef.location.nativeElement, 'z-index', '1055');\n this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement);\n }\n this._changeDetector.markForCheck();\n // Setting up popper and scheduling updates when zone is stable\n this._ngZone.runOutsideAngular(() => {\n if (this._windowRef) {\n this._positioning.createPopper({\n hostElement: this._elementRef.nativeElement,\n targetElement: this._windowRef.location.nativeElement,\n placement: this.placement,\n appendToBody: this.container === 'body',\n updatePopperOptions: addPopperOffset([0, 2]),\n });\n this._zoneSubscription = this._ngZone.onStable.subscribe(() => this._positioning.update());\n }\n });\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._positioning.destroy();\n this._zoneSubscription?.unsubscribe();\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 if (this.showHint && this._windowRef?.instance.hasActive() && this._inputValueBackup != null) {\n const userInputLowerCase = this._inputValueBackup.toLowerCase();\n const formattedVal = this._formatItemForInput(this._windowRef.instance.getActive());\n if (userInputLowerCase === formattedVal.substring(0, this._inputValueBackup.length).toLowerCase()) {\n this._writeInputValue(this._inputValueBackup + formattedVal.substring(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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTypeahead, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: NgbTypeaheadConfig }, { token: i0.NgZone }, { token: Live }, { token: DOCUMENT }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgbTypeahead.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbTypeahead, selector: \"input[ngbTypeahead]\", inputs: { autocomplete: \"autocomplete\", container: \"container\", editable: \"editable\", focusFirst: \"focusFirst\", inputFormatter: \"inputFormatter\", ngbTypeahead: \"ngbTypeahead\", resultFormatter: \"resultFormatter\", resultTemplate: \"resultTemplate\", showHint: \"showHint\", placement: \"placement\", popupClass: \"popupClass\" }, outputs: { selectItem: \"selectItem\" }, host: { attributes: { \"autocapitalize\": \"off\", \"autocorrect\": \"off\", \"role\": \"combobox\", \"aria-multiline\": \"false\" }, listeners: { \"blur\": \"handleBlur()\", \"keydown\": \"handleKeyDown($event)\" }, properties: { \"class.open\": \"isPopupOpen()\", \"autocomplete\": \"autocomplete\", \"attr.aria-autocomplete\": \"showHint ? \\\"both\\\" : \\\"list\\\"\", \"attr.aria-activedescendant\": \"activeDescendant\", \"attr.aria-owns\": \"isPopupOpen() ? popupId : null\", \"attr.aria-expanded\": \"isPopupOpen()\" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgbTypeahead), multi: true }], exportAs: [\"ngbTypeahead\"], usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTypeahead, decorators: [{\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 }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.Renderer2 }, { type: i0.Injector }, { type: NgbTypeaheadConfig }, { type: i0.NgZone }, { type: Live }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.ApplicationRef }]; }, propDecorators: { autocomplete: [{\n type: Input\n }], container: [{\n type: Input\n }], editable: [{\n type: Input\n }], focusFirst: [{\n type: Input\n }], inputFormatter: [{\n type: Input\n }], ngbTypeahead: [{\n type: Input\n }], resultFormatter: [{\n type: Input\n }], resultTemplate: [{\n type: Input\n }], showHint: [{\n type: Input\n }], placement: [{\n type: Input\n }], popupClass: [{\n type: Input\n }], selectItem: [{\n type: Output\n }] } });\n\nclass NgbTypeaheadModule {\n}\nNgbTypeaheadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTypeaheadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbTypeaheadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTypeaheadModule, declarations: [NgbTypeahead, NgbHighlight, NgbTypeaheadWindow], imports: [CommonModule], exports: [NgbTypeahead, NgbHighlight] });\nNgbTypeaheadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTypeaheadModule, imports: [CommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbTypeaheadModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [NgbTypeahead, NgbHighlight, NgbTypeaheadWindow],\n exports: [NgbTypeahead, NgbHighlight],\n imports: [CommonModule]\n }]\n }] });\n\nvar OffcanvasDismissReasons;\n(function (OffcanvasDismissReasons) {\n OffcanvasDismissReasons[OffcanvasDismissReasons[\"BACKDROP_CLICK\"] = 0] = \"BACKDROP_CLICK\";\n OffcanvasDismissReasons[OffcanvasDismissReasons[\"ESC\"] = 1] = \"ESC\";\n})(OffcanvasDismissReasons || (OffcanvasDismissReasons = {}));\n\nclass NgbOffcanvasBackdrop {\n constructor(_el, _zone) {\n this._el = _el;\n this._zone = _zone;\n this.dismissEvent = new EventEmitter();\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 dismiss() { this.dismissEvent.emit(OffcanvasDismissReasons.BACKDROP_CLICK); }\n}\nNgbOffcanvasBackdrop.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvasBackdrop, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });\nNgbOffcanvasBackdrop.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbOffcanvasBackdrop, selector: \"ngb-offcanvas-backdrop\", inputs: { animation: \"animation\", backdropClass: \"backdropClass\" }, outputs: { dismissEvent: \"dismiss\" }, host: { listeners: { \"mousedown\": \"dismiss()\" }, properties: { \"class\": \"\\\"offcanvas-backdrop\\\" + (backdropClass ? \\\" \\\" + backdropClass : \\\"\\\")\", \"class.show\": \"!animation\", \"class.fade\": \"animation\" } }, ngImport: i0, template: '', isInline: true, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvasBackdrop, decorators: [{\n type: Component,\n args: [{\n selector: 'ngb-offcanvas-backdrop',\n encapsulation: ViewEncapsulation.None,\n template: '',\n host: {\n '[class]': '\"offcanvas-backdrop\" + (backdropClass ? \" \" + backdropClass : \"\")',\n '[class.show]': '!animation',\n '[class.fade]': 'animation',\n '(mousedown)': 'dismiss()'\n }\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { animation: [{\n type: Input\n }], backdropClass: [{\n type: Input\n }], dismissEvent: [{\n type: Output,\n args: ['dismiss']\n }] } });\n\nclass NgbOffcanvasPanel {\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 offcanvas opening\n this.keyboard = true;\n this.position = 'start';\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 // TODO when we target Bootstrap 5.2+, the style.visibility handling can be removed, because Bootstrap has improved\n // its CSS\n const offcanvasTransition$ = ngbRunTransition(this._zone, this._elRef.nativeElement, (element) => {\n nativeElement.classList.remove('show');\n return () => element.style.visibility = 'hidden';\n }, context);\n offcanvasTransition$.subscribe(() => {\n this.hidden.next();\n this.hidden.complete();\n });\n this._disableEventHandling();\n this._restoreFocus();\n return offcanvasTransition$;\n }\n _show() {\n const context = { animation: this.animation, runningTransition: 'continue' };\n // TODO when we target Bootstrap 5.2+, the style.visibility handling can be removed, because Bootstrap has improved\n // its CSS\n const offcanvasTransition$ = ngbRunTransition(this._zone, this._elRef.nativeElement, (element, animation) => {\n if (animation) {\n reflow(element);\n }\n element.classList.add('show');\n element.style.visibility = 'visible';\n }, context);\n offcanvasTransition$.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 /* eslint-disable-next-line deprecation/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(OffcanvasDismissReasons.ESC));\n }\n });\n }\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}\nNgbOffcanvasPanel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvasPanel, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });\nNgbOffcanvasPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgbOffcanvasPanel, selector: \"ngb-offcanvas-panel\", inputs: { animation: \"animation\", ariaLabelledBy: \"ariaLabelledBy\", ariaDescribedBy: \"ariaDescribedBy\", keyboard: \"keyboard\", panelClass: \"panelClass\", position: \"position\" }, outputs: { dismissEvent: \"dismiss\" }, host: { attributes: { \"role\": \"dialog\", \"tabindex\": \"-1\" }, properties: { \"class\": \"\\\"offcanvas offcanvas-\\\" + position + (panelClass ? \\\" \\\" + panelClass : \\\"\\\")\", \"attr.aria-modal\": \"true\", \"attr.aria-labelledby\": \"ariaLabelledBy\", \"attr.aria-describedby\": \"ariaDescribedBy\" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvasPanel, decorators: [{\n type: Component,\n args: [{ selector: 'ngb-offcanvas-panel', template: '<ng-content></ng-content>', encapsulation: ViewEncapsulation.None, host: {\n '[class]': '\"offcanvas offcanvas-\" + position + (panelClass ? \" \" + panelClass : \"\")',\n 'role': 'dialog',\n 'tabindex': '-1',\n '[attr.aria-modal]': 'true',\n '[attr.aria-labelledby]': 'ariaLabelledBy',\n '[attr.aria-describedby]': 'ariaDescribedBy',\n } }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { animation: [{\n type: Input\n }], ariaLabelledBy: [{\n type: Input\n }], ariaDescribedBy: [{\n type: Input\n }], keyboard: [{\n type: Input\n }], panelClass: [{\n type: Input\n }], position: [{\n type: Input\n }], dismissEvent: [{\n type: Output,\n args: ['dismiss']\n }] } });\n\n/**\n * A reference to the currently opened (active) offcanvas.\n *\n * Instances of this class can be injected into your component passed as offcanvas content.\n * So you can `.close()` or `.dismiss()` the offcanvas window from your component.\n *\n * @since 12.1.0\n */\nclass NgbActiveOffcanvas {\n /**\n * Closes the offcanvas with an optional `result` value.\n *\n * The `NgbOffcanvasRef.result` promise will be resolved with the provided value.\n */\n close(result) { }\n /**\n * Dismisses the offcanvas with an optional `reason` value.\n *\n * The `NgbOffcanvasRef.result` promise will be rejected with the provided value.\n */\n dismiss(reason) { }\n}\n/**\n * A reference to the newly opened offcanvas returned by the `NgbOffcanvas.open()` method.\n *\n * @since 12.1.0\n */\nclass NgbOffcanvasRef {\n constructor(_panelCmptRef, _contentRef, _backdropCmptRef, _beforeDismiss) {\n this._panelCmptRef = _panelCmptRef;\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 _panelCmptRef.instance.dismissEvent.subscribe((reason) => { this.dismiss(reason); });\n if (_backdropCmptRef) {\n _backdropCmptRef.instance.dismissEvent.subscribe((reason) => { this.dismiss(reason); });\n }\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 offcanvas content.\n *\n * When a `TemplateRef` is used as the content or when the offcanvas 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 offcanvas is closed via the `.close()` method.\n *\n * It will emit the result passed to the `.close()` method.\n */\n get closed() { return this._closed.asObservable().pipe(takeUntil(this._hidden)); }\n /**\n * The observable that emits when the offcanvas 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 get dismissed() { return this._dismissed.asObservable().pipe(takeUntil(this._hidden)); }\n /**\n * The observable that emits when both offcanvas window and backdrop are closed and animations were finished.\n * At this point offcanvas and backdrop elements will be removed from the DOM tree.\n *\n * This observable will be completed after emitting.\n */\n get hidden() { return this._hidden.asObservable(); }\n /**\n * The observable that emits when offcanvas is fully visible and animation was finished.\n * The offcanvas DOM element is always available synchronously after calling 'offcanvas.open()' service.\n *\n * This observable will be completed after emitting.\n * It will not emit, if offcanvas is closed before open animation is finished.\n */\n get shown() { return this._panelCmptRef.instance.shown.asObservable(); }\n /**\n * Closes the offcanvas 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._panelCmptRef) {\n this._closed.next(result);\n this._resolve(result);\n this._removeOffcanvasElements();\n }\n }\n _dismiss(reason) {\n this._dismissed.next(reason);\n this._reject(reason);\n this._removeOffcanvasElements();\n }\n /**\n * Dismisses the offcanvas with an optional `reason` value.\n *\n * The `NgbOffcanvasRef.result` promise will be rejected with the provided value.\n */\n dismiss(reason) {\n if (this._panelCmptRef) {\n if (!this._beforeDismiss) {\n this._dismiss(reason);\n }\n else {\n const dismiss = this._beforeDismiss();\n if (isPromise(dismiss)) {\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 _removeOffcanvasElements() {\n const panelTransition$ = this._panelCmptRef.instance.hide();\n const backdropTransition$ = this._backdropCmptRef ? this._backdropCmptRef.instance.hide() : of(undefined);\n // hiding panel\n panelTransition$.subscribe(() => {\n const { nativeElement } = this._panelCmptRef.location;\n nativeElement.parentNode.removeChild(nativeElement);\n this._panelCmptRef.destroy();\n if (this._contentRef && this._contentRef.viewRef) {\n this._contentRef.viewRef.destroy();\n }\n this._panelCmptRef = 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(panelTransition$, backdropTransition$).subscribe(() => {\n this._hidden.next();\n this._hidden.complete();\n });\n }\n}\n\nclass NgbOffcanvasStack {\n constructor(_applicationRef, _injector, _document, _scrollBar, _ngZone) {\n this._applicationRef = _applicationRef;\n this._injector = _injector;\n this._document = _document;\n this._scrollBar = _scrollBar;\n this._ngZone = _ngZone;\n this._activePanelCmptHasChanged = new Subject();\n this._scrollBarRestoreFn = null;\n this._backdropAttributes = ['animation', 'backdropClass'];\n this._panelAttributes = ['animation', 'ariaDescribedBy', 'ariaLabelledBy', 'keyboard', 'panelClass', 'position'];\n this._activeInstance = new EventEmitter();\n // Trap focus on active PanelCmpt\n this._activePanelCmptHasChanged.subscribe(() => {\n if (this._panelCmpt) {\n ngbFocusTrap(this._ngZone, this._panelCmpt.location.nativeElement, this._activePanelCmptHasChanged);\n }\n });\n }\n _restoreScrollBar() {\n const scrollBarRestoreFn = this._scrollBarRestoreFn;\n if (scrollBarRestoreFn) {\n this._scrollBarRestoreFn = null;\n scrollBarRestoreFn();\n }\n }\n _hideScrollBar() {\n if (!this._scrollBarRestoreFn) {\n this._scrollBarRestoreFn = this._scrollBar.hide();\n }\n }\n open(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 if (!containerEl) {\n throw new Error(`The specified offcanvas container \"${options.container || 'body'}\" was not found in the DOM.`);\n }\n if (!options.scroll) {\n this._hideScrollBar();\n }\n const activeOffcanvas = new NgbActiveOffcanvas();\n const contentRef = this._getContentRef(options.injector || contentInjector, content, activeOffcanvas);\n let backdropCmptRef = options.backdrop !== false ? this._attachBackdrop(containerEl) : undefined;\n let panelCmptRef = this._attachWindowComponent(containerEl, contentRef.nodes);\n let ngbOffcanvasRef = new NgbOffcanvasRef(panelCmptRef, contentRef, backdropCmptRef, options.beforeDismiss);\n this._registerOffcanvasRef(ngbOffcanvasRef);\n this._registerPanelCmpt(panelCmptRef);\n ngbOffcanvasRef.hidden.pipe(finalize(() => this._restoreScrollBar())).subscribe();\n activeOffcanvas.close = (result) => { ngbOffcanvasRef.close(result); };\n activeOffcanvas.dismiss = (reason) => { ngbOffcanvasRef.dismiss(reason); };\n this._applyPanelOptions(panelCmptRef.instance, options);\n if (backdropCmptRef && backdropCmptRef.instance) {\n this._applyBackdropOptions(backdropCmptRef.instance, options);\n backdropCmptRef.changeDetectorRef.detectChanges();\n }\n panelCmptRef.changeDetectorRef.detectChanges();\n return ngbOffcanvasRef;\n }\n get activeInstance() { return this._activeInstance; }\n dismiss(reason) { this._offcanvasRef?.dismiss(reason); }\n hasOpenOffcanvas() { return !!this._offcanvasRef; }\n _attachBackdrop(containerEl) {\n let backdropCmptRef = createComponent(NgbOffcanvasBackdrop, { environmentInjector: this._applicationRef.injector, elementInjector: this._injector });\n this._applicationRef.attachView(backdropCmptRef.hostView);\n containerEl.appendChild(backdropCmptRef.location.nativeElement);\n return backdropCmptRef;\n }\n _attachWindowComponent(containerEl, projectableNodes) {\n let panelCmptRef = createComponent(NgbOffcanvasPanel, { environmentInjector: this._applicationRef.injector, elementInjector: this._injector, projectableNodes });\n this._applicationRef.attachView(panelCmptRef.hostView);\n containerEl.appendChild(panelCmptRef.location.nativeElement);\n return panelCmptRef;\n }\n _applyPanelOptions(windowInstance, options) {\n this._panelAttributes.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(contentInjector, content, activeOffcanvas) {\n if (!content) {\n return new ContentRef([]);\n }\n else if (content instanceof TemplateRef) {\n return this._createFromTemplateRef(content, activeOffcanvas);\n }\n else if (isString(content)) {\n return this._createFromString(content);\n }\n else {\n return this._createFromComponent(contentInjector, content, activeOffcanvas);\n }\n }\n _createFromTemplateRef(templateRef, activeOffcanvas) {\n const context = {\n $implicit: activeOffcanvas,\n close(result) { activeOffcanvas.close(result); },\n dismiss(reason) { activeOffcanvas.dismiss(reason); }\n };\n const viewRef = templateRef.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(contentInjector, componentType, context) {\n const elementInjector = Injector.create({ providers: [{ provide: NgbActiveOffcanvas, useValue: context }], parent: contentInjector });\n const componentRef = createComponent(componentType, { environmentInjector: this._applicationRef.injector, elementInjector });\n const componentNativeEl = componentRef.location.nativeElement;\n this._applicationRef.attachView(componentRef.hostView);\n return new ContentRef([[componentNativeEl]], componentRef.hostView, componentRef);\n }\n _registerOffcanvasRef(ngbOffcanvasRef) {\n const unregisterOffcanvasRef = () => {\n this._offcanvasRef = undefined;\n this._activeInstance.emit(this._offcanvasRef);\n };\n this._offcanvasRef = ngbOffcanvasRef;\n this._activeInstance.emit(this._offcanvasRef);\n ngbOffcanvasRef.result.then(unregisterOffcanvasRef, unregisterOffcanvasRef);\n }\n _registerPanelCmpt(ngbPanelCmpt) {\n this._panelCmpt = ngbPanelCmpt;\n this._activePanelCmptHasChanged.next();\n ngbPanelCmpt.onDestroy(() => {\n this._panelCmpt = undefined;\n this._activePanelCmptHasChanged.next();\n });\n }\n}\nNgbOffcanvasStack.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvasStack, deps: [{ token: i0.ApplicationRef }, { token: i0.Injector }, { token: DOCUMENT }, { token: ScrollBar }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbOffcanvasStack.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvasStack, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvasStack, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i0.ApplicationRef }, { type: i0.Injector }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: ScrollBar }, { type: i0.NgZone }]; } });\n\n/**\n * A configuration service for the [`NgbOffcanvas`](#/components/offcanvas/api#NgbOffcanvas) 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 offcanvases used in the application.\n *\n * @since 12.1.0\n */\nclass NgbOffcanvasConfig {\n constructor(_ngbConfig) {\n this._ngbConfig = _ngbConfig;\n this.backdrop = true;\n this.keyboard = true;\n this.position = 'start';\n this.scroll = false;\n }\n get animation() { return (this._animation === undefined) ? this._ngbConfig.animation : this._animation; }\n set animation(animation) { this._animation = animation; }\n}\nNgbOffcanvasConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvasConfig, deps: [{ token: NgbConfig }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbOffcanvasConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvasConfig, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvasConfig, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: NgbConfig }]; } });\n\n/**\n * A service for opening an offcanvas.\n *\n * Creating an offcanvas is straightforward: create a component or a template and pass it as an argument to\n * the `.open()` method.\n *\n * @since 12.1.0\n */\nclass NgbOffcanvas {\n constructor(_injector, _offcanvasStack, _config) {\n this._injector = _injector;\n this._offcanvasStack = _offcanvasStack;\n this._config = _config;\n }\n /**\n * Opens a new offcanvas panel 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 `NgbActiveOffcanvas` class. You can then\n * use `NgbActiveOffcanvas` methods to close / dismiss offcanvas from \"inside\" of your component.\n *\n * Also see the [`NgbOffcanvasOptions`](#/components/offcanvas/api#NgbOffcanvasOptions) for the list of supported\n * options.\n */\n open(content, options = {}) {\n const combinedOptions = { ...this._config, animation: this._config.animation, ...options };\n return this._offcanvasStack.open(this._injector, content, combinedOptions);\n }\n /**\n * Returns an observable that holds the active offcanvas instance.\n */\n get activeInstance() { return this._offcanvasStack.activeInstance; }\n /**\n * Dismisses the currently displayed offcanvas with the supplied reason.\n */\n dismiss(reason) { this._offcanvasStack.dismiss(reason); }\n /**\n * Indicates if there is currently an open offcanvas in the application.\n */\n hasOpenOffcanvas() { return this._offcanvasStack.hasOpenOffcanvas(); }\n}\nNgbOffcanvas.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvas, deps: [{ token: i0.Injector }, { token: NgbOffcanvasStack }, { token: NgbOffcanvasConfig }], target: i0.ɵɵFactoryTarget.Injectable });\nNgbOffcanvas.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvas, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvas, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i0.Injector }, { type: NgbOffcanvasStack }, { type: NgbOffcanvasConfig }]; } });\n\nclass NgbOffcanvasModule {\n}\nNgbOffcanvasModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvasModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbOffcanvasModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvasModule, declarations: [NgbOffcanvasPanel, NgbOffcanvasBackdrop] });\nNgbOffcanvasModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvasModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbOffcanvasModule, decorators: [{\n type: NgModule,\n args: [{ declarations: [NgbOffcanvasPanel, NgbOffcanvasBackdrop] }]\n }] });\n\nconst NGB_MODULES = [\n NgbAccordionModule, NgbAlertModule, NgbCarouselModule, NgbCollapseModule, NgbDatepickerModule, NgbDropdownModule,\n NgbModalModule, NgbNavModule, NgbOffcanvasModule, NgbPaginationModule, NgbPopoverModule, NgbProgressbarModule,\n NgbRatingModule, NgbTimepickerModule, NgbToastModule, NgbTooltipModule, NgbTypeaheadModule\n];\nclass NgbModule {\n}\nNgbModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNgbModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModule, imports: [NgbAccordionModule, NgbAlertModule, NgbCarouselModule, NgbCollapseModule, NgbDatepickerModule, NgbDropdownModule,\n NgbModalModule, NgbNavModule, NgbOffcanvasModule, NgbPaginationModule, NgbPopoverModule, NgbProgressbarModule,\n NgbRatingModule, NgbTimepickerModule, NgbToastModule, NgbTooltipModule, NgbTypeaheadModule], exports: [NgbAccordionModule, NgbAlertModule, NgbCarouselModule, NgbCollapseModule, NgbDatepickerModule, NgbDropdownModule,\n NgbModalModule, NgbNavModule, NgbOffcanvasModule, NgbPaginationModule, NgbPopoverModule, NgbProgressbarModule,\n NgbRatingModule, NgbTimepickerModule, NgbToastModule, NgbTooltipModule, NgbTypeaheadModule] });\nNgbModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModule, imports: [NGB_MODULES, NgbAccordionModule, NgbAlertModule, NgbCarouselModule, NgbCollapseModule, NgbDatepickerModule, NgbDropdownModule,\n NgbModalModule, NgbNavModule, NgbOffcanvasModule, NgbPaginationModule, NgbPopoverModule, NgbProgressbarModule,\n NgbRatingModule, NgbTimepickerModule, NgbToastModule, NgbTooltipModule, NgbTypeaheadModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgbModule, decorators: [{\n type: NgModule,\n args: [{ imports: NGB_MODULES, exports: NGB_MODULES }]\n }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ModalDismissReasons, NgbAccordion, NgbAccordionConfig, NgbAccordionModule, NgbActiveModal, NgbActiveOffcanvas, NgbAlert, NgbAlertConfig, NgbAlertModule, NgbCalendar, NgbCalendarBuddhist, NgbCalendarGregorian, NgbCalendarHebrew, NgbCalendarIslamicCivil, NgbCalendarIslamicUmalqura, NgbCalendarPersian, NgbCarousel, NgbCarouselConfig, NgbCarouselModule, 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, NgbOffcanvas, NgbOffcanvasConfig, NgbOffcanvasModule, NgbOffcanvasRef, NgbPagination, NgbPaginationConfig, NgbPaginationEllipsis, NgbPaginationFirst, NgbPaginationLast, NgbPaginationModule, NgbPaginationNext, NgbPaginationNumber, NgbPaginationPages, NgbPaginationPrevious, NgbPanel, NgbPanelContent, NgbPanelHeader, NgbPanelTitle, NgbPanelToggle, NgbPopover, NgbPopoverConfig, NgbPopoverModule, NgbProgressbar, NgbProgressbarConfig, NgbProgressbarModule, NgbRating, NgbRatingConfig, NgbRatingModule, NgbSlide, NgbSlideEventDirection, NgbSlideEventSource, NgbTimeAdapter, NgbTimepicker, NgbTimepickerConfig, NgbTimepickerI18n, NgbTimepickerModule, NgbToast, NgbToastConfig, NgbToastHeader, NgbToastModule, NgbTooltip, NgbTooltipConfig, NgbTooltipModule, NgbTypeahead, NgbTypeaheadConfig, NgbTypeaheadModule, OffcanvasDismissReasons };\n","// these aren't really private, but nor are they really useful to document\n\n/**\n * @private\n */\nclass LuxonError extends Error {}\n\n/**\n * @private\n */\nexport class InvalidDateTimeError extends LuxonError {\n constructor(reason) {\n super(`Invalid DateTime: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidIntervalError extends LuxonError {\n constructor(reason) {\n super(`Invalid Interval: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidDurationError extends LuxonError {\n constructor(reason) {\n super(`Invalid Duration: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class ConflictingSpecificationError extends LuxonError {}\n\n/**\n * @private\n */\nexport class InvalidUnitError extends LuxonError {\n constructor(unit) {\n super(`Invalid unit ${unit}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidArgumentError extends LuxonError {}\n\n/**\n * @private\n */\nexport class ZoneIsAbstractError extends LuxonError {\n constructor() {\n super(\"Zone is an abstract class\");\n }\n}\n","/**\n * @private\n */\n\nconst n = \"numeric\",\n s = \"short\",\n l = \"long\";\n\nexport const DATE_SHORT = {\n year: n,\n month: n,\n day: n,\n};\n\nexport const DATE_MED = {\n year: n,\n month: s,\n day: n,\n};\n\nexport const DATE_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n};\n\nexport const DATE_FULL = {\n year: n,\n month: l,\n day: n,\n};\n\nexport const DATE_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n};\n\nexport const TIME_SIMPLE = {\n hour: n,\n minute: n,\n};\n\nexport const TIME_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const TIME_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s,\n};\n\nexport const TIME_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l,\n};\n\nexport const TIME_24_SIMPLE = {\n hour: n,\n minute: n,\n hourCycle: \"h23\",\n};\n\nexport const TIME_24_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n};\n\nexport const TIME_24_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n timeZoneName: s,\n};\n\nexport const TIME_24_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n timeZoneName: l,\n};\n\nexport const DATETIME_SHORT = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_SHORT_WITH_SECONDS = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const DATETIME_MED = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_MED_WITH_SECONDS = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const DATETIME_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_FULL = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n timeZoneName: s,\n};\n\nexport const DATETIME_FULL_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s,\n};\n\nexport const DATETIME_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n timeZoneName: l,\n};\n\nexport const DATETIME_HUGE_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l,\n};\n","/*\n This is just a junk drawer, containing anything used across multiple classes.\n Because Luxon is small(ish), this should stay small and we won't worry about splitting\n it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.\n*/\n\nimport { InvalidArgumentError } from \"../errors.js\";\n\n/**\n * @private\n */\n\n// TYPES\n\nexport function isUndefined(o) {\n return typeof o === \"undefined\";\n}\n\nexport function isNumber(o) {\n return typeof o === \"number\";\n}\n\nexport function isInteger(o) {\n return typeof o === \"number\" && o % 1 === 0;\n}\n\nexport function isString(o) {\n return typeof o === \"string\";\n}\n\nexport function isDate(o) {\n return Object.prototype.toString.call(o) === \"[object Date]\";\n}\n\n// CAPABILITIES\n\nexport function hasRelative() {\n try {\n return typeof Intl !== \"undefined\" && !!Intl.RelativeTimeFormat;\n } catch (e) {\n return false;\n }\n}\n\n// OBJECTS AND ARRAYS\n\nexport function maybeArray(thing) {\n return Array.isArray(thing) ? thing : [thing];\n}\n\nexport function bestBy(arr, by, compare) {\n if (arr.length === 0) {\n return undefined;\n }\n return arr.reduce((best, next) => {\n const pair = [by(next), next];\n if (!best) {\n return pair;\n } else if (compare(best[0], pair[0]) === best[0]) {\n return best;\n } else {\n return pair;\n }\n }, null)[1];\n}\n\nexport function pick(obj, keys) {\n return keys.reduce((a, k) => {\n a[k] = obj[k];\n return a;\n }, {});\n}\n\nexport function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\n// NUMBERS AND STRINGS\n\nexport function integerBetween(thing, bottom, top) {\n return isInteger(thing) && thing >= bottom && thing <= top;\n}\n\n// x % n but takes the sign of n instead of x\nexport function floorMod(x, n) {\n return x - n * Math.floor(x / n);\n}\n\nexport function padStart(input, n = 2) {\n const isNeg = input < 0;\n let padded;\n if (isNeg) {\n padded = \"-\" + (\"\" + -input).padStart(n, \"0\");\n } else {\n padded = (\"\" + input).padStart(n, \"0\");\n }\n return padded;\n}\n\nexport function parseInteger(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseInt(string, 10);\n }\n}\n\nexport function parseFloating(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseFloat(string);\n }\n}\n\nexport function parseMillis(fraction) {\n // Return undefined (instead of 0) in these cases, where fraction is not set\n if (isUndefined(fraction) || fraction === null || fraction === \"\") {\n return undefined;\n } else {\n const f = parseFloat(\"0.\" + fraction) * 1000;\n return Math.floor(f);\n }\n}\n\nexport function roundTo(number, digits, towardZero = false) {\n const factor = 10 ** digits,\n rounder = towardZero ? Math.trunc : Math.round;\n return rounder(number * factor) / factor;\n}\n\n// DATE BASICS\n\nexport function isLeapYear(year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n\nexport function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\nexport function daysInMonth(year, month) {\n const modMonth = floorMod(month - 1, 12) + 1,\n modYear = year + (month - modMonth) / 12;\n\n if (modMonth === 2) {\n return isLeapYear(modYear) ? 29 : 28;\n } else {\n return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];\n }\n}\n\n// covert a calendar object to a local timestamp (epoch, but with the offset baked in)\nexport function objToLocalTS(obj) {\n let d = Date.UTC(\n obj.year,\n obj.month - 1,\n obj.day,\n obj.hour,\n obj.minute,\n obj.second,\n obj.millisecond\n );\n\n // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that\n if (obj.year < 100 && obj.year >= 0) {\n d = new Date(d);\n d.setUTCFullYear(d.getUTCFullYear() - 1900);\n }\n return +d;\n}\n\nexport function weeksInWeekYear(weekYear) {\n const p1 =\n (weekYear +\n Math.floor(weekYear / 4) -\n Math.floor(weekYear / 100) +\n Math.floor(weekYear / 400)) %\n 7,\n last = weekYear - 1,\n p2 = (last + Math.floor(last / 4) - Math.floor(last / 100) + Math.floor(last / 400)) % 7;\n return p1 === 4 || p2 === 3 ? 53 : 52;\n}\n\nexport function untruncateYear(year) {\n if (year > 99) {\n return year;\n } else return year > 60 ? 1900 + year : 2000 + year;\n}\n\n// PARSING\n\nexport function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {\n const date = new Date(ts),\n intlOpts = {\n hourCycle: \"h23\",\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n };\n\n if (timeZone) {\n intlOpts.timeZone = timeZone;\n }\n\n const modified = { timeZoneName: offsetFormat, ...intlOpts };\n\n const parsed = new Intl.DateTimeFormat(locale, modified)\n .formatToParts(date)\n .find((m) => m.type.toLowerCase() === \"timezonename\");\n return parsed ? parsed.value : null;\n}\n\n// signedOffset('-5', '30') -> -330\nexport function signedOffset(offHourStr, offMinuteStr) {\n let offHour = parseInt(offHourStr, 10);\n\n // don't || this because we want to preserve -0\n if (Number.isNaN(offHour)) {\n offHour = 0;\n }\n\n const offMin = parseInt(offMinuteStr, 10) || 0,\n offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;\n return offHour * 60 + offMinSigned;\n}\n\n// COERCION\n\nexport function asNumber(value) {\n const numericValue = Number(value);\n if (typeof value === \"boolean\" || value === \"\" || Number.isNaN(numericValue))\n throw new InvalidArgumentError(`Invalid unit value ${value}`);\n return numericValue;\n}\n\nexport function normalizeObject(obj, normalizer) {\n const normalized = {};\n for (const u in obj) {\n if (hasOwnProperty(obj, u)) {\n const v = obj[u];\n if (v === undefined || v === null) continue;\n normalized[normalizer(u)] = asNumber(v);\n }\n }\n return normalized;\n}\n\nexport function formatOffset(offset, format) {\n const hours = Math.trunc(Math.abs(offset / 60)),\n minutes = Math.trunc(Math.abs(offset % 60)),\n sign = offset >= 0 ? \"+\" : \"-\";\n\n switch (format) {\n case \"short\":\n return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`;\n case \"narrow\":\n return `${sign}${hours}${minutes > 0 ? `:${minutes}` : \"\"}`;\n case \"techie\":\n return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`;\n default:\n throw new RangeError(`Value format ${format} is out of range for property format`);\n }\n}\n\nexport function timeObject(obj) {\n return pick(obj, [\"hour\", \"minute\", \"second\", \"millisecond\"]);\n}\n\nexport const ianaRegex =\n /[A-Za-z_+-]{1,256}(?::?\\/[A-Za-z0-9_+-]{1,256}(?:\\/[A-Za-z0-9_+-]{1,256})?)?/;\n","import * as Formats from \"./formats.js\";\nimport { pick } from \"./util.js\";\n\nfunction stringify(obj) {\n return JSON.stringify(obj, Object.keys(obj).sort());\n}\n\n/**\n * @private\n */\n\nexport const monthsLong = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n];\n\nexport const monthsShort = [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n];\n\nexport const monthsNarrow = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"];\n\nexport function months(length) {\n switch (length) {\n case \"narrow\":\n return [...monthsNarrow];\n case \"short\":\n return [...monthsShort];\n case \"long\":\n return [...monthsLong];\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"];\n case \"2-digit\":\n return [\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\"];\n default:\n return null;\n }\n}\n\nexport const weekdaysLong = [\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n \"Sunday\",\n];\n\nexport const weekdaysShort = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\n\nexport const weekdaysNarrow = [\"M\", \"T\", \"W\", \"T\", \"F\", \"S\", \"S\"];\n\nexport function weekdays(length) {\n switch (length) {\n case \"narrow\":\n return [...weekdaysNarrow];\n case \"short\":\n return [...weekdaysShort];\n case \"long\":\n return [...weekdaysLong];\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"];\n default:\n return null;\n }\n}\n\nexport const meridiems = [\"AM\", \"PM\"];\n\nexport const erasLong = [\"Before Christ\", \"Anno Domini\"];\n\nexport const erasShort = [\"BC\", \"AD\"];\n\nexport const erasNarrow = [\"B\", \"A\"];\n\nexport function eras(length) {\n switch (length) {\n case \"narrow\":\n return [...erasNarrow];\n case \"short\":\n return [...erasShort];\n case \"long\":\n return [...erasLong];\n default:\n return null;\n }\n}\n\nexport function meridiemForDateTime(dt) {\n return meridiems[dt.hour < 12 ? 0 : 1];\n}\n\nexport function weekdayForDateTime(dt, length) {\n return weekdays(length)[dt.weekday - 1];\n}\n\nexport function monthForDateTime(dt, length) {\n return months(length)[dt.month - 1];\n}\n\nexport function eraForDateTime(dt, length) {\n return eras(length)[dt.year < 0 ? 0 : 1];\n}\n\nexport function formatRelativeTime(unit, count, numeric = \"always\", narrow = false) {\n const units = {\n years: [\"year\", \"yr.\"],\n quarters: [\"quarter\", \"qtr.\"],\n months: [\"month\", \"mo.\"],\n weeks: [\"week\", \"wk.\"],\n days: [\"day\", \"day\", \"days\"],\n hours: [\"hour\", \"hr.\"],\n minutes: [\"minute\", \"min.\"],\n seconds: [\"second\", \"sec.\"],\n };\n\n const lastable = [\"hours\", \"minutes\", \"seconds\"].indexOf(unit) === -1;\n\n if (numeric === \"auto\" && lastable) {\n const isDay = unit === \"days\";\n switch (count) {\n case 1:\n return isDay ? \"tomorrow\" : `next ${units[unit][0]}`;\n case -1:\n return isDay ? \"yesterday\" : `last ${units[unit][0]}`;\n case 0:\n return isDay ? \"today\" : `this ${units[unit][0]}`;\n default: // fall through\n }\n }\n\n const isInPast = Object.is(count, -0) || count < 0,\n fmtValue = Math.abs(count),\n singular = fmtValue === 1,\n lilUnits = units[unit],\n fmtUnit = narrow\n ? singular\n ? lilUnits[1]\n : lilUnits[2] || lilUnits[1]\n : singular\n ? units[unit][0]\n : unit;\n return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;\n}\n\nexport function formatString(knownFormat) {\n // these all have the offsets removed because we don't have access to them\n // without all the intl stuff this is backfilling\n const filtered = pick(knownFormat, [\n \"weekday\",\n \"era\",\n \"year\",\n \"month\",\n \"day\",\n \"hour\",\n \"minute\",\n \"second\",\n \"timeZoneName\",\n \"hourCycle\",\n ]),\n key = stringify(filtered),\n dateTimeHuge = \"EEEE, LLLL d, yyyy, h:mm a\";\n switch (key) {\n case stringify(Formats.DATE_SHORT):\n return \"M/d/yyyy\";\n case stringify(Formats.DATE_MED):\n return \"LLL d, yyyy\";\n case stringify(Formats.DATE_MED_WITH_WEEKDAY):\n return \"EEE, LLL d, yyyy\";\n case stringify(Formats.DATE_FULL):\n return \"LLLL d, yyyy\";\n case stringify(Formats.DATE_HUGE):\n return \"EEEE, LLLL d, yyyy\";\n case stringify(Formats.TIME_SIMPLE):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_SECONDS):\n return \"h:mm:ss a\";\n case stringify(Formats.TIME_WITH_SHORT_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_LONG_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_24_SIMPLE):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_SECONDS):\n return \"HH:mm:ss\";\n case stringify(Formats.TIME_24_WITH_SHORT_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_LONG_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.DATETIME_SHORT):\n return \"M/d/yyyy, h:mm a\";\n case stringify(Formats.DATETIME_MED):\n return \"LLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL):\n return \"LLLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_HUGE):\n return dateTimeHuge;\n case stringify(Formats.DATETIME_SHORT_WITH_SECONDS):\n return \"M/d/yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_SECONDS):\n return \"LLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_WEEKDAY):\n return \"EEE, d LLL yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL_WITH_SECONDS):\n return \"LLLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_HUGE_WITH_SECONDS):\n return \"EEEE, LLLL d, yyyy, h:mm:ss a\";\n default:\n return dateTimeHuge;\n }\n}\n","import * as English from \"./english.js\";\nimport * as Formats from \"./formats.js\";\nimport { padStart } from \"./util.js\";\n\nfunction stringifyTokens(splits, tokenToString) {\n let s = \"\";\n for (const token of splits) {\n if (token.literal) {\n s += token.val;\n } else {\n s += tokenToString(token.val);\n }\n }\n return s;\n}\n\nconst macroTokenToFormatOpts = {\n D: Formats.DATE_SHORT,\n DD: Formats.DATE_MED,\n DDD: Formats.DATE_FULL,\n DDDD: Formats.DATE_HUGE,\n t: Formats.TIME_SIMPLE,\n tt: Formats.TIME_WITH_SECONDS,\n ttt: Formats.TIME_WITH_SHORT_OFFSET,\n tttt: Formats.TIME_WITH_LONG_OFFSET,\n T: Formats.TIME_24_SIMPLE,\n TT: Formats.TIME_24_WITH_SECONDS,\n TTT: Formats.TIME_24_WITH_SHORT_OFFSET,\n TTTT: Formats.TIME_24_WITH_LONG_OFFSET,\n f: Formats.DATETIME_SHORT,\n ff: Formats.DATETIME_MED,\n fff: Formats.DATETIME_FULL,\n ffff: Formats.DATETIME_HUGE,\n F: Formats.DATETIME_SHORT_WITH_SECONDS,\n FF: Formats.DATETIME_MED_WITH_SECONDS,\n FFF: Formats.DATETIME_FULL_WITH_SECONDS,\n FFFF: Formats.DATETIME_HUGE_WITH_SECONDS,\n};\n\n/**\n * @private\n */\n\nexport default class Formatter {\n static create(locale, opts = {}) {\n return new Formatter(locale, opts);\n }\n\n static parseFormat(fmt) {\n let current = null,\n currentFull = \"\",\n bracketed = false;\n const splits = [];\n for (let i = 0; i < fmt.length; i++) {\n const c = fmt.charAt(i);\n if (c === \"'\") {\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed, val: currentFull });\n }\n current = null;\n currentFull = \"\";\n bracketed = !bracketed;\n } else if (bracketed) {\n currentFull += c;\n } else if (c === current) {\n currentFull += c;\n } else {\n if (currentFull.length > 0) {\n splits.push({ literal: false, val: currentFull });\n }\n currentFull = c;\n current = c;\n }\n }\n\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed, val: currentFull });\n }\n\n return splits;\n }\n\n static macroTokenToFormatOpts(token) {\n return macroTokenToFormatOpts[token];\n }\n\n constructor(locale, formatOpts) {\n this.opts = formatOpts;\n this.loc = locale;\n this.systemLoc = null;\n }\n\n formatWithSystemDefault(dt, opts) {\n if (this.systemLoc === null) {\n this.systemLoc = this.loc.redefaultToSystem();\n }\n const df = this.systemLoc.dtFormatter(dt, { ...this.opts, ...opts });\n return df.format();\n }\n\n formatDateTime(dt, opts = {}) {\n const df = this.loc.dtFormatter(dt, { ...this.opts, ...opts });\n return df.format();\n }\n\n formatDateTimeParts(dt, opts = {}) {\n const df = this.loc.dtFormatter(dt, { ...this.opts, ...opts });\n return df.formatToParts();\n }\n\n resolvedOptions(dt, opts = {}) {\n const df = this.loc.dtFormatter(dt, { ...this.opts, ...opts });\n return df.resolvedOptions();\n }\n\n num(n, p = 0) {\n // we get some perf out of doing this here, annoyingly\n if (this.opts.forceSimple) {\n return padStart(n, p);\n }\n\n const opts = { ...this.opts };\n\n if (p > 0) {\n opts.padTo = p;\n }\n\n return this.loc.numberFormatter(opts).format(n);\n }\n\n formatDateTimeFromString(dt, fmt) {\n const knownEnglish = this.loc.listingMode() === \"en\",\n useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== \"gregory\",\n string = (opts, extract) => this.loc.extract(dt, opts, extract),\n formatOffset = (opts) => {\n if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {\n return \"Z\";\n }\n\n return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : \"\";\n },\n meridiem = () =>\n knownEnglish\n ? English.meridiemForDateTime(dt)\n : string({ hour: \"numeric\", hourCycle: \"h12\" }, \"dayperiod\"),\n month = (length, standalone) =>\n knownEnglish\n ? English.monthForDateTime(dt, length)\n : string(standalone ? { month: length } : { month: length, day: \"numeric\" }, \"month\"),\n weekday = (length, standalone) =>\n knownEnglish\n ? English.weekdayForDateTime(dt, length)\n : string(\n standalone ? { weekday: length } : { weekday: length, month: \"long\", day: \"numeric\" },\n \"weekday\"\n ),\n maybeMacro = (token) => {\n const formatOpts = Formatter.macroTokenToFormatOpts(token);\n if (formatOpts) {\n return this.formatWithSystemDefault(dt, formatOpts);\n } else {\n return token;\n }\n },\n era = (length) =>\n knownEnglish ? English.eraForDateTime(dt, length) : string({ era: length }, \"era\"),\n tokenToString = (token) => {\n // Where possible: http://cldr.unicode.org/translation/date-time-1/date-time#TOC-Standalone-vs.-Format-Styles\n switch (token) {\n // ms\n case \"S\":\n return this.num(dt.millisecond);\n case \"u\":\n // falls through\n case \"SSS\":\n return this.num(dt.millisecond, 3);\n // seconds\n case \"s\":\n return this.num(dt.second);\n case \"ss\":\n return this.num(dt.second, 2);\n // fractional seconds\n case \"uu\":\n return this.num(Math.floor(dt.millisecond / 10), 2);\n case \"uuu\":\n return this.num(Math.floor(dt.millisecond / 100));\n // minutes\n case \"m\":\n return this.num(dt.minute);\n case \"mm\":\n return this.num(dt.minute, 2);\n // hours\n case \"h\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);\n case \"hh\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);\n case \"H\":\n return this.num(dt.hour);\n case \"HH\":\n return this.num(dt.hour, 2);\n // offset\n case \"Z\":\n // like +6\n return formatOffset({ format: \"narrow\", allowZ: this.opts.allowZ });\n case \"ZZ\":\n // like +06:00\n return formatOffset({ format: \"short\", allowZ: this.opts.allowZ });\n case \"ZZZ\":\n // like +0600\n return formatOffset({ format: \"techie\", allowZ: this.opts.allowZ });\n case \"ZZZZ\":\n // like EST\n return dt.zone.offsetName(dt.ts, { format: \"short\", locale: this.loc.locale });\n case \"ZZZZZ\":\n // like Eastern Standard Time\n return dt.zone.offsetName(dt.ts, { format: \"long\", locale: this.loc.locale });\n // zone\n case \"z\":\n // like America/New_York\n return dt.zoneName;\n // meridiems\n case \"a\":\n return meridiem();\n // dates\n case \"d\":\n return useDateTimeFormatter ? string({ day: \"numeric\" }, \"day\") : this.num(dt.day);\n case \"dd\":\n return useDateTimeFormatter ? string({ day: \"2-digit\" }, \"day\") : this.num(dt.day, 2);\n // weekdays - standalone\n case \"c\":\n // like 1\n return this.num(dt.weekday);\n case \"ccc\":\n // like 'Tues'\n return weekday(\"short\", true);\n case \"cccc\":\n // like 'Tuesday'\n return weekday(\"long\", true);\n case \"ccccc\":\n // like 'T'\n return weekday(\"narrow\", true);\n // weekdays - format\n case \"E\":\n // like 1\n return this.num(dt.weekday);\n case \"EEE\":\n // like 'Tues'\n return weekday(\"short\", false);\n case \"EEEE\":\n // like 'Tuesday'\n return weekday(\"long\", false);\n case \"EEEEE\":\n // like 'T'\n return weekday(\"narrow\", false);\n // months - standalone\n case \"L\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\", day: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"LL\":\n // like 01, doesn't seem to work\n return useDateTimeFormatter\n ? string({ month: \"2-digit\", day: \"numeric\" }, \"month\")\n : this.num(dt.month, 2);\n case \"LLL\":\n // like Jan\n return month(\"short\", true);\n case \"LLLL\":\n // like January\n return month(\"long\", true);\n case \"LLLLL\":\n // like J\n return month(\"narrow\", true);\n // months - format\n case \"M\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"MM\":\n // like 01\n return useDateTimeFormatter\n ? string({ month: \"2-digit\" }, \"month\")\n : this.num(dt.month, 2);\n case \"MMM\":\n // like Jan\n return month(\"short\", false);\n case \"MMMM\":\n // like January\n return month(\"long\", false);\n case \"MMMMM\":\n // like J\n return month(\"narrow\", false);\n // years\n case \"y\":\n // like 2014\n return useDateTimeFormatter ? string({ year: \"numeric\" }, \"year\") : this.num(dt.year);\n case \"yy\":\n // like 14\n return useDateTimeFormatter\n ? string({ year: \"2-digit\" }, \"year\")\n : this.num(dt.year.toString().slice(-2), 2);\n case \"yyyy\":\n // like 0012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 4);\n case \"yyyyyy\":\n // like 000012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 6);\n // eras\n case \"G\":\n // like AD\n return era(\"short\");\n case \"GG\":\n // like Anno Domini\n return era(\"long\");\n case \"GGGGG\":\n return era(\"narrow\");\n case \"kk\":\n return this.num(dt.weekYear.toString().slice(-2), 2);\n case \"kkkk\":\n return this.num(dt.weekYear, 4);\n case \"W\":\n return this.num(dt.weekNumber);\n case \"WW\":\n return this.num(dt.weekNumber, 2);\n case \"o\":\n return this.num(dt.ordinal);\n case \"ooo\":\n return this.num(dt.ordinal, 3);\n case \"q\":\n // like 1\n return this.num(dt.quarter);\n case \"qq\":\n // like 01\n return this.num(dt.quarter, 2);\n case \"X\":\n return this.num(Math.floor(dt.ts / 1000));\n case \"x\":\n return this.num(dt.ts);\n default:\n return maybeMacro(token);\n }\n };\n\n return stringifyTokens(Formatter.parseFormat(fmt), tokenToString);\n }\n\n formatDurationFromString(dur, fmt) {\n const tokenToField = (token) => {\n switch (token[0]) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"w\":\n return \"week\";\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n default:\n return null;\n }\n },\n tokenToString = (lildur) => (token) => {\n const mapped = tokenToField(token);\n if (mapped) {\n return this.num(lildur.get(mapped), token.length);\n } else {\n return token;\n }\n },\n tokens = Formatter.parseFormat(fmt),\n realTokens = tokens.reduce(\n (found, { literal, val }) => (literal ? found : found.concat(val)),\n []\n ),\n collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t) => t));\n return stringifyTokens(tokens, tokenToString(collapsed));\n }\n}\n","export default class Invalid {\n constructor(reason, explanation) {\n this.reason = reason;\n this.explanation = explanation;\n }\n\n toMessage() {\n if (this.explanation) {\n return `${this.reason}: ${this.explanation}`;\n } else {\n return this.reason;\n }\n }\n}\n","import { ZoneIsAbstractError } from \"./errors.js\";\n\n/**\n * @interface\n */\nexport default class Zone {\n /**\n * The type of zone\n * @abstract\n * @type {string}\n */\n get type() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The name of this zone.\n * @abstract\n * @type {string}\n */\n get name() {\n throw new ZoneIsAbstractError();\n }\n\n get ianaName() {\n return this.name;\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year.\n * @abstract\n * @type {boolean}\n */\n get isUniversal() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n offsetName(ts, opts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's value as a string\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */\n offset(ts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @abstract\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is valid.\n * @abstract\n * @type {boolean}\n */\n get isValid() {\n throw new ZoneIsAbstractError();\n }\n}\n","import { formatOffset, parseZoneInfo } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * Represents the local zone for this JavaScript environment.\n * @implements {Zone}\n */\nexport default class SystemZone extends Zone {\n /**\n * Get a singleton instance of the local zone\n * @return {SystemZone}\n */\n static get instance() {\n if (singleton === null) {\n singleton = new SystemZone();\n }\n return singleton;\n }\n\n /** @override **/\n get type() {\n return \"system\";\n }\n\n /** @override **/\n get name() {\n return new Intl.DateTimeFormat().resolvedOptions().timeZone;\n }\n\n /** @override **/\n get isUniversal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n return -new Date(ts).getTimezoneOffset();\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"system\";\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n","import { formatOffset, parseZoneInfo, isUndefined, objToLocalTS } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet dtfCache = {};\nfunction makeDTF(zone) {\n if (!dtfCache[zone]) {\n dtfCache[zone] = new Intl.DateTimeFormat(\"en-US\", {\n hour12: false,\n timeZone: zone,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n era: \"short\",\n });\n }\n return dtfCache[zone];\n}\n\nconst typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n era: 3,\n hour: 4,\n minute: 5,\n second: 6,\n};\n\nfunction hackyOffset(dtf, date) {\n const formatted = dtf.format(date).replace(/\\u200E/g, \"\"),\n parsed = /(\\d+)\\/(\\d+)\\/(\\d+) (AD|BC),? (\\d+):(\\d+):(\\d+)/.exec(formatted),\n [, fMonth, fDay, fYear, fadOrBc, fHour, fMinute, fSecond] = parsed;\n return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond];\n}\n\nfunction partsOffset(dtf, date) {\n const formatted = dtf.formatToParts(date);\n const filled = [];\n for (let i = 0; i < formatted.length; i++) {\n const { type, value } = formatted[i];\n const pos = typeToPos[type];\n\n if (type === \"era\") {\n filled[pos] = value;\n } else if (!isUndefined(pos)) {\n filled[pos] = parseInt(value, 10);\n }\n }\n return filled;\n}\n\nlet ianaZoneCache = {};\n/**\n * A zone identified by an IANA identifier, like America/New_York\n * @implements {Zone}\n */\nexport default class IANAZone extends Zone {\n /**\n * @param {string} name - Zone name\n * @return {IANAZone}\n */\n static create(name) {\n if (!ianaZoneCache[name]) {\n ianaZoneCache[name] = new IANAZone(name);\n }\n return ianaZoneCache[name];\n }\n\n /**\n * Reset local caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCache() {\n ianaZoneCache = {};\n dtfCache = {};\n }\n\n /**\n * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.\n * @param {string} s - The string to check validity on\n * @example IANAZone.isValidSpecifier(\"America/New_York\") //=> true\n * @example IANAZone.isValidSpecifier(\"Sport~~blorp\") //=> false\n * @deprecated This method returns false for some valid IANA names. Use isValidZone instead.\n * @return {boolean}\n */\n static isValidSpecifier(s) {\n return this.isValidZone(s);\n }\n\n /**\n * Returns whether the provided string identifies a real zone\n * @param {string} zone - The string to check\n * @example IANAZone.isValidZone(\"America/New_York\") //=> true\n * @example IANAZone.isValidZone(\"Fantasia/Castle\") //=> false\n * @example IANAZone.isValidZone(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */\n static isValidZone(zone) {\n if (!zone) {\n return false;\n }\n try {\n new Intl.DateTimeFormat(\"en-US\", { timeZone: zone }).format();\n return true;\n } catch (e) {\n return false;\n }\n }\n\n constructor(name) {\n super();\n /** @private **/\n this.zoneName = name;\n /** @private **/\n this.valid = IANAZone.isValidZone(name);\n }\n\n /** @override **/\n get type() {\n return \"iana\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get isUniversal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale, this.name);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n const date = new Date(ts);\n\n if (isNaN(date)) return NaN;\n\n const dtf = makeDTF(this.name);\n let [year, month, day, adOrBc, hour, minute, second] = dtf.formatToParts\n ? partsOffset(dtf, date)\n : hackyOffset(dtf, date);\n\n if (adOrBc === \"BC\") {\n year = -Math.abs(year) + 1;\n }\n\n // because we're using hour12 and https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat\n const adjustedHour = hour === 24 ? 0 : hour;\n\n const asUTC = objToLocalTS({\n year,\n month,\n day,\n hour: adjustedHour,\n minute,\n second,\n millisecond: 0,\n });\n\n let asTS = +date;\n const over = asTS % 1000;\n asTS -= over >= 0 ? over : 1000 + over;\n return (asUTC - asTS) / (60 * 1000);\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"iana\" && otherZone.name === this.name;\n }\n\n /** @override **/\n get isValid() {\n return this.valid;\n }\n}\n","import { formatOffset, signedOffset } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * A zone with a fixed offset (meaning no DST)\n * @implements {Zone}\n */\nexport default class FixedOffsetZone extends Zone {\n /**\n * Get a singleton instance of UTC\n * @return {FixedOffsetZone}\n */\n static get utcInstance() {\n if (singleton === null) {\n singleton = new FixedOffsetZone(0);\n }\n return singleton;\n }\n\n /**\n * Get an instance with a specified offset\n * @param {number} offset - The offset in minutes\n * @return {FixedOffsetZone}\n */\n static instance(offset) {\n return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset);\n }\n\n /**\n * Get an instance of FixedOffsetZone from a UTC offset string, like \"UTC+6\"\n * @param {string} s - The offset string to parse\n * @example FixedOffsetZone.parseSpecifier(\"UTC+6\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC+06\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC-6:00\")\n * @return {FixedOffsetZone}\n */\n static parseSpecifier(s) {\n if (s) {\n const r = s.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);\n if (r) {\n return new FixedOffsetZone(signedOffset(r[1], r[2]));\n }\n }\n return null;\n }\n\n constructor(offset) {\n super();\n /** @private **/\n this.fixed = offset;\n }\n\n /** @override **/\n get type() {\n return \"fixed\";\n }\n\n /** @override **/\n get name() {\n return this.fixed === 0 ? \"UTC\" : `UTC${formatOffset(this.fixed, \"narrow\")}`;\n }\n\n get ianaName() {\n if (this.fixed === 0) {\n return \"Etc/UTC\";\n } else {\n return `Etc/GMT${formatOffset(-this.fixed, \"narrow\")}`;\n }\n }\n\n /** @override **/\n offsetName() {\n return this.name;\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.fixed, format);\n }\n\n /** @override **/\n get isUniversal() {\n return true;\n }\n\n /** @override **/\n offset() {\n return this.fixed;\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"fixed\" && otherZone.fixed === this.fixed;\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n","import Zone from \"../zone.js\";\n\n/**\n * A zone that failed to parse. You should never need to instantiate this.\n * @implements {Zone}\n */\nexport default class InvalidZone extends Zone {\n constructor(zoneName) {\n super();\n /** @private */\n this.zoneName = zoneName;\n }\n\n /** @override **/\n get type() {\n return \"invalid\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get isUniversal() {\n return false;\n }\n\n /** @override **/\n offsetName() {\n return null;\n }\n\n /** @override **/\n formatOffset() {\n return \"\";\n }\n\n /** @override **/\n offset() {\n return NaN;\n }\n\n /** @override **/\n equals() {\n return false;\n }\n\n /** @override **/\n get isValid() {\n return false;\n }\n}\n","/**\n * @private\n */\n\nimport Zone from \"../zone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport InvalidZone from \"../zones/invalidZone.js\";\n\nimport { isUndefined, isString, isNumber } from \"./util.js\";\n\nexport function normalizeZone(input, defaultZone) {\n let offset;\n if (isUndefined(input) || input === null) {\n return defaultZone;\n } else if (input instanceof Zone) {\n return input;\n } else if (isString(input)) {\n const lowered = input.toLowerCase();\n if (lowered === \"local\" || lowered === \"system\") return defaultZone;\n else if (lowered === \"utc\" || lowered === \"gmt\") return FixedOffsetZone.utcInstance;\n else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input);\n } else if (isNumber(input)) {\n return FixedOffsetZone.instance(input);\n } else if (typeof input === \"object\" && input.offset && typeof input.offset === \"number\") {\n // This is dumb, but the instanceof check above doesn't seem to really work\n // so we're duck checking it\n return input;\n } else {\n return new InvalidZone(input);\n }\n}\n","import SystemZone from \"./zones/systemZone.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport Locale from \"./impl/locale.js\";\n\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nlet now = () => Date.now(),\n defaultZone = \"system\",\n defaultLocale = null,\n defaultNumberingSystem = null,\n defaultOutputCalendar = null,\n throwOnInvalid;\n\n/**\n * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here.\n */\nexport default class Settings {\n /**\n * Get the callback for returning the current timestamp.\n * @type {function}\n */\n static get now() {\n return now;\n }\n\n /**\n * Set the callback for returning the current timestamp.\n * The function should return a number, which will be interpreted as an Epoch millisecond count\n * @type {function}\n * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future\n * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time\n */\n static set now(n) {\n now = n;\n }\n\n /**\n * Set the default time zone to create DateTimes in. Does not affect existing instances.\n * Use the value \"system\" to reset this value to the system's time zone.\n * @type {string}\n */\n static set defaultZone(zone) {\n defaultZone = zone;\n }\n\n /**\n * Get the default time zone object currently used to create DateTimes. Does not affect existing instances.\n * The default value is the system's time zone (the one set on the machine that runs this code).\n * @type {Zone}\n */\n static get defaultZone() {\n return normalizeZone(defaultZone, SystemZone.instance);\n }\n\n /**\n * Get the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultLocale() {\n return defaultLocale;\n }\n\n /**\n * Set the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultLocale(locale) {\n defaultLocale = locale;\n }\n\n /**\n * Get the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultNumberingSystem() {\n return defaultNumberingSystem;\n }\n\n /**\n * Set the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultNumberingSystem(numberingSystem) {\n defaultNumberingSystem = numberingSystem;\n }\n\n /**\n * Get the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultOutputCalendar() {\n return defaultOutputCalendar;\n }\n\n /**\n * Set the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultOutputCalendar(outputCalendar) {\n defaultOutputCalendar = outputCalendar;\n }\n\n /**\n * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static get throwOnInvalid() {\n return throwOnInvalid;\n }\n\n /**\n * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static set throwOnInvalid(t) {\n throwOnInvalid = t;\n }\n\n /**\n * Reset Luxon's global caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCaches() {\n Locale.resetCache();\n IANAZone.resetCache();\n }\n}\n","import { padStart, roundTo, hasRelative } from \"./util.js\";\nimport * as English from \"./english.js\";\nimport Settings from \"../settings.js\";\nimport DateTime from \"../datetime.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n// todo - remap caching\n\nlet intlLFCache = {};\nfunction getCachedLF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlLFCache[key];\n if (!dtf) {\n dtf = new Intl.ListFormat(locString, opts);\n intlLFCache[key] = dtf;\n }\n return dtf;\n}\n\nlet intlDTCache = {};\nfunction getCachedDTF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlDTCache[key];\n if (!dtf) {\n dtf = new Intl.DateTimeFormat(locString, opts);\n intlDTCache[key] = dtf;\n }\n return dtf;\n}\n\nlet intlNumCache = {};\nfunction getCachedINF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let inf = intlNumCache[key];\n if (!inf) {\n inf = new Intl.NumberFormat(locString, opts);\n intlNumCache[key] = inf;\n }\n return inf;\n}\n\nlet intlRelCache = {};\nfunction getCachedRTF(locString, opts = {}) {\n const { base, ...cacheKeyOpts } = opts; // exclude `base` from the options\n const key = JSON.stringify([locString, cacheKeyOpts]);\n let inf = intlRelCache[key];\n if (!inf) {\n inf = new Intl.RelativeTimeFormat(locString, opts);\n intlRelCache[key] = inf;\n }\n return inf;\n}\n\nlet sysLocaleCache = null;\nfunction systemLocale() {\n if (sysLocaleCache) {\n return sysLocaleCache;\n } else {\n sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale;\n return sysLocaleCache;\n }\n}\n\nfunction parseLocaleString(localeStr) {\n // I really want to avoid writing a BCP 47 parser\n // see, e.g. https://github.com/wooorm/bcp-47\n // Instead, we'll do this:\n\n // a) if the string has no -u extensions, just leave it alone\n // b) if it does, use Intl to resolve everything\n // c) if Intl fails, try again without the -u\n\n const uIndex = localeStr.indexOf(\"-u-\");\n if (uIndex === -1) {\n return [localeStr];\n } else {\n let options;\n const smaller = localeStr.substring(0, uIndex);\n try {\n options = getCachedDTF(localeStr).resolvedOptions();\n } catch (e) {\n options = getCachedDTF(smaller).resolvedOptions();\n }\n\n const { numberingSystem, calendar } = options;\n // return the smaller one so that we can append the calendar and numbering overrides to it\n return [smaller, numberingSystem, calendar];\n }\n}\n\nfunction intlConfigString(localeStr, numberingSystem, outputCalendar) {\n if (outputCalendar || numberingSystem) {\n localeStr += \"-u\";\n\n if (outputCalendar) {\n localeStr += `-ca-${outputCalendar}`;\n }\n\n if (numberingSystem) {\n localeStr += `-nu-${numberingSystem}`;\n }\n return localeStr;\n } else {\n return localeStr;\n }\n}\n\nfunction mapMonths(f) {\n const ms = [];\n for (let i = 1; i <= 12; i++) {\n const dt = DateTime.utc(2016, i, 1);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction mapWeekdays(f) {\n const ms = [];\n for (let i = 1; i <= 7; i++) {\n const dt = DateTime.utc(2016, 11, 13 + i);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction listStuff(loc, length, defaultOK, englishFn, intlFn) {\n const mode = loc.listingMode(defaultOK);\n\n if (mode === \"error\") {\n return null;\n } else if (mode === \"en\") {\n return englishFn(length);\n } else {\n return intlFn(length);\n }\n}\n\nfunction supportsFastNumbers(loc) {\n if (loc.numberingSystem && loc.numberingSystem !== \"latn\") {\n return false;\n } else {\n return (\n loc.numberingSystem === \"latn\" ||\n !loc.locale ||\n loc.locale.startsWith(\"en\") ||\n new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === \"latn\"\n );\n }\n}\n\n/**\n * @private\n */\n\nclass PolyNumberFormatter {\n constructor(intl, forceSimple, opts) {\n this.padTo = opts.padTo || 0;\n this.floor = opts.floor || false;\n\n const { padTo, floor, ...otherOpts } = opts;\n\n if (!forceSimple || Object.keys(otherOpts).length > 0) {\n const intlOpts = { useGrouping: false, ...opts };\n if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;\n this.inf = getCachedINF(intl, intlOpts);\n }\n }\n\n format(i) {\n if (this.inf) {\n const fixed = this.floor ? Math.floor(i) : i;\n return this.inf.format(fixed);\n } else {\n // to match the browser's numberformatter defaults\n const fixed = this.floor ? Math.floor(i) : roundTo(i, 3);\n return padStart(fixed, this.padTo);\n }\n }\n}\n\n/**\n * @private\n */\n\nclass PolyDateFormatter {\n constructor(dt, intl, opts) {\n this.opts = opts;\n\n let z;\n if (dt.zone.isUniversal) {\n // UTC-8 or Etc/UTC-8 are not part of tzdata, only Etc/GMT+8 and the like.\n // That is why fixed-offset TZ is set to that unless it is:\n // 1. Representing offset 0 when UTC is used to maintain previous behavior and does not become GMT.\n // 2. Unsupported by the browser:\n // - some do not support Etc/\n // - < Etc/GMT-14, > Etc/GMT+12, and 30-minute or 45-minute offsets are not part of tzdata\n const gmtOffset = -1 * (dt.offset / 60);\n const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;\n if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {\n z = offsetZ;\n this.dt = dt;\n } else {\n // Not all fixed-offset zones like Etc/+4:30 are present in tzdata.\n // So we have to make do. Two cases:\n // 1. The format options tell us to show the zone. We can't do that, so the best\n // we can do is format the date in UTC.\n // 2. The format options don't tell us to show the zone. Then we can adjust them\n // the time and tell the formatter to show it to us in UTC, so that the time is right\n // and the bad zone doesn't show up.\n z = \"UTC\";\n if (opts.timeZoneName) {\n this.dt = dt;\n } else {\n this.dt = dt.offset === 0 ? dt : DateTime.fromMillis(dt.ts + dt.offset * 60 * 1000);\n }\n }\n } else if (dt.zone.type === \"system\") {\n this.dt = dt;\n } else {\n this.dt = dt;\n z = dt.zone.name;\n }\n\n const intlOpts = { ...this.opts };\n if (z) {\n intlOpts.timeZone = z;\n }\n this.dtf = getCachedDTF(intl, intlOpts);\n }\n\n format() {\n return this.dtf.format(this.dt.toJSDate());\n }\n\n formatToParts() {\n return this.dtf.formatToParts(this.dt.toJSDate());\n }\n\n resolvedOptions() {\n return this.dtf.resolvedOptions();\n }\n}\n\n/**\n * @private\n */\nclass PolyRelFormatter {\n constructor(intl, isEnglish, opts) {\n this.opts = { style: \"long\", ...opts };\n if (!isEnglish && hasRelative()) {\n this.rtf = getCachedRTF(intl, opts);\n }\n }\n\n format(count, unit) {\n if (this.rtf) {\n return this.rtf.format(count, unit);\n } else {\n return English.formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== \"long\");\n }\n }\n\n formatToParts(count, unit) {\n if (this.rtf) {\n return this.rtf.formatToParts(count, unit);\n } else {\n return [];\n }\n }\n}\n\n/**\n * @private\n */\n\nexport default class Locale {\n static fromOpts(opts) {\n return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.defaultToEN);\n }\n\n static create(locale, numberingSystem, outputCalendar, defaultToEN = false) {\n const specifiedLocale = locale || Settings.defaultLocale;\n // the system locale is useful for human readable strings but annoying for parsing/formatting known formats\n const localeR = specifiedLocale || (defaultToEN ? \"en-US\" : systemLocale());\n const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;\n const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;\n return new Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale);\n }\n\n static resetCache() {\n sysLocaleCache = null;\n intlDTCache = {};\n intlNumCache = {};\n intlRelCache = {};\n }\n\n static fromObject({ locale, numberingSystem, outputCalendar } = {}) {\n return Locale.create(locale, numberingSystem, outputCalendar);\n }\n\n constructor(locale, numbering, outputCalendar, specifiedLocale) {\n const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);\n\n this.locale = parsedLocale;\n this.numberingSystem = numbering || parsedNumberingSystem || null;\n this.outputCalendar = outputCalendar || parsedOutputCalendar || null;\n this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);\n\n this.weekdaysCache = { format: {}, standalone: {} };\n this.monthsCache = { format: {}, standalone: {} };\n this.meridiemCache = null;\n this.eraCache = {};\n\n this.specifiedLocale = specifiedLocale;\n this.fastNumbersCached = null;\n }\n\n get fastNumbers() {\n if (this.fastNumbersCached == null) {\n this.fastNumbersCached = supportsFastNumbers(this);\n }\n\n return this.fastNumbersCached;\n }\n\n listingMode() {\n const isActuallyEn = this.isEnglish();\n const hasNoWeirdness =\n (this.numberingSystem === null || this.numberingSystem === \"latn\") &&\n (this.outputCalendar === null || this.outputCalendar === \"gregory\");\n return isActuallyEn && hasNoWeirdness ? \"en\" : \"intl\";\n }\n\n clone(alts) {\n if (!alts || Object.getOwnPropertyNames(alts).length === 0) {\n return this;\n } else {\n return Locale.create(\n alts.locale || this.specifiedLocale,\n alts.numberingSystem || this.numberingSystem,\n alts.outputCalendar || this.outputCalendar,\n alts.defaultToEN || false\n );\n }\n }\n\n redefaultToEN(alts = {}) {\n return this.clone({ ...alts, defaultToEN: true });\n }\n\n redefaultToSystem(alts = {}) {\n return this.clone({ ...alts, defaultToEN: false });\n }\n\n months(length, format = false, defaultOK = true) {\n return listStuff(this, length, defaultOK, English.months, () => {\n const intl = format ? { month: length, day: \"numeric\" } : { month: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.monthsCache[formatStr][length]) {\n this.monthsCache[formatStr][length] = mapMonths((dt) => this.extract(dt, intl, \"month\"));\n }\n return this.monthsCache[formatStr][length];\n });\n }\n\n weekdays(length, format = false, defaultOK = true) {\n return listStuff(this, length, defaultOK, English.weekdays, () => {\n const intl = format\n ? { weekday: length, year: \"numeric\", month: \"long\", day: \"numeric\" }\n : { weekday: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.weekdaysCache[formatStr][length]) {\n this.weekdaysCache[formatStr][length] = mapWeekdays((dt) =>\n this.extract(dt, intl, \"weekday\")\n );\n }\n return this.weekdaysCache[formatStr][length];\n });\n }\n\n meridiems(defaultOK = true) {\n return listStuff(\n this,\n undefined,\n defaultOK,\n () => English.meridiems,\n () => {\n // In theory there could be aribitrary day periods. We're gonna assume there are exactly two\n // for AM and PM. This is probably wrong, but it's makes parsing way easier.\n if (!this.meridiemCache) {\n const intl = { hour: \"numeric\", hourCycle: \"h12\" };\n this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(\n (dt) => this.extract(dt, intl, \"dayperiod\")\n );\n }\n\n return this.meridiemCache;\n }\n );\n }\n\n eras(length, defaultOK = true) {\n return listStuff(this, length, defaultOK, English.eras, () => {\n const intl = { era: length };\n\n // This is problematic. Different calendars are going to define eras totally differently. What I need is the minimum set of dates\n // to definitely enumerate them.\n if (!this.eraCache[length]) {\n this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map((dt) =>\n this.extract(dt, intl, \"era\")\n );\n }\n\n return this.eraCache[length];\n });\n }\n\n extract(dt, intlOpts, field) {\n const df = this.dtFormatter(dt, intlOpts),\n results = df.formatToParts(),\n matching = results.find((m) => m.type.toLowerCase() === field);\n return matching ? matching.value : null;\n }\n\n numberFormatter(opts = {}) {\n // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave)\n // (in contrast, the rest of the condition is used heavily)\n return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);\n }\n\n dtFormatter(dt, intlOpts = {}) {\n return new PolyDateFormatter(dt, this.intl, intlOpts);\n }\n\n relFormatter(opts = {}) {\n return new PolyRelFormatter(this.intl, this.isEnglish(), opts);\n }\n\n listFormatter(opts = {}) {\n return getCachedLF(this.intl, opts);\n }\n\n isEnglish() {\n return (\n this.locale === \"en\" ||\n this.locale.toLowerCase() === \"en-us\" ||\n new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith(\"en-us\")\n );\n }\n\n equals(other) {\n return (\n this.locale === other.locale &&\n this.numberingSystem === other.numberingSystem &&\n this.outputCalendar === other.outputCalendar\n );\n }\n}\n","import {\n untruncateYear,\n signedOffset,\n parseInteger,\n parseMillis,\n ianaRegex,\n isUndefined,\n parseFloating\n} from \"./util.js\";\nimport * as English from \"./english.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n/*\n * This file handles parsing for well-specified formats. Here's how it works:\n * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match.\n * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object\n * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence.\n * Extractors can take a \"cursor\" representing the offset in the match to look at. This makes it easy to combine extractors.\n * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions.\n * Some extractions are super dumb and simpleParse and fromStrings help DRY them.\n */\n\nfunction combineRegexes(...regexes) {\n const full = regexes.reduce((f, r) => f + r.source, \"\");\n return RegExp(`^${full}$`);\n}\n\nfunction combineExtractors(...extractors) {\n return m =>\n extractors\n .reduce(\n ([mergedVals, mergedZone, cursor], ex) => {\n const [val, zone, next] = ex(m, cursor);\n return [{ ...mergedVals, ...val }, zone || mergedZone, next];\n },\n [{}, null, 1]\n )\n .slice(0, 2);\n}\n\nfunction parse(s, ...patterns) {\n if (s == null) {\n return [null, null];\n }\n\n for (const [regex, extractor] of patterns) {\n const m = regex.exec(s);\n if (m) {\n return extractor(m);\n }\n }\n return [null, null];\n}\n\nfunction simpleParse(...keys) {\n return (match, cursor) => {\n const ret = {};\n let i;\n\n for (i = 0; i < keys.length; i++) {\n ret[keys[i]] = parseInteger(match[cursor + i]);\n }\n return [ret, null, cursor + i];\n };\n}\n\n// ISO and SQL parsing\nconst offsetRegex = /(?:(Z)|([+-]\\d\\d)(?::?(\\d\\d))?)/;\nconst isoExtendedZone = `(?:${offsetRegex.source}?(?:\\\\[(${ianaRegex.source})\\\\])?)?`;\nconst isoTimeBaseRegex = /(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d{1,30}))?)?)?/;\nconst isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`);\nconst isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`);\nconst isoYmdRegex = /([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/;\nconst isoWeekRegex = /(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/;\nconst isoOrdinalRegex = /(\\d{4})-?(\\d{3})/;\nconst extractISOWeekData = simpleParse(\"weekYear\", \"weekNumber\", \"weekDay\");\nconst extractISOOrdinalData = simpleParse(\"year\", \"ordinal\");\nconst sqlYmdRegex = /(\\d{4})-(\\d\\d)-(\\d\\d)/; // dumbed-down version of the ISO one\nconst sqlTimeRegex = RegExp(\n `${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`\n);\nconst sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);\n\nfunction int(match, pos, fallback) {\n const m = match[pos];\n return isUndefined(m) ? fallback : parseInteger(m);\n}\n\nfunction extractISOYmd(match, cursor) {\n const item = {\n year: int(match, cursor),\n month: int(match, cursor + 1, 1),\n day: int(match, cursor + 2, 1)\n };\n\n return [item, null, cursor + 3];\n}\n\nfunction extractISOTime(match, cursor) {\n const item = {\n hours: int(match, cursor, 0),\n minutes: int(match, cursor + 1, 0),\n seconds: int(match, cursor + 2, 0),\n milliseconds: parseMillis(match[cursor + 3])\n };\n\n return [item, null, cursor + 4];\n}\n\nfunction extractISOOffset(match, cursor) {\n const local = !match[cursor] && !match[cursor + 1],\n fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]),\n zone = local ? null : FixedOffsetZone.instance(fullOffset);\n return [{}, zone, cursor + 3];\n}\n\nfunction extractIANAZone(match, cursor) {\n const zone = match[cursor] ? IANAZone.create(match[cursor]) : null;\n return [{}, zone, cursor + 1];\n}\n\n// ISO time parsing\n\nconst isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`);\n\n// ISO duration parsing\n\nconst isoDuration = /^-?P(?:(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)Y)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)W)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)D)?(?:T(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)H)?(?:(-?\\d{1,20}(?:\\.\\d{1,20})?)M)?(?:(-?\\d{1,20})(?:[.,](-?\\d{1,20}))?S)?)?)$/;\n\nfunction extractISODuration(match) {\n const [\n s,\n yearStr,\n monthStr,\n weekStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr,\n millisecondsStr\n ] = match;\n\n const hasNegativePrefix = s[0] === \"-\";\n const negativeSeconds = secondStr && secondStr[0] === \"-\";\n\n const maybeNegate = (num, force = false) =>\n num !== undefined && (force || (num && hasNegativePrefix)) ? -num : num;\n\n return [\n {\n years: maybeNegate(parseFloating(yearStr)),\n months: maybeNegate(parseFloating(monthStr)),\n weeks: maybeNegate(parseFloating(weekStr)),\n days: maybeNegate(parseFloating(dayStr)),\n hours: maybeNegate(parseFloating(hourStr)),\n minutes: maybeNegate(parseFloating(minuteStr)),\n seconds: maybeNegate(parseFloating(secondStr), secondStr === \"-0\"),\n milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds)\n }\n ];\n}\n\n// These are a little braindead. EDT *should* tell us that we're in, say, America/New_York\n// and not just that we're in -240 *right now*. But since I don't think these are used that often\n// I'm just going to ignore that\nconst obsOffsets = {\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n};\n\nfunction fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n const result = {\n year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr),\n month: English.monthsShort.indexOf(monthStr) + 1,\n day: parseInteger(dayStr),\n hour: parseInteger(hourStr),\n minute: parseInteger(minuteStr)\n };\n\n if (secondStr) result.second = parseInteger(secondStr);\n if (weekdayStr) {\n result.weekday =\n weekdayStr.length > 3\n ? English.weekdaysLong.indexOf(weekdayStr) + 1\n : English.weekdaysShort.indexOf(weekdayStr) + 1;\n }\n\n return result;\n}\n\n// RFC 2822/5322\nconst rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\\d\\d)(\\d\\d)))$/;\n\nfunction extractRFC2822(match) {\n const [\n ,\n weekdayStr,\n dayStr,\n monthStr,\n yearStr,\n hourStr,\n minuteStr,\n secondStr,\n obsOffset,\n milOffset,\n offHourStr,\n offMinuteStr\n ] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n\n let offset;\n if (obsOffset) {\n offset = obsOffsets[obsOffset];\n } else if (milOffset) {\n offset = 0;\n } else {\n offset = signedOffset(offHourStr, offMinuteStr);\n }\n\n return [result, new FixedOffsetZone(offset)];\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, \" \")\n .replace(/(\\s\\s+)/g, \" \")\n .trim();\n}\n\n// http date\n\nconst rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d\\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n rfc850 = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d\\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \\d|\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) (\\d{4})$/;\n\nfunction extractRFC1123Or850(match) {\n const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nfunction extractASCII(match) {\n const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nconst isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex);\nconst isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);\nconst isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);\nconst isoTimeCombinedRegex = combineRegexes(isoTimeRegex);\n\nconst extractISOYmdTimeAndOffset = combineExtractors(\n extractISOYmd,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOWeekTimeAndOffset = combineExtractors(\n extractISOWeekData,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOOrdinalDateAndTime = combineExtractors(\n extractISOOrdinalData,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOTimeAndOffset = combineExtractors(\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\n\n/*\n * @private\n */\n\nexport function parseISODate(s) {\n return parse(\n s,\n [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset],\n [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime],\n [isoTimeCombinedRegex, extractISOTimeAndOffset]\n );\n}\n\nexport function parseRFC2822Date(s) {\n return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]);\n}\n\nexport function parseHTTPDate(s) {\n return parse(\n s,\n [rfc1123, extractRFC1123Or850],\n [rfc850, extractRFC1123Or850],\n [ascii, extractASCII]\n );\n}\n\nexport function parseISODuration(s) {\n return parse(s, [isoDuration, extractISODuration]);\n}\n\nconst extractISOTimeOnly = combineExtractors(extractISOTime);\n\nexport function parseISOTimeOnly(s) {\n return parse(s, [isoTimeOnly, extractISOTimeOnly]);\n}\n\nconst sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);\nconst sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);\n\nconst extractISOTimeOffsetAndIANAZone = combineExtractors(\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\n\nexport function parseSQL(s) {\n return parse(\n s,\n [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]\n );\n}\n","import { InvalidArgumentError, InvalidDurationError, InvalidUnitError } from \"./errors.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport Invalid from \"./impl/invalid.js\";\nimport Locale from \"./impl/locale.js\";\nimport { parseISODuration, parseISOTimeOnly } from \"./impl/regexParser.js\";\nimport {\n asNumber,\n hasOwnProperty,\n isNumber,\n isUndefined,\n normalizeObject,\n roundTo,\n} from \"./impl/util.js\";\nimport Settings from \"./settings.js\";\n\nconst INVALID = \"Invalid Duration\";\n\n// unit conversion constants\nexport const lowOrderMatrix = {\n weeks: {\n days: 7,\n hours: 7 * 24,\n minutes: 7 * 24 * 60,\n seconds: 7 * 24 * 60 * 60,\n milliseconds: 7 * 24 * 60 * 60 * 1000,\n },\n days: {\n hours: 24,\n minutes: 24 * 60,\n seconds: 24 * 60 * 60,\n milliseconds: 24 * 60 * 60 * 1000,\n },\n hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1000 },\n minutes: { seconds: 60, milliseconds: 60 * 1000 },\n seconds: { milliseconds: 1000 },\n },\n casualMatrix = {\n years: {\n quarters: 4,\n months: 12,\n weeks: 52,\n days: 365,\n hours: 365 * 24,\n minutes: 365 * 24 * 60,\n seconds: 365 * 24 * 60 * 60,\n milliseconds: 365 * 24 * 60 * 60 * 1000,\n },\n quarters: {\n months: 3,\n weeks: 13,\n days: 91,\n hours: 91 * 24,\n minutes: 91 * 24 * 60,\n seconds: 91 * 24 * 60 * 60,\n milliseconds: 91 * 24 * 60 * 60 * 1000,\n },\n months: {\n weeks: 4,\n days: 30,\n hours: 30 * 24,\n minutes: 30 * 24 * 60,\n seconds: 30 * 24 * 60 * 60,\n milliseconds: 30 * 24 * 60 * 60 * 1000,\n },\n\n ...lowOrderMatrix,\n },\n daysInYearAccurate = 146097.0 / 400,\n daysInMonthAccurate = 146097.0 / 4800,\n accurateMatrix = {\n years: {\n quarters: 4,\n months: 12,\n weeks: daysInYearAccurate / 7,\n days: daysInYearAccurate,\n hours: daysInYearAccurate * 24,\n minutes: daysInYearAccurate * 24 * 60,\n seconds: daysInYearAccurate * 24 * 60 * 60,\n milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000,\n },\n quarters: {\n months: 3,\n weeks: daysInYearAccurate / 28,\n days: daysInYearAccurate / 4,\n hours: (daysInYearAccurate * 24) / 4,\n minutes: (daysInYearAccurate * 24 * 60) / 4,\n seconds: (daysInYearAccurate * 24 * 60 * 60) / 4,\n milliseconds: (daysInYearAccurate * 24 * 60 * 60 * 1000) / 4,\n },\n months: {\n weeks: daysInMonthAccurate / 7,\n days: daysInMonthAccurate,\n hours: daysInMonthAccurate * 24,\n minutes: daysInMonthAccurate * 24 * 60,\n seconds: daysInMonthAccurate * 24 * 60 * 60,\n milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000,\n },\n ...lowOrderMatrix,\n };\n\n// units ordered by size\nconst orderedUnits = [\n \"years\",\n \"quarters\",\n \"months\",\n \"weeks\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\",\n];\n\nconst reverseUnits = orderedUnits.slice(0).reverse();\n\n// clone really means \"create another instance just like this one, but with these changes\"\nfunction clone(dur, alts, clear = false) {\n // deep merge for vals\n const conf = {\n values: clear ? alts.values : { ...dur.values, ...(alts.values || {}) },\n loc: dur.loc.clone(alts.loc),\n conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,\n };\n return new Duration(conf);\n}\n\nfunction antiTrunc(n) {\n return n < 0 ? Math.floor(n) : Math.ceil(n);\n}\n\n// NB: mutates parameters\nfunction convert(matrix, fromMap, fromUnit, toMap, toUnit) {\n const conv = matrix[toUnit][fromUnit],\n raw = fromMap[fromUnit] / conv,\n sameSign = Math.sign(raw) === Math.sign(toMap[toUnit]),\n // ok, so this is wild, but see the matrix in the tests\n added =\n !sameSign && toMap[toUnit] !== 0 && Math.abs(raw) <= 1 ? antiTrunc(raw) : Math.trunc(raw);\n toMap[toUnit] += added;\n fromMap[fromUnit] -= added * conv;\n}\n\n// NB: mutates parameters\nfunction normalizeValues(matrix, vals) {\n reverseUnits.reduce((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n convert(matrix, vals, previous, vals, current);\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n}\n\n/**\n * A Duration object represents a period of time, like \"2 months\" or \"1 day, 1 hour\". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime#plus} to add a Duration object to a DateTime, producing another DateTime.\n *\n * Here is a brief overview of commonly used methods and getters in Duration:\n *\n * * **Creation** To create a Duration, use {@link Duration#fromMillis}, {@link Duration#fromObject}, or {@link Duration#fromISO}.\n * * **Unit values** See the {@link Duration#years}, {@link Duration#months}, {@link Duration#weeks}, {@link Duration#days}, {@link Duration#hours}, {@link Duration#minutes}, {@link Duration#seconds}, {@link Duration#milliseconds} accessors.\n * * **Configuration** See {@link Duration#locale} and {@link Duration#numberingSystem} accessors.\n * * **Transformation** To create new Durations out of old ones use {@link Duration#plus}, {@link Duration#minus}, {@link Duration#normalize}, {@link Duration#set}, {@link Duration#reconfigure}, {@link Duration#shiftTo}, and {@link Duration#negate}.\n * * **Output** To convert the Duration into other representations, see {@link Duration#as}, {@link Duration#toISO}, {@link Duration#toFormat}, and {@link Duration#toJSON}\n *\n * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation.\n */\nexport default class Duration {\n /**\n * @private\n */\n constructor(config) {\n const accurate = config.conversionAccuracy === \"longterm\" || false;\n /**\n * @access private\n */\n this.values = config.values;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.conversionAccuracy = accurate ? \"longterm\" : \"casual\";\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.matrix = accurate ? accurateMatrix : casualMatrix;\n /**\n * @access private\n */\n this.isLuxonDuration = true;\n }\n\n /**\n * Create Duration from a number of milliseconds.\n * @param {number} count of milliseconds\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n static fromMillis(count, opts) {\n return Duration.fromObject({ milliseconds: count }, opts);\n }\n\n /**\n * Create a Duration from a JavaScript object with keys like 'years' and 'hours'.\n * If this object is empty then a zero milliseconds duration is returned.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.years\n * @param {number} obj.quarters\n * @param {number} obj.months\n * @param {number} obj.weeks\n * @param {number} obj.days\n * @param {number} obj.hours\n * @param {number} obj.minutes\n * @param {number} obj.seconds\n * @param {number} obj.milliseconds\n * @param {Object} [opts=[]] - options for creating this Duration\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n static fromObject(obj, opts = {}) {\n if (obj == null || typeof obj !== \"object\") {\n throw new InvalidArgumentError(\n `Duration.fromObject: argument expected to be an object, got ${\n obj === null ? \"null\" : typeof obj\n }`\n );\n }\n\n return new Duration({\n values: normalizeObject(obj, Duration.normalizeUnit),\n loc: Locale.fromObject(opts),\n conversionAccuracy: opts.conversionAccuracy,\n });\n }\n\n /**\n * Create a Duration from DurationLike.\n *\n * @param {Object | number | Duration} durationLike\n * One of:\n * - object with keys like 'years' and 'hours'.\n * - number representing milliseconds\n * - Duration instance\n * @return {Duration}\n */\n static fromDurationLike(durationLike) {\n if (isNumber(durationLike)) {\n return Duration.fromMillis(durationLike);\n } else if (Duration.isDuration(durationLike)) {\n return durationLike;\n } else if (typeof durationLike === \"object\") {\n return Duration.fromObject(durationLike);\n } else {\n throw new InvalidArgumentError(\n `Unknown duration argument ${durationLike} of type ${typeof durationLike}`\n );\n }\n }\n\n /**\n * Create a Duration from an ISO 8601 duration string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }\n * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }\n * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }\n * @return {Duration}\n */\n static fromISO(text, opts) {\n const [parsed] = parseISODuration(text);\n if (parsed) {\n return Duration.fromObject(parsed, opts);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create a Duration from an ISO 8601 time string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 }\n * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @return {Duration}\n */\n static fromISOTime(text, opts) {\n const [parsed] = parseISOTimeOnly(text);\n if (parsed) {\n return Duration.fromObject(parsed, opts);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create an invalid Duration.\n * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Duration}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Duration is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDurationError(invalid);\n } else {\n return new Duration({ invalid });\n }\n }\n\n /**\n * @private\n */\n static normalizeUnit(unit) {\n const normalized = {\n year: \"years\",\n years: \"years\",\n quarter: \"quarters\",\n quarters: \"quarters\",\n month: \"months\",\n months: \"months\",\n week: \"weeks\",\n weeks: \"weeks\",\n day: \"days\",\n days: \"days\",\n hour: \"hours\",\n hours: \"hours\",\n minute: \"minutes\",\n minutes: \"minutes\",\n second: \"seconds\",\n seconds: \"seconds\",\n millisecond: \"milliseconds\",\n milliseconds: \"milliseconds\",\n }[unit ? unit.toLowerCase() : unit];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n }\n\n /**\n * Check if an object is a Duration. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDuration(o) {\n return (o && o.isLuxonDuration) || false;\n }\n\n /**\n * Get the locale of a Duration, such 'en-GB'\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:\n * * `S` for milliseconds\n * * `s` for seconds\n * * `m` for minutes\n * * `h` for hours\n * * `d` for days\n * * `w` for weeks\n * * `M` for months\n * * `y` for years\n * Notes:\n * * Add padding by repeating the token, e.g. \"yy\" pads the years to two digits, \"hhhh\" pads the hours out to four digits\n * * Tokens can be escaped by wrapping with single quotes.\n * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.\n * @param {string} fmt - the format string\n * @param {Object} opts - options\n * @param {boolean} [opts.floor=true] - floor numerical values\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"y d s\") //=> \"1 6 2\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"yy dd sss\") //=> \"01 06 002\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"M S\") //=> \"12 518402000\"\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n // reverse-compat since 1.2; we always round down now, never up, and we do it by default\n const fmtOpts = {\n ...opts,\n floor: opts.round !== false && opts.floor !== false,\n };\n return this.isValid\n ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a string representation of a Duration with all units included.\n * To modify its behavior use the `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat\n * @param opts - On option object to override the formatting. Accepts the same keys as the options parameter of the native `Int.NumberFormat` constructor, as well as `listStyle`.\n * @example\n * ```js\n * var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 })\n * dur.toHuman() //=> '1 day, 5 hours, 6 minutes'\n * dur.toHuman({ listStyle: \"long\" }) //=> '1 day, 5 hours, and 6 minutes'\n * dur.toHuman({ unitDisplay: \"short\" }) //=> '1 day, 5 hr, 6 min'\n * ```\n */\n toHuman(opts = {}) {\n const l = orderedUnits\n .map((unit) => {\n const val = this.values[unit];\n if (isUndefined(val)) {\n return null;\n }\n return this.loc\n .numberFormatter({ style: \"unit\", unitDisplay: \"long\", ...opts, unit: unit.slice(0, -1) })\n .format(val);\n })\n .filter((n) => n);\n\n return this.loc\n .listFormatter({ type: \"conjunction\", style: opts.listStyle || \"narrow\", ...opts })\n .format(l);\n }\n\n /**\n * Returns a JavaScript object with this Duration's values.\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }\n * @return {Object}\n */\n toObject() {\n if (!this.isValid) return {};\n return { ...this.values };\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'\n * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'\n * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'\n * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'\n * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'\n * @return {string}\n */\n toISO() {\n // we could use the formatter, but this is an easier way to get the minimum string\n if (!this.isValid) return null;\n\n let s = \"P\";\n if (this.years !== 0) s += this.years + \"Y\";\n if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + \"M\";\n if (this.weeks !== 0) s += this.weeks + \"W\";\n if (this.days !== 0) s += this.days + \"D\";\n if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0)\n s += \"T\";\n if (this.hours !== 0) s += this.hours + \"H\";\n if (this.minutes !== 0) s += this.minutes + \"M\";\n if (this.seconds !== 0 || this.milliseconds !== 0)\n // this will handle \"floating point madness\" by removing extra decimal places\n // https://stackoverflow.com/questions/588004/is-floating-point-math-broken\n s += roundTo(this.seconds + this.milliseconds / 1000, 3) + \"S\";\n if (s === \"P\") s += \"T0S\";\n return s;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.\n * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000'\n * @return {string}\n */\n toISOTime(opts = {}) {\n if (!this.isValid) return null;\n\n const millis = this.toMillis();\n if (millis < 0 || millis >= 86400000) return null;\n\n opts = {\n suppressMilliseconds: false,\n suppressSeconds: false,\n includePrefix: false,\n format: \"extended\",\n ...opts,\n };\n\n const value = this.shiftTo(\"hours\", \"minutes\", \"seconds\", \"milliseconds\");\n\n let fmt = opts.format === \"basic\" ? \"hhmm\" : \"hh:mm\";\n\n if (!opts.suppressSeconds || value.seconds !== 0 || value.milliseconds !== 0) {\n fmt += opts.format === \"basic\" ? \"ss\" : \":ss\";\n if (!opts.suppressMilliseconds || value.milliseconds !== 0) {\n fmt += \".SSS\";\n }\n }\n\n let str = value.toFormat(fmt);\n\n if (opts.includePrefix) {\n str = \"T\" + str;\n }\n\n return str;\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.\n * @return {string}\n */\n toString() {\n return this.toISO();\n }\n\n /**\n * Returns an milliseconds value of this Duration.\n * @return {number}\n */\n toMillis() {\n return this.as(\"milliseconds\");\n }\n\n /**\n * Returns an milliseconds value of this Duration. Alias of {@link toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Make this Duration longer by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n plus(duration) {\n if (!this.isValid) return this;\n\n const dur = Duration.fromDurationLike(duration),\n result = {};\n\n for (const k of orderedUnits) {\n if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {\n result[k] = dur.get(k) + this.get(k);\n }\n }\n\n return clone(this, { values: result }, true);\n }\n\n /**\n * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n minus(duration) {\n if (!this.isValid) return this;\n\n const dur = Duration.fromDurationLike(duration);\n return this.plus(dur.negate());\n }\n\n /**\n * Scale this Duration by the specified amount. Return a newly-constructed Duration.\n * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === \"hour\" ? x * 2 : x) //=> { hours: 2, minutes: 30 }\n * @return {Duration}\n */\n mapUnits(fn) {\n if (!this.isValid) return this;\n const result = {};\n for (const k of Object.keys(this.values)) {\n result[k] = asNumber(fn(this.values[k], k));\n }\n return clone(this, { values: result }, true);\n }\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2\n * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0\n * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3\n * @return {number}\n */\n get(unit) {\n return this[Duration.normalizeUnit(unit)];\n }\n\n /**\n * \"Set\" the values of specified units. Return a newly-constructed Duration.\n * @param {Object} values - a mapping of units to numbers\n * @example dur.set({ years: 2017 })\n * @example dur.set({ hours: 8, minutes: 30 })\n * @return {Duration}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const mixed = { ...this.values, ...normalizeObject(values, Duration.normalizeUnit) };\n return clone(this, { values: mixed });\n }\n\n /**\n * \"Set\" the locale and/or numberingSystem. Returns a newly-constructed Duration.\n * @example dur.reconfigure({ locale: 'en-GB' })\n * @return {Duration}\n */\n reconfigure({ locale, numberingSystem, conversionAccuracy } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem }),\n opts = { loc };\n\n if (conversionAccuracy) {\n opts.conversionAccuracy = conversionAccuracy;\n }\n\n return clone(this, opts);\n }\n\n /**\n * Return the length of the duration in the specified unit.\n * @param {string} unit - a unit such as 'minutes' or 'days'\n * @example Duration.fromObject({years: 1}).as('days') //=> 365\n * @example Duration.fromObject({years: 1}).as('months') //=> 12\n * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5\n * @return {number}\n */\n as(unit) {\n return this.isValid ? this.shiftTo(unit).get(unit) : NaN;\n }\n\n /**\n * Reduce this Duration to its canonical representation in its current units.\n * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }\n * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }\n * @return {Duration}\n */\n normalize() {\n if (!this.isValid) return this;\n const vals = this.toObject();\n normalizeValues(this.matrix, vals);\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Convert this Duration into its representation in a different set of units.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }\n * @return {Duration}\n */\n shiftTo(...units) {\n if (!this.isValid) return this;\n\n if (units.length === 0) {\n return this;\n }\n\n units = units.map((u) => Duration.normalizeUnit(u));\n\n const built = {},\n accumulated = {},\n vals = this.toObject();\n let lastUnit;\n\n for (const k of orderedUnits) {\n if (units.indexOf(k) >= 0) {\n lastUnit = k;\n\n let own = 0;\n\n // anything we haven't boiled down yet should get boiled to this unit\n for (const ak in accumulated) {\n own += this.matrix[ak][k] * accumulated[ak];\n accumulated[ak] = 0;\n }\n\n // plus anything that's already in this unit\n if (isNumber(vals[k])) {\n own += vals[k];\n }\n\n const i = Math.trunc(own);\n built[k] = i;\n accumulated[k] = (own * 1000 - i * 1000) / 1000;\n\n // plus anything further down the chain that should be rolled up in to this\n for (const down in vals) {\n if (orderedUnits.indexOf(down) > orderedUnits.indexOf(k)) {\n convert(this.matrix, vals, down, built, k);\n }\n }\n // otherwise, keep it in the wings to boil it later\n } else if (isNumber(vals[k])) {\n accumulated[k] = vals[k];\n }\n }\n\n // anything leftover becomes the decimal for the last unit\n // lastUnit must be defined since units is not empty\n for (const key in accumulated) {\n if (accumulated[key] !== 0) {\n built[lastUnit] +=\n key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key];\n }\n }\n\n return clone(this, { values: built }, true).normalize();\n }\n\n /**\n * Return the negative of this Duration.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }\n * @return {Duration}\n */\n negate() {\n if (!this.isValid) return this;\n const negated = {};\n for (const k of Object.keys(this.values)) {\n negated[k] = this.values[k] === 0 ? 0 : -this.values[k];\n }\n return clone(this, { values: negated }, true);\n }\n\n /**\n * Get the years.\n * @type {number}\n */\n get years() {\n return this.isValid ? this.values.years || 0 : NaN;\n }\n\n /**\n * Get the quarters.\n * @type {number}\n */\n get quarters() {\n return this.isValid ? this.values.quarters || 0 : NaN;\n }\n\n /**\n * Get the months.\n * @type {number}\n */\n get months() {\n return this.isValid ? this.values.months || 0 : NaN;\n }\n\n /**\n * Get the weeks\n * @type {number}\n */\n get weeks() {\n return this.isValid ? this.values.weeks || 0 : NaN;\n }\n\n /**\n * Get the days.\n * @type {number}\n */\n get days() {\n return this.isValid ? this.values.days || 0 : NaN;\n }\n\n /**\n * Get the hours.\n * @type {number}\n */\n get hours() {\n return this.isValid ? this.values.hours || 0 : NaN;\n }\n\n /**\n * Get the minutes.\n * @type {number}\n */\n get minutes() {\n return this.isValid ? this.values.minutes || 0 : NaN;\n }\n\n /**\n * Get the seconds.\n * @return {number}\n */\n get seconds() {\n return this.isValid ? this.values.seconds || 0 : NaN;\n }\n\n /**\n * Get the milliseconds.\n * @return {number}\n */\n get milliseconds() {\n return this.isValid ? this.values.milliseconds || 0 : NaN;\n }\n\n /**\n * Returns whether the Duration is invalid. Invalid durations are returned by diff operations\n * on invalid DateTimes or Intervals.\n * @return {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this Duration became invalid, or null if the Duration is valid\n * @return {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Duration became invalid, or null if the Duration is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Equality check\n * Two Durations are equal iff they have the same units and the same values for each unit.\n * @param {Duration} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n if (!this.loc.equals(other.loc)) {\n return false;\n }\n\n function eq(v1, v2) {\n // Consider 0 and undefined as equal\n if (v1 === undefined || v1 === 0) return v2 === undefined || v2 === 0;\n return v1 === v2;\n }\n\n for (const u of orderedUnits) {\n if (!eq(this.values[u], other.values[u])) {\n return false;\n }\n }\n return true;\n }\n}\n","import DateTime, { friendlyDateTime } from \"./datetime.js\";\nimport Duration from \"./duration.js\";\nimport Settings from \"./settings.js\";\nimport { InvalidArgumentError, InvalidIntervalError } from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid Interval\";\n\n// checks if the start is equal to or before the end\nfunction validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\n \"end before start\",\n `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`\n );\n } else {\n return null;\n }\n}\n\n/**\n * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them.\n *\n * Here is a brief overview of the most commonly used methods and getters in Interval:\n *\n * * **Creation** To create an Interval, use {@link Interval#fromDateTimes}, {@link Interval#after}, {@link Interval#before}, or {@link Interval#fromISO}.\n * * **Accessors** Use {@link Interval#start} and {@link Interval#end} to get the start and end.\n * * **Interrogation** To analyze the Interval, use {@link Interval#count}, {@link Interval#length}, {@link Interval#hasSame}, {@link Interval#contains}, {@link Interval#isAfter}, or {@link Interval#isBefore}.\n * * **Transformation** To create other Intervals out of this one, use {@link Interval#set}, {@link Interval#splitAt}, {@link Interval#splitBy}, {@link Interval#divideEqually}, {@link Interval#merge}, {@link Interval#xor}, {@link Interval#union}, {@link Interval#intersection}, or {@link Interval#difference}.\n * * **Comparison** To compare this Interval to another one, use {@link Interval#equals}, {@link Interval#overlaps}, {@link Interval#abutsStart}, {@link Interval#abutsEnd}, {@link Interval#engulfs}\n * * **Output** To convert the Interval into other representations, see {@link Interval#toString}, {@link Interval#toISO}, {@link Interval#toISODate}, {@link Interval#toISOTime}, {@link Interval#toFormat}, and {@link Interval#toDuration}.\n */\nexport default class Interval {\n /**\n * @private\n */\n constructor(config) {\n /**\n * @access private\n */\n this.s = config.start;\n /**\n * @access private\n */\n this.e = config.end;\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.isLuxonInterval = true;\n }\n\n /**\n * Create an invalid Interval.\n * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Interval}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Interval is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidIntervalError(invalid);\n } else {\n return new Interval({ invalid });\n }\n }\n\n /**\n * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.\n * @param {DateTime|Date|Object} start\n * @param {DateTime|Date|Object} end\n * @return {Interval}\n */\n static fromDateTimes(start, end) {\n const builtStart = friendlyDateTime(start),\n builtEnd = friendlyDateTime(end);\n\n const validateError = validateStartEnd(builtStart, builtEnd);\n\n if (validateError == null) {\n return new Interval({\n start: builtStart,\n end: builtEnd,\n });\n } else {\n return validateError;\n }\n }\n\n /**\n * Create an Interval from a start DateTime and a Duration to extend to.\n * @param {DateTime|Date|Object} start\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static after(start, duration) {\n const dur = Duration.fromDurationLike(duration),\n dt = friendlyDateTime(start);\n return Interval.fromDateTimes(dt, dt.plus(dur));\n }\n\n /**\n * Create an Interval from an end DateTime and a Duration to extend backwards to.\n * @param {DateTime|Date|Object} end\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static before(end, duration) {\n const dur = Duration.fromDurationLike(duration),\n dt = friendlyDateTime(end);\n return Interval.fromDateTimes(dt.minus(dur), dt);\n }\n\n /**\n * Create an Interval from an ISO 8601 string.\n * Accepts `<start>/<end>`, `<start>/<duration>`, and `<duration>/<end>` formats.\n * @param {string} text - the ISO string to parse\n * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {Interval}\n */\n static fromISO(text, opts) {\n const [s, e] = (text || \"\").split(\"/\", 2);\n if (s && e) {\n let start, startIsValid;\n try {\n start = DateTime.fromISO(s, opts);\n startIsValid = start.isValid;\n } catch (e) {\n startIsValid = false;\n }\n\n let end, endIsValid;\n try {\n end = DateTime.fromISO(e, opts);\n endIsValid = end.isValid;\n } catch (e) {\n endIsValid = false;\n }\n\n if (startIsValid && endIsValid) {\n return Interval.fromDateTimes(start, end);\n }\n\n if (startIsValid) {\n const dur = Duration.fromISO(e, opts);\n if (dur.isValid) {\n return Interval.after(start, dur);\n }\n } else if (endIsValid) {\n const dur = Duration.fromISO(s, opts);\n if (dur.isValid) {\n return Interval.before(end, dur);\n }\n }\n }\n return Interval.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n\n /**\n * Check if an object is an Interval. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isInterval(o) {\n return (o && o.isLuxonInterval) || false;\n }\n\n /**\n * Returns the start of the Interval\n * @type {DateTime}\n */\n get start() {\n return this.isValid ? this.s : null;\n }\n\n /**\n * Returns the end of the Interval\n * @type {DateTime}\n */\n get end() {\n return this.isValid ? this.e : null;\n }\n\n /**\n * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.\n * @type {boolean}\n */\n get isValid() {\n return this.invalidReason === null;\n }\n\n /**\n * Returns an error code if this Interval is invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Interval became invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Returns the length of the Interval in the specified unit.\n * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.\n * @return {number}\n */\n length(unit = \"milliseconds\") {\n return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN;\n }\n\n /**\n * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.\n * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'\n * asks 'what dates are included in this interval?', not 'how many days long is this interval?'\n * @param {string} [unit='milliseconds'] - the unit of time to count.\n * @return {number}\n */\n count(unit = \"milliseconds\") {\n if (!this.isValid) return NaN;\n const start = this.start.startOf(unit),\n end = this.end.startOf(unit);\n return Math.floor(end.diff(start, unit).get(unit)) + 1;\n }\n\n /**\n * Returns whether this Interval's start and end are both in the same unit of time\n * @param {string} unit - the unit of time to check sameness on\n * @return {boolean}\n */\n hasSame(unit) {\n return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;\n }\n\n /**\n * Return whether this Interval has the same start and end DateTimes.\n * @return {boolean}\n */\n isEmpty() {\n return this.s.valueOf() === this.e.valueOf();\n }\n\n /**\n * Return whether this Interval's start is after the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isAfter(dateTime) {\n if (!this.isValid) return false;\n return this.s > dateTime;\n }\n\n /**\n * Return whether this Interval's end is before the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isBefore(dateTime) {\n if (!this.isValid) return false;\n return this.e <= dateTime;\n }\n\n /**\n * Return whether this Interval contains the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n contains(dateTime) {\n if (!this.isValid) return false;\n return this.s <= dateTime && this.e > dateTime;\n }\n\n /**\n * \"Sets\" the start and/or end dates. Returns a newly-constructed Interval.\n * @param {Object} values - the values to set\n * @param {DateTime} values.start - the starting DateTime\n * @param {DateTime} values.end - the ending DateTime\n * @return {Interval}\n */\n set({ start, end } = {}) {\n if (!this.isValid) return this;\n return Interval.fromDateTimes(start || this.s, end || this.e);\n }\n\n /**\n * Split this Interval at each of the specified DateTimes\n * @param {...DateTime} dateTimes - the unit of time to count.\n * @return {Array}\n */\n splitAt(...dateTimes) {\n if (!this.isValid) return [];\n const sorted = dateTimes\n .map(friendlyDateTime)\n .filter((d) => this.contains(d))\n .sort(),\n results = [];\n let { s } = this,\n i = 0;\n\n while (s < this.e) {\n const added = sorted[i] || this.e,\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n i += 1;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into smaller Intervals, each of the specified length.\n * Left over time is grouped into a smaller interval\n * @param {Duration|Object|number} duration - The length of each resulting interval.\n * @return {Array}\n */\n splitBy(duration) {\n const dur = Duration.fromDurationLike(duration);\n\n if (!this.isValid || !dur.isValid || dur.as(\"milliseconds\") === 0) {\n return [];\n }\n\n let { s } = this,\n idx = 1,\n next;\n\n const results = [];\n while (s < this.e) {\n const added = this.start.plus(dur.mapUnits((x) => x * idx));\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n idx += 1;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into the specified number of smaller intervals.\n * @param {number} numberOfParts - The number of Intervals to divide the Interval into.\n * @return {Array}\n */\n divideEqually(numberOfParts) {\n if (!this.isValid) return [];\n return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);\n }\n\n /**\n * Return whether this Interval overlaps with the specified Interval\n * @param {Interval} other\n * @return {boolean}\n */\n overlaps(other) {\n return this.e > other.s && this.s < other.e;\n }\n\n /**\n * Return whether this Interval's end is adjacent to the specified Interval's start.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsStart(other) {\n if (!this.isValid) return false;\n return +this.e === +other.s;\n }\n\n /**\n * Return whether this Interval's start is adjacent to the specified Interval's end.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsEnd(other) {\n if (!this.isValid) return false;\n return +other.e === +this.s;\n }\n\n /**\n * Return whether this Interval engulfs the start and end of the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n engulfs(other) {\n if (!this.isValid) return false;\n return this.s <= other.s && this.e >= other.e;\n }\n\n /**\n * Return whether this Interval has the same start and end as the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n return this.s.equals(other.s) && this.e.equals(other.e);\n }\n\n /**\n * Return an Interval representing the intersection of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.\n * Returns null if the intersection is empty, meaning, the intervals don't intersect.\n * @param {Interval} other\n * @return {Interval}\n */\n intersection(other) {\n if (!this.isValid) return this;\n const s = this.s > other.s ? this.s : other.s,\n e = this.e < other.e ? this.e : other.e;\n\n if (s >= e) {\n return null;\n } else {\n return Interval.fromDateTimes(s, e);\n }\n }\n\n /**\n * Return an Interval representing the union of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.\n * @param {Interval} other\n * @return {Interval}\n */\n union(other) {\n if (!this.isValid) return this;\n const s = this.s < other.s ? this.s : other.s,\n e = this.e > other.e ? this.e : other.e;\n return Interval.fromDateTimes(s, e);\n }\n\n /**\n * Merge an array of Intervals into a equivalent minimal set of Intervals.\n * Combines overlapping and adjacent Intervals.\n * @param {Array} intervals\n * @return {Array}\n */\n static merge(intervals) {\n const [found, final] = intervals\n .sort((a, b) => a.s - b.s)\n .reduce(\n ([sofar, current], item) => {\n if (!current) {\n return [sofar, item];\n } else if (current.overlaps(item) || current.abutsStart(item)) {\n return [sofar, current.union(item)];\n } else {\n return [sofar.concat([current]), item];\n }\n },\n [[], null]\n );\n if (final) {\n found.push(final);\n }\n return found;\n }\n\n /**\n * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.\n * @param {Array} intervals\n * @return {Array}\n */\n static xor(intervals) {\n let start = null,\n currentCount = 0;\n const results = [],\n ends = intervals.map((i) => [\n { time: i.s, type: \"s\" },\n { time: i.e, type: \"e\" },\n ]),\n flattened = Array.prototype.concat(...ends),\n arr = flattened.sort((a, b) => a.time - b.time);\n\n for (const i of arr) {\n currentCount += i.type === \"s\" ? 1 : -1;\n\n if (currentCount === 1) {\n start = i.time;\n } else {\n if (start && +start !== +i.time) {\n results.push(Interval.fromDateTimes(start, i.time));\n }\n\n start = null;\n }\n }\n\n return Interval.merge(results);\n }\n\n /**\n * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.\n * @param {...Interval} intervals\n * @return {Array}\n */\n difference(...intervals) {\n return Interval.xor([this].concat(intervals))\n .map((i) => this.intersection(i))\n .filter((i) => i && !i.isEmpty());\n }\n\n /**\n * Returns a string representation of this Interval appropriate for debugging.\n * @return {string}\n */\n toString() {\n if (!this.isValid) return INVALID;\n return `[${this.s.toISO()} – ${this.e.toISO()})`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Interval.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */\n toISO(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of date of this Interval.\n * The time components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {string}\n */\n toISODate() {\n if (!this.isValid) return INVALID;\n return `${this.s.toISODate()}/${this.e.toISODate()}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of time of this Interval.\n * The date components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */\n toISOTime(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this Interval formatted according to the specified format string.\n * @param {string} dateFormat - the format string. This string formats the start and end time. See {@link DateTime#toFormat} for details.\n * @param {Object} opts - options\n * @param {string} [opts.separator = ' – '] - a separator to place between the start and end representations\n * @return {string}\n */\n toFormat(dateFormat, { separator = \" – \" } = {}) {\n if (!this.isValid) return INVALID;\n return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`;\n }\n\n /**\n * Return a Duration representing the time spanned by this interval.\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }\n * @return {Duration}\n */\n toDuration(unit, opts) {\n if (!this.isValid) {\n return Duration.invalid(this.invalidReason);\n }\n return this.e.diff(this.s, unit, opts);\n }\n\n /**\n * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes\n * @param {function} mapFn\n * @return {Interval}\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))\n */\n mapEndpoints(mapFn) {\n return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));\n }\n}\n","import DateTime from \"./datetime.js\";\nimport Settings from \"./settings.js\";\nimport Locale from \"./impl/locale.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nimport { hasRelative } from \"./impl/util.js\";\n\n/**\n * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment.\n */\nexport default class Info {\n /**\n * Return whether the specified zone contains a DST.\n * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.\n * @return {boolean}\n */\n static hasDST(zone = Settings.defaultZone) {\n const proto = DateTime.now().setZone(zone).set({ month: 12 });\n\n return !zone.isUniversal && proto.offset !== proto.set({ month: 6 }).offset;\n }\n\n /**\n * Return whether the specified zone is a valid IANA specifier.\n * @param {string} zone - Zone to check\n * @return {boolean}\n */\n static isValidIANAZone(zone) {\n return IANAZone.isValidZone(zone);\n }\n\n /**\n * Converts the input into a {@link Zone} instance.\n *\n * * If `input` is already a Zone instance, it is returned unchanged.\n * * If `input` is a string containing a valid time zone name, a Zone instance\n * with that name is returned.\n * * If `input` is a string that doesn't refer to a known time zone, a Zone\n * instance with {@link Zone#isValid} == false is returned.\n * * If `input is a number, a Zone instance with the specified fixed offset\n * in minutes is returned.\n * * If `input` is `null` or `undefined`, the default zone is returned.\n * @param {string|Zone|number} [input] - the value to be converted\n * @return {Zone}\n */\n static normalizeZone(input) {\n return normalizeZone(input, Settings.defaultZone);\n }\n\n /**\n * Return an array of standalone month names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @example Info.months()[0] //=> 'January'\n * @example Info.months('short')[0] //=> 'Jan'\n * @example Info.months('numeric')[0] //=> '1'\n * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'\n * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'\n * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'\n * @return {Array}\n */\n static months(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null, outputCalendar = \"gregory\" } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length);\n }\n\n /**\n * Return an array of format month names.\n * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that\n * changes the string.\n * See {@link Info#months}\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @return {Array}\n */\n static monthsFormat(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null, outputCalendar = \"gregory\" } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length, true);\n }\n\n /**\n * Return an array of standalone week names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @example Info.weekdays()[0] //=> 'Monday'\n * @example Info.weekdays('short')[0] //=> 'Mon'\n * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'\n * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'\n * @return {Array}\n */\n static weekdays(length = \"long\", { locale = null, numberingSystem = null, locObj = null } = {}) {\n return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length);\n }\n\n /**\n * Return an array of format week names.\n * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that\n * changes the string.\n * See {@link Info#weekdays}\n * @param {string} [length='long'] - the length of the month representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale=null] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @return {Array}\n */\n static weekdaysFormat(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length, true);\n }\n\n /**\n * Return an array of meridiems.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.meridiems() //=> [ 'AM', 'PM' ]\n * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]\n * @return {Array}\n */\n static meridiems({ locale = null } = {}) {\n return Locale.create(locale).meridiems();\n }\n\n /**\n * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.\n * @param {string} [length='short'] - the length of the era representation, such as \"short\" or \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.eras() //=> [ 'BC', 'AD' ]\n * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]\n * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]\n * @return {Array}\n */\n static eras(length = \"short\", { locale = null } = {}) {\n return Locale.create(locale, null, \"gregory\").eras(length);\n }\n\n /**\n * Return the set of available features in this environment.\n * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.\n * Keys:\n * * `relative`: whether this environment supports relative time formatting\n * @example Info.features() //=> { relative: false }\n * @return {Object}\n */\n static features() {\n return { relative: hasRelative() };\n }\n}\n","import Duration from \"../duration.js\";\n\nfunction dayDiff(earlier, later) {\n const utcDayStart = (dt) => dt.toUTC(0, { keepLocalTime: true }).startOf(\"day\").valueOf(),\n ms = utcDayStart(later) - utcDayStart(earlier);\n return Math.floor(Duration.fromMillis(ms).as(\"days\"));\n}\n\nfunction highOrderDiffs(cursor, later, units) {\n const differs = [\n [\"years\", (a, b) => b.year - a.year],\n [\"quarters\", (a, b) => b.quarter - a.quarter],\n [\"months\", (a, b) => b.month - a.month + (b.year - a.year) * 12],\n [\n \"weeks\",\n (a, b) => {\n const days = dayDiff(a, b);\n return (days - (days % 7)) / 7;\n },\n ],\n [\"days\", dayDiff],\n ];\n\n const results = {};\n let lowestOrder, highWater;\n\n for (const [unit, differ] of differs) {\n if (units.indexOf(unit) >= 0) {\n lowestOrder = unit;\n\n let delta = differ(cursor, later);\n highWater = cursor.plus({ [unit]: delta });\n\n if (highWater > later) {\n cursor = cursor.plus({ [unit]: delta - 1 });\n delta -= 1;\n } else {\n cursor = highWater;\n }\n\n results[unit] = delta;\n }\n }\n\n return [cursor, results, highWater, lowestOrder];\n}\n\nexport default function (earlier, later, units, opts) {\n let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units);\n\n const remainingMillis = later - cursor;\n\n const lowerOrderUnits = units.filter(\n (u) => [\"hours\", \"minutes\", \"seconds\", \"milliseconds\"].indexOf(u) >= 0\n );\n\n if (lowerOrderUnits.length === 0) {\n if (highWater < later) {\n highWater = cursor.plus({ [lowestOrder]: 1 });\n }\n\n if (highWater !== cursor) {\n results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);\n }\n }\n\n const duration = Duration.fromObject(results, opts);\n\n if (lowerOrderUnits.length > 0) {\n return Duration.fromMillis(remainingMillis, opts)\n .shiftTo(...lowerOrderUnits)\n .plus(duration);\n } else {\n return duration;\n }\n}\n","const numberingSystems = {\n arab: \"[\\u0660-\\u0669]\",\n arabext: \"[\\u06F0-\\u06F9]\",\n bali: \"[\\u1B50-\\u1B59]\",\n beng: \"[\\u09E6-\\u09EF]\",\n deva: \"[\\u0966-\\u096F]\",\n fullwide: \"[\\uFF10-\\uFF19]\",\n gujr: \"[\\u0AE6-\\u0AEF]\",\n hanidec: \"[〇|一|二|三|四|五|六|七|八|九]\",\n khmr: \"[\\u17E0-\\u17E9]\",\n knda: \"[\\u0CE6-\\u0CEF]\",\n laoo: \"[\\u0ED0-\\u0ED9]\",\n limb: \"[\\u1946-\\u194F]\",\n mlym: \"[\\u0D66-\\u0D6F]\",\n mong: \"[\\u1810-\\u1819]\",\n mymr: \"[\\u1040-\\u1049]\",\n orya: \"[\\u0B66-\\u0B6F]\",\n tamldec: \"[\\u0BE6-\\u0BEF]\",\n telu: \"[\\u0C66-\\u0C6F]\",\n thai: \"[\\u0E50-\\u0E59]\",\n tibt: \"[\\u0F20-\\u0F29]\",\n latn: \"\\\\d\",\n};\n\nconst numberingSystemsUTF16 = {\n arab: [1632, 1641],\n arabext: [1776, 1785],\n bali: [6992, 7001],\n beng: [2534, 2543],\n deva: [2406, 2415],\n fullwide: [65296, 65303],\n gujr: [2790, 2799],\n khmr: [6112, 6121],\n knda: [3302, 3311],\n laoo: [3792, 3801],\n limb: [6470, 6479],\n mlym: [3430, 3439],\n mong: [6160, 6169],\n mymr: [4160, 4169],\n orya: [2918, 2927],\n tamldec: [3046, 3055],\n telu: [3174, 3183],\n thai: [3664, 3673],\n tibt: [3872, 3881],\n};\n\nconst hanidecChars = numberingSystems.hanidec.replace(/[\\[|\\]]/g, \"\").split(\"\");\n\nexport function parseDigits(str) {\n let value = parseInt(str, 10);\n if (isNaN(value)) {\n value = \"\";\n for (let i = 0; i < str.length; i++) {\n const code = str.charCodeAt(i);\n\n if (str[i].search(numberingSystems.hanidec) !== -1) {\n value += hanidecChars.indexOf(str[i]);\n } else {\n for (const key in numberingSystemsUTF16) {\n const [min, max] = numberingSystemsUTF16[key];\n if (code >= min && code <= max) {\n value += code - min;\n }\n }\n }\n }\n return parseInt(value, 10);\n } else {\n return value;\n }\n}\n\nexport function digitRegex({ numberingSystem }, append = \"\") {\n return new RegExp(`${numberingSystems[numberingSystem || \"latn\"]}${append}`);\n}\n","import { parseMillis, isUndefined, untruncateYear, signedOffset, hasOwnProperty } from \"./util.js\";\nimport Formatter from \"./formatter.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport DateTime from \"../datetime.js\";\nimport { digitRegex, parseDigits } from \"./digits.js\";\nimport { ConflictingSpecificationError } from \"../errors.js\";\n\nconst MISSING_FTP = \"missing Intl.DateTimeFormat.formatToParts support\";\n\nfunction intUnit(regex, post = (i) => i) {\n return { regex, deser: ([s]) => post(parseDigits(s)) };\n}\n\nconst NBSP = String.fromCharCode(160);\nconst spaceOrNBSP = `[ ${NBSP}]`;\nconst spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, \"g\");\n\nfunction fixListRegex(s) {\n // make dots optional and also make them literal\n // make space and non breakable space characters interchangeable\n return s.replace(/\\./g, \"\\\\.?\").replace(spaceOrNBSPRegExp, spaceOrNBSP);\n}\n\nfunction stripInsensitivities(s) {\n return s\n .replace(/\\./g, \"\") // ignore dots that were made optional\n .replace(spaceOrNBSPRegExp, \" \") // interchange space and nbsp\n .toLowerCase();\n}\n\nfunction oneOf(strings, startIndex) {\n if (strings === null) {\n return null;\n } else {\n return {\n regex: RegExp(strings.map(fixListRegex).join(\"|\")),\n deser: ([s]) =>\n strings.findIndex((i) => stripInsensitivities(s) === stripInsensitivities(i)) + startIndex,\n };\n }\n}\n\nfunction offset(regex, groups) {\n return { regex, deser: ([, h, m]) => signedOffset(h, m), groups };\n}\n\nfunction simple(regex) {\n return { regex, deser: ([s]) => s };\n}\n\nfunction escapeToken(value) {\n return value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n}\n\nfunction unitForToken(token, loc) {\n const one = digitRegex(loc),\n two = digitRegex(loc, \"{2}\"),\n three = digitRegex(loc, \"{3}\"),\n four = digitRegex(loc, \"{4}\"),\n six = digitRegex(loc, \"{6}\"),\n oneOrTwo = digitRegex(loc, \"{1,2}\"),\n oneToThree = digitRegex(loc, \"{1,3}\"),\n oneToSix = digitRegex(loc, \"{1,6}\"),\n oneToNine = digitRegex(loc, \"{1,9}\"),\n twoToFour = digitRegex(loc, \"{2,4}\"),\n fourToSix = digitRegex(loc, \"{4,6}\"),\n literal = (t) => ({ regex: RegExp(escapeToken(t.val)), deser: ([s]) => s, literal: true }),\n unitate = (t) => {\n if (token.literal) {\n return literal(t);\n }\n switch (t.val) {\n // era\n case \"G\":\n return oneOf(loc.eras(\"short\", false), 0);\n case \"GG\":\n return oneOf(loc.eras(\"long\", false), 0);\n // years\n case \"y\":\n return intUnit(oneToSix);\n case \"yy\":\n return intUnit(twoToFour, untruncateYear);\n case \"yyyy\":\n return intUnit(four);\n case \"yyyyy\":\n return intUnit(fourToSix);\n case \"yyyyyy\":\n return intUnit(six);\n // months\n case \"M\":\n return intUnit(oneOrTwo);\n case \"MM\":\n return intUnit(two);\n case \"MMM\":\n return oneOf(loc.months(\"short\", true, false), 1);\n case \"MMMM\":\n return oneOf(loc.months(\"long\", true, false), 1);\n case \"L\":\n return intUnit(oneOrTwo);\n case \"LL\":\n return intUnit(two);\n case \"LLL\":\n return oneOf(loc.months(\"short\", false, false), 1);\n case \"LLLL\":\n return oneOf(loc.months(\"long\", false, false), 1);\n // dates\n case \"d\":\n return intUnit(oneOrTwo);\n case \"dd\":\n return intUnit(two);\n // ordinals\n case \"o\":\n return intUnit(oneToThree);\n case \"ooo\":\n return intUnit(three);\n // time\n case \"HH\":\n return intUnit(two);\n case \"H\":\n return intUnit(oneOrTwo);\n case \"hh\":\n return intUnit(two);\n case \"h\":\n return intUnit(oneOrTwo);\n case \"mm\":\n return intUnit(two);\n case \"m\":\n return intUnit(oneOrTwo);\n case \"q\":\n return intUnit(oneOrTwo);\n case \"qq\":\n return intUnit(two);\n case \"s\":\n return intUnit(oneOrTwo);\n case \"ss\":\n return intUnit(two);\n case \"S\":\n return intUnit(oneToThree);\n case \"SSS\":\n return intUnit(three);\n case \"u\":\n return simple(oneToNine);\n case \"uu\":\n return simple(oneOrTwo);\n case \"uuu\":\n return intUnit(one);\n // meridiem\n case \"a\":\n return oneOf(loc.meridiems(), 0);\n // weekYear (k)\n case \"kkkk\":\n return intUnit(four);\n case \"kk\":\n return intUnit(twoToFour, untruncateYear);\n // weekNumber (W)\n case \"W\":\n return intUnit(oneOrTwo);\n case \"WW\":\n return intUnit(two);\n // weekdays\n case \"E\":\n case \"c\":\n return intUnit(one);\n case \"EEE\":\n return oneOf(loc.weekdays(\"short\", false, false), 1);\n case \"EEEE\":\n return oneOf(loc.weekdays(\"long\", false, false), 1);\n case \"ccc\":\n return oneOf(loc.weekdays(\"short\", true, false), 1);\n case \"cccc\":\n return oneOf(loc.weekdays(\"long\", true, false), 1);\n // offset/zone\n case \"Z\":\n case \"ZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2);\n case \"ZZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2);\n // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing\n // because we don't have any way to figure out what they are\n case \"z\":\n return simple(/[a-z_+-/]{1,256}?/i);\n default:\n return literal(t);\n }\n };\n\n const unit = unitate(token) || {\n invalidReason: MISSING_FTP,\n };\n\n unit.token = token;\n\n return unit;\n}\n\nconst partTypeStyleToTokenVal = {\n year: {\n \"2-digit\": \"yy\",\n numeric: \"yyyyy\",\n },\n month: {\n numeric: \"M\",\n \"2-digit\": \"MM\",\n short: \"MMM\",\n long: \"MMMM\",\n },\n day: {\n numeric: \"d\",\n \"2-digit\": \"dd\",\n },\n weekday: {\n short: \"EEE\",\n long: \"EEEE\",\n },\n dayperiod: \"a\",\n dayPeriod: \"a\",\n hour: {\n numeric: \"h\",\n \"2-digit\": \"hh\",\n },\n minute: {\n numeric: \"m\",\n \"2-digit\": \"mm\",\n },\n second: {\n numeric: \"s\",\n \"2-digit\": \"ss\",\n },\n};\n\nfunction tokenForPart(part, locale, formatOpts) {\n const { type, value } = part;\n\n if (type === \"literal\") {\n return {\n literal: true,\n val: value,\n };\n }\n\n const style = formatOpts[type];\n\n let val = partTypeStyleToTokenVal[type];\n if (typeof val === \"object\") {\n val = val[style];\n }\n\n if (val) {\n return {\n literal: false,\n val,\n };\n }\n\n return undefined;\n}\n\nfunction buildRegex(units) {\n const re = units.map((u) => u.regex).reduce((f, r) => `${f}(${r.source})`, \"\");\n return [`^${re}$`, units];\n}\n\nfunction match(input, regex, handlers) {\n const matches = input.match(regex);\n\n if (matches) {\n const all = {};\n let matchIndex = 1;\n for (const i in handlers) {\n if (hasOwnProperty(handlers, i)) {\n const h = handlers[i],\n groups = h.groups ? h.groups + 1 : 1;\n if (!h.literal && h.token) {\n all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));\n }\n matchIndex += groups;\n }\n }\n return [matches, all];\n } else {\n return [matches, {}];\n }\n}\n\nfunction dateTimeFromMatches(matches) {\n const toField = (token) => {\n switch (token) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n case \"H\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"o\":\n return \"ordinal\";\n case \"L\":\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n case \"E\":\n case \"c\":\n return \"weekday\";\n case \"W\":\n return \"weekNumber\";\n case \"k\":\n return \"weekYear\";\n case \"q\":\n return \"quarter\";\n default:\n return null;\n }\n };\n\n let zone = null;\n let specificOffset;\n if (!isUndefined(matches.z)) {\n zone = IANAZone.create(matches.z);\n }\n\n if (!isUndefined(matches.Z)) {\n if (!zone) {\n zone = new FixedOffsetZone(matches.Z);\n }\n specificOffset = matches.Z;\n }\n\n if (!isUndefined(matches.q)) {\n matches.M = (matches.q - 1) * 3 + 1;\n }\n\n if (!isUndefined(matches.h)) {\n if (matches.h < 12 && matches.a === 1) {\n matches.h += 12;\n } else if (matches.h === 12 && matches.a === 0) {\n matches.h = 0;\n }\n }\n\n if (matches.G === 0 && matches.y) {\n matches.y = -matches.y;\n }\n\n if (!isUndefined(matches.u)) {\n matches.S = parseMillis(matches.u);\n }\n\n const vals = Object.keys(matches).reduce((r, k) => {\n const f = toField(k);\n if (f) {\n r[f] = matches[k];\n }\n\n return r;\n }, {});\n\n return [vals, zone, specificOffset];\n}\n\nlet dummyDateTimeCache = null;\n\nfunction getDummyDateTime() {\n if (!dummyDateTimeCache) {\n dummyDateTimeCache = DateTime.fromMillis(1555555555555);\n }\n\n return dummyDateTimeCache;\n}\n\nfunction maybeExpandMacroToken(token, locale) {\n if (token.literal) {\n return token;\n }\n\n const formatOpts = Formatter.macroTokenToFormatOpts(token.val);\n\n if (!formatOpts) {\n return token;\n }\n\n const formatter = Formatter.create(locale, formatOpts);\n const parts = formatter.formatDateTimeParts(getDummyDateTime());\n\n const tokens = parts.map((p) => tokenForPart(p, locale, formatOpts));\n\n if (tokens.includes(undefined)) {\n return token;\n }\n\n return tokens;\n}\n\nfunction expandMacroTokens(tokens, locale) {\n return Array.prototype.concat(...tokens.map((t) => maybeExpandMacroToken(t, locale)));\n}\n\n/**\n * @private\n */\n\nexport function explainFromTokens(locale, input, format) {\n const tokens = expandMacroTokens(Formatter.parseFormat(format), locale),\n units = tokens.map((t) => unitForToken(t, locale)),\n disqualifyingUnit = units.find((t) => t.invalidReason);\n\n if (disqualifyingUnit) {\n return { input, tokens, invalidReason: disqualifyingUnit.invalidReason };\n } else {\n const [regexString, handlers] = buildRegex(units),\n regex = RegExp(regexString, \"i\"),\n [rawMatches, matches] = match(input, regex, handlers),\n [result, zone, specificOffset] = matches\n ? dateTimeFromMatches(matches)\n : [null, null, undefined];\n if (hasOwnProperty(matches, \"a\") && hasOwnProperty(matches, \"H\")) {\n throw new ConflictingSpecificationError(\n \"Can't include meridiem when specifying 24-hour format\"\n );\n }\n return { input, tokens, regex, rawMatches, matches, result, zone, specificOffset };\n }\n}\n\nexport function parseFromTokens(locale, input, format) {\n const { result, zone, specificOffset, invalidReason } = explainFromTokens(locale, input, format);\n return [result, zone, specificOffset, invalidReason];\n}\n","import {\n integerBetween,\n isLeapYear,\n timeObject,\n daysInYear,\n daysInMonth,\n weeksInWeekYear,\n isInteger,\n} from \"./util.js\";\nimport Invalid from \"./invalid.js\";\n\nconst nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],\n leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\n\nfunction unitOutOfRange(unit, value) {\n return new Invalid(\n \"unit out of range\",\n `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`\n );\n}\n\nfunction dayOfWeek(year, month, day) {\n const d = new Date(Date.UTC(year, month - 1, day));\n\n if (year < 100 && year >= 0) {\n d.setUTCFullYear(d.getUTCFullYear() - 1900);\n }\n\n const js = d.getUTCDay();\n\n return js === 0 ? 7 : js;\n}\n\nfunction computeOrdinal(year, month, day) {\n return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1];\n}\n\nfunction uncomputeOrdinal(year, ordinal) {\n const table = isLeapYear(year) ? leapLadder : nonLeapLadder,\n month0 = table.findIndex((i) => i < ordinal),\n day = ordinal - table[month0];\n return { month: month0 + 1, day };\n}\n\n/**\n * @private\n */\n\nexport function gregorianToWeek(gregObj) {\n const { year, month, day } = gregObj,\n ordinal = computeOrdinal(year, month, day),\n weekday = dayOfWeek(year, month, day);\n\n let weekNumber = Math.floor((ordinal - weekday + 10) / 7),\n weekYear;\n\n if (weekNumber < 1) {\n weekYear = year - 1;\n weekNumber = weeksInWeekYear(weekYear);\n } else if (weekNumber > weeksInWeekYear(year)) {\n weekYear = year + 1;\n weekNumber = 1;\n } else {\n weekYear = year;\n }\n\n return { weekYear, weekNumber, weekday, ...timeObject(gregObj) };\n}\n\nexport function weekToGregorian(weekData) {\n const { weekYear, weekNumber, weekday } = weekData,\n weekdayOfJan4 = dayOfWeek(weekYear, 1, 4),\n yearInDays = daysInYear(weekYear);\n\n let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 3,\n year;\n\n if (ordinal < 1) {\n year = weekYear - 1;\n ordinal += daysInYear(year);\n } else if (ordinal > yearInDays) {\n year = weekYear + 1;\n ordinal -= daysInYear(weekYear);\n } else {\n year = weekYear;\n }\n\n const { month, day } = uncomputeOrdinal(year, ordinal);\n return { year, month, day, ...timeObject(weekData) };\n}\n\nexport function gregorianToOrdinal(gregData) {\n const { year, month, day } = gregData;\n const ordinal = computeOrdinal(year, month, day);\n return { year, ordinal, ...timeObject(gregData) };\n}\n\nexport function ordinalToGregorian(ordinalData) {\n const { year, ordinal } = ordinalData;\n const { month, day } = uncomputeOrdinal(year, ordinal);\n return { year, month, day, ...timeObject(ordinalData) };\n}\n\nexport function hasInvalidWeekData(obj) {\n const validYear = isInteger(obj.weekYear),\n validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear)),\n validWeekday = integerBetween(obj.weekday, 1, 7);\n\n if (!validYear) {\n return unitOutOfRange(\"weekYear\", obj.weekYear);\n } else if (!validWeek) {\n return unitOutOfRange(\"week\", obj.week);\n } else if (!validWeekday) {\n return unitOutOfRange(\"weekday\", obj.weekday);\n } else return false;\n}\n\nexport function hasInvalidOrdinalData(obj) {\n const validYear = isInteger(obj.year),\n validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validOrdinal) {\n return unitOutOfRange(\"ordinal\", obj.ordinal);\n } else return false;\n}\n\nexport function hasInvalidGregorianData(obj) {\n const validYear = isInteger(obj.year),\n validMonth = integerBetween(obj.month, 1, 12),\n validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validMonth) {\n return unitOutOfRange(\"month\", obj.month);\n } else if (!validDay) {\n return unitOutOfRange(\"day\", obj.day);\n } else return false;\n}\n\nexport function hasInvalidTimeData(obj) {\n const { hour, minute, second, millisecond } = obj;\n const validHour =\n integerBetween(hour, 0, 23) ||\n (hour === 24 && minute === 0 && second === 0 && millisecond === 0),\n validMinute = integerBetween(minute, 0, 59),\n validSecond = integerBetween(second, 0, 59),\n validMillisecond = integerBetween(millisecond, 0, 999);\n\n if (!validHour) {\n return unitOutOfRange(\"hour\", hour);\n } else if (!validMinute) {\n return unitOutOfRange(\"minute\", minute);\n } else if (!validSecond) {\n return unitOutOfRange(\"second\", second);\n } else if (!validMillisecond) {\n return unitOutOfRange(\"millisecond\", millisecond);\n } else return false;\n}\n","import Duration from \"./duration.js\";\nimport Interval from \"./interval.js\";\nimport Settings from \"./settings.js\";\nimport Info from \"./info.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport FixedOffsetZone from \"./zones/fixedOffsetZone.js\";\nimport Locale from \"./impl/locale.js\";\nimport {\n isUndefined,\n maybeArray,\n isDate,\n isNumber,\n bestBy,\n daysInMonth,\n daysInYear,\n isLeapYear,\n weeksInWeekYear,\n normalizeObject,\n roundTo,\n objToLocalTS,\n padStart,\n} from \"./impl/util.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\nimport diff from \"./impl/diff.js\";\nimport { parseRFC2822Date, parseISODate, parseHTTPDate, parseSQL } from \"./impl/regexParser.js\";\nimport { parseFromTokens, explainFromTokens } from \"./impl/tokenParser.js\";\nimport {\n gregorianToWeek,\n weekToGregorian,\n gregorianToOrdinal,\n ordinalToGregorian,\n hasInvalidGregorianData,\n hasInvalidWeekData,\n hasInvalidOrdinalData,\n hasInvalidTimeData,\n} from \"./impl/conversions.js\";\nimport * as Formats from \"./impl/formats.js\";\nimport {\n InvalidArgumentError,\n ConflictingSpecificationError,\n InvalidUnitError,\n InvalidDateTimeError,\n} from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid DateTime\";\nconst MAX_DATE = 8.64e15;\n\nfunction unsupportedZone(zone) {\n return new Invalid(\"unsupported zone\", `the zone \"${zone.name}\" is not supported`);\n}\n\n// we cache week data on the DT object and this intermediates the cache\nfunction possiblyCachedWeekData(dt) {\n if (dt.weekData === null) {\n dt.weekData = gregorianToWeek(dt.c);\n }\n return dt.weekData;\n}\n\n// clone really means, \"make a new object with these modifications\". all \"setters\" really use this\n// to create a new object while only changing some of the properties\nfunction clone(inst, alts) {\n const current = {\n ts: inst.ts,\n zone: inst.zone,\n c: inst.c,\n o: inst.o,\n loc: inst.loc,\n invalid: inst.invalid,\n };\n return new DateTime({ ...current, ...alts, old: current });\n}\n\n// find the right offset a given local time. The o input is our guess, which determines which\n// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)\nfunction fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n let utcGuess = localTS - o * 60 * 1000;\n\n // Test whether the zone matches the offset for this ts\n const o2 = tz.offset(utcGuess);\n\n // If so, offset didn't change and we're done\n if (o === o2) {\n return [utcGuess, o];\n }\n\n // If not, change the ts by the difference in the offset\n utcGuess -= (o2 - o) * 60 * 1000;\n\n // If that gives us the local time we want, we're done\n const o3 = tz.offset(utcGuess);\n if (o2 === o3) {\n return [utcGuess, o2];\n }\n\n // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n}\n\n// convert an epoch timestamp into a calendar object with the given offset\nfunction tsToObj(ts, offset) {\n ts += offset * 60 * 1000;\n\n const d = new Date(ts);\n\n return {\n year: d.getUTCFullYear(),\n month: d.getUTCMonth() + 1,\n day: d.getUTCDate(),\n hour: d.getUTCHours(),\n minute: d.getUTCMinutes(),\n second: d.getUTCSeconds(),\n millisecond: d.getUTCMilliseconds(),\n };\n}\n\n// convert a calendar object to a epoch timestamp\nfunction objToTS(obj, offset, zone) {\n return fixOffset(objToLocalTS(obj), offset, zone);\n}\n\n// create a new DT instance by adding a duration, adjusting for DSTs\nfunction adjustTime(inst, dur) {\n const oPre = inst.o,\n year = inst.c.year + Math.trunc(dur.years),\n month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3,\n c = {\n ...inst.c,\n year,\n month,\n day:\n Math.min(inst.c.day, daysInMonth(year, month)) +\n Math.trunc(dur.days) +\n Math.trunc(dur.weeks) * 7,\n },\n millisToAdd = Duration.fromObject({\n years: dur.years - Math.trunc(dur.years),\n quarters: dur.quarters - Math.trunc(dur.quarters),\n months: dur.months - Math.trunc(dur.months),\n weeks: dur.weeks - Math.trunc(dur.weeks),\n days: dur.days - Math.trunc(dur.days),\n hours: dur.hours,\n minutes: dur.minutes,\n seconds: dur.seconds,\n milliseconds: dur.milliseconds,\n }).as(\"milliseconds\"),\n localTS = objToLocalTS(c);\n\n let [ts, o] = fixOffset(localTS, oPre, inst.zone);\n\n if (millisToAdd !== 0) {\n ts += millisToAdd;\n // that could have changed the offset by going over a DST, but we want to keep the ts the same\n o = inst.zone.offset(ts);\n }\n\n return { ts, o };\n}\n\n// helper useful in turning the results of parsing into real dates\n// by handling the zone options\nfunction parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {\n const { setZone, zone } = opts;\n if (parsed && Object.keys(parsed).length !== 0) {\n const interpretationZone = parsedZone || zone,\n inst = DateTime.fromObject(parsed, {\n ...opts,\n zone: interpretationZone,\n specificOffset,\n });\n return setZone ? inst : inst.setZone(zone);\n } else {\n return DateTime.invalid(\n new Invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ${format}`)\n );\n }\n}\n\n// if you want to output a technical format (e.g. RFC 2822), this helper\n// helps handle the details\nfunction toTechFormat(dt, format, allowZ = true) {\n return dt.isValid\n ? Formatter.create(Locale.create(\"en-US\"), {\n allowZ,\n forceSimple: true,\n }).formatDateTimeFromString(dt, format)\n : null;\n}\n\nfunction toISODate(o, extended) {\n const longFormat = o.c.year > 9999 || o.c.year < 0;\n let c = \"\";\n if (longFormat && o.c.year >= 0) c += \"+\";\n c += padStart(o.c.year, longFormat ? 6 : 4);\n\n if (extended) {\n c += \"-\";\n c += padStart(o.c.month);\n c += \"-\";\n c += padStart(o.c.day);\n } else {\n c += padStart(o.c.month);\n c += padStart(o.c.day);\n }\n return c;\n}\n\nfunction toISOTime(\n o,\n extended,\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n extendedZone\n) {\n let c = padStart(o.c.hour);\n if (extended) {\n c += \":\";\n c += padStart(o.c.minute);\n if (o.c.second !== 0 || !suppressSeconds) {\n c += \":\";\n }\n } else {\n c += padStart(o.c.minute);\n }\n\n if (o.c.second !== 0 || !suppressSeconds) {\n c += padStart(o.c.second);\n\n if (o.c.millisecond !== 0 || !suppressMilliseconds) {\n c += \".\";\n c += padStart(o.c.millisecond, 3);\n }\n }\n\n if (includeOffset) {\n if (o.isOffsetFixed && o.offset === 0 && !extendedZone) {\n c += \"Z\";\n } else if (o.o < 0) {\n c += \"-\";\n c += padStart(Math.trunc(-o.o / 60));\n c += \":\";\n c += padStart(Math.trunc(-o.o % 60));\n } else {\n c += \"+\";\n c += padStart(Math.trunc(o.o / 60));\n c += \":\";\n c += padStart(Math.trunc(o.o % 60));\n }\n }\n\n if (extendedZone) {\n c += \"[\" + o.zone.ianaName + \"]\";\n }\n return c;\n}\n\n// defaults for unspecified units in the supported calendars\nconst defaultUnitValues = {\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n },\n defaultWeekUnitValues = {\n weekNumber: 1,\n weekday: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n },\n defaultOrdinalUnitValues = {\n ordinal: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n };\n\n// Units in the supported calendars, sorted by bigness\nconst orderedUnits = [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n orderedWeekUnits = [\n \"weekYear\",\n \"weekNumber\",\n \"weekday\",\n \"hour\",\n \"minute\",\n \"second\",\n \"millisecond\",\n ],\n orderedOrdinalUnits = [\"year\", \"ordinal\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n\n// standardize case and plurality in units\nfunction normalizeUnit(unit) {\n const normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\",\n }[unit.toLowerCase()];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n}\n\n// this is a dumbed down version of fromObject() that runs about 60% faster\n// but doesn't do any validation, makes a bunch of assumptions about what units\n// are present, and so on.\nfunction quickDT(obj, opts) {\n const zone = normalizeZone(opts.zone, Settings.defaultZone),\n loc = Locale.fromObject(opts),\n tsNow = Settings.now();\n\n let ts, o;\n\n // assume we have the higher-order units\n if (!isUndefined(obj.year)) {\n for (const u of orderedUnits) {\n if (isUndefined(obj[u])) {\n obj[u] = defaultUnitValues[u];\n }\n }\n\n const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n const offsetProvis = zone.offset(tsNow);\n [ts, o] = objToTS(obj, offsetProvis, zone);\n } else {\n ts = tsNow;\n }\n\n return new DateTime({ ts, zone, loc, o });\n}\n\nfunction diffRelative(start, end, opts) {\n const round = isUndefined(opts.round) ? true : opts.round,\n format = (c, unit) => {\n c = roundTo(c, round || opts.calendary ? 0 : 2, true);\n const formatter = end.loc.clone(opts).relFormatter(opts);\n return formatter.format(c, unit);\n },\n differ = (unit) => {\n if (opts.calendary) {\n if (!end.hasSame(start, unit)) {\n return end.startOf(unit).diff(start.startOf(unit), unit).get(unit);\n } else return 0;\n } else {\n return end.diff(start, unit).get(unit);\n }\n };\n\n if (opts.unit) {\n return format(differ(opts.unit), opts.unit);\n }\n\n for (const unit of opts.units) {\n const count = differ(unit);\n if (Math.abs(count) >= 1) {\n return format(count, unit);\n }\n }\n return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]);\n}\n\nfunction lastOpts(argList) {\n let opts = {},\n args;\n if (argList.length > 0 && typeof argList[argList.length - 1] === \"object\") {\n opts = argList[argList.length - 1];\n args = Array.from(argList).slice(0, argList.length - 1);\n } else {\n args = Array.from(argList);\n }\n return [opts, args];\n}\n\n/**\n * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them.\n *\n * A DateTime comprises of:\n * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch.\n * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone).\n * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`.\n *\n * Here is a brief overview of the most commonly used functionality it provides:\n *\n * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link DateTime#local}, {@link DateTime#utc}, and (most flexibly) {@link DateTime#fromObject}. To create one from a standard string format, use {@link DateTime#fromISO}, {@link DateTime#fromHTTP}, and {@link DateTime#fromRFC2822}. To create one from a custom string format, use {@link DateTime#fromFormat}. To create one from a native JS date, use {@link DateTime#fromJSDate}.\n * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link DateTime#toObject}), use the {@link DateTime#year}, {@link DateTime#month},\n * {@link DateTime#day}, {@link DateTime#hour}, {@link DateTime#minute}, {@link DateTime#second}, {@link DateTime#millisecond} accessors.\n * * **Week calendar**: For ISO week calendar attributes, see the {@link DateTime#weekYear}, {@link DateTime#weekNumber}, and {@link DateTime#weekday} accessors.\n * * **Configuration** See the {@link DateTime#locale} and {@link DateTime#numberingSystem} accessors.\n * * **Transformation**: To transform the DateTime into other DateTimes, use {@link DateTime#set}, {@link DateTime#reconfigure}, {@link DateTime#setZone}, {@link DateTime#setLocale}, {@link DateTime.plus}, {@link DateTime#minus}, {@link DateTime#endOf}, {@link DateTime#startOf}, {@link DateTime#toUTC}, and {@link DateTime#toLocal}.\n * * **Output**: To convert the DateTime to other representations, use the {@link DateTime#toRelative}, {@link DateTime#toRelativeCalendar}, {@link DateTime#toJSON}, {@link DateTime#toISO}, {@link DateTime#toHTTP}, {@link DateTime#toObject}, {@link DateTime#toRFC2822}, {@link DateTime#toString}, {@link DateTime#toLocaleString}, {@link DateTime#toFormat}, {@link DateTime#toMillis} and {@link DateTime#toJSDate}.\n *\n * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation.\n */\nexport default class DateTime {\n /**\n * @access private\n */\n constructor(config) {\n const zone = config.zone || Settings.defaultZone;\n\n let invalid =\n config.invalid ||\n (Number.isNaN(config.ts) ? new Invalid(\"invalid input\") : null) ||\n (!zone.isValid ? unsupportedZone(zone) : null);\n /**\n * @access private\n */\n this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;\n\n let c = null,\n o = null;\n if (!invalid) {\n const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);\n\n if (unchanged) {\n [c, o] = [config.old.c, config.old.o];\n } else {\n const ot = zone.offset(this.ts);\n c = tsToObj(this.ts, ot);\n invalid = Number.isNaN(c.year) ? new Invalid(\"invalid input\") : null;\n c = invalid ? null : c;\n o = invalid ? null : ot;\n }\n }\n\n /**\n * @access private\n */\n this._zone = zone;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.invalid = invalid;\n /**\n * @access private\n */\n this.weekData = null;\n /**\n * @access private\n */\n this.c = c;\n /**\n * @access private\n */\n this.o = o;\n /**\n * @access private\n */\n this.isLuxonDateTime = true;\n }\n\n // CONSTRUCT\n\n /**\n * Create a DateTime for the current instant, in the system's time zone.\n *\n * Use Settings to override these default values if needed.\n * @example DateTime.now().toISO() //~> now in the ISO format\n * @return {DateTime}\n */\n static now() {\n return new DateTime({});\n }\n\n /**\n * Create a local DateTime\n * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month, 1-indexed\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.local() //~> now\n * @example DateTime.local({ zone: \"America/New_York\" }) //~> now, in US east coast time\n * @example DateTime.local(2017) //~> 2017-01-01T00:00:00\n * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00\n * @example DateTime.local(2017, 3, 12, { locale: \"fr\" }) //~> 2017-03-12T00:00:00, with a French locale\n * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00\n * @example DateTime.local(2017, 3, 12, 5, { zone: \"utc\" }) //~> 2017-03-12T05:00:00, in UTC\n * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00\n * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10\n * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765\n * @return {DateTime}\n */\n static local() {\n const [opts, args] = lastOpts(arguments),\n [year, month, day, hour, minute, second, millisecond] = args;\n return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);\n }\n\n /**\n * Create a DateTime in UTC\n * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @param {Object} options - configuration options for the DateTime\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @example DateTime.utc() //~> now\n * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z\n * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z\n * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: \"fr\" }) //~> 2017-03-12T05:45:00Z with a French locale\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: \"fr\" }) //~> 2017-03-12T05:45:10.765Z with a French locale\n * @return {DateTime}\n */\n static utc() {\n const [opts, args] = lastOpts(arguments),\n [year, month, day, hour, minute, second, millisecond] = args;\n\n opts.zone = FixedOffsetZone.utcInstance;\n return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);\n }\n\n /**\n * Create a DateTime from a JavaScript Date object. Uses the default zone.\n * @param {Date} date - a JavaScript Date object\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @return {DateTime}\n */\n static fromJSDate(date, options = {}) {\n const ts = isDate(date) ? date.valueOf() : NaN;\n if (Number.isNaN(ts)) {\n return DateTime.invalid(\"invalid input\");\n }\n\n const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n return new DateTime({\n ts: ts,\n zone: zoneToUse,\n loc: Locale.fromObject(options),\n });\n }\n\n /**\n * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} milliseconds - a number of milliseconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromMillis(milliseconds, options = {}) {\n if (!isNumber(milliseconds)) {\n throw new InvalidArgumentError(\n `fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`\n );\n } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {\n // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start\n return DateTime.invalid(\"Timestamp out of range\");\n } else {\n return new DateTime({\n ts: milliseconds,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options),\n });\n }\n }\n\n /**\n * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} seconds - a number of seconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromSeconds(seconds, options = {}) {\n if (!isNumber(seconds)) {\n throw new InvalidArgumentError(\"fromSeconds requires a numerical input\");\n } else {\n return new DateTime({\n ts: seconds * 1000,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options),\n });\n }\n }\n\n /**\n * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.year - a year, such as 1987\n * @param {number} obj.month - a month, 1-12\n * @param {number} obj.day - a day of the month, 1-31, depending on the month\n * @param {number} obj.ordinal - day of the year, 1-365 or 366\n * @param {number} obj.weekYear - an ISO week year\n * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year\n * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday\n * @param {number} obj.hour - hour of the day, 0-23\n * @param {number} obj.minute - minute of the hour, 0-59\n * @param {number} obj.second - second of the minute, 0-59\n * @param {number} obj.millisecond - millisecond of the second, 0-999\n * @param {Object} opts - options for creating this DateTime\n * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'\n * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })\n * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'\n * @return {DateTime}\n */\n static fromObject(obj, opts = {}) {\n obj = obj || {};\n const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n const tsNow = Settings.now(),\n offsetProvis = !isUndefined(opts.specificOffset)\n ? opts.specificOffset\n : zoneToUse.offset(tsNow),\n normalized = normalizeObject(obj, normalizeUnit),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber,\n loc = Locale.fromObject(opts);\n\n // cases:\n // just a weekday -> this week's instance of that weekday, no worries\n // (gregorian data or ordinal) + (weekYear or weekNumber) -> error\n // (gregorian month or day) + ordinal -> error\n // otherwise just use weeks or ordinals or gregorian, depending on what's specified\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\n \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n );\n }\n\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n\n const useWeekData = definiteWeekDef || (normalized.weekday && !containsGregor);\n\n // configure ourselves to deal with gregorian dates or week stuff\n let units,\n defaultValues,\n objNow = tsToObj(tsNow, offsetProvis);\n if (useWeekData) {\n units = orderedWeekUnits;\n defaultValues = defaultWeekUnitValues;\n objNow = gregorianToWeek(objNow);\n } else if (containsOrdinal) {\n units = orderedOrdinalUnits;\n defaultValues = defaultOrdinalUnitValues;\n objNow = gregorianToOrdinal(objNow);\n } else {\n units = orderedUnits;\n defaultValues = defaultUnitValues;\n }\n\n // set default values for missing stuff\n let foundFirst = false;\n for (const u of units) {\n const v = normalized[u];\n if (!isUndefined(v)) {\n foundFirst = true;\n } else if (foundFirst) {\n normalized[u] = defaultValues[u];\n } else {\n normalized[u] = objNow[u];\n }\n }\n\n // make sure the values we have are in range\n const higherOrderInvalid = useWeekData\n ? hasInvalidWeekData(normalized)\n : containsOrdinal\n ? hasInvalidOrdinalData(normalized)\n : hasInvalidGregorianData(normalized),\n invalid = higherOrderInvalid || hasInvalidTimeData(normalized);\n\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n // compute the actual time\n const gregorian = useWeekData\n ? weekToGregorian(normalized)\n : containsOrdinal\n ? ordinalToGregorian(normalized)\n : normalized,\n [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse),\n inst = new DateTime({\n ts: tsFinal,\n zone: zoneToUse,\n o: offsetFinal,\n loc,\n });\n\n // gregorian data + weekday serves only to validate\n if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {\n return DateTime.invalid(\n \"mismatched weekday\",\n `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`\n );\n }\n\n return inst;\n }\n\n /**\n * Create a DateTime from an ISO 8601 string\n * @param {string} text - the ISO string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromISO('2016-05-25T09:08:34.123')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})\n * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})\n * @example DateTime.fromISO('2016-W05-4')\n * @return {DateTime}\n */\n static fromISO(text, opts = {}) {\n const [vals, parsedZone] = parseISODate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"ISO 8601\", text);\n }\n\n /**\n * Create a DateTime from an RFC 2822 string\n * @param {string} text - the RFC 2822 string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')\n * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')\n * @return {DateTime}\n */\n static fromRFC2822(text, opts = {}) {\n const [vals, parsedZone] = parseRFC2822Date(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"RFC 2822\", text);\n }\n\n /**\n * Create a DateTime from an HTTP header date\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @param {string} text - the HTTP header date\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')\n * @return {DateTime}\n */\n static fromHTTP(text, opts = {}) {\n const [vals, parsedZone] = parseHTTPDate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"HTTP\", opts);\n }\n\n /**\n * Create a DateTime from an input string and format string.\n * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromFormat(text, fmt, opts = {}) {\n if (isUndefined(text) || isUndefined(fmt)) {\n throw new InvalidArgumentError(\"fromFormat requires an input string and a format\");\n }\n\n const { locale = null, numberingSystem = null } = opts,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n }),\n [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt);\n if (invalid) {\n return DateTime.invalid(invalid);\n } else {\n return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset);\n }\n }\n\n /**\n * @deprecated use fromFormat instead\n */\n static fromString(text, fmt, opts = {}) {\n return DateTime.fromFormat(text, fmt, opts);\n }\n\n /**\n * Create a DateTime from a SQL date, time, or datetime\n * Defaults to en-US if no locale has been specified, regardless of the system's locale\n * @param {string} text - the string to parse\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @example DateTime.fromSQL('2017-05-15')\n * @example DateTime.fromSQL('2017-05-15 09:12:34')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })\n * @example DateTime.fromSQL('09:12:34.342')\n * @return {DateTime}\n */\n static fromSQL(text, opts = {}) {\n const [vals, parsedZone] = parseSQL(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"SQL\", text);\n }\n\n /**\n * Create an invalid DateTime.\n * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {DateTime}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the DateTime is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDateTimeError(invalid);\n } else {\n return new DateTime({ invalid });\n }\n }\n\n /**\n * Check if an object is an instance of DateTime. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDateTime(o) {\n return (o && o.isLuxonDateTime) || false;\n }\n\n // INFO\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example DateTime.local(2017, 7, 4).get('month'); //=> 7\n * @example DateTime.local(2017, 7, 4).get('day'); //=> 4\n * @return {number}\n */\n get(unit) {\n return this[unit];\n }\n\n /**\n * Returns whether the DateTime is valid. Invalid DateTimes occur when:\n * * The DateTime was created from invalid calendar information, such as the 13th month or February 30\n * * The DateTime was created by an operation on another invalid date\n * @type {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this DateTime is invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime\n *\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime\n *\n * @type {string}\n */\n get outputCalendar() {\n return this.isValid ? this.loc.outputCalendar : null;\n }\n\n /**\n * Get the time zone associated with this DateTime.\n * @type {Zone}\n */\n get zone() {\n return this._zone;\n }\n\n /**\n * Get the name of the time zone.\n * @type {string}\n */\n get zoneName() {\n return this.isValid ? this.zone.name : null;\n }\n\n /**\n * Get the year\n * @example DateTime.local(2017, 5, 25).year //=> 2017\n * @type {number}\n */\n get year() {\n return this.isValid ? this.c.year : NaN;\n }\n\n /**\n * Get the quarter\n * @example DateTime.local(2017, 5, 25).quarter //=> 2\n * @type {number}\n */\n get quarter() {\n return this.isValid ? Math.ceil(this.c.month / 3) : NaN;\n }\n\n /**\n * Get the month (1-12).\n * @example DateTime.local(2017, 5, 25).month //=> 5\n * @type {number}\n */\n get month() {\n return this.isValid ? this.c.month : NaN;\n }\n\n /**\n * Get the day of the month (1-30ish).\n * @example DateTime.local(2017, 5, 25).day //=> 25\n * @type {number}\n */\n get day() {\n return this.isValid ? this.c.day : NaN;\n }\n\n /**\n * Get the hour of the day (0-23).\n * @example DateTime.local(2017, 5, 25, 9).hour //=> 9\n * @type {number}\n */\n get hour() {\n return this.isValid ? this.c.hour : NaN;\n }\n\n /**\n * Get the minute of the hour (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30\n * @type {number}\n */\n get minute() {\n return this.isValid ? this.c.minute : NaN;\n }\n\n /**\n * Get the second of the minute (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52\n * @type {number}\n */\n get second() {\n return this.isValid ? this.c.second : NaN;\n }\n\n /**\n * Get the millisecond of the second (0-999).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654\n * @type {number}\n */\n get millisecond() {\n return this.isValid ? this.c.millisecond : NaN;\n }\n\n /**\n * Get the week year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 12, 31).weekYear //=> 2015\n * @type {number}\n */\n get weekYear() {\n return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the week number of the week year (1-52ish).\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2017, 5, 25).weekNumber //=> 21\n * @type {number}\n */\n get weekNumber() {\n return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the day of the week.\n * 1 is Monday and 7 is Sunday\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 11, 31).weekday //=> 4\n * @type {number}\n */\n get weekday() {\n return this.isValid ? possiblyCachedWeekData(this).weekday : NaN;\n }\n\n /**\n * Get the ordinal (meaning the day of the year)\n * @example DateTime.local(2017, 5, 25).ordinal //=> 145\n * @type {number|DateTime}\n */\n get ordinal() {\n return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN;\n }\n\n /**\n * Get the human readable short month name, such as 'Oct'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthShort //=> Oct\n * @type {string}\n */\n get monthShort() {\n return this.isValid ? Info.months(\"short\", { locObj: this.loc })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable long month name, such as 'October'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthLong //=> October\n * @type {string}\n */\n get monthLong() {\n return this.isValid ? Info.months(\"long\", { locObj: this.loc })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable short weekday, such as 'Mon'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon\n * @type {string}\n */\n get weekdayShort() {\n return this.isValid ? Info.weekdays(\"short\", { locObj: this.loc })[this.weekday - 1] : null;\n }\n\n /**\n * Get the human readable long weekday, such as 'Monday'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday\n * @type {string}\n */\n get weekdayLong() {\n return this.isValid ? Info.weekdays(\"long\", { locObj: this.loc })[this.weekday - 1] : null;\n }\n\n /**\n * Get the UTC offset of this DateTime in minutes\n * @example DateTime.now().offset //=> -240\n * @example DateTime.utc().offset //=> 0\n * @type {number}\n */\n get offset() {\n return this.isValid ? +this.o : NaN;\n }\n\n /**\n * Get the short human name for the zone's current offset, for example \"EST\" or \"EDT\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameShort() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"short\",\n locale: this.locale,\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get the long human name for the zone's current offset, for example \"Eastern Standard Time\" or \"Eastern Daylight Time\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameLong() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"long\",\n locale: this.locale,\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get whether this zone's offset ever changes, as in a DST.\n * @type {boolean}\n */\n get isOffsetFixed() {\n return this.isValid ? this.zone.isUniversal : null;\n }\n\n /**\n * Get whether the DateTime is in a DST.\n * @type {boolean}\n */\n get isInDST() {\n if (this.isOffsetFixed) {\n return false;\n } else {\n return (\n this.offset > this.set({ month: 1, day: 1 }).offset ||\n this.offset > this.set({ month: 5 }).offset\n );\n }\n }\n\n /**\n * Returns true if this DateTime is in a leap year, false otherwise\n * @example DateTime.local(2016).isInLeapYear //=> true\n * @example DateTime.local(2013).isInLeapYear //=> false\n * @type {boolean}\n */\n get isInLeapYear() {\n return isLeapYear(this.year);\n }\n\n /**\n * Returns the number of days in this DateTime's month\n * @example DateTime.local(2016, 2).daysInMonth //=> 29\n * @example DateTime.local(2016, 3).daysInMonth //=> 31\n * @type {number}\n */\n get daysInMonth() {\n return daysInMonth(this.year, this.month);\n }\n\n /**\n * Returns the number of days in this DateTime's year\n * @example DateTime.local(2016).daysInYear //=> 366\n * @example DateTime.local(2013).daysInYear //=> 365\n * @type {number}\n */\n get daysInYear() {\n return this.isValid ? daysInYear(this.year) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2004).weeksInWeekYear //=> 53\n * @example DateTime.local(2013).weeksInWeekYear //=> 52\n * @type {number}\n */\n get weeksInWeekYear() {\n return this.isValid ? weeksInWeekYear(this.weekYear) : NaN;\n }\n\n /**\n * Returns the resolved Intl options for this DateTime.\n * This is useful in understanding the behavior of formatting methods\n * @param {Object} opts - the same options as toLocaleString\n * @return {Object}\n */\n resolvedLocaleOptions(opts = {}) {\n const { locale, numberingSystem, calendar } = Formatter.create(\n this.loc.clone(opts),\n opts\n ).resolvedOptions(this);\n return { locale, numberingSystem, outputCalendar: calendar };\n }\n\n // TRANSFORM\n\n /**\n * \"Set\" the DateTime's zone to UTC. Returns a newly-constructed DateTime.\n *\n * Equivalent to {@link DateTime#setZone}('utc')\n * @param {number} [offset=0] - optionally, an offset from UTC in minutes\n * @param {Object} [opts={}] - options to pass to `setZone()`\n * @return {DateTime}\n */\n toUTC(offset = 0, opts = {}) {\n return this.setZone(FixedOffsetZone.instance(offset), opts);\n }\n\n /**\n * \"Set\" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.\n *\n * Equivalent to `setZone('local')`\n * @return {DateTime}\n */\n toLocal() {\n return this.setZone(Settings.defaultZone);\n }\n\n /**\n * \"Set\" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.\n *\n * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.\n * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.\n * @param {Object} opts - options\n * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.\n * @return {DateTime}\n */\n setZone(zone, { keepLocalTime = false, keepCalendarTime = false } = {}) {\n zone = normalizeZone(zone, Settings.defaultZone);\n if (zone.equals(this.zone)) {\n return this;\n } else if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n } else {\n let newTS = this.ts;\n if (keepLocalTime || keepCalendarTime) {\n const offsetGuess = zone.offset(this.ts);\n const asObj = this.toObject();\n [newTS] = objToTS(asObj, offsetGuess, zone);\n }\n return clone(this, { ts: newTS, zone });\n }\n }\n\n /**\n * \"Set\" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.\n * @param {Object} properties - the properties to set\n * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })\n * @return {DateTime}\n */\n reconfigure({ locale, numberingSystem, outputCalendar } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem, outputCalendar });\n return clone(this, { loc });\n }\n\n /**\n * \"Set\" the locale. Returns a newly-constructed DateTime.\n * Just a convenient alias for reconfigure({ locale })\n * @example DateTime.local(2017, 5, 25).setLocale('en-GB')\n * @return {DateTime}\n */\n setLocale(locale) {\n return this.reconfigure({ locale });\n }\n\n /**\n * \"Set\" the values of specified units. Returns a newly-constructed DateTime.\n * You can only set units with this method; for \"setting\" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.\n * @param {Object} values - a mapping of units to numbers\n * @example dt.set({ year: 2017 })\n * @example dt.set({ hour: 8, minute: 30 })\n * @example dt.set({ weekday: 5 })\n * @example dt.set({ year: 2005, ordinal: 234 })\n * @return {DateTime}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const normalized = normalizeObject(values, normalizeUnit),\n settingWeekStuff =\n !isUndefined(normalized.weekYear) ||\n !isUndefined(normalized.weekNumber) ||\n !isUndefined(normalized.weekday),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\n \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n );\n }\n\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n\n let mixed;\n if (settingWeekStuff) {\n mixed = weekToGregorian({ ...gregorianToWeek(this.c), ...normalized });\n } else if (!isUndefined(normalized.ordinal)) {\n mixed = ordinalToGregorian({ ...gregorianToOrdinal(this.c), ...normalized });\n } else {\n mixed = { ...this.toObject(), ...normalized };\n\n // if we didn't set the day but we ended up on an overflow date,\n // use the last day of the right month\n if (isUndefined(normalized.day)) {\n mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);\n }\n }\n\n const [ts, o] = objToTS(mixed, this.o, this.zone);\n return clone(this, { ts, o });\n }\n\n /**\n * Add a period of time to this DateTime and return the resulting DateTime\n *\n * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @example DateTime.now().plus(123) //~> in 123 milliseconds\n * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes\n * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow\n * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday\n * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min\n * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min\n * @return {DateTime}\n */\n plus(duration) {\n if (!this.isValid) return this;\n const dur = Duration.fromDurationLike(duration);\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * Subtract a period of time to this DateTime and return the resulting DateTime\n * See {@link DateTime#plus}\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n @return {DateTime}\n */\n minus(duration) {\n if (!this.isValid) return this;\n const dur = Duration.fromDurationLike(duration).negate();\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * \"Set\" this DateTime to the beginning of a unit of time.\n * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'\n * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'\n * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'\n * @return {DateTime}\n */\n startOf(unit) {\n if (!this.isValid) return this;\n const o = {},\n normalizedUnit = Duration.normalizeUnit(unit);\n switch (normalizedUnit) {\n case \"years\":\n o.month = 1;\n // falls through\n case \"quarters\":\n case \"months\":\n o.day = 1;\n // falls through\n case \"weeks\":\n case \"days\":\n o.hour = 0;\n // falls through\n case \"hours\":\n o.minute = 0;\n // falls through\n case \"minutes\":\n o.second = 0;\n // falls through\n case \"seconds\":\n o.millisecond = 0;\n break;\n case \"milliseconds\":\n break;\n // no default, invalid units throw in normalizeUnit()\n }\n\n if (normalizedUnit === \"weeks\") {\n o.weekday = 1;\n }\n\n if (normalizedUnit === \"quarters\") {\n const q = Math.ceil(this.month / 3);\n o.month = (q - 1) * 3 + 1;\n }\n\n return this.set(o);\n }\n\n /**\n * \"Set\" this DateTime to the end (meaning the last millisecond) of a unit of time\n * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'\n * @return {DateTime}\n */\n endOf(unit) {\n return this.isValid\n ? this.plus({ [unit]: 1 })\n .startOf(unit)\n .minus(1)\n : this;\n }\n\n // OUTPUT\n\n /**\n * Returns a string representation of this DateTime formatted according to the specified format string.\n * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @param {string} fmt - the format string\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'\n * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'\n * @example DateTime.now().toFormat('yyyy LLL dd', { locale: \"fr\" }) //=> '2017 avr. 22'\n * @example DateTime.now().toFormat(\"HH 'hours and' mm 'minutes'\") //=> '20 hours and 55 minutes'\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.\n * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation\n * of the DateTime in the assigned locale.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toLocaleString(); //=> 4/20/2017\n * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'\n * @example DateTime.now().toLocaleString({ locale: 'en-gb' }); //=> '20/04/2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'\n * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'\n * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'\n * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'\n * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'\n * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'\n * @return {string}\n */\n toLocaleString(formatOpts = Formats.DATE_SHORT, opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this)\n : INVALID;\n }\n\n /**\n * Returns an array of format \"parts\", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts\n * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.\n * @example DateTime.now().toLocaleParts(); //=> [\n * //=> { type: 'day', value: '25' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'month', value: '05' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'year', value: '1982' }\n * //=> ]\n */\n toLocaleParts(opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this)\n : [];\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=true] - add the time zone format extension\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'\n * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'\n * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'\n * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'\n * @return {string}\n */\n toISO({\n format = \"extended\",\n suppressSeconds = false,\n suppressMilliseconds = false,\n includeOffset = true,\n extendedZone = false,\n } = {}) {\n if (!this.isValid) {\n return null;\n }\n\n const ext = format === \"extended\";\n\n let c = toISODate(this, ext);\n c += \"T\";\n c += toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone);\n return c;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's date component\n * @param {Object} opts - options\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'\n * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'\n * @return {string}\n */\n toISODate({ format = \"extended\" } = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return toISODate(this, format === \"extended\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's week date\n * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'\n * @return {string}\n */\n toISOWeekDate() {\n return toTechFormat(this, \"kkkk-'W'WW-c\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's time component\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=true] - add the time zone format extension\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'\n * @return {string}\n */\n toISOTime({\n suppressMilliseconds = false,\n suppressSeconds = false,\n includeOffset = true,\n includePrefix = false,\n extendedZone = false,\n format = \"extended\",\n } = {}) {\n if (!this.isValid) {\n return null;\n }\n\n let c = includePrefix ? \"T\" : \"\";\n return (\n c +\n toISOTime(\n this,\n format === \"extended\",\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n extendedZone\n )\n );\n }\n\n /**\n * Returns an RFC 2822-compatible string representation of this DateTime\n * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'\n * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'\n * @return {string}\n */\n toRFC2822() {\n return toTechFormat(this, \"EEE, dd LLL yyyy HH:mm:ss ZZZ\", false);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.\n * Specifically, the string conforms to RFC 1123.\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'\n * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'\n * @return {string}\n */\n toHTTP() {\n return toTechFormat(this.toUTC(), \"EEE, dd LLL yyyy HH:mm:ss 'GMT'\");\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Date\n * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'\n * @return {string}\n */\n toSQLDate() {\n if (!this.isValid) {\n return null;\n }\n return toISODate(this, true);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Time\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc().toSQL() //=> '05:15:16.345'\n * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'\n * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'\n * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'\n * @return {string}\n */\n toSQLTime({ includeOffset = true, includeZone = false, includeOffsetSpace = true } = {}) {\n let fmt = \"HH:mm:ss.SSS\";\n\n if (includeZone || includeOffset) {\n if (includeOffsetSpace) {\n fmt += \" \";\n }\n if (includeZone) {\n fmt += \"z\";\n } else if (includeOffset) {\n fmt += \"ZZ\";\n }\n }\n\n return toTechFormat(this, fmt, true);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'\n * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'\n * @return {string}\n */\n toSQL(opts = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return `${this.toSQLDate()} ${this.toSQLTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for debugging\n * @return {string}\n */\n toString() {\n return this.isValid ? this.toISO() : INVALID;\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime.\n * @return {number}\n */\n toMillis() {\n return this.isValid ? this.ts : NaN;\n }\n\n /**\n * Returns the epoch seconds of this DateTime.\n * @return {number}\n */\n toSeconds() {\n return this.isValid ? this.ts / 1000 : NaN;\n }\n\n /**\n * Returns the epoch seconds (as a whole number) of this DateTime.\n * @return {number}\n */\n toUnixInteger() {\n return this.isValid ? Math.floor(this.ts / 1000) : NaN;\n }\n\n /**\n * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns a BSON serializable equivalent to this DateTime.\n * @return {Date}\n */\n toBSON() {\n return this.toJSDate();\n }\n\n /**\n * Returns a JavaScript object with this DateTime's year, month, day, and so on.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }\n * @return {Object}\n */\n toObject(opts = {}) {\n if (!this.isValid) return {};\n\n const base = { ...this.c };\n\n if (opts.includeConfig) {\n base.outputCalendar = this.outputCalendar;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n }\n\n /**\n * Returns a JavaScript Date equivalent to this DateTime.\n * @return {Date}\n */\n toJSDate() {\n return new Date(this.isValid ? this.ts : NaN);\n }\n\n // COMPARE\n\n /**\n * Return the difference between two DateTimes as a Duration.\n * @param {DateTime} otherDateTime - the DateTime to compare this one to\n * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example\n * var i1 = DateTime.fromISO('1982-05-25T09:45'),\n * i2 = DateTime.fromISO('1983-10-14T10:30');\n * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\n * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\n * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\n * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n * @return {Duration}\n */\n diff(otherDateTime, unit = \"milliseconds\", opts = {}) {\n if (!this.isValid || !otherDateTime.isValid) {\n return Duration.invalid(\"created by diffing an invalid DateTime\");\n }\n\n const durOpts = { locale: this.locale, numberingSystem: this.numberingSystem, ...opts };\n\n const units = maybeArray(unit).map(Duration.normalizeUnit),\n otherIsLater = otherDateTime.valueOf() > this.valueOf(),\n earlier = otherIsLater ? this : otherDateTime,\n later = otherIsLater ? otherDateTime : this,\n diffed = diff(earlier, later, units, durOpts);\n\n return otherIsLater ? diffed.negate() : diffed;\n }\n\n /**\n * Return the difference between this DateTime and right now.\n * See {@link DateTime#diff}\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n diffNow(unit = \"milliseconds\", opts = {}) {\n return this.diff(DateTime.now(), unit, opts);\n }\n\n /**\n * Return an Interval spanning between this DateTime and another DateTime\n * @param {DateTime} otherDateTime - the other end point of the Interval\n * @return {Interval}\n */\n until(otherDateTime) {\n return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this;\n }\n\n /**\n * Return whether this DateTime is in the same unit of time as another DateTime.\n * Higher-order units must also be identical for this function to return `true`.\n * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.\n * @param {DateTime} otherDateTime - the other DateTime\n * @param {string} unit - the unit of time to check sameness on\n * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day\n * @return {boolean}\n */\n hasSame(otherDateTime, unit) {\n if (!this.isValid) return false;\n\n const inputMs = otherDateTime.valueOf();\n const adjustedToZone = this.setZone(otherDateTime.zone, { keepLocalTime: true });\n return adjustedToZone.startOf(unit) <= inputMs && inputMs <= adjustedToZone.endOf(unit);\n }\n\n /**\n * Equality check\n * Two DateTimes are equal iff they represent the same millisecond, have the same zone and location, and are both valid.\n * To compare just the millisecond values, use `+dt1 === +dt2`.\n * @param {DateTime} other - the other DateTime\n * @return {boolean}\n */\n equals(other) {\n return (\n this.isValid &&\n other.isValid &&\n this.valueOf() === other.valueOf() &&\n this.zone.equals(other.zone) &&\n this.loc.equals(other.loc)\n );\n }\n\n /**\n * Returns a string representation of a this time relative to now, such as \"in two days\". Can only internationalize if your\n * platform supports Intl.RelativeTimeFormat. Rounds down by default.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} [options.style=\"long\"] - the style of units, must be \"long\", \"short\", or \"narrow\"\n * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", or \"seconds\"\n * @param {boolean} [options.round=true] - whether to round the numbers in the output.\n * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelative() //=> \"in 1 day\"\n * @example DateTime.now().setLocale(\"es\").toRelative({ days: 1 }) //=> \"dentro de 1 día\"\n * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: \"fr\" }) //=> \"dans 23 heures\"\n * @example DateTime.now().minus({ days: 2 }).toRelative() //=> \"2 days ago\"\n * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: \"hours\" }) //=> \"48 hours ago\"\n * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> \"1.5 days ago\"\n */\n toRelative(options = {}) {\n if (!this.isValid) return null;\n const base = options.base || DateTime.fromObject({}, { zone: this.zone }),\n padding = options.padding ? (this < base ? -options.padding : options.padding) : 0;\n let units = [\"years\", \"months\", \"days\", \"hours\", \"minutes\", \"seconds\"];\n let unit = options.unit;\n if (Array.isArray(options.unit)) {\n units = options.unit;\n unit = undefined;\n }\n return diffRelative(base, this.plus(padding), {\n ...options,\n numeric: \"always\",\n units,\n unit,\n });\n }\n\n /**\n * Returns a string representation of this date relative to today, such as \"yesterday\" or \"next month\".\n * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", or \"days\"\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> \"tomorrow\"\n * @example DateTime.now().setLocale(\"es\").plus({ days: 1 }).toRelative() //=> \"\"mañana\"\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: \"fr\" }) //=> \"demain\"\n * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> \"2 days ago\"\n */\n toRelativeCalendar(options = {}) {\n if (!this.isValid) return null;\n\n return diffRelative(options.base || DateTime.fromObject({}, { zone: this.zone }), this, {\n ...options,\n numeric: \"auto\",\n units: [\"years\", \"months\", \"days\"],\n calendary: true,\n });\n }\n\n /**\n * Return the min of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum\n * @return {DateTime} the min DateTime, or undefined if called with no argument\n */\n static min(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"min requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, (i) => i.valueOf(), Math.min);\n }\n\n /**\n * Return the max of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum\n * @return {DateTime} the max DateTime, or undefined if called with no argument\n */\n static max(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"max requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, (i) => i.valueOf(), Math.max);\n }\n\n // MISC\n\n /**\n * Explain how a string would be parsed by fromFormat()\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see description)\n * @param {Object} options - options taken by fromFormat()\n * @return {Object}\n */\n static fromFormatExplain(text, fmt, options = {}) {\n const { locale = null, numberingSystem = null } = options,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n });\n return explainFromTokens(localeToUse, text, fmt);\n }\n\n /**\n * @deprecated use fromFormatExplain instead\n */\n static fromStringExplain(text, fmt, options = {}) {\n return DateTime.fromFormatExplain(text, fmt, options);\n }\n\n // FORMAT PRESETS\n\n /**\n * {@link DateTime#toLocaleString} format like 10/14/1983\n * @type {Object}\n */\n static get DATE_SHORT() {\n return Formats.DATE_SHORT;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED() {\n return Formats.DATE_MED;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED_WITH_WEEKDAY() {\n return Formats.DATE_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983'\n * @type {Object}\n */\n static get DATE_FULL() {\n return Formats.DATE_FULL;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'\n * @type {Object}\n */\n static get DATE_HUGE() {\n return Formats.DATE_HUGE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_SIMPLE() {\n return Formats.TIME_SIMPLE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SECONDS() {\n return Formats.TIME_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SHORT_OFFSET() {\n return Formats.TIME_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_LONG_OFFSET() {\n return Formats.TIME_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_SIMPLE() {\n return Formats.TIME_24_SIMPLE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SECONDS() {\n return Formats.TIME_24_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SHORT_OFFSET() {\n return Formats.TIME_24_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_LONG_OFFSET() {\n return Formats.TIME_24_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT() {\n return Formats.DATETIME_SHORT;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT_WITH_SECONDS() {\n return Formats.DATETIME_SHORT_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED() {\n return Formats.DATETIME_MED;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_SECONDS() {\n return Formats.DATETIME_MED_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_WEEKDAY() {\n return Formats.DATETIME_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL() {\n return Formats.DATETIME_FULL;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL_WITH_SECONDS() {\n return Formats.DATETIME_FULL_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE() {\n return Formats.DATETIME_HUGE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE_WITH_SECONDS() {\n return Formats.DATETIME_HUGE_WITH_SECONDS;\n }\n}\n\n/**\n * @private\n */\nexport function friendlyDateTime(dateTimeish) {\n if (DateTime.isDateTime(dateTimeish)) {\n return dateTimeish;\n } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {\n return DateTime.fromJSDate(dateTimeish);\n } else if (dateTimeish && typeof dateTimeish === \"object\") {\n return DateTime.fromObject(dateTimeish);\n } else {\n throw new InvalidArgumentError(\n `Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`\n );\n }\n}\n","import * as i1$1 from '@angular/cdk/overlay';\nimport { OverlayModule, OverlayConfig } from '@angular/cdk/overlay';\nimport * as i3$1 from '@angular/cdk/portal';\nimport { BasePortalOutlet, CdkPortalOutlet, PortalModule, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, Directive, ViewChild, NgModule, Injector, TemplateRef, Injectable, Optional, SkipSelf } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport * as i3 from '@angular/material/button';\nimport { MatButtonModule } from '@angular/material/button';\nimport { Subject } from 'rxjs';\nimport * as i1 from '@angular/cdk/platform';\nimport { take, takeUntil } from 'rxjs/operators';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\nimport * as i2$1 from '@angular/cdk/a11y';\nimport * as i3$2 from '@angular/cdk/layout';\nimport { Breakpoints } from '@angular/cdk/layout';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token that can be used to access the data that was passed in to a snack bar. */\nconst MAT_SNACK_BAR_DATA = new InjectionToken('MatSnackBarData');\n/**\n * Configuration used when opening a snack-bar.\n */\nclass MatSnackBarConfig {\n constructor() {\n /** The politeness level for the MatAriaLiveAnnouncer announcement. */\n this.politeness = 'assertive';\n /**\n * Message to be announced by the LiveAnnouncer. When opening a snackbar without a custom\n * component or template, the announcement message will default to the specified message.\n */\n this.announcementMessage = '';\n /** The length of time in milliseconds to wait before automatically dismissing the snack bar. */\n this.duration = 0;\n /** Data being injected into the child component. */\n this.data = null;\n /** The horizontal position to place the snack bar. */\n this.horizontalPosition = 'center';\n /** The vertical position to place the snack bar. */\n this.verticalPosition = 'bottom';\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/** Maximum amount of milliseconds that can be passed into setTimeout. */\nconst MAX_TIMEOUT = Math.pow(2, 31) - 1;\n/**\n * Reference to a snack bar dispatched from the snack bar service.\n */\nclass MatSnackBarRef {\n constructor(containerInstance, _overlayRef) {\n this._overlayRef = _overlayRef;\n /** Subject for notifying the user that the snack bar has been dismissed. */\n this._afterDismissed = new Subject();\n /** Subject for notifying the user that the snack bar has opened and appeared. */\n this._afterOpened = new Subject();\n /** Subject for notifying the user that the snack bar action was called. */\n this._onAction = new Subject();\n /** Whether the snack bar was dismissed using the action button. */\n this._dismissedByAction = false;\n this.containerInstance = containerInstance;\n containerInstance._onExit.subscribe(() => this._finishDismiss());\n }\n /** Dismisses the snack bar. */\n dismiss() {\n if (!this._afterDismissed.closed) {\n this.containerInstance.exit();\n }\n clearTimeout(this._durationTimeoutId);\n }\n /** Marks the snackbar action clicked. */\n dismissWithAction() {\n if (!this._onAction.closed) {\n this._dismissedByAction = true;\n this._onAction.next();\n this._onAction.complete();\n this.dismiss();\n }\n clearTimeout(this._durationTimeoutId);\n }\n /**\n * Marks the snackbar action clicked.\n * @deprecated Use `dismissWithAction` instead.\n * @breaking-change 8.0.0\n */\n closeWithAction() {\n this.dismissWithAction();\n }\n /** Dismisses the snack bar after some duration */\n _dismissAfter(duration) {\n // Note that we need to cap the duration to the maximum value for setTimeout, because\n // it'll revert to 1 if somebody passes in something greater (e.g. `Infinity`). See #17234.\n this._durationTimeoutId = setTimeout(() => this.dismiss(), Math.min(duration, MAX_TIMEOUT));\n }\n /** Marks the snackbar as opened */\n _open() {\n if (!this._afterOpened.closed) {\n this._afterOpened.next();\n this._afterOpened.complete();\n }\n }\n /** Cleans up the DOM after closing. */\n _finishDismiss() {\n this._overlayRef.dispose();\n if (!this._onAction.closed) {\n this._onAction.complete();\n }\n this._afterDismissed.next({ dismissedByAction: this._dismissedByAction });\n this._afterDismissed.complete();\n this._dismissedByAction = false;\n }\n /** Gets an observable that is notified when the snack bar is finished closing. */\n afterDismissed() {\n return this._afterDismissed;\n }\n /** Gets an observable that is notified when the snack bar has opened and appeared. */\n afterOpened() {\n return this.containerInstance._onEnter;\n }\n /** Gets an observable that is notified when the snack bar action is called. */\n onAction() {\n return this._onAction;\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 component used to open as the default snack bar, matching material spec.\n * This should only be used internally by the snack bar service.\n */\nclass SimpleSnackBar {\n constructor(snackBarRef, data) {\n this.snackBarRef = snackBarRef;\n this.data = data;\n }\n /** Performs the action on the snack bar. */\n action() {\n this.snackBarRef.dismissWithAction();\n }\n /** If the action button should be shown. */\n get hasAction() {\n return !!this.data.action;\n }\n}\nSimpleSnackBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: SimpleSnackBar, deps: [{ token: MatSnackBarRef }, { token: MAT_SNACK_BAR_DATA }], target: i0.ɵɵFactoryTarget.Component });\nSimpleSnackBar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: SimpleSnackBar, selector: \"simple-snack-bar\", host: { classAttribute: \"mat-simple-snackbar\" }, ngImport: i0, template: \"<span class=\\\"mat-simple-snack-bar-content\\\">{{data.message}}</span>\\n<div class=\\\"mat-simple-snackbar-action\\\" *ngIf=\\\"hasAction\\\">\\n <button mat-button (click)=\\\"action()\\\">{{data.action}}</button>\\n</div>\\n\", styles: [\".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}.mat-simple-snack-bar-content{overflow:hidden;text-overflow:ellipsis}\"], dependencies: [{ kind: \"directive\", type: i2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"component\", type: i3.MatButton, selector: \"button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]\", inputs: [\"disabled\", \"disableRipple\", \"color\"], exportAs: [\"matButton\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: SimpleSnackBar, decorators: [{\n type: Component,\n args: [{ selector: 'simple-snack-bar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {\n 'class': 'mat-simple-snackbar',\n }, template: \"<span class=\\\"mat-simple-snack-bar-content\\\">{{data.message}}</span>\\n<div class=\\\"mat-simple-snackbar-action\\\" *ngIf=\\\"hasAction\\\">\\n <button mat-button (click)=\\\"action()\\\">{{data.action}}</button>\\n</div>\\n\", styles: [\".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}.mat-simple-snack-bar-content{overflow:hidden;text-overflow:ellipsis}\"] }]\n }], ctorParameters: function () { return [{ type: MatSnackBarRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_SNACK_BAR_DATA]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Animations used by the Material snack bar.\n * @docs-private\n */\nconst matSnackBarAnimations = {\n /** Animation that shows and hides a snack bar. */\n snackBarState: trigger('state', [\n state('void, hidden', style({\n transform: 'scale(0.8)',\n opacity: 0,\n })),\n state('visible', style({\n transform: 'scale(1)',\n opacity: 1,\n })),\n transition('* => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),\n transition('* => void, * => hidden', animate('75ms cubic-bezier(0.4, 0.0, 1, 1)', style({\n opacity: 0,\n }))),\n ]),\n};\n\n/**\n * Base class for snack bar containers.\n * @docs-private\n */\nclass _MatSnackBarContainerBase extends BasePortalOutlet {\n constructor(_ngZone, _elementRef, _changeDetectorRef, _platform, \n /** The snack bar configuration. */\n snackBarConfig) {\n super();\n this._ngZone = _ngZone;\n this._elementRef = _elementRef;\n this._changeDetectorRef = _changeDetectorRef;\n this._platform = _platform;\n this.snackBarConfig = snackBarConfig;\n /** The number of milliseconds to wait before announcing the snack bar's content. */\n this._announceDelay = 150;\n /** Whether the component has been destroyed. */\n this._destroyed = false;\n /** Subject for notifying that the snack bar has announced to screen readers. */\n this._onAnnounce = new Subject();\n /** Subject for notifying that the snack bar has exited from view. */\n this._onExit = new Subject();\n /** Subject for notifying that the snack bar has finished entering the view. */\n this._onEnter = new Subject();\n /** The state of the snack bar animations. */\n this._animationState = 'void';\n /**\n * Attaches a DOM portal to the snack bar container.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n this.attachDomPortal = (portal) => {\n this._assertNotAttached();\n const result = this._portalOutlet.attachDomPortal(portal);\n this._afterPortalAttached();\n return result;\n };\n // Use aria-live rather than a live role like 'alert' or 'status'\n // because NVDA and JAWS have show inconsistent behavior with live roles.\n if (snackBarConfig.politeness === 'assertive' && !snackBarConfig.announcementMessage) {\n this._live = 'assertive';\n }\n else if (snackBarConfig.politeness === 'off') {\n this._live = 'off';\n }\n else {\n this._live = 'polite';\n }\n // Only set role for Firefox. Set role based on aria-live because setting role=\"alert\" implies\n // aria-live=\"assertive\" which may cause issues if aria-live is set to \"polite\" above.\n if (this._platform.FIREFOX) {\n if (this._live === 'polite') {\n this._role = 'status';\n }\n if (this._live === 'assertive') {\n this._role = 'alert';\n }\n }\n }\n /** Attach a component portal as content to this snack bar container. */\n attachComponentPortal(portal) {\n this._assertNotAttached();\n const result = this._portalOutlet.attachComponentPortal(portal);\n this._afterPortalAttached();\n return result;\n }\n /** Attach a template portal as content to this snack bar container. */\n attachTemplatePortal(portal) {\n this._assertNotAttached();\n const result = this._portalOutlet.attachTemplatePortal(portal);\n this._afterPortalAttached();\n return result;\n }\n /** Handle end of animations, updating the state of the snackbar. */\n onAnimationEnd(event) {\n const { fromState, toState } = event;\n if ((toState === 'void' && fromState !== 'void') || toState === 'hidden') {\n this._completeExit();\n }\n if (toState === 'visible') {\n // Note: we shouldn't use `this` inside the zone callback,\n // because it can cause a memory leak.\n const onEnter = this._onEnter;\n this._ngZone.run(() => {\n onEnter.next();\n onEnter.complete();\n });\n }\n }\n /** Begin animation of snack bar entrance into view. */\n enter() {\n if (!this._destroyed) {\n this._animationState = 'visible';\n this._changeDetectorRef.detectChanges();\n this._screenReaderAnnounce();\n }\n }\n /** Begin animation of the snack bar exiting from view. */\n exit() {\n // It's common for snack bars to be opened by random outside calls like HTTP requests or\n // errors. Run inside the NgZone to ensure that it functions correctly.\n this._ngZone.run(() => {\n // Note: this one transitions to `hidden`, rather than `void`, in order to handle the case\n // where multiple snack bars are opened in quick succession (e.g. two consecutive calls to\n // `MatSnackBar.open`).\n this._animationState = 'hidden';\n // Mark this element with an 'exit' attribute to indicate that the snackbar has\n // been dismissed and will soon be removed from the DOM. This is used by the snackbar\n // test harness.\n this._elementRef.nativeElement.setAttribute('mat-exit', '');\n // If the snack bar hasn't been announced by the time it exits it wouldn't have been open\n // long enough to visually read it either, so clear the timeout for announcing.\n clearTimeout(this._announceTimeoutId);\n });\n return this._onExit;\n }\n /** Makes sure the exit callbacks have been invoked when the element is destroyed. */\n ngOnDestroy() {\n this._destroyed = true;\n this._completeExit();\n }\n /**\n * Waits for the zone to settle before removing the element. Helps prevent\n * errors where we end up removing an element which is in the middle of an animation.\n */\n _completeExit() {\n this._ngZone.onMicrotaskEmpty.pipe(take(1)).subscribe(() => {\n this._ngZone.run(() => {\n this._onExit.next();\n this._onExit.complete();\n });\n });\n }\n /**\n * Called after the portal contents have been attached. Can be\n * used to modify the DOM once it's guaranteed to be in place.\n */\n _afterPortalAttached() {\n const element = this._elementRef.nativeElement;\n const panelClasses = this.snackBarConfig.panelClass;\n if (panelClasses) {\n if (Array.isArray(panelClasses)) {\n // Note that we can't use a spread here, because IE doesn't support multiple arguments.\n panelClasses.forEach(cssClass => element.classList.add(cssClass));\n }\n else {\n element.classList.add(panelClasses);\n }\n }\n }\n /** Asserts that no content is already attached to the container. */\n _assertNotAttached() {\n if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Attempting to attach snack bar content after content is already attached');\n }\n }\n /**\n * Starts a timeout to move the snack bar content to the live region so screen readers will\n * announce it.\n */\n _screenReaderAnnounce() {\n if (!this._announceTimeoutId) {\n this._ngZone.runOutsideAngular(() => {\n this._announceTimeoutId = setTimeout(() => {\n const inertElement = this._elementRef.nativeElement.querySelector('[aria-hidden]');\n const liveElement = this._elementRef.nativeElement.querySelector('[aria-live]');\n if (inertElement && liveElement) {\n // If an element in the snack bar content is focused before being moved\n // track it and restore focus after moving to the live region.\n let focusedElement = null;\n if (this._platform.isBrowser &&\n document.activeElement instanceof HTMLElement &&\n inertElement.contains(document.activeElement)) {\n focusedElement = document.activeElement;\n }\n inertElement.removeAttribute('aria-hidden');\n liveElement.appendChild(inertElement);\n focusedElement?.focus();\n this._onAnnounce.next();\n this._onAnnounce.complete();\n }\n }, this._announceDelay);\n });\n }\n }\n}\n_MatSnackBarContainerBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatSnackBarContainerBase, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.Platform }, { token: MatSnackBarConfig }], target: i0.ɵɵFactoryTarget.Directive });\n_MatSnackBarContainerBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _MatSnackBarContainerBase, viewQueries: [{ propertyName: \"_portalOutlet\", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatSnackBarContainerBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.Platform }, { type: MatSnackBarConfig }]; }, propDecorators: { _portalOutlet: [{\n type: ViewChild,\n args: [CdkPortalOutlet, { static: true }]\n }] } });\n/**\n * Internal component that wraps user-provided snack bar content.\n * @docs-private\n */\nclass MatSnackBarContainer extends _MatSnackBarContainerBase {\n _afterPortalAttached() {\n super._afterPortalAttached();\n if (this.snackBarConfig.horizontalPosition === 'center') {\n this._elementRef.nativeElement.classList.add('mat-snack-bar-center');\n }\n if (this.snackBarConfig.verticalPosition === 'top') {\n this._elementRef.nativeElement.classList.add('mat-snack-bar-top');\n }\n }\n}\nMatSnackBarContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSnackBarContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatSnackBarContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatSnackBarContainer, selector: \"snack-bar-container\", host: { listeners: { \"@state.done\": \"onAnimationEnd($event)\" }, properties: { \"@state\": \"_animationState\" }, classAttribute: \"mat-snack-bar-container\" }, usesInheritance: true, ngImport: i0, template: \"<!-- Initially holds the snack bar content, will be empty after announcing to screen readers. -->\\n<div aria-hidden=\\\"true\\\">\\n <ng-template cdkPortalOutlet></ng-template>\\n</div>\\n\\n<!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\\n<div [attr.aria-live]=\\\"_live\\\" [attr.role]=\\\"_role\\\"></div>\\n\", styles: [\".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\"], dependencies: [{ kind: \"directive\", type: i3$1.CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: [\"cdkPortalOutlet\"], outputs: [\"attached\"], exportAs: [\"cdkPortalOutlet\"] }], animations: [matSnackBarAnimations.snackBarState], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSnackBarContainer, decorators: [{\n type: Component,\n args: [{ selector: 'snack-bar-container', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, animations: [matSnackBarAnimations.snackBarState], host: {\n 'class': 'mat-snack-bar-container',\n '[@state]': '_animationState',\n '(@state.done)': 'onAnimationEnd($event)',\n }, template: \"<!-- Initially holds the snack bar content, will be empty after announcing to screen readers. -->\\n<div aria-hidden=\\\"true\\\">\\n <ng-template cdkPortalOutlet></ng-template>\\n</div>\\n\\n<!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\\n<div [attr.aria-live]=\\\"_live\\\" [attr.role]=\\\"_role\\\"></div>\\n\", styles: [\".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\"] }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 MatSnackBarModule {\n}\nMatSnackBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSnackBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatSnackBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSnackBarModule, declarations: [MatSnackBarContainer, SimpleSnackBar], imports: [OverlayModule, PortalModule, CommonModule, MatButtonModule, MatCommonModule], exports: [MatSnackBarContainer, MatCommonModule] });\nMatSnackBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSnackBarModule, imports: [OverlayModule, PortalModule, CommonModule, MatButtonModule, MatCommonModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSnackBarModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [OverlayModule, PortalModule, CommonModule, MatButtonModule, MatCommonModule],\n exports: [MatSnackBarContainer, MatCommonModule],\n declarations: [MatSnackBarContainer, SimpleSnackBar],\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/** Injection token that can be used to specify default snack bar. */\nconst MAT_SNACK_BAR_DEFAULT_OPTIONS = new InjectionToken('mat-snack-bar-default-options', {\n providedIn: 'root',\n factory: MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY,\n});\n/** @docs-private */\nfunction MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY() {\n return new MatSnackBarConfig();\n}\nclass _MatSnackBarBase {\n constructor(_overlay, _live, _injector, _breakpointObserver, _parentSnackBar, _defaultConfig) {\n this._overlay = _overlay;\n this._live = _live;\n this._injector = _injector;\n this._breakpointObserver = _breakpointObserver;\n this._parentSnackBar = _parentSnackBar;\n this._defaultConfig = _defaultConfig;\n /**\n * Reference to the current snack bar in the view *at this level* (in the Angular injector tree).\n * If there is a parent snack-bar service, all operations should delegate to that parent\n * via `_openedSnackBarRef`.\n */\n this._snackBarRefAtThisLevel = null;\n }\n /** Reference to the currently opened snackbar at *any* level. */\n get _openedSnackBarRef() {\n const parent = this._parentSnackBar;\n return parent ? parent._openedSnackBarRef : this._snackBarRefAtThisLevel;\n }\n set _openedSnackBarRef(value) {\n if (this._parentSnackBar) {\n this._parentSnackBar._openedSnackBarRef = value;\n }\n else {\n this._snackBarRefAtThisLevel = value;\n }\n }\n /**\n * Creates and dispatches a snack bar with a custom component for the content, removing any\n * currently opened snack bars.\n *\n * @param component Component to be instantiated.\n * @param config Extra configuration for the snack bar.\n */\n openFromComponent(component, config) {\n return this._attach(component, config);\n }\n /**\n * Creates and dispatches a snack bar with a custom template for the content, removing any\n * currently opened snack bars.\n *\n * @param template Template to be instantiated.\n * @param config Extra configuration for the snack bar.\n */\n openFromTemplate(template, config) {\n return this._attach(template, config);\n }\n /**\n * Opens a snackbar with a message and an optional action.\n * @param message The message to show in the snackbar.\n * @param action The label for the snackbar action.\n * @param config Additional configuration options for the snackbar.\n */\n open(message, action = '', config) {\n const _config = { ...this._defaultConfig, ...config };\n // Since the user doesn't have access to the component, we can\n // override the data to pass in our own message and action.\n _config.data = { message, action };\n // Since the snack bar has `role=\"alert\"`, we don't\n // want to announce the same message twice.\n if (_config.announcementMessage === message) {\n _config.announcementMessage = undefined;\n }\n return this.openFromComponent(this.simpleSnackBarComponent, _config);\n }\n /**\n * Dismisses the currently-visible snack bar.\n */\n dismiss() {\n if (this._openedSnackBarRef) {\n this._openedSnackBarRef.dismiss();\n }\n }\n ngOnDestroy() {\n // Only dismiss the snack bar at the current level on destroy.\n if (this._snackBarRefAtThisLevel) {\n this._snackBarRefAtThisLevel.dismiss();\n }\n }\n /**\n * Attaches the snack bar container component to the overlay.\n */\n _attachSnackBarContainer(overlayRef, config) {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const injector = Injector.create({\n parent: userInjector || this._injector,\n providers: [{ provide: MatSnackBarConfig, useValue: config }],\n });\n const containerPortal = new ComponentPortal(this.snackBarContainerComponent, config.viewContainerRef, injector);\n const containerRef = overlayRef.attach(containerPortal);\n containerRef.instance.snackBarConfig = config;\n return containerRef.instance;\n }\n /**\n * Places a new component or a template as the content of the snack bar container.\n */\n _attach(content, userConfig) {\n const config = { ...new MatSnackBarConfig(), ...this._defaultConfig, ...userConfig };\n const overlayRef = this._createOverlay(config);\n const container = this._attachSnackBarContainer(overlayRef, config);\n const snackBarRef = new MatSnackBarRef(container, overlayRef);\n if (content instanceof TemplateRef) {\n const portal = new TemplatePortal(content, null, {\n $implicit: config.data,\n snackBarRef,\n });\n snackBarRef.instance = container.attachTemplatePortal(portal);\n }\n else {\n const injector = this._createInjector(config, snackBarRef);\n const portal = new ComponentPortal(content, undefined, injector);\n const contentRef = container.attachComponentPortal(portal);\n // We can't pass this via the injector, because the injector is created earlier.\n snackBarRef.instance = contentRef.instance;\n }\n // Subscribe to the breakpoint observer and attach the mat-snack-bar-handset class as\n // appropriate. This class is applied to the overlay element because the overlay must expand to\n // fill the width of the screen for full width snackbars.\n this._breakpointObserver\n .observe(Breakpoints.HandsetPortrait)\n .pipe(takeUntil(overlayRef.detachments()))\n .subscribe(state => {\n overlayRef.overlayElement.classList.toggle(this.handsetCssClass, state.matches);\n });\n if (config.announcementMessage) {\n // Wait until the snack bar contents have been announced then deliver this message.\n container._onAnnounce.subscribe(() => {\n this._live.announce(config.announcementMessage, config.politeness);\n });\n }\n this._animateSnackBar(snackBarRef, config);\n this._openedSnackBarRef = snackBarRef;\n return this._openedSnackBarRef;\n }\n /** Animates the old snack bar out and the new one in. */\n _animateSnackBar(snackBarRef, config) {\n // When the snackbar is dismissed, clear the reference to it.\n snackBarRef.afterDismissed().subscribe(() => {\n // Clear the snackbar ref if it hasn't already been replaced by a newer snackbar.\n if (this._openedSnackBarRef == snackBarRef) {\n this._openedSnackBarRef = null;\n }\n if (config.announcementMessage) {\n this._live.clear();\n }\n });\n if (this._openedSnackBarRef) {\n // If a snack bar is already in view, dismiss it and enter the\n // new snack bar after exit animation is complete.\n this._openedSnackBarRef.afterDismissed().subscribe(() => {\n snackBarRef.containerInstance.enter();\n });\n this._openedSnackBarRef.dismiss();\n }\n else {\n // If no snack bar is in view, enter the new snack bar.\n snackBarRef.containerInstance.enter();\n }\n // If a dismiss timeout is provided, set up dismiss based on after the snackbar is opened.\n if (config.duration && config.duration > 0) {\n snackBarRef.afterOpened().subscribe(() => snackBarRef._dismissAfter(config.duration));\n }\n }\n /**\n * Creates a new overlay and places it in the correct location.\n * @param config The user-specified snack bar config.\n */\n _createOverlay(config) {\n const overlayConfig = new OverlayConfig();\n overlayConfig.direction = config.direction;\n let positionStrategy = this._overlay.position().global();\n // Set horizontal position.\n const isRtl = config.direction === 'rtl';\n const isLeft = config.horizontalPosition === 'left' ||\n (config.horizontalPosition === 'start' && !isRtl) ||\n (config.horizontalPosition === 'end' && isRtl);\n const isRight = !isLeft && config.horizontalPosition !== 'center';\n if (isLeft) {\n positionStrategy.left('0');\n }\n else if (isRight) {\n positionStrategy.right('0');\n }\n else {\n positionStrategy.centerHorizontally();\n }\n // Set horizontal position.\n if (config.verticalPosition === 'top') {\n positionStrategy.top('0');\n }\n else {\n positionStrategy.bottom('0');\n }\n overlayConfig.positionStrategy = positionStrategy;\n return this._overlay.create(overlayConfig);\n }\n /**\n * Creates an injector to be used inside of a snack bar component.\n * @param config Config that was used to create the snack bar.\n * @param snackBarRef Reference to the snack bar.\n */\n _createInjector(config, snackBarRef) {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n return Injector.create({\n parent: userInjector || this._injector,\n providers: [\n { provide: MatSnackBarRef, useValue: snackBarRef },\n { provide: MAT_SNACK_BAR_DATA, useValue: config.data },\n ],\n });\n }\n}\n_MatSnackBarBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatSnackBarBase, deps: [{ token: i1$1.Overlay }, { token: i2$1.LiveAnnouncer }, { token: i0.Injector }, { token: i3$2.BreakpointObserver }, { token: _MatSnackBarBase, optional: true, skipSelf: true }, { token: MAT_SNACK_BAR_DEFAULT_OPTIONS }], target: i0.ɵɵFactoryTarget.Injectable });\n_MatSnackBarBase.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatSnackBarBase });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatSnackBarBase, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i2$1.LiveAnnouncer }, { type: i0.Injector }, { type: i3$2.BreakpointObserver }, { type: _MatSnackBarBase, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }] }, { type: MatSnackBarConfig, decorators: [{\n type: Inject,\n args: [MAT_SNACK_BAR_DEFAULT_OPTIONS]\n }] }]; } });\n/**\n * Service to dispatch Material Design snack bar messages.\n */\nclass MatSnackBar extends _MatSnackBarBase {\n constructor(overlay, live, injector, breakpointObserver, parentSnackBar, defaultConfig) {\n super(overlay, live, injector, breakpointObserver, parentSnackBar, defaultConfig);\n this.simpleSnackBarComponent = SimpleSnackBar;\n this.snackBarContainerComponent = MatSnackBarContainer;\n this.handsetCssClass = 'mat-snack-bar-handset';\n }\n}\nMatSnackBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSnackBar, deps: [{ token: i1$1.Overlay }, { token: i2$1.LiveAnnouncer }, { token: i0.Injector }, { token: i3$2.BreakpointObserver }, { token: MatSnackBar, optional: true, skipSelf: true }, { token: MAT_SNACK_BAR_DEFAULT_OPTIONS }], target: i0.ɵɵFactoryTarget.Injectable });\nMatSnackBar.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSnackBar, providedIn: MatSnackBarModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSnackBar, decorators: [{\n type: Injectable,\n args: [{ providedIn: MatSnackBarModule }]\n }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i2$1.LiveAnnouncer }, { type: i0.Injector }, { type: i3$2.BreakpointObserver }, { type: MatSnackBar, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }] }, { type: MatSnackBarConfig, decorators: [{\n type: Inject,\n args: [MAT_SNACK_BAR_DEFAULT_OPTIONS]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Generated bundle index. Do not edit.\n */\n\nexport { MAT_SNACK_BAR_DATA, MAT_SNACK_BAR_DEFAULT_OPTIONS, MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY, MatSnackBar, MatSnackBarConfig, MatSnackBarContainer, MatSnackBarModule, MatSnackBarRef, SimpleSnackBar, _MatSnackBarBase, _MatSnackBarContainerBase, matSnackBarAnimations };\n","import * as i4 from '@angular/cdk/observers';\nimport { ObserversModule } from '@angular/cdk/observers';\nimport * as i3 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Directive, Attribute, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, ViewChild, ContentChild, ContentChildren, NgModule } from '@angular/core';\nimport { mixinColor, MatCommonModule } from '@angular/material/core';\nimport * as i1 from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Subject, merge, fromEvent } from 'rxjs';\nimport { startWith, takeUntil, take } from 'rxjs/operators';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\nimport * as i2 from '@angular/cdk/platform';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 nextUniqueId$2 = 0;\n/**\n * Injection token that can be used to reference instances of `MatError`. It serves as\n * alternative token to the actual `MatError` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_ERROR = new InjectionToken('MatError');\n/** Single error message to be shown underneath the form field. */\nclass MatError {\n constructor(ariaLive, elementRef) {\n this.id = `mat-error-${nextUniqueId$2++}`;\n // If no aria-live value is set add 'polite' as a default. This is preferred over setting\n // role='alert' so that screen readers do not interrupt the current task to read this aloud.\n if (!ariaLive) {\n elementRef.nativeElement.setAttribute('aria-live', 'polite');\n }\n }\n}\nMatError.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatError, deps: [{ token: 'aria-live', attribute: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nMatError.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatError, selector: \"mat-error\", inputs: { id: \"id\" }, host: { attributes: { \"aria-atomic\": \"true\" }, properties: { \"attr.id\": \"id\" }, classAttribute: \"mat-error\" }, providers: [{ provide: MAT_ERROR, useExisting: MatError }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatError, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-error',\n host: {\n 'class': 'mat-error',\n '[attr.id]': 'id',\n 'aria-atomic': 'true',\n },\n providers: [{ provide: MAT_ERROR, useExisting: MatError }],\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Attribute,\n args: ['aria-live']\n }] }, { type: i0.ElementRef }]; }, propDecorators: { id: [{\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 * Animations used by the MatFormField.\n * @docs-private\n */\nconst matFormFieldAnimations = {\n /** Animation that transitions the form field's error and hint messages. */\n transitionMessages: trigger('transitionMessages', [\n // TODO(mmalerba): Use angular animations for label animation as well.\n state('enter', style({ opacity: 1, transform: 'translateY(0%)' })),\n transition('void => enter', [\n style({ opacity: 0, transform: 'translateY(-5px)' }),\n animate('300ms cubic-bezier(0.55, 0, 0.55, 0.2)'),\n ]),\n ]),\n};\n\n/** An interface which allows a control to work inside of a `MatFormField`. */\nclass MatFormFieldControl {\n}\nMatFormFieldControl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatFormFieldControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatFormFieldControl.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatFormFieldControl, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatFormFieldControl, decorators: [{\n type: 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/** @docs-private */\nfunction getMatFormFieldPlaceholderConflictError() {\n return Error('Placeholder attribute and child element were both specified.');\n}\n/** @docs-private */\nfunction getMatFormFieldDuplicatedHintError(align) {\n return Error(`A hint was already declared for 'align=\"${align}\"'.`);\n}\n/** @docs-private */\nfunction getMatFormFieldMissingControlError() {\n return Error('mat-form-field must contain a MatFormFieldControl.');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 nextUniqueId$1 = 0;\n/**\n * Injection token that can be used to reference instances of `MatHint`. It serves as\n * alternative token to the actual `MatHint` class which could cause unnecessary\n * retention of the class and its directive metadata.\n *\n * *Note*: This is not part of the public API as the MDC-based form-field will not\n * need a lightweight token for `MatHint` and we want to reduce breaking changes.\n */\nconst _MAT_HINT = new InjectionToken('MatHint');\n/** Hint text to be shown underneath the form field control. */\nclass MatHint {\n constructor() {\n /** Whether to align the hint label at the start or end of the line. */\n this.align = 'start';\n /** Unique ID for the hint. Used for the aria-describedby on the form field control. */\n this.id = `mat-hint-${nextUniqueId$1++}`;\n }\n}\nMatHint.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatHint, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatHint.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatHint, selector: \"mat-hint\", inputs: { align: \"align\", id: \"id\" }, host: { properties: { \"class.mat-form-field-hint-end\": \"align === \\\"end\\\"\", \"attr.id\": \"id\", \"attr.align\": \"null\" }, classAttribute: \"mat-hint\" }, providers: [{ provide: _MAT_HINT, useExisting: MatHint }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatHint, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-hint',\n host: {\n 'class': 'mat-hint',\n '[class.mat-form-field-hint-end]': 'align === \"end\"',\n '[attr.id]': 'id',\n // Remove align attribute to prevent it from interfering with layout.\n '[attr.align]': 'null',\n },\n providers: [{ provide: _MAT_HINT, useExisting: MatHint }],\n }]\n }], propDecorators: { align: [{\n type: Input\n }], id: [{\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/** The floating label for a `mat-form-field`. */\nclass MatLabel {\n}\nMatLabel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatLabel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatLabel, selector: \"mat-label\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatLabel, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-label',\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 placeholder text for an `MatFormField`.\n * @deprecated Use `<mat-label>` to specify the label and the `placeholder` attribute to specify the\n * placeholder.\n * @breaking-change 8.0.0\n */\nclass MatPlaceholder {\n}\nMatPlaceholder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatPlaceholder, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatPlaceholder.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatPlaceholder, selector: \"mat-placeholder\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatPlaceholder, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-placeholder',\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 * Injection token that can be used to reference instances of `MatPrefix`. It serves as\n * alternative token to the actual `MatPrefix` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_PREFIX = new InjectionToken('MatPrefix');\n/** Prefix to be placed in front of the form field. */\nclass MatPrefix {\n}\nMatPrefix.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatPrefix, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatPrefix.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatPrefix, selector: \"[matPrefix]\", providers: [{ provide: MAT_PREFIX, useExisting: MatPrefix }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatPrefix, decorators: [{\n type: Directive,\n args: [{\n selector: '[matPrefix]',\n providers: [{ provide: MAT_PREFIX, useExisting: MatPrefix }],\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 * Injection token that can be used to reference instances of `MatSuffix`. It serves as\n * alternative token to the actual `MatSuffix` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_SUFFIX = new InjectionToken('MatSuffix');\n/** Suffix to be placed at the end of the form field. */\nclass MatSuffix {\n}\nMatSuffix.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSuffix, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatSuffix.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatSuffix, selector: \"[matSuffix]\", providers: [{ provide: MAT_SUFFIX, useExisting: MatSuffix }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSuffix, decorators: [{\n type: Directive,\n args: [{\n selector: '[matSuffix]',\n providers: [{ provide: MAT_SUFFIX, useExisting: MatSuffix }],\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 nextUniqueId = 0;\nconst floatingLabelScale = 0.75;\nconst outlineGapPadding = 5;\n/**\n * Boilerplate for applying mixins to MatFormField.\n * @docs-private\n */\nconst _MatFormFieldBase = mixinColor(class {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n}, 'primary');\n/**\n * Injection token that can be used to configure the\n * default options for all form field within an app.\n */\nconst MAT_FORM_FIELD_DEFAULT_OPTIONS = new InjectionToken('MAT_FORM_FIELD_DEFAULT_OPTIONS');\n/**\n * Injection token that can be used to inject an instances of `MatFormField`. It serves\n * as alternative token to the actual `MatFormField` class which would cause unnecessary\n * retention of the `MatFormField` class and its component metadata.\n */\nconst MAT_FORM_FIELD = new InjectionToken('MatFormField');\n/** Container for form controls that applies Material Design styling and behavior. */\nclass MatFormField extends _MatFormFieldBase {\n constructor(elementRef, _changeDetectorRef, _dir, _defaults, _platform, _ngZone, _animationMode) {\n super(elementRef);\n this._changeDetectorRef = _changeDetectorRef;\n this._dir = _dir;\n this._defaults = _defaults;\n this._platform = _platform;\n this._ngZone = _ngZone;\n /**\n * Whether the outline gap needs to be calculated\n * immediately on the next change detection run.\n */\n this._outlineGapCalculationNeededImmediately = false;\n /** Whether the outline gap needs to be calculated next time the zone has stabilized. */\n this._outlineGapCalculationNeededOnStable = false;\n this._destroyed = new Subject();\n this._hideRequiredMarker = false;\n /** Override for the logic that disables the label animation in certain cases. */\n this._showAlwaysAnimate = false;\n /** State of the mat-hint and mat-error animations. */\n this._subscriptAnimationState = '';\n this._hintLabel = '';\n // Unique id for the hint label.\n this._hintLabelId = `mat-hint-${nextUniqueId++}`;\n // Unique id for the label element.\n this._labelId = `mat-form-field-label-${nextUniqueId++}`;\n this.floatLabel = this._getDefaultFloatLabelState();\n this._animationsEnabled = _animationMode !== 'NoopAnimations';\n // Set the default through here so we invoke the setter on the first run.\n this.appearance = _defaults?.appearance || 'legacy';\n if (_defaults) {\n this._hideRequiredMarker = Boolean(_defaults.hideRequiredMarker);\n if (_defaults.color) {\n this.color = this.defaultColor = _defaults.color;\n }\n }\n }\n /** The form field appearance style. */\n get appearance() {\n return this._appearance;\n }\n set appearance(value) {\n const oldValue = this._appearance;\n this._appearance = value || this._defaults?.appearance || 'legacy';\n if (this._appearance === 'outline' && oldValue !== value) {\n this._outlineGapCalculationNeededOnStable = true;\n }\n }\n /** Whether the required marker should be hidden. */\n get hideRequiredMarker() {\n return this._hideRequiredMarker;\n }\n set hideRequiredMarker(value) {\n this._hideRequiredMarker = coerceBooleanProperty(value);\n }\n /** Whether the floating label should always float or not. */\n _shouldAlwaysFloat() {\n return this.floatLabel === 'always' && !this._showAlwaysAnimate;\n }\n /** Whether the label can float or not. */\n _canLabelFloat() {\n return this.floatLabel !== 'never';\n }\n /** Text for the form field hint. */\n get hintLabel() {\n return this._hintLabel;\n }\n set hintLabel(value) {\n this._hintLabel = value;\n this._processHints();\n }\n /**\n * Whether the label should always float, never float or float as the user types.\n *\n * Note: only the legacy appearance supports the `never` option. `never` was originally added as a\n * way to make the floating label emulate the behavior of a standard input placeholder. However\n * the form field now supports both floating labels and placeholders. Therefore in the non-legacy\n * appearances the `never` option has been disabled in favor of just using the placeholder.\n */\n get floatLabel() {\n return this.appearance !== 'legacy' && this._floatLabel === 'never' ? 'auto' : this._floatLabel;\n }\n set floatLabel(value) {\n if (value !== this._floatLabel) {\n this._floatLabel = value || this._getDefaultFloatLabelState();\n this._changeDetectorRef.markForCheck();\n }\n }\n get _control() {\n // TODO(crisbeto): we need this workaround in order to support both Ivy and ViewEngine.\n // We should clean this up once Ivy is the default renderer.\n return this._explicitFormFieldControl || this._controlNonStatic || this._controlStatic;\n }\n set _control(value) {\n this._explicitFormFieldControl = value;\n }\n /**\n * Gets the id of the label element. If no label is present, returns `null`.\n */\n getLabelId() {\n return this._hasFloatingLabel() ? this._labelId : null;\n }\n /**\n * Gets an ElementRef for the element that a overlay attached to the form field should be\n * positioned relative to.\n */\n getConnectedOverlayOrigin() {\n return this._connectionContainerRef || this._elementRef;\n }\n ngAfterContentInit() {\n this._validateControlChild();\n const control = this._control;\n if (control.controlType) {\n this._elementRef.nativeElement.classList.add(`mat-form-field-type-${control.controlType}`);\n }\n // Subscribe to changes in the child control state in order to update the form field UI.\n control.stateChanges.pipe(startWith(null)).subscribe(() => {\n this._validatePlaceholders();\n this._syncDescribedByIds();\n this._changeDetectorRef.markForCheck();\n });\n // Run change detection if the value changes.\n if (control.ngControl && control.ngControl.valueChanges) {\n control.ngControl.valueChanges\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._changeDetectorRef.markForCheck());\n }\n // Note that we have to run outside of the `NgZone` explicitly,\n // in order to avoid throwing users into an infinite loop\n // if `zone-patch-rxjs` is included.\n this._ngZone.runOutsideAngular(() => {\n this._ngZone.onStable.pipe(takeUntil(this._destroyed)).subscribe(() => {\n if (this._outlineGapCalculationNeededOnStable) {\n this.updateOutlineGap();\n }\n });\n });\n // Run change detection and update the outline if the suffix or prefix changes.\n merge(this._prefixChildren.changes, this._suffixChildren.changes).subscribe(() => {\n this._outlineGapCalculationNeededOnStable = true;\n this._changeDetectorRef.markForCheck();\n });\n // Re-validate when the number of hints changes.\n this._hintChildren.changes.pipe(startWith(null)).subscribe(() => {\n this._processHints();\n this._changeDetectorRef.markForCheck();\n });\n // Update the aria-described by when the number of errors changes.\n this._errorChildren.changes.pipe(startWith(null)).subscribe(() => {\n this._syncDescribedByIds();\n this._changeDetectorRef.markForCheck();\n });\n if (this._dir) {\n this._dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {\n if (typeof requestAnimationFrame === 'function') {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => this.updateOutlineGap());\n });\n }\n else {\n this.updateOutlineGap();\n }\n });\n }\n }\n ngAfterContentChecked() {\n this._validateControlChild();\n if (this._outlineGapCalculationNeededImmediately) {\n this.updateOutlineGap();\n }\n }\n ngAfterViewInit() {\n // Avoid animations on load.\n this._subscriptAnimationState = 'enter';\n this._changeDetectorRef.detectChanges();\n }\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n /**\n * Determines whether a class from the AbstractControlDirective\n * should be forwarded to the host element.\n */\n _shouldForward(prop) {\n const control = this._control ? this._control.ngControl : null;\n return control && control[prop];\n }\n _hasPlaceholder() {\n return !!((this._control && this._control.placeholder) || this._placeholderChild);\n }\n _hasLabel() {\n return !!(this._labelChildNonStatic || this._labelChildStatic);\n }\n _shouldLabelFloat() {\n return (this._canLabelFloat() &&\n ((this._control && this._control.shouldLabelFloat) || this._shouldAlwaysFloat()));\n }\n _hideControlPlaceholder() {\n // In the legacy appearance the placeholder is promoted to a label if no label is given.\n return ((this.appearance === 'legacy' && !this._hasLabel()) ||\n (this._hasLabel() && !this._shouldLabelFloat()));\n }\n _hasFloatingLabel() {\n // In the legacy appearance the placeholder is promoted to a label if no label is given.\n return this._hasLabel() || (this.appearance === 'legacy' && this._hasPlaceholder());\n }\n /** Determines whether to display hints or errors. */\n _getDisplayedMessages() {\n return this._errorChildren && this._errorChildren.length > 0 && this._control.errorState\n ? 'error'\n : 'hint';\n }\n /** Animates the placeholder up and locks it in position. */\n _animateAndLockLabel() {\n if (this._hasFloatingLabel() && this._canLabelFloat()) {\n // If animations are disabled, we shouldn't go in here,\n // because the `transitionend` will never fire.\n if (this._animationsEnabled && this._label) {\n this._showAlwaysAnimate = true;\n fromEvent(this._label.nativeElement, 'transitionend')\n .pipe(take(1))\n .subscribe(() => {\n this._showAlwaysAnimate = false;\n });\n }\n this.floatLabel = 'always';\n this._changeDetectorRef.markForCheck();\n }\n }\n /**\n * Ensure that there is only one placeholder (either `placeholder` attribute on the child control\n * or child element with the `mat-placeholder` directive).\n */\n _validatePlaceholders() {\n if (this._control.placeholder &&\n this._placeholderChild &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatFormFieldPlaceholderConflictError();\n }\n }\n /** Does any extra processing that is required when handling the hints. */\n _processHints() {\n this._validateHints();\n this._syncDescribedByIds();\n }\n /**\n * Ensure that there is a maximum of one of each `<mat-hint>` alignment specified, with the\n * attribute being considered as `align=\"start\"`.\n */\n _validateHints() {\n if (this._hintChildren && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n let startHint;\n let endHint;\n this._hintChildren.forEach((hint) => {\n if (hint.align === 'start') {\n if (startHint || this.hintLabel) {\n throw getMatFormFieldDuplicatedHintError('start');\n }\n startHint = hint;\n }\n else if (hint.align === 'end') {\n if (endHint) {\n throw getMatFormFieldDuplicatedHintError('end');\n }\n endHint = hint;\n }\n });\n }\n }\n /** Gets the default float label state. */\n _getDefaultFloatLabelState() {\n return (this._defaults && this._defaults.floatLabel) || 'auto';\n }\n /**\n * Sets the list of element IDs that describe the child control. This allows the control to update\n * its `aria-describedby` attribute accordingly.\n */\n _syncDescribedByIds() {\n if (this._control) {\n let ids = [];\n // TODO(wagnermaciel): Remove the type check when we find the root cause of this bug.\n if (this._control.userAriaDescribedBy &&\n typeof this._control.userAriaDescribedBy === 'string') {\n ids.push(...this._control.userAriaDescribedBy.split(' '));\n }\n if (this._getDisplayedMessages() === 'hint') {\n const startHint = this._hintChildren\n ? this._hintChildren.find(hint => hint.align === 'start')\n : null;\n const endHint = this._hintChildren\n ? this._hintChildren.find(hint => hint.align === 'end')\n : null;\n if (startHint) {\n ids.push(startHint.id);\n }\n else if (this._hintLabel) {\n ids.push(this._hintLabelId);\n }\n if (endHint) {\n ids.push(endHint.id);\n }\n }\n else if (this._errorChildren) {\n ids.push(...this._errorChildren.map(error => error.id));\n }\n this._control.setDescribedByIds(ids);\n }\n }\n /** Throws an error if the form field's control is missing. */\n _validateControlChild() {\n if (!this._control && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatFormFieldMissingControlError();\n }\n }\n /**\n * Updates the width and position of the gap in the outline. Only relevant for the outline\n * appearance.\n */\n updateOutlineGap() {\n const labelEl = this._label ? this._label.nativeElement : null;\n const container = this._connectionContainerRef.nativeElement;\n const outlineStartSelector = '.mat-form-field-outline-start';\n const outlineGapSelector = '.mat-form-field-outline-gap';\n // getBoundingClientRect isn't available on the server.\n if (this.appearance !== 'outline' || !this._platform.isBrowser) {\n return;\n }\n // If there is no content, set the gap elements to zero.\n if (!labelEl || !labelEl.children.length || !labelEl.textContent.trim()) {\n const gapElements = container.querySelectorAll(`${outlineStartSelector}, ${outlineGapSelector}`);\n for (let i = 0; i < gapElements.length; i++) {\n gapElements[i].style.width = '0';\n }\n return;\n }\n // If the element is not present in the DOM, the outline gap will need to be calculated\n // the next time it is checked and in the DOM.\n if (!this._isAttachedToDOM()) {\n this._outlineGapCalculationNeededImmediately = true;\n return;\n }\n let startWidth = 0;\n let gapWidth = 0;\n const startEls = container.querySelectorAll(outlineStartSelector);\n const gapEls = container.querySelectorAll(outlineGapSelector);\n if (this._label && this._label.nativeElement.children.length) {\n const containerRect = container.getBoundingClientRect();\n // If the container's width and height are zero, it means that the element is\n // invisible and we can't calculate the outline gap. Mark the element as needing\n // to be checked the next time the zone stabilizes. We can't do this immediately\n // on the next change detection, because even if the element becomes visible,\n // the `ClientRect` won't be recalculated immediately. We reset the\n // `_outlineGapCalculationNeededImmediately` flag some we don't run the checks twice.\n if (containerRect.width === 0 && containerRect.height === 0) {\n this._outlineGapCalculationNeededOnStable = true;\n this._outlineGapCalculationNeededImmediately = false;\n return;\n }\n const containerStart = this._getStartEnd(containerRect);\n const labelChildren = labelEl.children;\n const labelStart = this._getStartEnd(labelChildren[0].getBoundingClientRect());\n let labelWidth = 0;\n for (let i = 0; i < labelChildren.length; i++) {\n labelWidth += labelChildren[i].offsetWidth;\n }\n startWidth = Math.abs(labelStart - containerStart) - outlineGapPadding;\n gapWidth = labelWidth > 0 ? labelWidth * floatingLabelScale + outlineGapPadding * 2 : 0;\n }\n for (let i = 0; i < startEls.length; i++) {\n startEls[i].style.width = `${startWidth}px`;\n }\n for (let i = 0; i < gapEls.length; i++) {\n gapEls[i].style.width = `${gapWidth}px`;\n }\n this._outlineGapCalculationNeededOnStable = this._outlineGapCalculationNeededImmediately =\n false;\n }\n /** Gets the start end of the rect considering the current directionality. */\n _getStartEnd(rect) {\n return this._dir && this._dir.value === 'rtl' ? rect.right : rect.left;\n }\n /** Checks whether the form field is attached to the DOM. */\n _isAttachedToDOM() {\n const element = this._elementRef.nativeElement;\n if (element.getRootNode) {\n const rootNode = element.getRootNode();\n // If the element is inside the DOM the root node will be either the document\n // or the closest shadow root, otherwise it'll be the element itself.\n return rootNode && rootNode !== element;\n }\n // Otherwise fall back to checking if it's in the document. This doesn't account for\n // shadow DOM, however browser that support shadow DOM should support `getRootNode` as well.\n return document.documentElement.contains(element);\n }\n}\nMatFormField.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatFormField, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.Directionality, optional: true }, { token: MAT_FORM_FIELD_DEFAULT_OPTIONS, optional: true }, { token: i2.Platform }, { token: i0.NgZone }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatFormField.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatFormField, selector: \"mat-form-field\", inputs: { color: \"color\", appearance: \"appearance\", hideRequiredMarker: \"hideRequiredMarker\", hintLabel: \"hintLabel\", floatLabel: \"floatLabel\" }, host: { properties: { \"class.mat-form-field-appearance-standard\": \"appearance == \\\"standard\\\"\", \"class.mat-form-field-appearance-fill\": \"appearance == \\\"fill\\\"\", \"class.mat-form-field-appearance-outline\": \"appearance == \\\"outline\\\"\", \"class.mat-form-field-appearance-legacy\": \"appearance == \\\"legacy\\\"\", \"class.mat-form-field-invalid\": \"_control.errorState\", \"class.mat-form-field-can-float\": \"_canLabelFloat()\", \"class.mat-form-field-should-float\": \"_shouldLabelFloat()\", \"class.mat-form-field-has-label\": \"_hasFloatingLabel()\", \"class.mat-form-field-hide-placeholder\": \"_hideControlPlaceholder()\", \"class.mat-form-field-disabled\": \"_control.disabled\", \"class.mat-form-field-autofilled\": \"_control.autofilled\", \"class.mat-focused\": \"_control.focused\", \"class.ng-untouched\": \"_shouldForward(\\\"untouched\\\")\", \"class.ng-touched\": \"_shouldForward(\\\"touched\\\")\", \"class.ng-pristine\": \"_shouldForward(\\\"pristine\\\")\", \"class.ng-dirty\": \"_shouldForward(\\\"dirty\\\")\", \"class.ng-valid\": \"_shouldForward(\\\"valid\\\")\", \"class.ng-invalid\": \"_shouldForward(\\\"invalid\\\")\", \"class.ng-pending\": \"_shouldForward(\\\"pending\\\")\", \"class._mat-animation-noopable\": \"!_animationsEnabled\" }, classAttribute: \"mat-form-field\" }, providers: [{ provide: MAT_FORM_FIELD, useExisting: MatFormField }], queries: [{ propertyName: \"_controlNonStatic\", first: true, predicate: MatFormFieldControl, descendants: true }, { propertyName: \"_controlStatic\", first: true, predicate: MatFormFieldControl, descendants: true, static: true }, { propertyName: \"_labelChildNonStatic\", first: true, predicate: MatLabel, descendants: true }, { propertyName: \"_labelChildStatic\", first: true, predicate: MatLabel, descendants: true, static: true }, { propertyName: \"_placeholderChild\", first: true, predicate: MatPlaceholder, descendants: true }, { propertyName: \"_errorChildren\", predicate: MAT_ERROR, descendants: true }, { propertyName: \"_hintChildren\", predicate: _MAT_HINT, descendants: true }, { propertyName: \"_prefixChildren\", predicate: MAT_PREFIX, descendants: true }, { propertyName: \"_suffixChildren\", predicate: MAT_SUFFIX, descendants: true }], viewQueries: [{ propertyName: \"_connectionContainerRef\", first: true, predicate: [\"connectionContainer\"], descendants: true, static: true }, { propertyName: \"_inputContainerRef\", first: true, predicate: [\"inputContainer\"], descendants: true }, { propertyName: \"_label\", first: true, predicate: [\"label\"], descendants: true }], exportAs: [\"matFormField\"], usesInheritance: true, ngImport: i0, template: \"<div class=\\\"mat-form-field-wrapper\\\">\\n <div class=\\\"mat-form-field-flex\\\" #connectionContainer\\n (click)=\\\"_control.onContainerClick && _control.onContainerClick($event)\\\">\\n\\n <!-- Outline used for outline appearance. -->\\n <ng-container *ngIf=\\\"appearance == 'outline'\\\">\\n <div class=\\\"mat-form-field-outline\\\">\\n <div class=\\\"mat-form-field-outline-start\\\"></div>\\n <div class=\\\"mat-form-field-outline-gap\\\"></div>\\n <div class=\\\"mat-form-field-outline-end\\\"></div>\\n </div>\\n <div class=\\\"mat-form-field-outline mat-form-field-outline-thick\\\">\\n <div class=\\\"mat-form-field-outline-start\\\"></div>\\n <div class=\\\"mat-form-field-outline-gap\\\"></div>\\n <div class=\\\"mat-form-field-outline-end\\\"></div>\\n </div>\\n </ng-container>\\n\\n <div\\n class=\\\"mat-form-field-prefix\\\"\\n *ngIf=\\\"_prefixChildren.length\\\"\\n (cdkObserveContent)=\\\"updateOutlineGap()\\\"\\n [cdkObserveContentDisabled]=\\\"appearance != 'outline'\\\">\\n <ng-content select=\\\"[matPrefix]\\\"></ng-content>\\n </div>\\n\\n <div class=\\\"mat-form-field-infix\\\" #inputContainer>\\n <ng-content></ng-content>\\n\\n <span class=\\\"mat-form-field-label-wrapper\\\">\\n <!-- We add aria-owns as a workaround for an issue in JAWS & NVDA where the label isn't\\n read if it comes before the control in the DOM. -->\\n <label class=\\\"mat-form-field-label\\\"\\n (cdkObserveContent)=\\\"updateOutlineGap()\\\"\\n [cdkObserveContentDisabled]=\\\"appearance != 'outline'\\\"\\n [id]=\\\"_labelId\\\"\\n [attr.for]=\\\"_control.id\\\"\\n [attr.aria-owns]=\\\"_control.id\\\"\\n [class.mat-empty]=\\\"_control.empty && !_shouldAlwaysFloat()\\\"\\n [class.mat-form-field-empty]=\\\"_control.empty && !_shouldAlwaysFloat()\\\"\\n [class.mat-accent]=\\\"color == 'accent'\\\"\\n [class.mat-warn]=\\\"color == 'warn'\\\"\\n #label\\n *ngIf=\\\"_hasFloatingLabel()\\\"\\n [ngSwitch]=\\\"_hasLabel()\\\">\\n\\n <!-- @breaking-change 8.0.0 remove in favor of mat-label element an placeholder attr. -->\\n <ng-container *ngSwitchCase=\\\"false\\\">\\n <ng-content select=\\\"mat-placeholder\\\"></ng-content>\\n <span>{{_control.placeholder}}</span>\\n </ng-container>\\n\\n <ng-content select=\\\"mat-label\\\" *ngSwitchCase=\\\"true\\\"></ng-content>\\n\\n <!-- @breaking-change 8.0.0 remove `mat-placeholder-required` class -->\\n <span\\n class=\\\"mat-placeholder-required mat-form-field-required-marker\\\"\\n aria-hidden=\\\"true\\\"\\n *ngIf=\\\"!hideRequiredMarker && _control.required && !_control.disabled\\\"> *</span>\\n </label>\\n </span>\\n </div>\\n\\n <div class=\\\"mat-form-field-suffix\\\" *ngIf=\\\"_suffixChildren.length\\\">\\n <ng-content select=\\\"[matSuffix]\\\"></ng-content>\\n </div>\\n </div>\\n\\n <!-- Underline used for legacy, standard, and box appearances. -->\\n <div class=\\\"mat-form-field-underline\\\"\\n *ngIf=\\\"appearance != 'outline'\\\">\\n <span class=\\\"mat-form-field-ripple\\\"\\n [class.mat-accent]=\\\"color == 'accent'\\\"\\n [class.mat-warn]=\\\"color == 'warn'\\\"></span>\\n </div>\\n\\n <div class=\\\"mat-form-field-subscript-wrapper\\\"\\n [ngSwitch]=\\\"_getDisplayedMessages()\\\">\\n <div *ngSwitchCase=\\\"'error'\\\" [@transitionMessages]=\\\"_subscriptAnimationState\\\">\\n <ng-content select=\\\"mat-error\\\"></ng-content>\\n </div>\\n\\n <div class=\\\"mat-form-field-hint-wrapper\\\" *ngSwitchCase=\\\"'hint'\\\"\\n [@transitionMessages]=\\\"_subscriptAnimationState\\\">\\n <!-- TODO(mmalerba): use an actual <mat-hint> once all selectors are switched to mat-* -->\\n <div *ngIf=\\\"hintLabel\\\" [id]=\\\"_hintLabelId\\\" class=\\\"mat-hint\\\">{{hintLabel}}</div>\\n <ng-content select=\\\"mat-hint:not([align='end'])\\\"></ng-content>\\n <div class=\\\"mat-form-field-hint-spacer\\\"></div>\\n <ng-content select=\\\"mat-hint[align='end']\\\"></ng-content>\\n </div>\\n </div>\\n</div>\\n\", styles: [\".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.cdk-high-contrast-active .mat-form-field-disabled .mat-form-field-label{color:GrayText}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:none;transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field-hint-end{order:1}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\", \".mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-form-field-flex{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-form-field-flex{outline:dashed 3px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:\\\"\\\";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\", \".mat-input-element{font:inherit;background:rgba(0,0,0,0);color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit;box-sizing:content-box}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element:not([type=password])::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:\\\" \\\";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{opacity:0}._mat-animation-noopable .mat-input-element::placeholder{transition:none}._mat-animation-noopable .mat-input-element::-moz-placeholder{transition:none}._mat-animation-noopable .mat-input-element::-webkit-input-placeholder{transition:none}._mat-animation-noopable .mat-input-element:-ms-input-placeholder{transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:\\\"\\\";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\", \".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px)}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:rgba(0,0,0,0)}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px;border-top-color:GrayText}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\", \".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:rgba(0,0,0,0)}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.cdk-high-contrast-active .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{border:3px dashed}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.cdk-high-contrast-active .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{color:GrayText}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\", \".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:rgba(0,0,0,0)}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\"], dependencies: [{ kind: \"directive\", type: i3.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i3.NgSwitch, selector: \"[ngSwitch]\", inputs: [\"ngSwitch\"] }, { kind: \"directive\", type: i3.NgSwitchCase, selector: \"[ngSwitchCase]\", inputs: [\"ngSwitchCase\"] }, { kind: \"directive\", type: i4.CdkObserveContent, selector: \"[cdkObserveContent]\", inputs: [\"cdkObserveContentDisabled\", \"debounce\"], outputs: [\"cdkObserveContent\"], exportAs: [\"cdkObserveContent\"] }], animations: [matFormFieldAnimations.transitionMessages], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatFormField, decorators: [{\n type: Component,\n args: [{ selector: 'mat-form-field', exportAs: 'matFormField', animations: [matFormFieldAnimations.transitionMessages], host: {\n 'class': 'mat-form-field',\n '[class.mat-form-field-appearance-standard]': 'appearance == \"standard\"',\n '[class.mat-form-field-appearance-fill]': 'appearance == \"fill\"',\n '[class.mat-form-field-appearance-outline]': 'appearance == \"outline\"',\n '[class.mat-form-field-appearance-legacy]': 'appearance == \"legacy\"',\n '[class.mat-form-field-invalid]': '_control.errorState',\n '[class.mat-form-field-can-float]': '_canLabelFloat()',\n '[class.mat-form-field-should-float]': '_shouldLabelFloat()',\n '[class.mat-form-field-has-label]': '_hasFloatingLabel()',\n '[class.mat-form-field-hide-placeholder]': '_hideControlPlaceholder()',\n '[class.mat-form-field-disabled]': '_control.disabled',\n '[class.mat-form-field-autofilled]': '_control.autofilled',\n '[class.mat-focused]': '_control.focused',\n '[class.ng-untouched]': '_shouldForward(\"untouched\")',\n '[class.ng-touched]': '_shouldForward(\"touched\")',\n '[class.ng-pristine]': '_shouldForward(\"pristine\")',\n '[class.ng-dirty]': '_shouldForward(\"dirty\")',\n '[class.ng-valid]': '_shouldForward(\"valid\")',\n '[class.ng-invalid]': '_shouldForward(\"invalid\")',\n '[class.ng-pending]': '_shouldForward(\"pending\")',\n '[class._mat-animation-noopable]': '!_animationsEnabled',\n }, inputs: ['color'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: MAT_FORM_FIELD, useExisting: MatFormField }], template: \"<div class=\\\"mat-form-field-wrapper\\\">\\n <div class=\\\"mat-form-field-flex\\\" #connectionContainer\\n (click)=\\\"_control.onContainerClick && _control.onContainerClick($event)\\\">\\n\\n <!-- Outline used for outline appearance. -->\\n <ng-container *ngIf=\\\"appearance == 'outline'\\\">\\n <div class=\\\"mat-form-field-outline\\\">\\n <div class=\\\"mat-form-field-outline-start\\\"></div>\\n <div class=\\\"mat-form-field-outline-gap\\\"></div>\\n <div class=\\\"mat-form-field-outline-end\\\"></div>\\n </div>\\n <div class=\\\"mat-form-field-outline mat-form-field-outline-thick\\\">\\n <div class=\\\"mat-form-field-outline-start\\\"></div>\\n <div class=\\\"mat-form-field-outline-gap\\\"></div>\\n <div class=\\\"mat-form-field-outline-end\\\"></div>\\n </div>\\n </ng-container>\\n\\n <div\\n class=\\\"mat-form-field-prefix\\\"\\n *ngIf=\\\"_prefixChildren.length\\\"\\n (cdkObserveContent)=\\\"updateOutlineGap()\\\"\\n [cdkObserveContentDisabled]=\\\"appearance != 'outline'\\\">\\n <ng-content select=\\\"[matPrefix]\\\"></ng-content>\\n </div>\\n\\n <div class=\\\"mat-form-field-infix\\\" #inputContainer>\\n <ng-content></ng-content>\\n\\n <span class=\\\"mat-form-field-label-wrapper\\\">\\n <!-- We add aria-owns as a workaround for an issue in JAWS & NVDA where the label isn't\\n read if it comes before the control in the DOM. -->\\n <label class=\\\"mat-form-field-label\\\"\\n (cdkObserveContent)=\\\"updateOutlineGap()\\\"\\n [cdkObserveContentDisabled]=\\\"appearance != 'outline'\\\"\\n [id]=\\\"_labelId\\\"\\n [attr.for]=\\\"_control.id\\\"\\n [attr.aria-owns]=\\\"_control.id\\\"\\n [class.mat-empty]=\\\"_control.empty && !_shouldAlwaysFloat()\\\"\\n [class.mat-form-field-empty]=\\\"_control.empty && !_shouldAlwaysFloat()\\\"\\n [class.mat-accent]=\\\"color == 'accent'\\\"\\n [class.mat-warn]=\\\"color == 'warn'\\\"\\n #label\\n *ngIf=\\\"_hasFloatingLabel()\\\"\\n [ngSwitch]=\\\"_hasLabel()\\\">\\n\\n <!-- @breaking-change 8.0.0 remove in favor of mat-label element an placeholder attr. -->\\n <ng-container *ngSwitchCase=\\\"false\\\">\\n <ng-content select=\\\"mat-placeholder\\\"></ng-content>\\n <span>{{_control.placeholder}}</span>\\n </ng-container>\\n\\n <ng-content select=\\\"mat-label\\\" *ngSwitchCase=\\\"true\\\"></ng-content>\\n\\n <!-- @breaking-change 8.0.0 remove `mat-placeholder-required` class -->\\n <span\\n class=\\\"mat-placeholder-required mat-form-field-required-marker\\\"\\n aria-hidden=\\\"true\\\"\\n *ngIf=\\\"!hideRequiredMarker && _control.required && !_control.disabled\\\"> *</span>\\n </label>\\n </span>\\n </div>\\n\\n <div class=\\\"mat-form-field-suffix\\\" *ngIf=\\\"_suffixChildren.length\\\">\\n <ng-content select=\\\"[matSuffix]\\\"></ng-content>\\n </div>\\n </div>\\n\\n <!-- Underline used for legacy, standard, and box appearances. -->\\n <div class=\\\"mat-form-field-underline\\\"\\n *ngIf=\\\"appearance != 'outline'\\\">\\n <span class=\\\"mat-form-field-ripple\\\"\\n [class.mat-accent]=\\\"color == 'accent'\\\"\\n [class.mat-warn]=\\\"color == 'warn'\\\"></span>\\n </div>\\n\\n <div class=\\\"mat-form-field-subscript-wrapper\\\"\\n [ngSwitch]=\\\"_getDisplayedMessages()\\\">\\n <div *ngSwitchCase=\\\"'error'\\\" [@transitionMessages]=\\\"_subscriptAnimationState\\\">\\n <ng-content select=\\\"mat-error\\\"></ng-content>\\n </div>\\n\\n <div class=\\\"mat-form-field-hint-wrapper\\\" *ngSwitchCase=\\\"'hint'\\\"\\n [@transitionMessages]=\\\"_subscriptAnimationState\\\">\\n <!-- TODO(mmalerba): use an actual <mat-hint> once all selectors are switched to mat-* -->\\n <div *ngIf=\\\"hintLabel\\\" [id]=\\\"_hintLabelId\\\" class=\\\"mat-hint\\\">{{hintLabel}}</div>\\n <ng-content select=\\\"mat-hint:not([align='end'])\\\"></ng-content>\\n <div class=\\\"mat-form-field-hint-spacer\\\"></div>\\n <ng-content select=\\\"mat-hint[align='end']\\\"></ng-content>\\n </div>\\n </div>\\n</div>\\n\", styles: [\".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.cdk-high-contrast-active .mat-form-field-disabled .mat-form-field-label{color:GrayText}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:none;transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field-hint-end{order:1}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\", \".mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-form-field-flex{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-form-field-flex{outline:dashed 3px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:\\\"\\\";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\", \".mat-input-element{font:inherit;background:rgba(0,0,0,0);color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit;box-sizing:content-box}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element:not([type=password])::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:\\\" \\\";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{opacity:0}._mat-animation-noopable .mat-input-element::placeholder{transition:none}._mat-animation-noopable .mat-input-element::-moz-placeholder{transition:none}._mat-animation-noopable .mat-input-element::-webkit-input-placeholder{transition:none}._mat-animation-noopable .mat-input-element:-ms-input-placeholder{transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:\\\"\\\";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\", \".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px)}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:rgba(0,0,0,0)}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px;border-top-color:GrayText}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\", \".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:rgba(0,0,0,0)}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.cdk-high-contrast-active .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{border:3px dashed}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.cdk-high-contrast-active .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{color:GrayText}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\", \".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:rgba(0,0,0,0)}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.Directionality, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_FORM_FIELD_DEFAULT_OPTIONS]\n }] }, { type: i2.Platform }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { appearance: [{\n type: Input\n }], hideRequiredMarker: [{\n type: Input\n }], hintLabel: [{\n type: Input\n }], floatLabel: [{\n type: Input\n }], _connectionContainerRef: [{\n type: ViewChild,\n args: ['connectionContainer', { static: true }]\n }], _inputContainerRef: [{\n type: ViewChild,\n args: ['inputContainer']\n }], _label: [{\n type: ViewChild,\n args: ['label']\n }], _controlNonStatic: [{\n type: ContentChild,\n args: [MatFormFieldControl]\n }], _controlStatic: [{\n type: ContentChild,\n args: [MatFormFieldControl, { static: true }]\n }], _labelChildNonStatic: [{\n type: ContentChild,\n args: [MatLabel]\n }], _labelChildStatic: [{\n type: ContentChild,\n args: [MatLabel, { static: true }]\n }], _placeholderChild: [{\n type: ContentChild,\n args: [MatPlaceholder]\n }], _errorChildren: [{\n type: ContentChildren,\n args: [MAT_ERROR, { descendants: true }]\n }], _hintChildren: [{\n type: ContentChildren,\n args: [_MAT_HINT, { descendants: true }]\n }], _prefixChildren: [{\n type: ContentChildren,\n args: [MAT_PREFIX, { descendants: true }]\n }], _suffixChildren: [{\n type: ContentChildren,\n args: [MAT_SUFFIX, { descendants: 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 */\nclass MatFormFieldModule {\n}\nMatFormFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatFormFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatFormFieldModule, declarations: [MatError, MatFormField, MatHint, MatLabel, MatPlaceholder, MatPrefix, MatSuffix], imports: [CommonModule, MatCommonModule, ObserversModule], exports: [MatCommonModule,\n MatError,\n MatFormField,\n MatHint,\n MatLabel,\n MatPlaceholder,\n MatPrefix,\n MatSuffix] });\nMatFormFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatFormFieldModule, imports: [CommonModule, MatCommonModule, ObserversModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatFormFieldModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [MatError, MatFormField, MatHint, MatLabel, MatPlaceholder, MatPrefix, MatSuffix],\n imports: [CommonModule, MatCommonModule, ObserversModule],\n exports: [\n MatCommonModule,\n MatError,\n MatFormField,\n MatHint,\n MatLabel,\n MatPlaceholder,\n MatPrefix,\n MatSuffix,\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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 { MAT_ERROR, MAT_FORM_FIELD, MAT_FORM_FIELD_DEFAULT_OPTIONS, MAT_PREFIX, MAT_SUFFIX, MatError, MatFormField, MatFormFieldControl, MatFormFieldModule, MatHint, MatLabel, MatPlaceholder, MatPrefix, MatSuffix, _MAT_HINT, getMatFormFieldDuplicatedHintError, getMatFormFieldMissingControlError, getMatFormFieldPlaceholderConflictError, matFormFieldAnimations };\n","import * as i1 from '@angular/cdk/platform';\nimport { normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport * as i0 from '@angular/core';\nimport { Injectable, EventEmitter, Directive, Output, Optional, Inject, Input, NgModule } from '@angular/core';\nimport { coerceElement, coerceNumberProperty, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { EMPTY, Subject, fromEvent } from 'rxjs';\nimport { auditTime, takeUntil } from 'rxjs/operators';\nimport { DOCUMENT } from '@angular/common';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Options to pass to the animationstart listener. */\nconst listenerOptions = normalizePassiveListenerOptions({ passive: true });\n/**\n * An injectable service that can be used to monitor the autofill state of an input.\n * Based on the following blog post:\n * https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7\n */\nclass AutofillMonitor {\n constructor(_platform, _ngZone) {\n this._platform = _platform;\n this._ngZone = _ngZone;\n this._monitoredElements = new Map();\n }\n monitor(elementOrRef) {\n if (!this._platform.isBrowser) {\n return EMPTY;\n }\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n if (info) {\n return info.subject;\n }\n const result = new Subject();\n const cssClass = 'cdk-text-field-autofilled';\n const listener = ((event) => {\n // Animation events fire on initial element render, we check for the presence of the autofill\n // CSS class to make sure this is a real change in state, not just the initial render before\n // we fire off events.\n if (event.animationName === 'cdk-text-field-autofill-start' &&\n !element.classList.contains(cssClass)) {\n element.classList.add(cssClass);\n this._ngZone.run(() => result.next({ target: event.target, isAutofilled: true }));\n }\n else if (event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)) {\n element.classList.remove(cssClass);\n this._ngZone.run(() => result.next({ target: event.target, isAutofilled: false }));\n }\n });\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('animationstart', listener, listenerOptions);\n element.classList.add('cdk-text-field-autofill-monitored');\n });\n this._monitoredElements.set(element, {\n subject: result,\n unlisten: () => {\n element.removeEventListener('animationstart', listener, listenerOptions);\n },\n });\n return result;\n }\n stopMonitoring(elementOrRef) {\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n if (info) {\n info.unlisten();\n info.subject.complete();\n element.classList.remove('cdk-text-field-autofill-monitored');\n element.classList.remove('cdk-text-field-autofilled');\n this._monitoredElements.delete(element);\n }\n }\n ngOnDestroy() {\n this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element));\n }\n}\nAutofillMonitor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: AutofillMonitor, deps: [{ token: i1.Platform }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });\nAutofillMonitor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: AutofillMonitor, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: AutofillMonitor, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.Platform }, { type: i0.NgZone }]; } });\n/** A directive that can be used to monitor the autofill state of an input. */\nclass CdkAutofill {\n constructor(_elementRef, _autofillMonitor) {\n this._elementRef = _elementRef;\n this._autofillMonitor = _autofillMonitor;\n /** Emits when the autofill state of the element changes. */\n this.cdkAutofill = new EventEmitter();\n }\n ngOnInit() {\n this._autofillMonitor\n .monitor(this._elementRef)\n .subscribe(event => this.cdkAutofill.emit(event));\n }\n ngOnDestroy() {\n this._autofillMonitor.stopMonitoring(this._elementRef);\n }\n}\nCdkAutofill.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkAutofill, deps: [{ token: i0.ElementRef }, { token: AutofillMonitor }], target: i0.ɵɵFactoryTarget.Directive });\nCdkAutofill.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkAutofill, selector: \"[cdkAutofill]\", outputs: { cdkAutofill: \"cdkAutofill\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkAutofill, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkAutofill]',\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: AutofillMonitor }]; }, propDecorators: { cdkAutofill: [{\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 */\n/** Directive to automatically resize a textarea to fit its content. */\nclass CdkTextareaAutosize {\n constructor(_elementRef, _platform, _ngZone, \n /** @breaking-change 11.0.0 make document required */\n document) {\n this._elementRef = _elementRef;\n this._platform = _platform;\n this._ngZone = _ngZone;\n this._destroyed = new Subject();\n this._enabled = true;\n /**\n * Value of minRows as of last resize. If the minRows has decreased, the\n * height of the textarea needs to be recomputed to reflect the new minimum. The maxHeight\n * does not have the same problem because it does not affect the textarea's scrollHeight.\n */\n this._previousMinRows = -1;\n this._isViewInited = false;\n /** Handles `focus` and `blur` events. */\n this._handleFocusEvent = (event) => {\n this._hasFocus = event.type === 'focus';\n };\n this._document = document;\n this._textareaElement = this._elementRef.nativeElement;\n }\n /** Minimum amount of rows in the textarea. */\n get minRows() {\n return this._minRows;\n }\n set minRows(value) {\n this._minRows = coerceNumberProperty(value);\n this._setMinHeight();\n }\n /** Maximum amount of rows in the textarea. */\n get maxRows() {\n return this._maxRows;\n }\n set maxRows(value) {\n this._maxRows = coerceNumberProperty(value);\n this._setMaxHeight();\n }\n /** Whether autosizing is enabled or not */\n get enabled() {\n return this._enabled;\n }\n set enabled(value) {\n value = coerceBooleanProperty(value);\n // Only act if the actual value changed. This specifically helps to not run\n // resizeToFitContent too early (i.e. before ngAfterViewInit)\n if (this._enabled !== value) {\n (this._enabled = value) ? this.resizeToFitContent(true) : this.reset();\n }\n }\n get placeholder() {\n return this._textareaElement.placeholder;\n }\n set placeholder(value) {\n this._cachedPlaceholderHeight = undefined;\n if (value) {\n this._textareaElement.setAttribute('placeholder', value);\n }\n else {\n this._textareaElement.removeAttribute('placeholder');\n }\n this._cacheTextareaPlaceholderHeight();\n }\n /** Sets the minimum height of the textarea as determined by minRows. */\n _setMinHeight() {\n const minHeight = this.minRows && this._cachedLineHeight ? `${this.minRows * this._cachedLineHeight}px` : null;\n if (minHeight) {\n this._textareaElement.style.minHeight = minHeight;\n }\n }\n /** Sets the maximum height of the textarea as determined by maxRows. */\n _setMaxHeight() {\n const maxHeight = this.maxRows && this._cachedLineHeight ? `${this.maxRows * this._cachedLineHeight}px` : null;\n if (maxHeight) {\n this._textareaElement.style.maxHeight = maxHeight;\n }\n }\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n // Remember the height which we started with in case autosizing is disabled\n this._initialHeight = this._textareaElement.style.height;\n this.resizeToFitContent();\n this._ngZone.runOutsideAngular(() => {\n const window = this._getWindow();\n fromEvent(window, 'resize')\n .pipe(auditTime(16), takeUntil(this._destroyed))\n .subscribe(() => this.resizeToFitContent(true));\n this._textareaElement.addEventListener('focus', this._handleFocusEvent);\n this._textareaElement.addEventListener('blur', this._handleFocusEvent);\n });\n this._isViewInited = true;\n this.resizeToFitContent(true);\n }\n }\n ngOnDestroy() {\n this._textareaElement.removeEventListener('focus', this._handleFocusEvent);\n this._textareaElement.removeEventListener('blur', this._handleFocusEvent);\n this._destroyed.next();\n this._destroyed.complete();\n }\n /**\n * Cache the height of a single-row textarea if it has not already been cached.\n *\n * We need to know how large a single \"row\" of a textarea is in order to apply minRows and\n * maxRows. For the initial version, we will assume that the height of a single line in the\n * textarea does not ever change.\n */\n _cacheTextareaLineHeight() {\n if (this._cachedLineHeight) {\n return;\n }\n // Use a clone element because we have to override some styles.\n let textareaClone = this._textareaElement.cloneNode(false);\n textareaClone.rows = 1;\n // Use `position: absolute` so that this doesn't cause a browser layout and use\n // `visibility: hidden` so that nothing is rendered. Clear any other styles that\n // would affect the height.\n textareaClone.style.position = 'absolute';\n textareaClone.style.visibility = 'hidden';\n textareaClone.style.border = 'none';\n textareaClone.style.padding = '0';\n textareaClone.style.height = '';\n textareaClone.style.minHeight = '';\n textareaClone.style.maxHeight = '';\n // In Firefox it happens that textarea elements are always bigger than the specified amount\n // of rows. This is because Firefox tries to add extra space for the horizontal scrollbar.\n // As a workaround that removes the extra space for the scrollbar, we can just set overflow\n // to hidden. This ensures that there is no invalid calculation of the line height.\n // See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654\n textareaClone.style.overflow = 'hidden';\n this._textareaElement.parentNode.appendChild(textareaClone);\n this._cachedLineHeight = textareaClone.clientHeight;\n textareaClone.remove();\n // Min and max heights have to be re-calculated if the cached line height changes\n this._setMinHeight();\n this._setMaxHeight();\n }\n _measureScrollHeight() {\n const element = this._textareaElement;\n const previousMargin = element.style.marginBottom || '';\n const isFirefox = this._platform.FIREFOX;\n const needsMarginFiller = isFirefox && this._hasFocus;\n const measuringClass = isFirefox\n ? 'cdk-textarea-autosize-measuring-firefox'\n : 'cdk-textarea-autosize-measuring';\n // In some cases the page might move around while we're measuring the `textarea` on Firefox. We\n // work around it by assigning a temporary margin with the same height as the `textarea` so that\n // it occupies the same amount of space. See #23233.\n if (needsMarginFiller) {\n element.style.marginBottom = `${element.clientHeight}px`;\n }\n // Reset the textarea height to auto in order to shrink back to its default size.\n // Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations.\n element.classList.add(measuringClass);\n // The measuring class includes a 2px padding to workaround an issue with Chrome,\n // so we account for that extra space here by subtracting 4 (2px top + 2px bottom).\n const scrollHeight = element.scrollHeight - 4;\n element.classList.remove(measuringClass);\n if (needsMarginFiller) {\n element.style.marginBottom = previousMargin;\n }\n return scrollHeight;\n }\n _cacheTextareaPlaceholderHeight() {\n if (!this._isViewInited || this._cachedPlaceholderHeight != undefined) {\n return;\n }\n if (!this.placeholder) {\n this._cachedPlaceholderHeight = 0;\n return;\n }\n const value = this._textareaElement.value;\n this._textareaElement.value = this._textareaElement.placeholder;\n this._cachedPlaceholderHeight = this._measureScrollHeight();\n this._textareaElement.value = value;\n }\n ngDoCheck() {\n if (this._platform.isBrowser) {\n this.resizeToFitContent();\n }\n }\n /**\n * Resize the textarea to fit its content.\n * @param force Whether to force a height recalculation. By default the height will be\n * recalculated only if the value changed since the last call.\n */\n resizeToFitContent(force = false) {\n // If autosizing is disabled, just skip everything else\n if (!this._enabled) {\n return;\n }\n this._cacheTextareaLineHeight();\n this._cacheTextareaPlaceholderHeight();\n // If we haven't determined the line-height yet, we know we're still hidden and there's no point\n // in checking the height of the textarea.\n if (!this._cachedLineHeight) {\n return;\n }\n const textarea = this._elementRef.nativeElement;\n const value = textarea.value;\n // Only resize if the value or minRows have changed since these calculations can be expensive.\n if (!force && this._minRows === this._previousMinRows && value === this._previousValue) {\n return;\n }\n const scrollHeight = this._measureScrollHeight();\n const height = Math.max(scrollHeight, this._cachedPlaceholderHeight || 0);\n // Use the scrollHeight to know how large the textarea *would* be if fit its entire value.\n textarea.style.height = `${height}px`;\n this._ngZone.runOutsideAngular(() => {\n if (typeof requestAnimationFrame !== 'undefined') {\n requestAnimationFrame(() => this._scrollToCaretPosition(textarea));\n }\n else {\n setTimeout(() => this._scrollToCaretPosition(textarea));\n }\n });\n this._previousValue = value;\n this._previousMinRows = this._minRows;\n }\n /**\n * Resets the textarea to its original size\n */\n reset() {\n // Do not try to change the textarea, if the initialHeight has not been determined yet\n // This might potentially remove styles when reset() is called before ngAfterViewInit\n if (this._initialHeight !== undefined) {\n this._textareaElement.style.height = this._initialHeight;\n }\n }\n _noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\n }\n /** Access injected document if available or fallback to global document reference */\n _getDocument() {\n return this._document || document;\n }\n /** Use defaultView of injected document if available or fallback to global window reference */\n _getWindow() {\n const doc = this._getDocument();\n return doc.defaultView || window;\n }\n /**\n * Scrolls a textarea to the caret position. On Firefox resizing the textarea will\n * prevent it from scrolling to the caret position. We need to re-set the selection\n * in order for it to scroll to the proper position.\n */\n _scrollToCaretPosition(textarea) {\n const { selectionStart, selectionEnd } = textarea;\n // IE will throw an \"Unspecified error\" if we try to set the selection range after the\n // element has been removed from the DOM. Assert that the directive hasn't been destroyed\n // between the time we requested the animation frame and when it was executed.\n // Also note that we have to assert that the textarea is focused before we set the\n // selection range. Setting the selection range on a non-focused textarea will cause\n // it to receive focus on IE and Edge.\n if (!this._destroyed.isStopped && this._hasFocus) {\n textarea.setSelectionRange(selectionStart, selectionEnd);\n }\n }\n}\nCdkTextareaAutosize.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTextareaAutosize, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: i0.NgZone }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkTextareaAutosize.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkTextareaAutosize, selector: \"textarea[cdkTextareaAutosize]\", inputs: { minRows: [\"cdkAutosizeMinRows\", \"minRows\"], maxRows: [\"cdkAutosizeMaxRows\", \"maxRows\"], enabled: [\"cdkTextareaAutosize\", \"enabled\"], placeholder: \"placeholder\" }, host: { attributes: { \"rows\": \"1\" }, listeners: { \"input\": \"_noopInputHandler()\" }, classAttribute: \"cdk-textarea-autosize\" }, exportAs: [\"cdkTextareaAutosize\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTextareaAutosize, decorators: [{\n type: Directive,\n args: [{\n selector: 'textarea[cdkTextareaAutosize]',\n exportAs: 'cdkTextareaAutosize',\n host: {\n 'class': 'cdk-textarea-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n '(input)': '_noopInputHandler()',\n },\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.Platform }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, propDecorators: { minRows: [{\n type: Input,\n args: ['cdkAutosizeMinRows']\n }], maxRows: [{\n type: Input,\n args: ['cdkAutosizeMaxRows']\n }], enabled: [{\n type: Input,\n args: ['cdkTextareaAutosize']\n }], placeholder: [{\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 */\nclass TextFieldModule {\n}\nTextFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: TextFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nTextFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: TextFieldModule, declarations: [CdkAutofill, CdkTextareaAutosize], exports: [CdkAutofill, CdkTextareaAutosize] });\nTextFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: TextFieldModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: TextFieldModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [CdkAutofill, CdkTextareaAutosize],\n exports: [CdkAutofill, CdkTextareaAutosize],\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 * Generated bundle index. Do not edit.\n */\n\nexport { AutofillMonitor, CdkAutofill, CdkTextareaAutosize, TextFieldModule };\n","import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport * as i1 from '@angular/cdk/platform';\nimport { getSupportedInputTypes } from '@angular/cdk/platform';\nimport * as i4 from '@angular/cdk/text-field';\nimport { TextFieldModule } from '@angular/cdk/text-field';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Directive, Optional, Self, Inject, Input, NgModule } from '@angular/core';\nimport * as i2 from '@angular/forms';\nimport { Validators } from '@angular/forms';\nimport * as i3 from '@angular/material/core';\nimport { mixinErrorState, MatCommonModule, ErrorStateMatcher } from '@angular/material/core';\nimport * as i5 from '@angular/material/form-field';\nimport { MAT_FORM_FIELD, MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';\nimport { Subject } from 'rxjs';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** @docs-private */\nfunction getMatInputUnsupportedTypeError(type) {\n return Error(`Input type \"${type}\" isn't supported by matInput.`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 token is used to inject the object whose value should be set into `MatInput`. If none is\n * provided, the native `HTMLInputElement` is used. Directives like `MatDatepickerInput` can provide\n * themselves for this token, in order to make `MatInput` delegate the getting and setting of the\n * value to them.\n */\nconst MAT_INPUT_VALUE_ACCESSOR = new InjectionToken('MAT_INPUT_VALUE_ACCESSOR');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Invalid input type. Using one of these will throw an MatInputUnsupportedTypeError.\nconst MAT_INPUT_INVALID_TYPES = [\n 'button',\n 'checkbox',\n 'file',\n 'hidden',\n 'image',\n 'radio',\n 'range',\n 'reset',\n 'submit',\n];\nlet nextUniqueId = 0;\n// Boilerplate for applying mixins to MatInput.\n/** @docs-private */\nconst _MatInputBase = mixinErrorState(class {\n constructor(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, \n /**\n * Form control bound to the component.\n * Implemented as part of `MatFormFieldControl`.\n * @docs-private\n */\n ngControl) {\n this._defaultErrorStateMatcher = _defaultErrorStateMatcher;\n this._parentForm = _parentForm;\n this._parentFormGroup = _parentFormGroup;\n this.ngControl = ngControl;\n /**\n * Emits whenever the component state changes and should cause the parent\n * form field to update. Implemented as part of `MatFormFieldControl`.\n * @docs-private\n */\n this.stateChanges = new Subject();\n }\n});\n/** Directive that allows a native input to work inside a `MatFormField`. */\nclass MatInput extends _MatInputBase {\n constructor(_elementRef, _platform, ngControl, _parentForm, _parentFormGroup, _defaultErrorStateMatcher, inputValueAccessor, _autofillMonitor, ngZone, \n // TODO: Remove this once the legacy appearance has been removed. We only need\n // to inject the form field for determining whether the placeholder has been promoted.\n _formField) {\n super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl);\n this._elementRef = _elementRef;\n this._platform = _platform;\n this._autofillMonitor = _autofillMonitor;\n this._formField = _formField;\n this._uid = `mat-input-${nextUniqueId++}`;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n this.focused = false;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n this.stateChanges = new Subject();\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n this.controlType = 'mat-input';\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n this.autofilled = false;\n this._disabled = false;\n this._type = 'text';\n this._readonly = false;\n this._neverEmptyInputTypes = [\n 'date',\n 'datetime',\n 'datetime-local',\n 'month',\n 'time',\n 'week',\n ].filter(t => getSupportedInputTypes().has(t));\n this._iOSKeyupListener = (event) => {\n const el = event.target;\n // Note: We specifically check for 0, rather than `!el.selectionStart`, because the two\n // indicate different things. If the value is 0, it means that the caret is at the start\n // of the input, whereas a value of `null` means that the input doesn't support\n // manipulating the selection range. Inputs that don't support setting the selection range\n // will throw an error so we want to avoid calling `setSelectionRange` on them. See:\n // https://html.spec.whatwg.org/multipage/input.html#do-not-apply\n if (!el.value && el.selectionStart === 0 && el.selectionEnd === 0) {\n // Note: Just setting `0, 0` doesn't fix the issue. Setting\n // `1, 1` fixes it for the first time that you type text and\n // then hold delete. Toggling to `1, 1` and then back to\n // `0, 0` seems to completely fix it.\n el.setSelectionRange(1, 1);\n el.setSelectionRange(0, 0);\n }\n };\n const element = this._elementRef.nativeElement;\n const nodeName = element.nodeName.toLowerCase();\n // If no input value accessor was explicitly specified, use the element as the input value\n // accessor.\n this._inputValueAccessor = inputValueAccessor || element;\n this._previousNativeValue = this.value;\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n // On some versions of iOS the caret gets stuck in the wrong place when holding down the delete\n // key. In order to get around this we need to \"jiggle\" the caret loose. Since this bug only\n // exists on iOS, we only bother to install the listener on iOS.\n if (_platform.IOS) {\n ngZone.runOutsideAngular(() => {\n _elementRef.nativeElement.addEventListener('keyup', this._iOSKeyupListener);\n });\n }\n this._isServer = !this._platform.isBrowser;\n this._isNativeSelect = nodeName === 'select';\n this._isTextarea = nodeName === 'textarea';\n this._isInFormField = !!_formField;\n if (this._isNativeSelect) {\n this.controlType = element.multiple\n ? 'mat-native-select-multiple'\n : 'mat-native-select';\n }\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get disabled() {\n if (this.ngControl && this.ngControl.disabled !== null) {\n return this.ngControl.disabled;\n }\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n // Browsers may not fire the blur event if the input is disabled too quickly.\n // Reset from here to ensure that the element doesn't become stuck.\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get id() {\n return this._id;\n }\n set id(value) {\n this._id = value || this._uid;\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get required() {\n return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;\n }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n }\n /** Input type of the element. */\n get type() {\n return this._type;\n }\n set type(value) {\n this._type = value || 'text';\n this._validateType();\n // When using Angular inputs, developers are no longer able to set the properties on the native\n // input element. To ensure that bindings for `type` work, we need to sync the setter\n // with the native property. Textarea elements don't support the type property or attribute.\n if (!this._isTextarea && getSupportedInputTypes().has(this._type)) {\n this._elementRef.nativeElement.type = this._type;\n }\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get value() {\n return this._inputValueAccessor.value;\n }\n set value(value) {\n if (value !== this.value) {\n this._inputValueAccessor.value = value;\n this.stateChanges.next();\n }\n }\n /** Whether the element is readonly. */\n get readonly() {\n return this._readonly;\n }\n set readonly(value) {\n this._readonly = coerceBooleanProperty(value);\n }\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(event => {\n this.autofilled = event.isAutofilled;\n this.stateChanges.next();\n });\n }\n }\n ngOnChanges() {\n this.stateChanges.next();\n }\n ngOnDestroy() {\n this.stateChanges.complete();\n if (this._platform.isBrowser) {\n this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement);\n }\n if (this._platform.IOS) {\n this._elementRef.nativeElement.removeEventListener('keyup', this._iOSKeyupListener);\n }\n }\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n }\n // We need to dirty-check the native element's value, because there are some cases where\n // we won't be notified when it changes (e.g. the consumer isn't using forms or they're\n // updating the value using `emitEvent: false`).\n this._dirtyCheckNativeValue();\n // We need to dirty-check and set the placeholder attribute ourselves, because whether it's\n // present or not depends on a query which is prone to \"changed after checked\" errors.\n this._dirtyCheckPlaceholder();\n }\n /** Focuses the input. */\n focus(options) {\n this._elementRef.nativeElement.focus(options);\n }\n /** Callback for the cases where the focused state of the input changes. */\n _focusChanged(isFocused) {\n if (isFocused !== this.focused) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }\n _onInput() {\n // This is a noop function and is used to let Angular know whenever the value changes.\n // Angular will run a new change detection each time the `input` event has been dispatched.\n // It's necessary that Angular recognizes the value change, because when floatingLabel\n // is set to false and Angular forms aren't used, the placeholder won't recognize the\n // value changes and will not disappear.\n // Listening to the input event wouldn't be necessary when the input is using the\n // FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.\n }\n /** Does some manual dirty checking on the native input `placeholder` attribute. */\n _dirtyCheckPlaceholder() {\n // If we're hiding the native placeholder, it should also be cleared from the DOM, otherwise\n // screen readers will read it out twice: once from the label and once from the attribute.\n // TODO: can be removed once we get rid of the `legacy` style for the form field, because it's\n // the only one that supports promoting the placeholder to a label.\n const formField = this._formField;\n const placeholder = formField && formField.appearance === 'legacy' && !formField._hasLabel?.()\n ? null\n : this.placeholder;\n if (placeholder !== this._previousPlaceholder) {\n const element = this._elementRef.nativeElement;\n this._previousPlaceholder = placeholder;\n placeholder\n ? element.setAttribute('placeholder', placeholder)\n : element.removeAttribute('placeholder');\n }\n }\n /** Does some manual dirty checking on the native input `value` property. */\n _dirtyCheckNativeValue() {\n const newValue = this._elementRef.nativeElement.value;\n if (this._previousNativeValue !== newValue) {\n this._previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }\n /** Make sure the input is a supported type. */\n _validateType() {\n if (MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1 &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatInputUnsupportedTypeError(this._type);\n }\n }\n /** Checks whether the input type is one of the types that are never empty. */\n _isNeverEmpty() {\n return this._neverEmptyInputTypes.indexOf(this._type) > -1;\n }\n /** Checks whether the input is invalid based on the native validation. */\n _isBadInput() {\n // The `validity` property won't be present on platform-server.\n let validity = this._elementRef.nativeElement.validity;\n return validity && validity.badInput;\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get empty() {\n return (!this._isNeverEmpty() &&\n !this._elementRef.nativeElement.value &&\n !this._isBadInput() &&\n !this.autofilled);\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldLabelFloat() {\n if (this._isNativeSelect) {\n // For a single-selection `<select>`, the label should float when the selected option has\n // a non-empty display value. For a `<select multiple>`, the label *always* floats to avoid\n // overlapping the label with the options.\n const selectElement = this._elementRef.nativeElement;\n const firstOption = selectElement.options[0];\n // On most browsers the `selectedIndex` will always be 0, however on IE and Edge it'll be\n // -1 if the `value` is set to something, that isn't in the list of options, at a later point.\n return (this.focused ||\n selectElement.multiple ||\n !this.empty ||\n !!(selectElement.selectedIndex > -1 && firstOption && firstOption.label));\n }\n else {\n return this.focused || !this.empty;\n }\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids) {\n if (ids.length) {\n this._elementRef.nativeElement.setAttribute('aria-describedby', ids.join(' '));\n }\n else {\n this._elementRef.nativeElement.removeAttribute('aria-describedby');\n }\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n // Do not re-focus the input element if the element is already focused. Otherwise it can happen\n // that someone clicks on a time input and the cursor resets to the \"hours\" field while the\n // \"minutes\" field was actually clicked. See: https://github.com/angular/components/issues/12849\n if (!this.focused) {\n this.focus();\n }\n }\n /** Whether the form control is a native select that is displayed inline. */\n _isInlineSelect() {\n const element = this._elementRef.nativeElement;\n return this._isNativeSelect && (element.multiple || element.size > 1);\n }\n}\nMatInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatInput, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i3.ErrorStateMatcher }, { token: MAT_INPUT_VALUE_ACCESSOR, optional: true, self: true }, { token: i4.AutofillMonitor }, { token: i0.NgZone }, { token: MAT_FORM_FIELD, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatInput.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatInput, selector: \"input[matInput], textarea[matInput], select[matNativeControl],\\n input[matNativeControl], textarea[matNativeControl]\", inputs: { disabled: \"disabled\", id: \"id\", placeholder: \"placeholder\", name: \"name\", required: \"required\", type: \"type\", errorStateMatcher: \"errorStateMatcher\", userAriaDescribedBy: [\"aria-describedby\", \"userAriaDescribedBy\"], value: \"value\", readonly: \"readonly\" }, host: { listeners: { \"focus\": \"_focusChanged(true)\", \"blur\": \"_focusChanged(false)\", \"input\": \"_onInput()\" }, properties: { \"class.mat-input-server\": \"_isServer\", \"attr.id\": \"id\", \"attr.data-placeholder\": \"placeholder\", \"disabled\": \"disabled\", \"required\": \"required\", \"attr.name\": \"name || null\", \"attr.readonly\": \"readonly && !_isNativeSelect || null\", \"class.mat-native-select-inline\": \"_isInlineSelect()\", \"attr.aria-invalid\": \"(empty && required) ? null : errorState\", \"attr.aria-required\": \"required\" }, classAttribute: \"mat-input-element mat-form-field-autofill-control\" }, providers: [{ provide: MatFormFieldControl, useExisting: MatInput }], exportAs: [\"matInput\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatInput, decorators: [{\n type: Directive,\n args: [{\n selector: `input[matInput], textarea[matInput], select[matNativeControl],\n input[matNativeControl], textarea[matNativeControl]`,\n exportAs: 'matInput',\n host: {\n /**\n * @breaking-change 8.0.0 remove .mat-form-field-autofill-control in favor of AutofillMonitor.\n */\n 'class': 'mat-input-element mat-form-field-autofill-control',\n '[class.mat-input-server]': '_isServer',\n // Native input properties that are overwritten by Angular inputs need to be synced with\n // the native input element. Otherwise property bindings for those don't work.\n '[attr.id]': 'id',\n // At the time of writing, we have a lot of customer tests that look up the input based on its\n // placeholder. Since we sometimes omit the placeholder attribute from the DOM to prevent screen\n // readers from reading it twice, we have to keep it somewhere in the DOM for the lookup.\n '[attr.data-placeholder]': 'placeholder',\n '[disabled]': 'disabled',\n '[required]': 'required',\n '[attr.name]': 'name || null',\n '[attr.readonly]': 'readonly && !_isNativeSelect || null',\n '[class.mat-native-select-inline]': '_isInlineSelect()',\n // Only mark the input as invalid for assistive technology if it has a value since the\n // state usually overlaps with `aria-required` when the input is empty and can be redundant.\n '[attr.aria-invalid]': '(empty && required) ? null : errorState',\n '[attr.aria-required]': 'required',\n '(focus)': '_focusChanged(true)',\n '(blur)': '_focusChanged(false)',\n '(input)': '_onInput()',\n },\n providers: [{ provide: MatFormFieldControl, useExisting: MatInput }],\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.Platform }, { type: i2.NgControl, decorators: [{\n type: Optional\n }, {\n type: Self\n }] }, { type: i2.NgForm, decorators: [{\n type: Optional\n }] }, { type: i2.FormGroupDirective, decorators: [{\n type: Optional\n }] }, { type: i3.ErrorStateMatcher }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [MAT_INPUT_VALUE_ACCESSOR]\n }] }, { type: i4.AutofillMonitor }, { type: i0.NgZone }, { type: i5.MatFormField, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_FORM_FIELD]\n }] }]; }, propDecorators: { disabled: [{\n type: Input\n }], id: [{\n type: Input\n }], placeholder: [{\n type: Input\n }], name: [{\n type: Input\n }], required: [{\n type: Input\n }], type: [{\n type: Input\n }], errorStateMatcher: [{\n type: Input\n }], userAriaDescribedBy: [{\n type: Input,\n args: ['aria-describedby']\n }], value: [{\n type: Input\n }], readonly: [{\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 */\nclass MatInputModule {\n}\nMatInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatInputModule, declarations: [MatInput], imports: [TextFieldModule, MatFormFieldModule, MatCommonModule], exports: [TextFieldModule,\n // We re-export the `MatFormFieldModule` since `MatInput` will almost always\n // be used together with `MatFormField`.\n MatFormFieldModule,\n MatInput] });\nMatInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatInputModule, providers: [ErrorStateMatcher], imports: [TextFieldModule, MatFormFieldModule, MatCommonModule, TextFieldModule,\n // We re-export the `MatFormFieldModule` since `MatInput` will almost always\n // be used together with `MatFormField`.\n MatFormFieldModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatInputModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [MatInput],\n imports: [TextFieldModule, MatFormFieldModule, MatCommonModule],\n exports: [\n TextFieldModule,\n // We re-export the `MatFormFieldModule` since `MatInput` will almost always\n // be used together with `MatFormField`.\n MatFormFieldModule,\n MatInput,\n ],\n providers: [ErrorStateMatcher],\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 * Generated bundle index. Do not edit.\n */\n\nexport { MAT_INPUT_VALUE_ACCESSOR, MatInput, MatInputModule, getMatInputUnsupportedTypeError };\n","import * as i0 from '@angular/core';\nimport { SecurityContext, Injectable, Optional, Inject, SkipSelf, ErrorHandler, InjectionToken, inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Attribute, Input, NgModule } from '@angular/core';\nimport { mixinColor, MatCommonModule } from '@angular/material/core';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DOCUMENT } from '@angular/common';\nimport { of, throwError, forkJoin, Subscription } from 'rxjs';\nimport { tap, map, catchError, finalize, share, take } from 'rxjs/operators';\nimport * as i1 from '@angular/common/http';\nimport { HttpClient } from '@angular/common/http';\nimport * as i2 from '@angular/platform-browser';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 (typeof window !== 'undefined') {\n const ttWindow = window;\n if (ttWindow.trustedTypes !== undefined) {\n policy = ttWindow.trustedTypes.createPolicy('angular#components', {\n createHTML: (s) => s,\n });\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 return getPolicy()?.createHTML(html) || 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 * Returns an exception to be thrown in the case when attempting to\n * load an icon with a name that cannot be found.\n * @docs-private\n */\nfunction getMatIconNameNotFoundError(iconName) {\n return Error(`Unable to find icon with the name \"${iconName}\"`);\n}\n/**\n * Returns an exception to be thrown when the consumer attempts to use\n * `<mat-icon>` without including @angular/common/http.\n * @docs-private\n */\nfunction getMatIconNoHttpProviderError() {\n return Error('Could not find HttpClient provider for use with Angular Material icons. ' +\n 'Please include the HttpClientModule from @angular/common/http in your ' +\n 'app imports.');\n}\n/**\n * Returns an exception to be thrown when a URL couldn't be sanitized.\n * @param url URL that was attempted to be sanitized.\n * @docs-private\n */\nfunction getMatIconFailedToSanitizeUrlError(url) {\n return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL ` +\n `via Angular's DomSanitizer. Attempted URL was \"${url}\".`);\n}\n/**\n * Returns an exception to be thrown when a HTML string couldn't be sanitized.\n * @param literal HTML that was attempted to be sanitized.\n * @docs-private\n */\nfunction getMatIconFailedToSanitizeLiteralError(literal) {\n return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by ` +\n `Angular's DomSanitizer. Attempted literal was \"${literal}\".`);\n}\n/**\n * Configuration for an icon, including the URL and possibly the cached SVG element.\n * @docs-private\n */\nclass SvgIconConfig {\n constructor(url, svgText, options) {\n this.url = url;\n this.svgText = svgText;\n this.options = options;\n }\n}\n/**\n * Service to register and display icons used by the `<mat-icon>` component.\n * - Registers icon URLs by namespace and name.\n * - Registers icon set URLs by namespace.\n * - Registers aliases for CSS classes, for use with icon fonts.\n * - Loads icons from URLs and extracts individual icons from icon sets.\n */\nclass MatIconRegistry {\n constructor(_httpClient, _sanitizer, document, _errorHandler) {\n this._httpClient = _httpClient;\n this._sanitizer = _sanitizer;\n this._errorHandler = _errorHandler;\n /**\n * URLs and cached SVG elements for individual icons. Keys are of the format \"[namespace]:[icon]\".\n */\n this._svgIconConfigs = new Map();\n /**\n * SvgIconConfig objects and cached SVG elements for icon sets, keyed by namespace.\n * Multiple icon sets can be registered under the same namespace.\n */\n this._iconSetConfigs = new Map();\n /** Cache for icons loaded by direct URLs. */\n this._cachedIconsByUrl = new Map();\n /** In-progress icon fetches. Used to coalesce multiple requests to the same URL. */\n this._inProgressUrlFetches = new Map();\n /** Map from font identifiers to their CSS class names. Used for icon fonts. */\n this._fontCssClassesByAlias = new Map();\n /** Registered icon resolver functions. */\n this._resolvers = [];\n /**\n * The CSS classes to apply when an `<mat-icon>` component has no icon name, url, or font\n * specified. The default 'material-icons' value assumes that the material icon font has been\n * loaded as described at http://google.github.io/material-design-icons/#icon-font-for-the-web\n */\n this._defaultFontSetClass = ['material-icons', 'mat-ligature-font'];\n this._document = document;\n }\n /**\n * Registers an icon by URL in the default namespace.\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n addSvgIcon(iconName, url, options) {\n return this.addSvgIconInNamespace('', iconName, url, options);\n }\n /**\n * Registers an icon using an HTML string in the default namespace.\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n addSvgIconLiteral(iconName, literal, options) {\n return this.addSvgIconLiteralInNamespace('', iconName, literal, options);\n }\n /**\n * Registers an icon by URL in the specified namespace.\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n addSvgIconInNamespace(namespace, iconName, url, options) {\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url, null, options));\n }\n /**\n * Registers an icon resolver function with the registry. The function will be invoked with the\n * name and namespace of an icon when the registry tries to resolve the URL from which to fetch\n * the icon. The resolver is expected to return a `SafeResourceUrl` that points to the icon,\n * an object with the icon URL and icon options, or `null` if the icon is not supported. Resolvers\n * will be invoked in the order in which they have been registered.\n * @param resolver Resolver function to be registered.\n */\n addSvgIconResolver(resolver) {\n this._resolvers.push(resolver);\n return this;\n }\n /**\n * Registers an icon using an HTML string in the specified namespace.\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n addSvgIconLiteralInNamespace(namespace, iconName, literal, options) {\n const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n // TODO: add an ngDevMode check\n if (!cleanLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n // Security: The literal is passed in as SafeHtml, and is thus trusted.\n const trustedLiteral = trustedHTMLFromString(cleanLiteral);\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig('', trustedLiteral, options));\n }\n /**\n * Registers an icon set by URL in the default namespace.\n * @param url\n */\n addSvgIconSet(url, options) {\n return this.addSvgIconSetInNamespace('', url, options);\n }\n /**\n * Registers an icon set using an HTML string in the default namespace.\n * @param literal SVG source of the icon set.\n */\n addSvgIconSetLiteral(literal, options) {\n return this.addSvgIconSetLiteralInNamespace('', literal, options);\n }\n /**\n * Registers an icon set by URL in the specified namespace.\n * @param namespace Namespace in which to register the icon set.\n * @param url\n */\n addSvgIconSetInNamespace(namespace, url, options) {\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig(url, null, options));\n }\n /**\n * Registers an icon set using an HTML string in the specified namespace.\n * @param namespace Namespace in which to register the icon set.\n * @param literal SVG source of the icon set.\n */\n addSvgIconSetLiteralInNamespace(namespace, literal, options) {\n const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n if (!cleanLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n // Security: The literal is passed in as SafeHtml, and is thus trusted.\n const trustedLiteral = trustedHTMLFromString(cleanLiteral);\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig('', trustedLiteral, options));\n }\n /**\n * Defines an alias for CSS class names to be used for icon fonts. Creating an matIcon\n * component with the alias as the fontSet input will cause the class name to be applied\n * to the `<mat-icon>` element.\n *\n * If the registered font is a ligature font, then don't forget to also include the special\n * class `mat-ligature-font` to allow the usage via attribute. So register like this:\n *\n * ```ts\n * iconRegistry.registerFontClassAlias('f1', 'font1 mat-ligature-font');\n * ```\n *\n * And use like this:\n *\n * ```html\n * <mat-icon fontSet=\"f1\" fontIcon=\"home\"></mat-icon>\n * ```\n *\n * @param alias Alias for the font.\n * @param classNames Class names override to be used instead of the alias.\n */\n registerFontClassAlias(alias, classNames = alias) {\n this._fontCssClassesByAlias.set(alias, classNames);\n return this;\n }\n /**\n * Returns the CSS class name associated with the alias by a previous call to\n * registerFontClassAlias. If no CSS class has been associated, returns the alias unmodified.\n */\n classNameForFontAlias(alias) {\n return this._fontCssClassesByAlias.get(alias) || alias;\n }\n /**\n * Sets the CSS classes to be used for icon fonts when an `<mat-icon>` component does not\n * have a fontSet input value, and is not loading an icon by name or URL.\n */\n setDefaultFontSetClass(...classNames) {\n this._defaultFontSetClass = classNames;\n return this;\n }\n /**\n * Returns the CSS classes to be used for icon fonts when an `<mat-icon>` component does not\n * have a fontSet input value, and is not loading an icon by name or URL.\n */\n getDefaultFontSetClass() {\n return this._defaultFontSetClass;\n }\n /**\n * Returns an Observable that produces the icon (as an `<svg>` DOM element) from the given URL.\n * The response from the URL may be cached so this will not always cause an HTTP request, but\n * the produced element will always be a new copy of the originally fetched icon. (That is,\n * it will not contain any modifications made to elements previously returned).\n *\n * @param safeUrl URL from which to fetch the SVG icon.\n */\n getSvgIconFromUrl(safeUrl) {\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n if (!url) {\n throw getMatIconFailedToSanitizeUrlError(safeUrl);\n }\n const cachedIcon = this._cachedIconsByUrl.get(url);\n if (cachedIcon) {\n return of(cloneSvg(cachedIcon));\n }\n return this._loadSvgIconFromConfig(new SvgIconConfig(safeUrl, null)).pipe(tap(svg => this._cachedIconsByUrl.set(url, svg)), map(svg => cloneSvg(svg)));\n }\n /**\n * Returns an Observable that produces the icon (as an `<svg>` DOM element) with the given name\n * and namespace. The icon must have been previously registered with addIcon or addIconSet;\n * if not, the Observable will throw an error.\n *\n * @param name Name of the icon to be retrieved.\n * @param namespace Namespace in which to look for the icon.\n */\n getNamedSvgIcon(name, namespace = '') {\n const key = iconKey(namespace, name);\n let config = this._svgIconConfigs.get(key);\n // Return (copy of) cached icon if possible.\n if (config) {\n return this._getSvgFromConfig(config);\n }\n // Otherwise try to resolve the config from one of the resolver functions.\n config = this._getIconConfigFromResolvers(namespace, name);\n if (config) {\n this._svgIconConfigs.set(key, config);\n return this._getSvgFromConfig(config);\n }\n // See if we have any icon sets registered for the namespace.\n const iconSetConfigs = this._iconSetConfigs.get(namespace);\n if (iconSetConfigs) {\n return this._getSvgFromIconSetConfigs(name, iconSetConfigs);\n }\n return throwError(getMatIconNameNotFoundError(key));\n }\n ngOnDestroy() {\n this._resolvers = [];\n this._svgIconConfigs.clear();\n this._iconSetConfigs.clear();\n this._cachedIconsByUrl.clear();\n }\n /**\n * Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.\n */\n _getSvgFromConfig(config) {\n if (config.svgText) {\n // We already have the SVG element for this icon, return a copy.\n return of(cloneSvg(this._svgElementFromConfig(config)));\n }\n else {\n // Fetch the icon from the config's URL, cache it, and return a copy.\n return this._loadSvgIconFromConfig(config).pipe(map(svg => cloneSvg(svg)));\n }\n }\n /**\n * Attempts to find an icon with the specified name in any of the SVG icon sets.\n * First searches the available cached icons for a nested element with a matching name, and\n * if found copies the element to a new `<svg>` element. If not found, fetches all icon sets\n * that have not been cached, and searches again after all fetches are completed.\n * The returned Observable produces the SVG element if possible, and throws\n * an error if no icon with the specified name can be found.\n */\n _getSvgFromIconSetConfigs(name, iconSetConfigs) {\n // For all the icon set SVG elements we've fetched, see if any contain an icon with the\n // requested name.\n const namedIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n if (namedIcon) {\n // We could cache namedIcon in _svgIconConfigs, but since we have to make a copy every\n // time anyway, there's probably not much advantage compared to just always extracting\n // it from the icon set.\n return of(namedIcon);\n }\n // Not found in any cached icon sets. If there are icon sets with URLs that we haven't\n // fetched, fetch them now and look for iconName in the results.\n const iconSetFetchRequests = iconSetConfigs\n .filter(iconSetConfig => !iconSetConfig.svgText)\n .map(iconSetConfig => {\n return this._loadSvgIconSetFromConfig(iconSetConfig).pipe(catchError((err) => {\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, iconSetConfig.url);\n // Swallow errors fetching individual URLs so the\n // combined Observable won't necessarily fail.\n const errorMessage = `Loading icon set URL: ${url} failed: ${err.message}`;\n this._errorHandler.handleError(new Error(errorMessage));\n return of(null);\n }));\n });\n // Fetch all the icon set URLs. When the requests complete, every IconSet should have a\n // cached SVG element (unless the request failed), and we can check again for the icon.\n return forkJoin(iconSetFetchRequests).pipe(map(() => {\n const foundIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n // TODO: add an ngDevMode check\n if (!foundIcon) {\n throw getMatIconNameNotFoundError(name);\n }\n return foundIcon;\n }));\n }\n /**\n * Searches the cached SVG elements for the given icon sets for a nested icon element whose \"id\"\n * tag matches the specified name. If found, copies the nested element to a new SVG element and\n * returns it. Returns null if no matching element is found.\n */\n _extractIconWithNameFromAnySet(iconName, iconSetConfigs) {\n // Iterate backwards, so icon sets added later have precedence.\n for (let i = iconSetConfigs.length - 1; i >= 0; i--) {\n const config = iconSetConfigs[i];\n // Parsing the icon set's text into an SVG element can be expensive. We can avoid some of\n // the parsing by doing a quick check using `indexOf` to see if there's any chance for the\n // icon to be in the set. This won't be 100% accurate, but it should help us avoid at least\n // some of the parsing.\n if (config.svgText && config.svgText.toString().indexOf(iconName) > -1) {\n const svg = this._svgElementFromConfig(config);\n const foundIcon = this._extractSvgIconFromSet(svg, iconName, config.options);\n if (foundIcon) {\n return foundIcon;\n }\n }\n }\n return null;\n }\n /**\n * Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element\n * from it.\n */\n _loadSvgIconFromConfig(config) {\n return this._fetchIcon(config).pipe(tap(svgText => (config.svgText = svgText)), map(() => this._svgElementFromConfig(config)));\n }\n /**\n * Loads the content of the icon set URL specified in the\n * SvgIconConfig and attaches it to the config.\n */\n _loadSvgIconSetFromConfig(config) {\n if (config.svgText) {\n return of(null);\n }\n return this._fetchIcon(config).pipe(tap(svgText => (config.svgText = svgText)));\n }\n /**\n * Searches the cached element of the given SvgIconConfig for a nested icon element whose \"id\"\n * tag matches the specified name. If found, copies the nested element to a new SVG element and\n * returns it. Returns null if no matching element is found.\n */\n _extractSvgIconFromSet(iconSet, iconName, options) {\n // Use the `id=\"iconName\"` syntax in order to escape special\n // characters in the ID (versus using the #iconName syntax).\n const iconSource = iconSet.querySelector(`[id=\"${iconName}\"]`);\n if (!iconSource) {\n return null;\n }\n // Clone the element and remove the ID to prevent multiple elements from being added\n // to the page with the same ID.\n const iconElement = iconSource.cloneNode(true);\n iconElement.removeAttribute('id');\n // If the icon node is itself an <svg> node, clone and return it directly. If not, set it as\n // the content of a new <svg> node.\n if (iconElement.nodeName.toLowerCase() === 'svg') {\n return this._setSvgAttributes(iconElement, options);\n }\n // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>. Note\n // that the same could be achieved by referring to it via <use href=\"#id\">, however the <use>\n // tag is problematic on Firefox, because it needs to include the current page path.\n if (iconElement.nodeName.toLowerCase() === 'symbol') {\n return this._setSvgAttributes(this._toSvgElement(iconElement), options);\n }\n // createElement('SVG') doesn't work as expected; the DOM ends up with\n // the correct nodes, but the SVG content doesn't render. Instead we\n // have to create an empty SVG node using innerHTML and append its content.\n // Elements created using DOMParser.parseFromString have the same problem.\n // http://stackoverflow.com/questions/23003278/svg-innerhtml-in-firefox-can-not-display\n const svg = this._svgElementFromString(trustedHTMLFromString('<svg></svg>'));\n // Clone the node so we don't remove it from the parent icon set element.\n svg.appendChild(iconElement);\n return this._setSvgAttributes(svg, options);\n }\n /**\n * Creates a DOM element from the given SVG string.\n */\n _svgElementFromString(str) {\n const div = this._document.createElement('DIV');\n div.innerHTML = str;\n const svg = div.querySelector('svg');\n // TODO: add an ngDevMode check\n if (!svg) {\n throw Error('<svg> tag not found');\n }\n return svg;\n }\n /**\n * Converts an element into an SVG node by cloning all of its children.\n */\n _toSvgElement(element) {\n const svg = this._svgElementFromString(trustedHTMLFromString('<svg></svg>'));\n const attributes = element.attributes;\n // Copy over all the attributes from the `symbol` to the new SVG, except the id.\n for (let i = 0; i < attributes.length; i++) {\n const { name, value } = attributes[i];\n if (name !== 'id') {\n svg.setAttribute(name, value);\n }\n }\n for (let i = 0; i < element.childNodes.length; i++) {\n if (element.childNodes[i].nodeType === this._document.ELEMENT_NODE) {\n svg.appendChild(element.childNodes[i].cloneNode(true));\n }\n }\n return svg;\n }\n /**\n * Sets the default attributes for an SVG element to be used as an icon.\n */\n _setSvgAttributes(svg, options) {\n svg.setAttribute('fit', '');\n svg.setAttribute('height', '100%');\n svg.setAttribute('width', '100%');\n svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n svg.setAttribute('focusable', 'false'); // Disable IE11 default behavior to make SVGs focusable.\n if (options && options.viewBox) {\n svg.setAttribute('viewBox', options.viewBox);\n }\n return svg;\n }\n /**\n * Returns an Observable which produces the string contents of the given icon. Results may be\n * cached, so future calls with the same URL may not cause another HTTP request.\n */\n _fetchIcon(iconConfig) {\n const { url: safeUrl, options } = iconConfig;\n const withCredentials = options?.withCredentials ?? false;\n if (!this._httpClient) {\n throw getMatIconNoHttpProviderError();\n }\n // TODO: add an ngDevMode check\n if (safeUrl == null) {\n throw Error(`Cannot fetch icon from URL \"${safeUrl}\".`);\n }\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n // TODO: add an ngDevMode check\n if (!url) {\n throw getMatIconFailedToSanitizeUrlError(safeUrl);\n }\n // Store in-progress fetches to avoid sending a duplicate request for a URL when there is\n // already a request in progress for that URL. It's necessary to call share() on the\n // Observable returned by http.get() so that multiple subscribers don't cause multiple XHRs.\n const inProgressFetch = this._inProgressUrlFetches.get(url);\n if (inProgressFetch) {\n return inProgressFetch;\n }\n const req = this._httpClient.get(url, { responseType: 'text', withCredentials }).pipe(map(svg => {\n // Security: This SVG is fetched from a SafeResourceUrl, and is thus\n // trusted HTML.\n return trustedHTMLFromString(svg);\n }), finalize(() => this._inProgressUrlFetches.delete(url)), share());\n this._inProgressUrlFetches.set(url, req);\n return req;\n }\n /**\n * Registers an icon config by name in the specified namespace.\n * @param namespace Namespace in which to register the icon config.\n * @param iconName Name under which to register the config.\n * @param config Config to be registered.\n */\n _addSvgIconConfig(namespace, iconName, config) {\n this._svgIconConfigs.set(iconKey(namespace, iconName), config);\n return this;\n }\n /**\n * Registers an icon set config in the specified namespace.\n * @param namespace Namespace in which to register the icon config.\n * @param config Config to be registered.\n */\n _addSvgIconSetConfig(namespace, config) {\n const configNamespace = this._iconSetConfigs.get(namespace);\n if (configNamespace) {\n configNamespace.push(config);\n }\n else {\n this._iconSetConfigs.set(namespace, [config]);\n }\n return this;\n }\n /** Parses a config's text into an SVG element. */\n _svgElementFromConfig(config) {\n if (!config.svgElement) {\n const svg = this._svgElementFromString(config.svgText);\n this._setSvgAttributes(svg, config.options);\n config.svgElement = svg;\n }\n return config.svgElement;\n }\n /** Tries to create an icon config through the registered resolver functions. */\n _getIconConfigFromResolvers(namespace, name) {\n for (let i = 0; i < this._resolvers.length; i++) {\n const result = this._resolvers[i](name, namespace);\n if (result) {\n return isSafeUrlWithOptions(result)\n ? new SvgIconConfig(result.url, null, result.options)\n : new SvgIconConfig(result, null);\n }\n }\n return undefined;\n }\n}\nMatIconRegistry.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatIconRegistry, deps: [{ token: i1.HttpClient, optional: true }, { token: i2.DomSanitizer }, { token: DOCUMENT, optional: true }, { token: i0.ErrorHandler }], target: i0.ɵɵFactoryTarget.Injectable });\nMatIconRegistry.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatIconRegistry, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatIconRegistry, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: function () { return [{ type: i1.HttpClient, decorators: [{\n type: Optional\n }] }, { type: i2.DomSanitizer }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i0.ErrorHandler }]; } });\n/** @docs-private */\nfunction ICON_REGISTRY_PROVIDER_FACTORY(parentRegistry, httpClient, sanitizer, errorHandler, document) {\n return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document, errorHandler);\n}\n/** @docs-private */\nconst ICON_REGISTRY_PROVIDER = {\n // If there is already an MatIconRegistry available, use that. Otherwise, provide a new one.\n provide: MatIconRegistry,\n deps: [\n [new Optional(), new SkipSelf(), MatIconRegistry],\n [new Optional(), HttpClient],\n DomSanitizer,\n ErrorHandler,\n [new Optional(), DOCUMENT],\n ],\n useFactory: ICON_REGISTRY_PROVIDER_FACTORY,\n};\n/** Clones an SVGElement while preserving type information. */\nfunction cloneSvg(svg) {\n return svg.cloneNode(true);\n}\n/** Returns the cache key to use for an icon namespace and name. */\nfunction iconKey(namespace, name) {\n return namespace + ':' + name;\n}\nfunction isSafeUrlWithOptions(value) {\n return !!(value.url && value.options);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Boilerplate for applying mixins to MatIcon.\n/** @docs-private */\nconst _MatIconBase = mixinColor(class {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n});\n/** Injection token to be used to override the default options for `mat-icon`. */\nconst MAT_ICON_DEFAULT_OPTIONS = new InjectionToken('MAT_ICON_DEFAULT_OPTIONS');\n/**\n * Injection token used to provide the current location to `MatIcon`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nconst MAT_ICON_LOCATION = new InjectionToken('mat-icon-location', {\n providedIn: 'root',\n factory: MAT_ICON_LOCATION_FACTORY,\n});\n/** @docs-private */\nfunction MAT_ICON_LOCATION_FACTORY() {\n const _document = inject(DOCUMENT);\n const _location = _document ? _document.location : null;\n return {\n // Note that this needs to be a function, rather than a property, because Angular\n // will only resolve it once, but we want the current path on each call.\n getPathname: () => (_location ? _location.pathname + _location.search : ''),\n };\n}\n/** SVG attributes that accept a FuncIRI (e.g. `url(<something>)`). */\nconst funcIriAttributes = [\n 'clip-path',\n 'color-profile',\n 'src',\n 'cursor',\n 'fill',\n 'filter',\n 'marker',\n 'marker-start',\n 'marker-mid',\n 'marker-end',\n 'mask',\n 'stroke',\n];\n/** Selector that can be used to find all elements that are using a `FuncIRI`. */\nconst funcIriAttributeSelector = funcIriAttributes.map(attr => `[${attr}]`).join(', ');\n/** Regex that can be used to extract the id out of a FuncIRI. */\nconst funcIriPattern = /^url\\(['\"]?#(.*?)['\"]?\\)$/;\n/**\n * Component to display an icon. It can be used in the following ways:\n *\n * - Specify the svgIcon input to load an SVG icon from a URL previously registered with the\n * addSvgIcon, addSvgIconInNamespace, addSvgIconSet, or addSvgIconSetInNamespace methods of\n * MatIconRegistry. If the svgIcon value contains a colon it is assumed to be in the format\n * \"[namespace]:[name]\", if not the value will be the name of an icon in the default namespace.\n * Examples:\n * `<mat-icon svgIcon=\"left-arrow\"></mat-icon>\n * <mat-icon svgIcon=\"animals:cat\"></mat-icon>`\n *\n * - Use a font ligature as an icon by putting the ligature text in the `fontIcon` attribute or the\n * content of the `<mat-icon>` component. If you register a custom font class, don't forget to also\n * include the special class `mat-ligature-font`. It is recommended to use the attribute alternative\n * to prevent the ligature text to be selectable and to appear in search engine results.\n * By default, the Material icons font is used as described at\n * http://google.github.io/material-design-icons/#icon-font-for-the-web. You can specify an\n * alternate font by setting the fontSet input to either the CSS class to apply to use the\n * desired font, or to an alias previously registered with MatIconRegistry.registerFontClassAlias.\n * Examples:\n * `<mat-icon fontIcon=\"home\"></mat-icon>\n * <mat-icon>home</mat-icon>\n * <mat-icon fontSet=\"myfont\" fontIcon=\"sun\"></mat-icon>\n * <mat-icon fontSet=\"myfont\">sun</mat-icon>`\n *\n * - Specify a font glyph to be included via CSS rules by setting the fontSet input to specify the\n * font, and the fontIcon input to specify the icon. Typically the fontIcon will specify a\n * CSS class which causes the glyph to be displayed via a :before selector, as in\n * https://fortawesome.github.io/Font-Awesome/examples/\n * Example:\n * `<mat-icon fontSet=\"fa\" fontIcon=\"alarm\"></mat-icon>`\n */\nclass MatIcon extends _MatIconBase {\n constructor(elementRef, _iconRegistry, ariaHidden, _location, _errorHandler, defaults) {\n super(elementRef);\n this._iconRegistry = _iconRegistry;\n this._location = _location;\n this._errorHandler = _errorHandler;\n this._inline = false;\n this._previousFontSetClass = [];\n /** Subscription to the current in-progress SVG icon request. */\n this._currentIconFetch = Subscription.EMPTY;\n if (defaults) {\n if (defaults.color) {\n this.color = this.defaultColor = defaults.color;\n }\n if (defaults.fontSet) {\n this.fontSet = defaults.fontSet;\n }\n }\n // If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is\n // the right thing to do for the majority of icon use-cases.\n if (!ariaHidden) {\n elementRef.nativeElement.setAttribute('aria-hidden', 'true');\n }\n }\n /**\n * Whether the icon should be inlined, automatically sizing the icon to match the font size of\n * the element the icon is contained in.\n */\n get inline() {\n return this._inline;\n }\n set inline(inline) {\n this._inline = coerceBooleanProperty(inline);\n }\n /** Name of the icon in the SVG icon set. */\n get svgIcon() {\n return this._svgIcon;\n }\n set svgIcon(value) {\n if (value !== this._svgIcon) {\n if (value) {\n this._updateSvgIcon(value);\n }\n else if (this._svgIcon) {\n this._clearSvgElement();\n }\n this._svgIcon = value;\n }\n }\n /** Font set that the icon is a part of. */\n get fontSet() {\n return this._fontSet;\n }\n set fontSet(value) {\n const newValue = this._cleanupFontValue(value);\n if (newValue !== this._fontSet) {\n this._fontSet = newValue;\n this._updateFontIconClasses();\n }\n }\n /** Name of an icon within a font set. */\n get fontIcon() {\n return this._fontIcon;\n }\n set fontIcon(value) {\n const newValue = this._cleanupFontValue(value);\n if (newValue !== this._fontIcon) {\n this._fontIcon = newValue;\n this._updateFontIconClasses();\n }\n }\n /**\n * Splits an svgIcon binding value into its icon set and icon name components.\n * Returns a 2-element array of [(icon set), (icon name)].\n * The separator for the two fields is ':'. If there is no separator, an empty\n * string is returned for the icon set and the entire value is returned for\n * the icon name. If the argument is falsy, returns an array of two empty strings.\n * Throws an error if the name contains two or more ':' separators.\n * Examples:\n * `'social:cake' -> ['social', 'cake']\n * 'penguin' -> ['', 'penguin']\n * null -> ['', '']\n * 'a:b:c' -> (throws Error)`\n */\n _splitIconName(iconName) {\n if (!iconName) {\n return ['', ''];\n }\n const parts = iconName.split(':');\n switch (parts.length) {\n case 1:\n return ['', parts[0]]; // Use default namespace.\n case 2:\n return parts;\n default:\n throw Error(`Invalid icon name: \"${iconName}\"`); // TODO: add an ngDevMode check\n }\n }\n ngOnInit() {\n // Update font classes because ngOnChanges won't be called if none of the inputs are present,\n // e.g. <mat-icon>arrow</mat-icon> In this case we need to add a CSS class for the default font.\n this._updateFontIconClasses();\n }\n ngAfterViewChecked() {\n const cachedElements = this._elementsWithExternalReferences;\n if (cachedElements && cachedElements.size) {\n const newPath = this._location.getPathname();\n // We need to check whether the URL has changed on each change detection since\n // the browser doesn't have an API that will let us react on link clicks and\n // we can't depend on the Angular router. The references need to be updated,\n // because while most browsers don't care whether the URL is correct after\n // the first render, Safari will break if the user navigates to a different\n // page and the SVG isn't re-rendered.\n if (newPath !== this._previousPath) {\n this._previousPath = newPath;\n this._prependPathToReferences(newPath);\n }\n }\n }\n ngOnDestroy() {\n this._currentIconFetch.unsubscribe();\n if (this._elementsWithExternalReferences) {\n this._elementsWithExternalReferences.clear();\n }\n }\n _usingFontIcon() {\n return !this.svgIcon;\n }\n _setSvgElement(svg) {\n this._clearSvgElement();\n // Note: we do this fix here, rather than the icon registry, because the\n // references have to point to the URL at the time that the icon was created.\n const path = this._location.getPathname();\n this._previousPath = path;\n this._cacheChildrenWithExternalReferences(svg);\n this._prependPathToReferences(path);\n this._elementRef.nativeElement.appendChild(svg);\n }\n _clearSvgElement() {\n const layoutElement = this._elementRef.nativeElement;\n let childCount = layoutElement.childNodes.length;\n if (this._elementsWithExternalReferences) {\n this._elementsWithExternalReferences.clear();\n }\n // Remove existing non-element child nodes and SVGs, and add the new SVG element. Note that\n // we can't use innerHTML, because IE will throw if the element has a data binding.\n while (childCount--) {\n const child = layoutElement.childNodes[childCount];\n // 1 corresponds to Node.ELEMENT_NODE. We remove all non-element nodes in order to get rid\n // of any loose text nodes, as well as any SVG elements in order to remove any old icons.\n if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {\n child.remove();\n }\n }\n }\n _updateFontIconClasses() {\n if (!this._usingFontIcon()) {\n return;\n }\n const elem = this._elementRef.nativeElement;\n const fontSetClasses = (this.fontSet\n ? this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/)\n : this._iconRegistry.getDefaultFontSetClass()).filter(className => className.length > 0);\n this._previousFontSetClass.forEach(className => elem.classList.remove(className));\n fontSetClasses.forEach(className => elem.classList.add(className));\n this._previousFontSetClass = fontSetClasses;\n if (this.fontIcon !== this._previousFontIconClass &&\n !fontSetClasses.includes('mat-ligature-font')) {\n if (this._previousFontIconClass) {\n elem.classList.remove(this._previousFontIconClass);\n }\n if (this.fontIcon) {\n elem.classList.add(this.fontIcon);\n }\n this._previousFontIconClass = this.fontIcon;\n }\n }\n /**\n * Cleans up a value to be used as a fontIcon or fontSet.\n * Since the value ends up being assigned as a CSS class, we\n * have to trim the value and omit space-separated values.\n */\n _cleanupFontValue(value) {\n return typeof value === 'string' ? value.trim().split(' ')[0] : value;\n }\n /**\n * Prepends the current path to all elements that have an attribute pointing to a `FuncIRI`\n * reference. This is required because WebKit browsers require references to be prefixed with\n * the current path, if the page has a `base` tag.\n */\n _prependPathToReferences(path) {\n const elements = this._elementsWithExternalReferences;\n if (elements) {\n elements.forEach((attrs, element) => {\n attrs.forEach(attr => {\n element.setAttribute(attr.name, `url('${path}#${attr.value}')`);\n });\n });\n }\n }\n /**\n * Caches the children of an SVG element that have `url()`\n * references that we need to prefix with the current path.\n */\n _cacheChildrenWithExternalReferences(element) {\n const elementsWithFuncIri = element.querySelectorAll(funcIriAttributeSelector);\n const elements = (this._elementsWithExternalReferences =\n this._elementsWithExternalReferences || new Map());\n for (let i = 0; i < elementsWithFuncIri.length; i++) {\n funcIriAttributes.forEach(attr => {\n const elementWithReference = elementsWithFuncIri[i];\n const value = elementWithReference.getAttribute(attr);\n const match = value ? value.match(funcIriPattern) : null;\n if (match) {\n let attributes = elements.get(elementWithReference);\n if (!attributes) {\n attributes = [];\n elements.set(elementWithReference, attributes);\n }\n attributes.push({ name: attr, value: match[1] });\n }\n });\n }\n }\n /** Sets a new SVG icon with a particular name. */\n _updateSvgIcon(rawName) {\n this._svgNamespace = null;\n this._svgName = null;\n this._currentIconFetch.unsubscribe();\n if (rawName) {\n const [namespace, iconName] = this._splitIconName(rawName);\n if (namespace) {\n this._svgNamespace = namespace;\n }\n if (iconName) {\n this._svgName = iconName;\n }\n this._currentIconFetch = this._iconRegistry\n .getNamedSvgIcon(iconName, namespace)\n .pipe(take(1))\n .subscribe(svg => this._setSvgElement(svg), (err) => {\n const errorMessage = `Error retrieving icon ${namespace}:${iconName}! ${err.message}`;\n this._errorHandler.handleError(new Error(errorMessage));\n });\n }\n }\n}\nMatIcon.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatIcon, deps: [{ token: i0.ElementRef }, { token: MatIconRegistry }, { token: 'aria-hidden', attribute: true }, { token: MAT_ICON_LOCATION }, { token: i0.ErrorHandler }, { token: MAT_ICON_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatIcon.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatIcon, selector: \"mat-icon\", inputs: { color: \"color\", inline: \"inline\", svgIcon: \"svgIcon\", fontSet: \"fontSet\", fontIcon: \"fontIcon\" }, host: { attributes: { \"role\": \"img\" }, properties: { \"attr.data-mat-icon-type\": \"_usingFontIcon() ? \\\"font\\\" : \\\"svg\\\"\", \"attr.data-mat-icon-name\": \"_svgName || fontIcon\", \"attr.data-mat-icon-namespace\": \"_svgNamespace || fontSet\", \"class.mat-icon-inline\": \"inline\", \"class.mat-icon-no-color\": \"color !== \\\"primary\\\" && color !== \\\"accent\\\" && color !== \\\"warn\\\"\" }, classAttribute: \"mat-icon notranslate\" }, exportAs: [\"matIcon\"], usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [\".mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatIcon, decorators: [{\n type: Component,\n args: [{ template: '<ng-content></ng-content>', selector: 'mat-icon', exportAs: 'matIcon', inputs: ['color'], host: {\n 'role': 'img',\n 'class': 'mat-icon notranslate',\n '[attr.data-mat-icon-type]': '_usingFontIcon() ? \"font\" : \"svg\"',\n '[attr.data-mat-icon-name]': '_svgName || fontIcon',\n '[attr.data-mat-icon-namespace]': '_svgNamespace || fontSet',\n '[class.mat-icon-inline]': 'inline',\n '[class.mat-icon-no-color]': 'color !== \"primary\" && color !== \"accent\" && color !== \"warn\"',\n }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: MatIconRegistry }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['aria-hidden']\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_ICON_LOCATION]\n }] }, { type: i0.ErrorHandler }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_ICON_DEFAULT_OPTIONS]\n }] }]; }, propDecorators: { inline: [{\n type: Input\n }], svgIcon: [{\n type: Input\n }], fontSet: [{\n type: Input\n }], fontIcon: [{\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 */\nclass MatIconModule {\n}\nMatIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatIconModule, declarations: [MatIcon], imports: [MatCommonModule], exports: [MatIcon, MatCommonModule] });\nMatIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatIconModule, imports: [MatCommonModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatIconModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [MatCommonModule],\n exports: [MatIcon, MatCommonModule],\n declarations: [MatIcon],\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 * Generated bundle index. Do not edit.\n */\n\nexport { ICON_REGISTRY_PROVIDER, ICON_REGISTRY_PROVIDER_FACTORY, MAT_ICON_DEFAULT_OPTIONS, MAT_ICON_LOCATION, MAT_ICON_LOCATION_FACTORY, MatIcon, MatIconModule, MatIconRegistry, getMatIconFailedToSanitizeLiteralError, getMatIconFailedToSanitizeUrlError, getMatIconNameNotFoundError, getMatIconNoHttpProviderError };\n","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _get() {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(arguments.length < 3 ? target : receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get.apply(this, arguments);\n}\n\nfunction set(target, property, value, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.set) {\n set = Reflect.set;\n } else {\n set = function set(target, property, value, receiver) {\n var base = _superPropBase(target, property);\n\n var desc;\n\n if (base) {\n desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.set) {\n desc.set.call(receiver, value);\n return true;\n } else if (!desc.writable) {\n return false;\n }\n }\n\n desc = Object.getOwnPropertyDescriptor(receiver, property);\n\n if (desc) {\n if (!desc.writable) {\n return false;\n }\n\n desc.value = value;\n Object.defineProperty(receiver, property, desc);\n } else {\n _defineProperty(receiver, property, value);\n }\n\n return true;\n };\n }\n\n return set(target, property, value, receiver);\n}\n\nfunction _set(target, property, value, receiver, isStrict) {\n var s = set(target, property, value, receiver || target);\n\n if (!s && isStrict) {\n throw new Error('failed to set property');\n }\n\n return value;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nexport { _createClass as _, _classCallCheck as a, _objectWithoutProperties as b, _typeof as c, _inherits as d, _createSuper as e, _slicedToArray as f, _get as g, _getPrototypeOf as h, _set as i };\n","import { _ as _createClass, a as _classCallCheck } from '../_rollupPluginBabelHelpers-b054ecd2.js';\n\n/**\n Provides details of changing model value\n @param {Object} [details]\n @param {string} [details.inserted] - Inserted symbols\n @param {boolean} [details.skip] - Can skip chars\n @param {number} [details.removeCount] - Removed symbols count\n @param {number} [details.tailShift] - Additional offset if any changes occurred before tail\n*/\nvar ChangeDetails = /*#__PURE__*/function () {\n /** Inserted symbols */\n\n /** Can skip chars */\n\n /** Additional offset if any changes occurred before tail */\n\n /** Raw inserted is used by dynamic mask */\n function ChangeDetails(details) {\n _classCallCheck(this, ChangeDetails);\n\n Object.assign(this, {\n inserted: '',\n rawInserted: '',\n skip: false,\n tailShift: 0\n }, details);\n }\n /**\n Aggregate changes\n @returns {ChangeDetails} `this`\n */\n\n\n _createClass(ChangeDetails, [{\n key: \"aggregate\",\n value: function aggregate(details) {\n this.rawInserted += details.rawInserted;\n this.skip = this.skip || details.skip;\n this.inserted += details.inserted;\n this.tailShift += details.tailShift;\n return this;\n }\n /** Total offset considering all changes */\n\n }, {\n key: \"offset\",\n get: function get() {\n return this.tailShift + this.inserted.length;\n }\n }]);\n\n return ChangeDetails;\n}();\n\nexport { ChangeDetails as default };\n","import { c as _typeof } from '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport ChangeDetails from './change-details.js';\n\n/** Checks if value is string */\n\nfunction isString(str) {\n return typeof str === 'string' || str instanceof String;\n}\n/**\n Direction\n @prop {string} NONE\n @prop {string} LEFT\n @prop {string} FORCE_LEFT\n @prop {string} RIGHT\n @prop {string} FORCE_RIGHT\n*/\n\nvar DIRECTION = {\n NONE: 'NONE',\n LEFT: 'LEFT',\n FORCE_LEFT: 'FORCE_LEFT',\n RIGHT: 'RIGHT',\n FORCE_RIGHT: 'FORCE_RIGHT'\n};\n/**\n Direction\n @enum {string}\n*/\n\n/** Returns next char index in direction */\nfunction indexInDirection(pos, direction) {\n if (direction === DIRECTION.LEFT) --pos;\n return pos;\n}\n/** Returns next char position in direction */\n\nfunction posInDirection(pos, direction) {\n switch (direction) {\n case DIRECTION.LEFT:\n case DIRECTION.FORCE_LEFT:\n return --pos;\n\n case DIRECTION.RIGHT:\n case DIRECTION.FORCE_RIGHT:\n return ++pos;\n\n default:\n return pos;\n }\n}\n/** */\n\nfunction forceDirection(direction) {\n switch (direction) {\n case DIRECTION.LEFT:\n return DIRECTION.FORCE_LEFT;\n\n case DIRECTION.RIGHT:\n return DIRECTION.FORCE_RIGHT;\n\n default:\n return direction;\n }\n}\n/** Escapes regular expression control chars */\n\nfunction escapeRegExp(str) {\n return str.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, '\\\\$1');\n}\nfunction normalizePrepare(prep) {\n return Array.isArray(prep) ? prep : [prep, new ChangeDetails()];\n} // cloned from https://github.com/epoberezkin/fast-deep-equal with small changes\n\nfunction objectIncludes(b, a) {\n if (a === b) return true;\n var arrA = Array.isArray(a),\n arrB = Array.isArray(b),\n i;\n\n if (arrA && arrB) {\n if (a.length != b.length) return false;\n\n for (i = 0; i < a.length; i++) {\n if (!objectIncludes(a[i], b[i])) return false;\n }\n\n return true;\n }\n\n if (arrA != arrB) return false;\n\n if (a && b && _typeof(a) === 'object' && _typeof(b) === 'object') {\n var dateA = a instanceof Date,\n dateB = b instanceof Date;\n if (dateA && dateB) return a.getTime() == b.getTime();\n if (dateA != dateB) return false;\n var regexpA = a instanceof RegExp,\n regexpB = b instanceof RegExp;\n if (regexpA && regexpB) return a.toString() == b.toString();\n if (regexpA != regexpB) return false;\n var keys = Object.keys(a); // if (keys.length !== Object.keys(b).length) return false;\n\n for (i = 0; i < keys.length; i++) {\n // $FlowFixMe ... ???\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n }\n\n for (i = 0; i < keys.length; i++) {\n if (!objectIncludes(b[keys[i]], a[keys[i]])) return false;\n }\n\n return true;\n } else if (a && b && typeof a === 'function' && typeof b === 'function') {\n return a.toString() === b.toString();\n }\n\n return false;\n}\n/** Selection range */\n\nexport { DIRECTION, escapeRegExp, forceDirection, indexInDirection, isString, normalizePrepare, objectIncludes, posInDirection };\n","import { _ as _createClass, a as _classCallCheck } from '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport { DIRECTION } from './utils.js';\nimport './change-details.js';\n\n/** Provides details of changing input */\n\nvar ActionDetails = /*#__PURE__*/function () {\n /** Current input value */\n\n /** Current cursor position */\n\n /** Old input value */\n\n /** Old selection */\n function ActionDetails(value, cursorPos, oldValue, oldSelection) {\n _classCallCheck(this, ActionDetails);\n\n this.value = value;\n this.cursorPos = cursorPos;\n this.oldValue = oldValue;\n this.oldSelection = oldSelection; // double check if left part was changed (autofilling, other non-standard input triggers)\n\n while (this.value.slice(0, this.startChangePos) !== this.oldValue.slice(0, this.startChangePos)) {\n --this.oldSelection.start;\n }\n }\n /**\n Start changing position\n @readonly\n */\n\n\n _createClass(ActionDetails, [{\n key: \"startChangePos\",\n get: function get() {\n return Math.min(this.cursorPos, this.oldSelection.start);\n }\n /**\n Inserted symbols count\n @readonly\n */\n\n }, {\n key: \"insertedCount\",\n get: function get() {\n return this.cursorPos - this.startChangePos;\n }\n /**\n Inserted symbols\n @readonly\n */\n\n }, {\n key: \"inserted\",\n get: function get() {\n return this.value.substr(this.startChangePos, this.insertedCount);\n }\n /**\n Removed symbols count\n @readonly\n */\n\n }, {\n key: \"removedCount\",\n get: function get() {\n // Math.max for opposite operation\n return Math.max(this.oldSelection.end - this.startChangePos || // for Delete\n this.oldValue.length - this.value.length, 0);\n }\n /**\n Removed symbols\n @readonly\n */\n\n }, {\n key: \"removed\",\n get: function get() {\n return this.oldValue.substr(this.startChangePos, this.removedCount);\n }\n /**\n Unchanged head symbols\n @readonly\n */\n\n }, {\n key: \"head\",\n get: function get() {\n return this.value.substring(0, this.startChangePos);\n }\n /**\n Unchanged tail symbols\n @readonly\n */\n\n }, {\n key: \"tail\",\n get: function get() {\n return this.value.substring(this.startChangePos + this.insertedCount);\n }\n /**\n Remove direction\n @readonly\n */\n\n }, {\n key: \"removeDirection\",\n get: function get() {\n if (!this.removedCount || this.insertedCount) return DIRECTION.NONE; // align right if delete at right\n\n return (this.oldSelection.end === this.cursorPos || this.oldSelection.start === this.cursorPos) && // if not range removed (event with backspace)\n this.oldSelection.end === this.oldSelection.start ? DIRECTION.RIGHT : DIRECTION.LEFT;\n }\n }]);\n\n return ActionDetails;\n}();\n\nexport { ActionDetails as default };\n","import { _ as _createClass, a as _classCallCheck } from '../_rollupPluginBabelHelpers-b054ecd2.js';\n\n/** Provides details of continuous extracted tail */\nvar ContinuousTailDetails = /*#__PURE__*/function () {\n /** Tail value as string */\n\n /** Tail start position */\n\n /** Start position */\n function ContinuousTailDetails() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var stop = arguments.length > 2 ? arguments[2] : undefined;\n\n _classCallCheck(this, ContinuousTailDetails);\n\n this.value = value;\n this.from = from;\n this.stop = stop;\n }\n\n _createClass(ContinuousTailDetails, [{\n key: \"toString\",\n value: function toString() {\n return this.value;\n }\n }, {\n key: \"extend\",\n value: function extend(tail) {\n this.value += String(tail);\n }\n }, {\n key: \"appendTo\",\n value: function appendTo(masked) {\n return masked.append(this.toString(), {\n tail: true\n }).aggregate(masked._appendPlaceholder());\n }\n }, {\n key: \"state\",\n get: function get() {\n return {\n value: this.value,\n from: this.from,\n stop: this.stop\n };\n },\n set: function set(state) {\n Object.assign(this, state);\n }\n }, {\n key: \"unshift\",\n value: function unshift(beforePos) {\n if (!this.value.length || beforePos != null && this.from >= beforePos) return '';\n var shiftChar = this.value[0];\n this.value = this.value.slice(1);\n return shiftChar;\n }\n }, {\n key: \"shift\",\n value: function shift() {\n if (!this.value.length) return '';\n var shiftChar = this.value[this.value.length - 1];\n this.value = this.value.slice(0, -1);\n return shiftChar;\n }\n }]);\n\n return ContinuousTailDetails;\n}();\n\nexport { ContinuousTailDetails as default };\n","/**\n * Applies mask on element.\n * @constructor\n * @param {HTMLInputElement|HTMLTextAreaElement|MaskElement} el - Element to apply mask\n * @param {Object} opts - Custom mask options\n * @return {InputMask}\n */\nfunction IMask(el) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n // currently available only for input-like elements\n return new IMask.InputMask(el, opts);\n}\n\nexport { IMask as default };\n","import { _ as _createClass, a as _classCallCheck, f as _slicedToArray } from '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport ChangeDetails from '../core/change-details.js';\nimport ContinuousTailDetails from '../core/continuous-tail-details.js';\nimport { isString, normalizePrepare, forceDirection, DIRECTION } from '../core/utils.js';\nimport IMask from '../core/holder.js';\n\n/** Supported mask type */\n\n/** Provides common masking stuff */\nvar Masked = /*#__PURE__*/function () {\n // $Shape<MaskedOptions>; TODO after fix https://github.com/facebook/flow/issues/4773\n\n /** @type {Mask} */\n\n /** */\n // $FlowFixMe no ideas\n\n /** Transforms value before mask processing */\n\n /** Validates if value is acceptable */\n\n /** Does additional processing in the end of editing */\n\n /** Format typed value to string */\n\n /** Parse strgin to get typed value */\n\n /** Enable characters overwriting */\n\n /** */\n\n /** */\n function Masked(opts) {\n _classCallCheck(this, Masked);\n\n this._value = '';\n\n this._update(Object.assign({}, Masked.DEFAULTS, opts));\n\n this.isInitialized = true;\n }\n /** Sets and applies new options */\n\n\n _createClass(Masked, [{\n key: \"updateOptions\",\n value: function updateOptions(opts) {\n if (!Object.keys(opts).length) return; // $FlowFixMe\n\n this.withValueRefresh(this._update.bind(this, opts));\n }\n /**\n Sets new options\n @protected\n */\n\n }, {\n key: \"_update\",\n value: function _update(opts) {\n Object.assign(this, opts);\n }\n /** Mask state */\n\n }, {\n key: \"state\",\n get: function get() {\n return {\n _value: this.value\n };\n },\n set: function set(state) {\n this._value = state._value;\n }\n /** Resets value */\n\n }, {\n key: \"reset\",\n value: function reset() {\n this._value = '';\n }\n /** */\n\n }, {\n key: \"value\",\n get: function get() {\n return this._value;\n },\n set: function set(value) {\n this.resolve(value);\n }\n /** Resolve new value */\n\n }, {\n key: \"resolve\",\n value: function resolve(value) {\n this.reset();\n this.append(value, {\n input: true\n }, '');\n this.doCommit();\n return this.value;\n }\n /** */\n\n }, {\n key: \"unmaskedValue\",\n get: function get() {\n return this.value;\n },\n set: function set(value) {\n this.reset();\n this.append(value, {}, '');\n this.doCommit();\n }\n /** */\n\n }, {\n key: \"typedValue\",\n get: function get() {\n return this.doParse(this.value);\n },\n set: function set(value) {\n this.value = this.doFormat(value);\n }\n /** Value that includes raw user input */\n\n }, {\n key: \"rawInputValue\",\n get: function get() {\n return this.extractInput(0, this.value.length, {\n raw: true\n });\n },\n set: function set(value) {\n this.reset();\n this.append(value, {\n raw: true\n }, '');\n this.doCommit();\n }\n /** */\n\n }, {\n key: \"isComplete\",\n get: function get() {\n return true;\n }\n /** */\n\n }, {\n key: \"isFilled\",\n get: function get() {\n return this.isComplete;\n }\n /** Finds nearest input position in direction */\n\n }, {\n key: \"nearestInputPos\",\n value: function nearestInputPos(cursorPos, direction) {\n return cursorPos;\n }\n /** Extracts value in range considering flags */\n\n }, {\n key: \"extractInput\",\n value: function extractInput() {\n var fromPos = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var toPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.value.length;\n return this.value.slice(fromPos, toPos);\n }\n /** Extracts tail in range */\n\n }, {\n key: \"extractTail\",\n value: function extractTail() {\n var fromPos = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var toPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.value.length;\n return new ContinuousTailDetails(this.extractInput(fromPos, toPos), fromPos);\n }\n /** Appends tail */\n // $FlowFixMe no ideas\n\n }, {\n key: \"appendTail\",\n value: function appendTail(tail) {\n if (isString(tail)) tail = new ContinuousTailDetails(String(tail));\n return tail.appendTo(this);\n }\n /** Appends char */\n\n }, {\n key: \"_appendCharRaw\",\n value: function _appendCharRaw(ch) {\n if (!ch) return new ChangeDetails();\n this._value += ch;\n return new ChangeDetails({\n inserted: ch,\n rawInserted: ch\n });\n }\n /** Appends char */\n\n }, {\n key: \"_appendChar\",\n value: function _appendChar(ch) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var checkTail = arguments.length > 2 ? arguments[2] : undefined;\n var consistentState = this.state;\n var details;\n\n var _normalizePrepare = normalizePrepare(this.doPrepare(ch, flags));\n\n var _normalizePrepare2 = _slicedToArray(_normalizePrepare, 2);\n\n ch = _normalizePrepare2[0];\n details = _normalizePrepare2[1];\n details = details.aggregate(this._appendCharRaw(ch, flags));\n\n if (details.inserted) {\n var consistentTail;\n var appended = this.doValidate(flags) !== false;\n\n if (appended && checkTail != null) {\n // validation ok, check tail\n var beforeTailState = this.state;\n\n if (this.overwrite === true) {\n consistentTail = checkTail.state;\n checkTail.unshift(this.value.length);\n }\n\n var tailDetails = this.appendTail(checkTail);\n appended = tailDetails.rawInserted === checkTail.toString(); // not ok, try shift\n\n if (!(appended && tailDetails.inserted) && this.overwrite === 'shift') {\n this.state = beforeTailState;\n consistentTail = checkTail.state;\n checkTail.shift();\n tailDetails = this.appendTail(checkTail);\n appended = tailDetails.rawInserted === checkTail.toString();\n } // if ok, rollback state after tail\n\n\n if (appended && tailDetails.inserted) this.state = beforeTailState;\n } // revert all if something went wrong\n\n\n if (!appended) {\n details = new ChangeDetails();\n this.state = consistentState;\n if (checkTail && consistentTail) checkTail.state = consistentTail;\n }\n }\n\n return details;\n }\n /** Appends optional placeholder at end */\n\n }, {\n key: \"_appendPlaceholder\",\n value: function _appendPlaceholder() {\n return new ChangeDetails();\n }\n /** Appends optional eager placeholder at end */\n\n }, {\n key: \"_appendEager\",\n value: function _appendEager() {\n return new ChangeDetails();\n }\n /** Appends symbols considering flags */\n // $FlowFixMe no ideas\n\n }, {\n key: \"append\",\n value: function append(str, flags, tail) {\n if (!isString(str)) throw new Error('value should be string');\n var details = new ChangeDetails();\n var checkTail = isString(tail) ? new ContinuousTailDetails(String(tail)) : tail;\n if (flags && flags.tail) flags._beforeTailState = this.state;\n\n for (var ci = 0; ci < str.length; ++ci) {\n details.aggregate(this._appendChar(str[ci], flags, checkTail));\n } // append tail but aggregate only tailShift\n\n\n if (checkTail != null) {\n details.tailShift += this.appendTail(checkTail).tailShift; // TODO it's a good idea to clear state after appending ends\n // but it causes bugs when one append calls another (when dynamic dispatch set rawInputValue)\n // this._resetBeforeTailState();\n }\n\n if (this.eager && flags !== null && flags !== void 0 && flags.input && str) {\n details.aggregate(this._appendEager());\n }\n\n return details;\n }\n /** */\n\n }, {\n key: \"remove\",\n value: function remove() {\n var fromPos = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var toPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.value.length;\n this._value = this.value.slice(0, fromPos) + this.value.slice(toPos);\n return new ChangeDetails();\n }\n /** Calls function and reapplies current value */\n\n }, {\n key: \"withValueRefresh\",\n value: function withValueRefresh(fn) {\n if (this._refreshing || !this.isInitialized) return fn();\n this._refreshing = true;\n var rawInput = this.rawInputValue;\n var value = this.value;\n var ret = fn();\n this.rawInputValue = rawInput; // append lost trailing chars at end\n\n if (this.value && this.value !== value && value.indexOf(this.value) === 0) {\n this.append(value.slice(this.value.length), {}, '');\n }\n\n delete this._refreshing;\n return ret;\n }\n /** */\n\n }, {\n key: \"runIsolated\",\n value: function runIsolated(fn) {\n if (this._isolated || !this.isInitialized) return fn(this);\n this._isolated = true;\n var state = this.state;\n var ret = fn(this);\n this.state = state;\n delete this._isolated;\n return ret;\n }\n /**\n Prepares string before mask processing\n @protected\n */\n\n }, {\n key: \"doPrepare\",\n value: function doPrepare(str) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return this.prepare ? this.prepare(str, this, flags) : str;\n }\n /**\n Validates if value is acceptable\n @protected\n */\n\n }, {\n key: \"doValidate\",\n value: function doValidate(flags) {\n return (!this.validate || this.validate(this.value, this, flags)) && (!this.parent || this.parent.doValidate(flags));\n }\n /**\n Does additional processing in the end of editing\n @protected\n */\n\n }, {\n key: \"doCommit\",\n value: function doCommit() {\n if (this.commit) this.commit(this.value, this);\n }\n /** */\n\n }, {\n key: \"doFormat\",\n value: function doFormat(value) {\n return this.format ? this.format(value, this) : value;\n }\n /** */\n\n }, {\n key: \"doParse\",\n value: function doParse(str) {\n return this.parse ? this.parse(str, this) : str;\n }\n /** */\n\n }, {\n key: \"splice\",\n value: function splice(start, deleteCount, inserted, removeDirection) {\n var tailPos = start + deleteCount;\n var tail = this.extractTail(tailPos);\n var oldRawValue;\n\n if (this.eager) {\n removeDirection = forceDirection(removeDirection);\n oldRawValue = this.extractInput(0, tailPos, {\n raw: true\n });\n }\n\n var startChangePos = this.nearestInputPos(start, deleteCount > 1 && start !== 0 && !this.eager ? DIRECTION.NONE : removeDirection);\n var details = new ChangeDetails({\n tailShift: startChangePos - start // adjust tailShift if start was aligned\n\n }).aggregate(this.remove(startChangePos));\n\n if (this.eager && removeDirection !== DIRECTION.NONE && oldRawValue === this.rawInputValue) {\n if (removeDirection === DIRECTION.FORCE_LEFT) {\n var valLength;\n\n while (oldRawValue === this.rawInputValue && (valLength = this.value.length)) {\n details.aggregate(new ChangeDetails({\n tailShift: -1\n })).aggregate(this.remove(valLength - 1));\n }\n } else if (removeDirection === DIRECTION.FORCE_RIGHT) {\n tail.unshift();\n }\n }\n\n return details.aggregate(this.append(inserted, {\n input: true\n }, tail));\n }\n }, {\n key: \"maskEquals\",\n value: function maskEquals(mask) {\n return this.mask === mask;\n }\n }]);\n\n return Masked;\n}();\nMasked.DEFAULTS = {\n format: function format(v) {\n return v;\n },\n parse: function parse(v) {\n return v;\n }\n};\nIMask.Masked = Masked;\n\nexport { Masked as default };\n","import { isString } from '../core/utils.js';\nimport IMask from '../core/holder.js';\nimport '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport '../core/change-details.js';\n\n/** Get Masked class by mask type */\n\nfunction maskedClass(mask) {\n if (mask == null) {\n throw new Error('mask property should be defined');\n } // $FlowFixMe\n\n\n if (mask instanceof RegExp) return IMask.MaskedRegExp; // $FlowFixMe\n\n if (isString(mask)) return IMask.MaskedPattern; // $FlowFixMe\n\n if (mask instanceof Date || mask === Date) return IMask.MaskedDate; // $FlowFixMe\n\n if (mask instanceof Number || typeof mask === 'number' || mask === Number) return IMask.MaskedNumber; // $FlowFixMe\n\n if (Array.isArray(mask) || mask === Array) return IMask.MaskedDynamic; // $FlowFixMe\n\n if (IMask.Masked && mask.prototype instanceof IMask.Masked) return mask; // $FlowFixMe\n\n if (mask instanceof IMask.Masked) return mask.constructor; // $FlowFixMe\n\n if (mask instanceof Function) return IMask.MaskedFunction;\n console.warn('Mask not found for mask', mask); // eslint-disable-line no-console\n // $FlowFixMe\n\n return IMask.Masked;\n}\n/** Creates new {@link Masked} depending on mask type */\n\nfunction createMask(opts) {\n // $FlowFixMe\n if (IMask.Masked && opts instanceof IMask.Masked) return opts;\n opts = Object.assign({}, opts);\n var mask = opts.mask; // $FlowFixMe\n\n if (IMask.Masked && mask instanceof IMask.Masked) return mask;\n var MaskedClass = maskedClass(mask);\n if (!MaskedClass) throw new Error('Masked class is not found for provided mask, appropriate module needs to be import manually before creating mask.');\n return new MaskedClass(opts);\n}\nIMask.createMask = createMask;\n\nexport { createMask as default, maskedClass };\n","import { _ as _createClass, a as _classCallCheck, b as _objectWithoutProperties } from '../../_rollupPluginBabelHelpers-b054ecd2.js';\nimport createMask from '../factory.js';\nimport ChangeDetails from '../../core/change-details.js';\nimport { DIRECTION } from '../../core/utils.js';\nimport '../../core/holder.js';\n\nvar _excluded = [\"mask\"];\nvar DEFAULT_INPUT_DEFINITIONS = {\n '0': /\\d/,\n 'a': /[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0527\\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\\u08A0\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\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\\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-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\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-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\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-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\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-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/,\n // http://stackoverflow.com/a/22075070\n '*': /./\n};\n/** */\n\nvar PatternInputDefinition = /*#__PURE__*/function () {\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n function PatternInputDefinition(opts) {\n _classCallCheck(this, PatternInputDefinition);\n\n var mask = opts.mask,\n blockOpts = _objectWithoutProperties(opts, _excluded);\n\n this.masked = createMask({\n mask: mask\n });\n Object.assign(this, blockOpts);\n }\n\n _createClass(PatternInputDefinition, [{\n key: \"reset\",\n value: function reset() {\n this.isFilled = false;\n this.masked.reset();\n }\n }, {\n key: \"remove\",\n value: function remove() {\n var fromPos = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var toPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.value.length;\n\n if (fromPos === 0 && toPos >= 1) {\n this.isFilled = false;\n return this.masked.remove(fromPos, toPos);\n }\n\n return new ChangeDetails();\n }\n }, {\n key: \"value\",\n get: function get() {\n return this.masked.value || (this.isFilled && !this.isOptional ? this.placeholderChar : '');\n }\n }, {\n key: \"unmaskedValue\",\n get: function get() {\n return this.masked.unmaskedValue;\n }\n }, {\n key: \"isComplete\",\n get: function get() {\n return Boolean(this.masked.value) || this.isOptional;\n }\n }, {\n key: \"_appendChar\",\n value: function _appendChar(ch) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (this.isFilled) return new ChangeDetails();\n var state = this.masked.state; // simulate input\n\n var details = this.masked._appendChar(ch, flags);\n\n if (details.inserted && this.doValidate(flags) === false) {\n details.inserted = details.rawInserted = '';\n this.masked.state = state;\n }\n\n if (!details.inserted && !this.isOptional && !this.lazy && !flags.input) {\n details.inserted = this.placeholderChar;\n }\n\n details.skip = !details.inserted && !this.isOptional;\n this.isFilled = Boolean(details.inserted);\n return details;\n }\n }, {\n key: \"append\",\n value: function append() {\n var _this$masked;\n\n // TODO probably should be done via _appendChar\n return (_this$masked = this.masked).append.apply(_this$masked, arguments);\n }\n }, {\n key: \"_appendPlaceholder\",\n value: function _appendPlaceholder() {\n var details = new ChangeDetails();\n if (this.isFilled || this.isOptional) return details;\n this.isFilled = true;\n details.inserted = this.placeholderChar;\n return details;\n }\n }, {\n key: \"_appendEager\",\n value: function _appendEager() {\n return new ChangeDetails();\n }\n }, {\n key: \"extractTail\",\n value: function extractTail() {\n var _this$masked2;\n\n return (_this$masked2 = this.masked).extractTail.apply(_this$masked2, arguments);\n }\n }, {\n key: \"appendTail\",\n value: function appendTail() {\n var _this$masked3;\n\n return (_this$masked3 = this.masked).appendTail.apply(_this$masked3, arguments);\n }\n }, {\n key: \"extractInput\",\n value: function extractInput() {\n var fromPos = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var toPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.value.length;\n var flags = arguments.length > 2 ? arguments[2] : undefined;\n return this.masked.extractInput(fromPos, toPos, flags);\n }\n }, {\n key: \"nearestInputPos\",\n value: function nearestInputPos(cursorPos) {\n var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DIRECTION.NONE;\n var minPos = 0;\n var maxPos = this.value.length;\n var boundPos = Math.min(Math.max(cursorPos, minPos), maxPos);\n\n switch (direction) {\n case DIRECTION.LEFT:\n case DIRECTION.FORCE_LEFT:\n return this.isComplete ? boundPos : minPos;\n\n case DIRECTION.RIGHT:\n case DIRECTION.FORCE_RIGHT:\n return this.isComplete ? boundPos : maxPos;\n\n case DIRECTION.NONE:\n default:\n return boundPos;\n }\n }\n }, {\n key: \"doValidate\",\n value: function doValidate() {\n var _this$masked4, _this$parent;\n\n return (_this$masked4 = this.masked).doValidate.apply(_this$masked4, arguments) && (!this.parent || (_this$parent = this.parent).doValidate.apply(_this$parent, arguments));\n }\n }, {\n key: \"doCommit\",\n value: function doCommit() {\n this.masked.doCommit();\n }\n }, {\n key: \"state\",\n get: function get() {\n return {\n masked: this.masked.state,\n isFilled: this.isFilled\n };\n },\n set: function set(state) {\n this.masked.state = state.masked;\n this.isFilled = state.isFilled;\n }\n }]);\n\n return PatternInputDefinition;\n}();\n\nexport { DEFAULT_INPUT_DEFINITIONS, PatternInputDefinition as default };\n","import { _ as _createClass, a as _classCallCheck } from '../../_rollupPluginBabelHelpers-b054ecd2.js';\nimport ChangeDetails from '../../core/change-details.js';\nimport { DIRECTION, isString } from '../../core/utils.js';\nimport ContinuousTailDetails from '../../core/continuous-tail-details.js';\n\nvar PatternFixedDefinition = /*#__PURE__*/function () {\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n function PatternFixedDefinition(opts) {\n _classCallCheck(this, PatternFixedDefinition);\n\n Object.assign(this, opts);\n this._value = '';\n this.isFixed = true;\n }\n\n _createClass(PatternFixedDefinition, [{\n key: \"value\",\n get: function get() {\n return this._value;\n }\n }, {\n key: \"unmaskedValue\",\n get: function get() {\n return this.isUnmasking ? this.value : '';\n }\n }, {\n key: \"reset\",\n value: function reset() {\n this._isRawInput = false;\n this._value = '';\n }\n }, {\n key: \"remove\",\n value: function remove() {\n var fromPos = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var toPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._value.length;\n this._value = this._value.slice(0, fromPos) + this._value.slice(toPos);\n if (!this._value) this._isRawInput = false;\n return new ChangeDetails();\n }\n }, {\n key: \"nearestInputPos\",\n value: function nearestInputPos(cursorPos) {\n var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DIRECTION.NONE;\n var minPos = 0;\n var maxPos = this._value.length;\n\n switch (direction) {\n case DIRECTION.LEFT:\n case DIRECTION.FORCE_LEFT:\n return minPos;\n\n case DIRECTION.NONE:\n case DIRECTION.RIGHT:\n case DIRECTION.FORCE_RIGHT:\n default:\n return maxPos;\n }\n }\n }, {\n key: \"extractInput\",\n value: function extractInput() {\n var fromPos = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var toPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._value.length;\n var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return flags.raw && this._isRawInput && this._value.slice(fromPos, toPos) || '';\n }\n }, {\n key: \"isComplete\",\n get: function get() {\n return true;\n }\n }, {\n key: \"isFilled\",\n get: function get() {\n return Boolean(this._value);\n }\n }, {\n key: \"_appendChar\",\n value: function _appendChar(ch) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var details = new ChangeDetails();\n if (this._value) return details;\n var appended = this.char === ch;\n var isResolved = appended && (this.isUnmasking || flags.input || flags.raw) && !this.eager && !flags.tail;\n if (isResolved) details.rawInserted = this.char;\n this._value = details.inserted = this.char;\n this._isRawInput = isResolved && (flags.raw || flags.input);\n return details;\n }\n }, {\n key: \"_appendEager\",\n value: function _appendEager() {\n return this._appendChar(this.char);\n }\n }, {\n key: \"_appendPlaceholder\",\n value: function _appendPlaceholder() {\n var details = new ChangeDetails();\n if (this._value) return details;\n this._value = details.inserted = this.char;\n return details;\n }\n }, {\n key: \"extractTail\",\n value: function extractTail() {\n arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.value.length;\n return new ContinuousTailDetails('');\n } // $FlowFixMe no ideas\n\n }, {\n key: \"appendTail\",\n value: function appendTail(tail) {\n if (isString(tail)) tail = new ContinuousTailDetails(String(tail));\n return tail.appendTo(this);\n }\n }, {\n key: \"append\",\n value: function append(str, flags, tail) {\n var details = this._appendChar(str[0], flags);\n\n if (tail != null) {\n details.tailShift += this.appendTail(tail).tailShift;\n }\n\n return details;\n }\n }, {\n key: \"doCommit\",\n value: function doCommit() {}\n }, {\n key: \"state\",\n get: function get() {\n return {\n _value: this._value,\n _isRawInput: this._isRawInput\n };\n },\n set: function set(state) {\n Object.assign(this, state);\n }\n }]);\n\n return PatternFixedDefinition;\n}();\n\nexport { PatternFixedDefinition as default };\n","import { _ as _createClass, a as _classCallCheck, b as _objectWithoutProperties } from '../../_rollupPluginBabelHelpers-b054ecd2.js';\nimport ChangeDetails from '../../core/change-details.js';\nimport { isString } from '../../core/utils.js';\nimport ContinuousTailDetails from '../../core/continuous-tail-details.js';\nimport IMask from '../../core/holder.js';\n\nvar _excluded = [\"chunks\"];\n\nvar ChunksTailDetails = /*#__PURE__*/function () {\n /** */\n function ChunksTailDetails() {\n var chunks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n _classCallCheck(this, ChunksTailDetails);\n\n this.chunks = chunks;\n this.from = from;\n }\n\n _createClass(ChunksTailDetails, [{\n key: \"toString\",\n value: function toString() {\n return this.chunks.map(String).join('');\n } // $FlowFixMe no ideas\n\n }, {\n key: \"extend\",\n value: function extend(tailChunk) {\n if (!String(tailChunk)) return;\n if (isString(tailChunk)) tailChunk = new ContinuousTailDetails(String(tailChunk));\n var lastChunk = this.chunks[this.chunks.length - 1];\n var extendLast = lastChunk && ( // if stops are same or tail has no stop\n lastChunk.stop === tailChunk.stop || tailChunk.stop == null) && // if tail chunk goes just after last chunk\n tailChunk.from === lastChunk.from + lastChunk.toString().length;\n\n if (tailChunk instanceof ContinuousTailDetails) {\n // check the ability to extend previous chunk\n if (extendLast) {\n // extend previous chunk\n lastChunk.extend(tailChunk.toString());\n } else {\n // append new chunk\n this.chunks.push(tailChunk);\n }\n } else if (tailChunk instanceof ChunksTailDetails) {\n if (tailChunk.stop == null) {\n // unwrap floating chunks to parent, keeping `from` pos\n var firstTailChunk;\n\n while (tailChunk.chunks.length && tailChunk.chunks[0].stop == null) {\n firstTailChunk = tailChunk.chunks.shift();\n firstTailChunk.from += tailChunk.from;\n this.extend(firstTailChunk);\n }\n } // if tail chunk still has value\n\n\n if (tailChunk.toString()) {\n // if chunks contains stops, then popup stop to container\n tailChunk.stop = tailChunk.blockIndex;\n this.chunks.push(tailChunk);\n }\n }\n }\n }, {\n key: \"appendTo\",\n value: function appendTo(masked) {\n // $FlowFixMe\n if (!(masked instanceof IMask.MaskedPattern)) {\n var tail = new ContinuousTailDetails(this.toString());\n return tail.appendTo(masked);\n }\n\n var details = new ChangeDetails();\n\n for (var ci = 0; ci < this.chunks.length && !details.skip; ++ci) {\n var chunk = this.chunks[ci];\n\n var lastBlockIter = masked._mapPosToBlock(masked.value.length);\n\n var stop = chunk.stop;\n var chunkBlock = void 0;\n\n if (stop != null && ( // if block not found or stop is behind lastBlock\n !lastBlockIter || lastBlockIter.index <= stop)) {\n if (chunk instanceof ChunksTailDetails || // for continuous block also check if stop is exist\n masked._stops.indexOf(stop) >= 0) {\n details.aggregate(masked._appendPlaceholder(stop));\n }\n\n chunkBlock = chunk instanceof ChunksTailDetails && masked._blocks[stop];\n }\n\n if (chunkBlock) {\n var tailDetails = chunkBlock.appendTail(chunk);\n tailDetails.skip = false; // always ignore skip, it will be set on last\n\n details.aggregate(tailDetails);\n masked._value += tailDetails.inserted; // get not inserted chars\n\n var remainChars = chunk.toString().slice(tailDetails.rawInserted.length);\n if (remainChars) details.aggregate(masked.append(remainChars, {\n tail: true\n }));\n } else {\n details.aggregate(masked.append(chunk.toString(), {\n tail: true\n }));\n }\n }\n return details;\n }\n }, {\n key: \"state\",\n get: function get() {\n return {\n chunks: this.chunks.map(function (c) {\n return c.state;\n }),\n from: this.from,\n stop: this.stop,\n blockIndex: this.blockIndex\n };\n },\n set: function set(state) {\n var chunks = state.chunks,\n props = _objectWithoutProperties(state, _excluded);\n\n Object.assign(this, props);\n this.chunks = chunks.map(function (cstate) {\n var chunk = \"chunks\" in cstate ? new ChunksTailDetails() : new ContinuousTailDetails(); // $FlowFixMe already checked above\n\n chunk.state = cstate;\n return chunk;\n });\n }\n }, {\n key: \"unshift\",\n value: function unshift(beforePos) {\n if (!this.chunks.length || beforePos != null && this.from >= beforePos) return '';\n var chunkShiftPos = beforePos != null ? beforePos - this.from : beforePos;\n var ci = 0;\n\n while (ci < this.chunks.length) {\n var chunk = this.chunks[ci];\n var shiftChar = chunk.unshift(chunkShiftPos);\n\n if (chunk.toString()) {\n // chunk still contains value\n // but not shifted - means no more available chars to shift\n if (!shiftChar) break;\n ++ci;\n } else {\n // clean if chunk has no value\n this.chunks.splice(ci, 1);\n }\n\n if (shiftChar) return shiftChar;\n }\n\n return '';\n }\n }, {\n key: \"shift\",\n value: function shift() {\n if (!this.chunks.length) return '';\n var ci = this.chunks.length - 1;\n\n while (0 <= ci) {\n var chunk = this.chunks[ci];\n var shiftChar = chunk.shift();\n\n if (chunk.toString()) {\n // chunk still contains value\n // but not shifted - means no more available chars to shift\n if (!shiftChar) break;\n --ci;\n } else {\n // clean if chunk has no value\n this.chunks.splice(ci, 1);\n }\n\n if (shiftChar) return shiftChar;\n }\n\n return '';\n }\n }]);\n\n return ChunksTailDetails;\n}();\n\nexport { ChunksTailDetails as default };\n","import { _ as _createClass, a as _classCallCheck } from '../../_rollupPluginBabelHelpers-b054ecd2.js';\nimport { DIRECTION } from '../../core/utils.js';\nimport '../../core/change-details.js';\n\nvar PatternCursor = /*#__PURE__*/function () {\n function PatternCursor(masked, pos) {\n _classCallCheck(this, PatternCursor);\n\n this.masked = masked;\n this._log = [];\n\n var _ref = masked._mapPosToBlock(pos) || (pos < 0 ? // first\n {\n index: 0,\n offset: 0\n } : // last\n {\n index: this.masked._blocks.length,\n offset: 0\n }),\n offset = _ref.offset,\n index = _ref.index;\n\n this.offset = offset;\n this.index = index;\n this.ok = false;\n }\n\n _createClass(PatternCursor, [{\n key: \"block\",\n get: function get() {\n return this.masked._blocks[this.index];\n }\n }, {\n key: \"pos\",\n get: function get() {\n return this.masked._blockStartPos(this.index) + this.offset;\n }\n }, {\n key: \"state\",\n get: function get() {\n return {\n index: this.index,\n offset: this.offset,\n ok: this.ok\n };\n },\n set: function set(s) {\n Object.assign(this, s);\n }\n }, {\n key: \"pushState\",\n value: function pushState() {\n this._log.push(this.state);\n }\n }, {\n key: \"popState\",\n value: function popState() {\n var s = this._log.pop();\n\n this.state = s;\n return s;\n }\n }, {\n key: \"bindBlock\",\n value: function bindBlock() {\n if (this.block) return;\n\n if (this.index < 0) {\n this.index = 0;\n this.offset = 0;\n }\n\n if (this.index >= this.masked._blocks.length) {\n this.index = this.masked._blocks.length - 1;\n this.offset = this.block.value.length;\n }\n }\n }, {\n key: \"_pushLeft\",\n value: function _pushLeft(fn) {\n this.pushState();\n\n for (this.bindBlock(); 0 <= this.index; --this.index, this.offset = ((_this$block = this.block) === null || _this$block === void 0 ? void 0 : _this$block.value.length) || 0) {\n var _this$block;\n\n if (fn()) return this.ok = true;\n }\n\n return this.ok = false;\n }\n }, {\n key: \"_pushRight\",\n value: function _pushRight(fn) {\n this.pushState();\n\n for (this.bindBlock(); this.index < this.masked._blocks.length; ++this.index, this.offset = 0) {\n if (fn()) return this.ok = true;\n }\n\n return this.ok = false;\n }\n }, {\n key: \"pushLeftBeforeFilled\",\n value: function pushLeftBeforeFilled() {\n var _this = this;\n\n return this._pushLeft(function () {\n if (_this.block.isFixed || !_this.block.value) return;\n _this.offset = _this.block.nearestInputPos(_this.offset, DIRECTION.FORCE_LEFT);\n if (_this.offset !== 0) return true;\n });\n }\n }, {\n key: \"pushLeftBeforeInput\",\n value: function pushLeftBeforeInput() {\n var _this2 = this;\n\n // cases:\n // filled input: 00|\n // optional empty input: 00[]|\n // nested block: XX<[]>|\n return this._pushLeft(function () {\n if (_this2.block.isFixed) return;\n _this2.offset = _this2.block.nearestInputPos(_this2.offset, DIRECTION.LEFT);\n return true;\n });\n }\n }, {\n key: \"pushLeftBeforeRequired\",\n value: function pushLeftBeforeRequired() {\n var _this3 = this;\n\n return this._pushLeft(function () {\n if (_this3.block.isFixed || _this3.block.isOptional && !_this3.block.value) return;\n _this3.offset = _this3.block.nearestInputPos(_this3.offset, DIRECTION.LEFT);\n return true;\n });\n }\n }, {\n key: \"pushRightBeforeFilled\",\n value: function pushRightBeforeFilled() {\n var _this4 = this;\n\n return this._pushRight(function () {\n if (_this4.block.isFixed || !_this4.block.value) return;\n _this4.offset = _this4.block.nearestInputPos(_this4.offset, DIRECTION.FORCE_RIGHT);\n if (_this4.offset !== _this4.block.value.length) return true;\n });\n }\n }, {\n key: \"pushRightBeforeInput\",\n value: function pushRightBeforeInput() {\n var _this5 = this;\n\n return this._pushRight(function () {\n if (_this5.block.isFixed) return; // const o = this.offset;\n\n _this5.offset = _this5.block.nearestInputPos(_this5.offset, DIRECTION.NONE); // HACK cases like (STILL DOES NOT WORK FOR NESTED)\n // aa|X\n // aa<X|[]>X_ - this will not work\n // if (o && o === this.offset && this.block instanceof PatternInputDefinition) continue;\n\n return true;\n });\n }\n }, {\n key: \"pushRightBeforeRequired\",\n value: function pushRightBeforeRequired() {\n var _this6 = this;\n\n return this._pushRight(function () {\n if (_this6.block.isFixed || _this6.block.isOptional && !_this6.block.value) return; // TODO check |[*]XX_\n\n _this6.offset = _this6.block.nearestInputPos(_this6.offset, DIRECTION.NONE);\n return true;\n });\n }\n }]);\n\n return PatternCursor;\n}();\n\nexport { PatternCursor as default };\n","import { d as _inherits, e as _createSuper, _ as _createClass, a as _classCallCheck, g as _get, h as _getPrototypeOf } from '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport Masked from './base.js';\nimport IMask from '../core/holder.js';\nimport '../core/change-details.js';\nimport '../core/continuous-tail-details.js';\nimport '../core/utils.js';\n\n/** Masking by RegExp */\n\nvar MaskedRegExp = /*#__PURE__*/function (_Masked) {\n _inherits(MaskedRegExp, _Masked);\n\n var _super = _createSuper(MaskedRegExp);\n\n function MaskedRegExp() {\n _classCallCheck(this, MaskedRegExp);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(MaskedRegExp, [{\n key: \"_update\",\n value:\n /**\n @override\n @param {Object} opts\n */\n function _update(opts) {\n if (opts.mask) opts.validate = function (value) {\n return value.search(opts.mask) >= 0;\n };\n\n _get(_getPrototypeOf(MaskedRegExp.prototype), \"_update\", this).call(this, opts);\n }\n }]);\n\n return MaskedRegExp;\n}(Masked);\nIMask.MaskedRegExp = MaskedRegExp;\n\nexport { MaskedRegExp as default };\n","import { d as _inherits, e as _createSuper, a as _classCallCheck, _ as _createClass, g as _get, h as _getPrototypeOf, b as _objectWithoutProperties, i as _set } from '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport { DIRECTION } from '../core/utils.js';\nimport ChangeDetails from '../core/change-details.js';\nimport Masked from './base.js';\nimport PatternInputDefinition, { DEFAULT_INPUT_DEFINITIONS } from './pattern/input-definition.js';\nimport PatternFixedDefinition from './pattern/fixed-definition.js';\nimport ChunksTailDetails from './pattern/chunk-tail-details.js';\nimport PatternCursor from './pattern/cursor.js';\nimport createMask from './factory.js';\nimport IMask from '../core/holder.js';\nimport './regexp.js';\nimport '../core/continuous-tail-details.js';\n\nvar _excluded = [\"_blocks\"];\n\n/**\n Pattern mask\n @param {Object} opts\n @param {Object} opts.blocks\n @param {Object} opts.definitions\n @param {string} opts.placeholderChar\n @param {boolean} opts.lazy\n*/\nvar MaskedPattern = /*#__PURE__*/function (_Masked) {\n _inherits(MaskedPattern, _Masked);\n\n var _super = _createSuper(MaskedPattern);\n\n /** */\n\n /** */\n\n /** Single char for empty input */\n\n /** Show placeholder only when needed */\n function MaskedPattern() {\n var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, MaskedPattern);\n\n // TODO type $Shape<MaskedPatternOptions>={} does not work\n opts.definitions = Object.assign({}, DEFAULT_INPUT_DEFINITIONS, opts.definitions);\n return _super.call(this, Object.assign({}, MaskedPattern.DEFAULTS, opts));\n }\n /**\n @override\n @param {Object} opts\n */\n\n\n _createClass(MaskedPattern, [{\n key: \"_update\",\n value: function _update() {\n var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n opts.definitions = Object.assign({}, this.definitions, opts.definitions);\n\n _get(_getPrototypeOf(MaskedPattern.prototype), \"_update\", this).call(this, opts);\n\n this._rebuildMask();\n }\n /** */\n\n }, {\n key: \"_rebuildMask\",\n value: function _rebuildMask() {\n var _this = this;\n\n var defs = this.definitions;\n this._blocks = [];\n this._stops = [];\n this._maskedBlocks = {};\n var pattern = this.mask;\n if (!pattern || !defs) return;\n var unmaskingBlock = false;\n var optionalBlock = false;\n\n for (var i = 0; i < pattern.length; ++i) {\n if (this.blocks) {\n var _ret = function () {\n var p = pattern.slice(i);\n var bNames = Object.keys(_this.blocks).filter(function (bName) {\n return p.indexOf(bName) === 0;\n }); // order by key length\n\n bNames.sort(function (a, b) {\n return b.length - a.length;\n }); // use block name with max length\n\n var bName = bNames[0];\n\n if (bName) {\n // $FlowFixMe no ideas\n var maskedBlock = createMask(Object.assign({\n parent: _this,\n lazy: _this.lazy,\n eager: _this.eager,\n placeholderChar: _this.placeholderChar,\n overwrite: _this.overwrite\n }, _this.blocks[bName]));\n\n if (maskedBlock) {\n _this._blocks.push(maskedBlock); // store block index\n\n\n if (!_this._maskedBlocks[bName]) _this._maskedBlocks[bName] = [];\n\n _this._maskedBlocks[bName].push(_this._blocks.length - 1);\n }\n\n i += bName.length - 1;\n return \"continue\";\n }\n }();\n\n if (_ret === \"continue\") continue;\n }\n\n var char = pattern[i];\n var isInput = (char in defs);\n\n if (char === MaskedPattern.STOP_CHAR) {\n this._stops.push(this._blocks.length);\n\n continue;\n }\n\n if (char === '{' || char === '}') {\n unmaskingBlock = !unmaskingBlock;\n continue;\n }\n\n if (char === '[' || char === ']') {\n optionalBlock = !optionalBlock;\n continue;\n }\n\n if (char === MaskedPattern.ESCAPE_CHAR) {\n ++i;\n char = pattern[i];\n if (!char) break;\n isInput = false;\n }\n\n var def = isInput ? new PatternInputDefinition({\n parent: this,\n lazy: this.lazy,\n eager: this.eager,\n placeholderChar: this.placeholderChar,\n mask: defs[char],\n isOptional: optionalBlock\n }) : new PatternFixedDefinition({\n char: char,\n eager: this.eager,\n isUnmasking: unmaskingBlock\n });\n\n this._blocks.push(def);\n }\n }\n /**\n @override\n */\n\n }, {\n key: \"state\",\n get: function get() {\n return Object.assign({}, _get(_getPrototypeOf(MaskedPattern.prototype), \"state\", this), {\n _blocks: this._blocks.map(function (b) {\n return b.state;\n })\n });\n },\n set: function set(state) {\n var _blocks = state._blocks,\n maskedState = _objectWithoutProperties(state, _excluded);\n\n this._blocks.forEach(function (b, bi) {\n return b.state = _blocks[bi];\n });\n\n _set(_getPrototypeOf(MaskedPattern.prototype), \"state\", maskedState, this, true);\n }\n /**\n @override\n */\n\n }, {\n key: \"reset\",\n value: function reset() {\n _get(_getPrototypeOf(MaskedPattern.prototype), \"reset\", this).call(this);\n\n this._blocks.forEach(function (b) {\n return b.reset();\n });\n }\n /**\n @override\n */\n\n }, {\n key: \"isComplete\",\n get: function get() {\n return this._blocks.every(function (b) {\n return b.isComplete;\n });\n }\n /**\n @override\n */\n\n }, {\n key: \"isFilled\",\n get: function get() {\n return this._blocks.every(function (b) {\n return b.isFilled;\n });\n }\n }, {\n key: \"isFixed\",\n get: function get() {\n return this._blocks.every(function (b) {\n return b.isFixed;\n });\n }\n }, {\n key: \"isOptional\",\n get: function get() {\n return this._blocks.every(function (b) {\n return b.isOptional;\n });\n }\n /**\n @override\n */\n\n }, {\n key: \"doCommit\",\n value: function doCommit() {\n this._blocks.forEach(function (b) {\n return b.doCommit();\n });\n\n _get(_getPrototypeOf(MaskedPattern.prototype), \"doCommit\", this).call(this);\n }\n /**\n @override\n */\n\n }, {\n key: \"unmaskedValue\",\n get: function get() {\n return this._blocks.reduce(function (str, b) {\n return str += b.unmaskedValue;\n }, '');\n },\n set: function set(unmaskedValue) {\n _set(_getPrototypeOf(MaskedPattern.prototype), \"unmaskedValue\", unmaskedValue, this, true);\n }\n /**\n @override\n */\n\n }, {\n key: \"value\",\n get: function get() {\n // TODO return _value when not in change?\n return this._blocks.reduce(function (str, b) {\n return str += b.value;\n }, '');\n },\n set: function set(value) {\n _set(_getPrototypeOf(MaskedPattern.prototype), \"value\", value, this, true);\n }\n /**\n @override\n */\n\n }, {\n key: \"appendTail\",\n value: function appendTail(tail) {\n return _get(_getPrototypeOf(MaskedPattern.prototype), \"appendTail\", this).call(this, tail).aggregate(this._appendPlaceholder());\n }\n /**\n @override\n */\n\n }, {\n key: \"_appendEager\",\n value: function _appendEager() {\n var _this$_mapPosToBlock;\n\n var details = new ChangeDetails();\n var startBlockIndex = (_this$_mapPosToBlock = this._mapPosToBlock(this.value.length)) === null || _this$_mapPosToBlock === void 0 ? void 0 : _this$_mapPosToBlock.index;\n if (startBlockIndex == null) return details; // TODO test if it works for nested pattern masks\n\n if (this._blocks[startBlockIndex].isFilled) ++startBlockIndex;\n\n for (var bi = startBlockIndex; bi < this._blocks.length; ++bi) {\n var d = this._blocks[bi]._appendEager();\n\n if (!d.inserted) break;\n details.aggregate(d);\n }\n\n return details;\n }\n /**\n @override\n */\n\n }, {\n key: \"_appendCharRaw\",\n value: function _appendCharRaw(ch) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var blockIter = this._mapPosToBlock(this.value.length);\n\n var details = new ChangeDetails();\n if (!blockIter) return details;\n\n for (var bi = blockIter.index;; ++bi) {\n var _flags$_beforeTailSta;\n\n var _block = this._blocks[bi];\n if (!_block) break;\n\n var blockDetails = _block._appendChar(ch, Object.assign({}, flags, {\n _beforeTailState: (_flags$_beforeTailSta = flags._beforeTailState) === null || _flags$_beforeTailSta === void 0 ? void 0 : _flags$_beforeTailSta._blocks[bi]\n }));\n\n var skip = blockDetails.skip;\n details.aggregate(blockDetails);\n if (skip || blockDetails.rawInserted) break; // go next char\n }\n\n return details;\n }\n /**\n @override\n */\n\n }, {\n key: \"extractTail\",\n value: function extractTail() {\n var _this2 = this;\n\n var fromPos = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var toPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.value.length;\n var chunkTail = new ChunksTailDetails();\n if (fromPos === toPos) return chunkTail;\n\n this._forEachBlocksInRange(fromPos, toPos, function (b, bi, bFromPos, bToPos) {\n var blockChunk = b.extractTail(bFromPos, bToPos);\n blockChunk.stop = _this2._findStopBefore(bi);\n blockChunk.from = _this2._blockStartPos(bi);\n if (blockChunk instanceof ChunksTailDetails) blockChunk.blockIndex = bi;\n chunkTail.extend(blockChunk);\n });\n\n return chunkTail;\n }\n /**\n @override\n */\n\n }, {\n key: \"extractInput\",\n value: function extractInput() {\n var fromPos = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var toPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.value.length;\n var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (fromPos === toPos) return '';\n var input = '';\n\n this._forEachBlocksInRange(fromPos, toPos, function (b, _, fromPos, toPos) {\n input += b.extractInput(fromPos, toPos, flags);\n });\n\n return input;\n }\n }, {\n key: \"_findStopBefore\",\n value: function _findStopBefore(blockIndex) {\n var stopBefore;\n\n for (var si = 0; si < this._stops.length; ++si) {\n var stop = this._stops[si];\n if (stop <= blockIndex) stopBefore = stop;else break;\n }\n\n return stopBefore;\n }\n /** Appends placeholder depending on laziness */\n\n }, {\n key: \"_appendPlaceholder\",\n value: function _appendPlaceholder(toBlockIndex) {\n var _this3 = this;\n\n var details = new ChangeDetails();\n if (this.lazy && toBlockIndex == null) return details;\n\n var startBlockIter = this._mapPosToBlock(this.value.length);\n\n if (!startBlockIter) return details;\n var startBlockIndex = startBlockIter.index;\n var endBlockIndex = toBlockIndex != null ? toBlockIndex : this._blocks.length;\n\n this._blocks.slice(startBlockIndex, endBlockIndex).forEach(function (b) {\n if (!b.lazy || toBlockIndex != null) {\n // $FlowFixMe `_blocks` may not be present\n var args = b._blocks != null ? [b._blocks.length] : [];\n\n var bDetails = b._appendPlaceholder.apply(b, args);\n\n _this3._value += bDetails.inserted;\n details.aggregate(bDetails);\n }\n });\n\n return details;\n }\n /** Finds block in pos */\n\n }, {\n key: \"_mapPosToBlock\",\n value: function _mapPosToBlock(pos) {\n var accVal = '';\n\n for (var bi = 0; bi < this._blocks.length; ++bi) {\n var _block2 = this._blocks[bi];\n var blockStartPos = accVal.length;\n accVal += _block2.value;\n\n if (pos <= accVal.length) {\n return {\n index: bi,\n offset: pos - blockStartPos\n };\n }\n }\n }\n /** */\n\n }, {\n key: \"_blockStartPos\",\n value: function _blockStartPos(blockIndex) {\n return this._blocks.slice(0, blockIndex).reduce(function (pos, b) {\n return pos += b.value.length;\n }, 0);\n }\n /** */\n\n }, {\n key: \"_forEachBlocksInRange\",\n value: function _forEachBlocksInRange(fromPos) {\n var toPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.value.length;\n var fn = arguments.length > 2 ? arguments[2] : undefined;\n\n var fromBlockIter = this._mapPosToBlock(fromPos);\n\n if (fromBlockIter) {\n var toBlockIter = this._mapPosToBlock(toPos); // process first block\n\n\n var isSameBlock = toBlockIter && fromBlockIter.index === toBlockIter.index;\n var fromBlockStartPos = fromBlockIter.offset;\n var fromBlockEndPos = toBlockIter && isSameBlock ? toBlockIter.offset : this._blocks[fromBlockIter.index].value.length;\n fn(this._blocks[fromBlockIter.index], fromBlockIter.index, fromBlockStartPos, fromBlockEndPos);\n\n if (toBlockIter && !isSameBlock) {\n // process intermediate blocks\n for (var bi = fromBlockIter.index + 1; bi < toBlockIter.index; ++bi) {\n fn(this._blocks[bi], bi, 0, this._blocks[bi].value.length);\n } // process last block\n\n\n fn(this._blocks[toBlockIter.index], toBlockIter.index, 0, toBlockIter.offset);\n }\n }\n }\n /**\n @override\n */\n\n }, {\n key: \"remove\",\n value: function remove() {\n var fromPos = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var toPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.value.length;\n\n var removeDetails = _get(_getPrototypeOf(MaskedPattern.prototype), \"remove\", this).call(this, fromPos, toPos);\n\n this._forEachBlocksInRange(fromPos, toPos, function (b, _, bFromPos, bToPos) {\n removeDetails.aggregate(b.remove(bFromPos, bToPos));\n });\n\n return removeDetails;\n }\n /**\n @override\n */\n\n }, {\n key: \"nearestInputPos\",\n value: function nearestInputPos(cursorPos) {\n var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DIRECTION.NONE;\n if (!this._blocks.length) return 0;\n var cursor = new PatternCursor(this, cursorPos);\n\n if (direction === DIRECTION.NONE) {\n // -------------------------------------------------\n // NONE should only go out from fixed to the right!\n // -------------------------------------------------\n if (cursor.pushRightBeforeInput()) return cursor.pos;\n cursor.popState();\n if (cursor.pushLeftBeforeInput()) return cursor.pos;\n return this.value.length;\n } // FORCE is only about a|* otherwise is 0\n\n\n if (direction === DIRECTION.LEFT || direction === DIRECTION.FORCE_LEFT) {\n // try to break fast when *|a\n if (direction === DIRECTION.LEFT) {\n cursor.pushRightBeforeFilled();\n if (cursor.ok && cursor.pos === cursorPos) return cursorPos;\n cursor.popState();\n } // forward flow\n\n\n cursor.pushLeftBeforeInput();\n cursor.pushLeftBeforeRequired();\n cursor.pushLeftBeforeFilled(); // backward flow\n\n if (direction === DIRECTION.LEFT) {\n cursor.pushRightBeforeInput();\n cursor.pushRightBeforeRequired();\n if (cursor.ok && cursor.pos <= cursorPos) return cursor.pos;\n cursor.popState();\n if (cursor.ok && cursor.pos <= cursorPos) return cursor.pos;\n cursor.popState();\n }\n\n if (cursor.ok) return cursor.pos;\n if (direction === DIRECTION.FORCE_LEFT) return 0;\n cursor.popState();\n if (cursor.ok) return cursor.pos;\n cursor.popState();\n if (cursor.ok) return cursor.pos; // cursor.popState();\n // if (\n // cursor.pushRightBeforeInput() &&\n // // TODO HACK for lazy if has aligned left inside fixed and has came to the start - use start position\n // (!this.lazy || this.extractInput())\n // ) return cursor.pos;\n\n return 0;\n }\n\n if (direction === DIRECTION.RIGHT || direction === DIRECTION.FORCE_RIGHT) {\n // forward flow\n cursor.pushRightBeforeInput();\n cursor.pushRightBeforeRequired();\n if (cursor.pushRightBeforeFilled()) return cursor.pos;\n if (direction === DIRECTION.FORCE_RIGHT) return this.value.length; // backward flow\n\n cursor.popState();\n if (cursor.ok) return cursor.pos;\n cursor.popState();\n if (cursor.ok) return cursor.pos;\n return this.nearestInputPos(cursorPos, DIRECTION.LEFT);\n }\n\n return cursorPos;\n }\n /** Get block by name */\n\n }, {\n key: \"maskedBlock\",\n value: function maskedBlock(name) {\n return this.maskedBlocks(name)[0];\n }\n /** Get all blocks by name */\n\n }, {\n key: \"maskedBlocks\",\n value: function maskedBlocks(name) {\n var _this4 = this;\n\n var indices = this._maskedBlocks[name];\n if (!indices) return [];\n return indices.map(function (gi) {\n return _this4._blocks[gi];\n });\n }\n }]);\n\n return MaskedPattern;\n}(Masked);\nMaskedPattern.DEFAULTS = {\n lazy: true,\n placeholderChar: '_'\n};\nMaskedPattern.STOP_CHAR = '`';\nMaskedPattern.ESCAPE_CHAR = '\\\\';\nMaskedPattern.InputDefinition = PatternInputDefinition;\nMaskedPattern.FixedDefinition = PatternFixedDefinition;\nIMask.MaskedPattern = MaskedPattern;\n\nexport { MaskedPattern as default };\n","import { d as _inherits, e as _createSuper, a as _classCallCheck, _ as _createClass, g as _get, h as _getPrototypeOf, f as _slicedToArray } from '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport MaskedPattern from './pattern.js';\nimport { normalizePrepare } from '../core/utils.js';\nimport IMask from '../core/holder.js';\nimport '../core/change-details.js';\nimport './base.js';\nimport '../core/continuous-tail-details.js';\nimport './pattern/input-definition.js';\nimport './factory.js';\nimport './pattern/fixed-definition.js';\nimport './pattern/chunk-tail-details.js';\nimport './pattern/cursor.js';\nimport './regexp.js';\n\n/** Pattern which accepts ranges */\n\nvar MaskedRange = /*#__PURE__*/function (_MaskedPattern) {\n _inherits(MaskedRange, _MaskedPattern);\n\n var _super = _createSuper(MaskedRange);\n\n function MaskedRange() {\n _classCallCheck(this, MaskedRange);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(MaskedRange, [{\n key: \"_matchFrom\",\n get:\n /**\n Optionally sets max length of pattern.\n Used when pattern length is longer then `to` param length. Pads zeros at start in this case.\n */\n\n /** Min bound */\n\n /** Max bound */\n\n /** */\n function get() {\n return this.maxLength - String(this.from).length;\n }\n /**\n @override\n */\n\n }, {\n key: \"_update\",\n value: function _update(opts) {\n // TODO type\n opts = Object.assign({\n to: this.to || 0,\n from: this.from || 0,\n maxLength: this.maxLength || 0\n }, opts);\n var maxLength = String(opts.to).length;\n if (opts.maxLength != null) maxLength = Math.max(maxLength, opts.maxLength);\n opts.maxLength = maxLength;\n var fromStr = String(opts.from).padStart(maxLength, '0');\n var toStr = String(opts.to).padStart(maxLength, '0');\n var sameCharsCount = 0;\n\n while (sameCharsCount < toStr.length && toStr[sameCharsCount] === fromStr[sameCharsCount]) {\n ++sameCharsCount;\n }\n\n opts.mask = toStr.slice(0, sameCharsCount).replace(/0/g, '\\\\0') + '0'.repeat(maxLength - sameCharsCount);\n\n _get(_getPrototypeOf(MaskedRange.prototype), \"_update\", this).call(this, opts);\n }\n /**\n @override\n */\n\n }, {\n key: \"isComplete\",\n get: function get() {\n return _get(_getPrototypeOf(MaskedRange.prototype), \"isComplete\", this) && Boolean(this.value);\n }\n }, {\n key: \"boundaries\",\n value: function boundaries(str) {\n var minstr = '';\n var maxstr = '';\n\n var _ref = str.match(/^(\\D*)(\\d*)(\\D*)/) || [],\n _ref2 = _slicedToArray(_ref, 3),\n placeholder = _ref2[1],\n num = _ref2[2];\n\n if (num) {\n minstr = '0'.repeat(placeholder.length) + num;\n maxstr = '9'.repeat(placeholder.length) + num;\n }\n\n minstr = minstr.padEnd(this.maxLength, '0');\n maxstr = maxstr.padEnd(this.maxLength, '9');\n return [minstr, maxstr];\n } // TODO str is a single char everytime\n\n /**\n @override\n */\n\n }, {\n key: \"doPrepare\",\n value: function doPrepare(ch) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var details;\n\n var _normalizePrepare = normalizePrepare(_get(_getPrototypeOf(MaskedRange.prototype), \"doPrepare\", this).call(this, ch.replace(/\\D/g, ''), flags));\n\n var _normalizePrepare2 = _slicedToArray(_normalizePrepare, 2);\n\n ch = _normalizePrepare2[0];\n details = _normalizePrepare2[1];\n if (!this.autofix || !ch) return ch;\n var fromStr = String(this.from).padStart(this.maxLength, '0');\n var toStr = String(this.to).padStart(this.maxLength, '0');\n var nextVal = this.value + ch;\n if (nextVal.length > this.maxLength) return '';\n\n var _this$boundaries = this.boundaries(nextVal),\n _this$boundaries2 = _slicedToArray(_this$boundaries, 2),\n minstr = _this$boundaries2[0],\n maxstr = _this$boundaries2[1];\n\n if (Number(maxstr) < this.from) return fromStr[nextVal.length - 1];\n\n if (Number(minstr) > this.to) {\n if (this.autofix === 'pad' && nextVal.length < this.maxLength) {\n return ['', details.aggregate(this.append(fromStr[nextVal.length - 1] + ch, flags))];\n }\n\n return toStr[nextVal.length - 1];\n }\n\n return ch;\n }\n /**\n @override\n */\n\n }, {\n key: \"doValidate\",\n value: function doValidate() {\n var _get2;\n\n var str = this.value;\n var firstNonZero = str.search(/[^0]/);\n if (firstNonZero === -1 && str.length <= this._matchFrom) return true;\n\n var _this$boundaries3 = this.boundaries(str),\n _this$boundaries4 = _slicedToArray(_this$boundaries3, 2),\n minstr = _this$boundaries4[0],\n maxstr = _this$boundaries4[1];\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return this.from <= Number(maxstr) && Number(minstr) <= this.to && (_get2 = _get(_getPrototypeOf(MaskedRange.prototype), \"doValidate\", this)).call.apply(_get2, [this].concat(args));\n }\n }]);\n\n return MaskedRange;\n}(MaskedPattern);\nIMask.MaskedRange = MaskedRange;\n\nexport { MaskedRange as default };\n","import { d as _inherits, e as _createSuper, a as _classCallCheck, _ as _createClass, f as _slicedToArray, g as _get, h as _getPrototypeOf, i as _set } from '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport MaskedPattern from './pattern.js';\nimport MaskedRange from './range.js';\nimport IMask from '../core/holder.js';\nimport '../core/utils.js';\nimport '../core/change-details.js';\nimport './base.js';\nimport '../core/continuous-tail-details.js';\nimport './pattern/input-definition.js';\nimport './factory.js';\nimport './pattern/fixed-definition.js';\nimport './pattern/chunk-tail-details.js';\nimport './pattern/cursor.js';\nimport './regexp.js';\n\n/** Date mask */\n\nvar MaskedDate = /*#__PURE__*/function (_MaskedPattern) {\n _inherits(MaskedDate, _MaskedPattern);\n\n var _super = _createSuper(MaskedDate);\n\n /** Pattern mask for date according to {@link MaskedDate#format} */\n\n /** Start date */\n\n /** End date */\n\n /** */\n\n /**\n @param {Object} opts\n */\n function MaskedDate(opts) {\n _classCallCheck(this, MaskedDate);\n\n return _super.call(this, Object.assign({}, MaskedDate.DEFAULTS, opts));\n }\n /**\n @override\n */\n\n\n _createClass(MaskedDate, [{\n key: \"_update\",\n value: function _update(opts) {\n if (opts.mask === Date) delete opts.mask;\n if (opts.pattern) opts.mask = opts.pattern;\n var blocks = opts.blocks;\n opts.blocks = Object.assign({}, MaskedDate.GET_DEFAULT_BLOCKS()); // adjust year block\n\n if (opts.min) opts.blocks.Y.from = opts.min.getFullYear();\n if (opts.max) opts.blocks.Y.to = opts.max.getFullYear();\n\n if (opts.min && opts.max && opts.blocks.Y.from === opts.blocks.Y.to) {\n opts.blocks.m.from = opts.min.getMonth() + 1;\n opts.blocks.m.to = opts.max.getMonth() + 1;\n\n if (opts.blocks.m.from === opts.blocks.m.to) {\n opts.blocks.d.from = opts.min.getDate();\n opts.blocks.d.to = opts.max.getDate();\n }\n }\n\n Object.assign(opts.blocks, this.blocks, blocks); // add autofix\n\n Object.keys(opts.blocks).forEach(function (bk) {\n var b = opts.blocks[bk];\n if (!('autofix' in b) && 'autofix' in opts) b.autofix = opts.autofix;\n });\n\n _get(_getPrototypeOf(MaskedDate.prototype), \"_update\", this).call(this, opts);\n }\n /**\n @override\n */\n\n }, {\n key: \"doValidate\",\n value: function doValidate() {\n var _get2;\n\n var date = this.date;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return (_get2 = _get(_getPrototypeOf(MaskedDate.prototype), \"doValidate\", this)).call.apply(_get2, [this].concat(args)) && (!this.isComplete || this.isDateExist(this.value) && date != null && (this.min == null || this.min <= date) && (this.max == null || date <= this.max));\n }\n /** Checks if date is exists */\n\n }, {\n key: \"isDateExist\",\n value: function isDateExist(str) {\n return this.format(this.parse(str, this), this).indexOf(str) >= 0;\n }\n /** Parsed Date */\n\n }, {\n key: \"date\",\n get: function get() {\n return this.typedValue;\n },\n set: function set(date) {\n this.typedValue = date;\n }\n /**\n @override\n */\n\n }, {\n key: \"typedValue\",\n get: function get() {\n return this.isComplete ? _get(_getPrototypeOf(MaskedDate.prototype), \"typedValue\", this) : null;\n },\n set: function set(value) {\n _set(_getPrototypeOf(MaskedDate.prototype), \"typedValue\", value, this, true);\n }\n /**\n @override\n */\n\n }, {\n key: \"maskEquals\",\n value: function maskEquals(mask) {\n return mask === Date || _get(_getPrototypeOf(MaskedDate.prototype), \"maskEquals\", this).call(this, mask);\n }\n }]);\n\n return MaskedDate;\n}(MaskedPattern);\nMaskedDate.DEFAULTS = {\n pattern: 'd{.}`m{.}`Y',\n format: function format(date) {\n if (!date) return '';\n var day = String(date.getDate()).padStart(2, '0');\n var month = String(date.getMonth() + 1).padStart(2, '0');\n var year = date.getFullYear();\n return [day, month, year].join('.');\n },\n parse: function parse(str) {\n var _str$split = str.split('.'),\n _str$split2 = _slicedToArray(_str$split, 3),\n day = _str$split2[0],\n month = _str$split2[1],\n year = _str$split2[2];\n\n return new Date(year, month - 1, day);\n }\n};\n\nMaskedDate.GET_DEFAULT_BLOCKS = function () {\n return {\n d: {\n mask: MaskedRange,\n from: 1,\n to: 31,\n maxLength: 2\n },\n m: {\n mask: MaskedRange,\n from: 1,\n to: 12,\n maxLength: 2\n },\n Y: {\n mask: MaskedRange,\n from: 1900,\n to: 9999\n }\n };\n};\n\nIMask.MaskedDate = MaskedDate;\n\nexport { MaskedDate as default };\n","import { _ as _createClass, a as _classCallCheck } from '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport IMask from '../core/holder.js';\n\n/**\n Generic element API to use with mask\n @interface\n*/\nvar MaskElement = /*#__PURE__*/function () {\n function MaskElement() {\n _classCallCheck(this, MaskElement);\n }\n\n _createClass(MaskElement, [{\n key: \"selectionStart\",\n get:\n /** */\n\n /** */\n\n /** */\n\n /** Safely returns selection start */\n function get() {\n var start;\n\n try {\n start = this._unsafeSelectionStart;\n } catch (e) {}\n\n return start != null ? start : this.value.length;\n }\n /** Safely returns selection end */\n\n }, {\n key: \"selectionEnd\",\n get: function get() {\n var end;\n\n try {\n end = this._unsafeSelectionEnd;\n } catch (e) {}\n\n return end != null ? end : this.value.length;\n }\n /** Safely sets element selection */\n\n }, {\n key: \"select\",\n value: function select(start, end) {\n if (start == null || end == null || start === this.selectionStart && end === this.selectionEnd) return;\n\n try {\n this._unsafeSelect(start, end);\n } catch (e) {}\n }\n /** Should be overriden in subclasses */\n\n }, {\n key: \"_unsafeSelect\",\n value: function _unsafeSelect(start, end) {}\n /** Should be overriden in subclasses */\n\n }, {\n key: \"isActive\",\n get: function get() {\n return false;\n }\n /** Should be overriden in subclasses */\n\n }, {\n key: \"bindEvents\",\n value: function bindEvents(handlers) {}\n /** Should be overriden in subclasses */\n\n }, {\n key: \"unbindEvents\",\n value: function unbindEvents() {}\n }]);\n\n return MaskElement;\n}();\nIMask.MaskElement = MaskElement;\n\nexport { MaskElement as default };\n","import { d as _inherits, e as _createSuper, a as _classCallCheck, _ as _createClass } from '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport MaskElement from './mask-element.js';\nimport IMask from '../core/holder.js';\n\n/** Bridge between HTMLElement and {@link Masked} */\n\nvar HTMLMaskElement = /*#__PURE__*/function (_MaskElement) {\n _inherits(HTMLMaskElement, _MaskElement);\n\n var _super = _createSuper(HTMLMaskElement);\n\n /** Mapping between HTMLElement events and mask internal events */\n\n /** HTMLElement to use mask on */\n\n /**\n @param {HTMLInputElement|HTMLTextAreaElement} input\n */\n function HTMLMaskElement(input) {\n var _this;\n\n _classCallCheck(this, HTMLMaskElement);\n\n _this = _super.call(this);\n _this.input = input;\n _this._handlers = {};\n return _this;\n }\n /** */\n // $FlowFixMe https://github.com/facebook/flow/issues/2839\n\n\n _createClass(HTMLMaskElement, [{\n key: \"rootElement\",\n get: function get() {\n var _this$input$getRootNo, _this$input$getRootNo2, _this$input;\n\n return (_this$input$getRootNo = (_this$input$getRootNo2 = (_this$input = this.input).getRootNode) === null || _this$input$getRootNo2 === void 0 ? void 0 : _this$input$getRootNo2.call(_this$input)) !== null && _this$input$getRootNo !== void 0 ? _this$input$getRootNo : document;\n }\n /**\n Is element in focus\n @readonly\n */\n\n }, {\n key: \"isActive\",\n get: function get() {\n //$FlowFixMe\n return this.input === this.rootElement.activeElement;\n }\n /**\n Returns HTMLElement selection start\n @override\n */\n\n }, {\n key: \"_unsafeSelectionStart\",\n get: function get() {\n return this.input.selectionStart;\n }\n /**\n Returns HTMLElement selection end\n @override\n */\n\n }, {\n key: \"_unsafeSelectionEnd\",\n get: function get() {\n return this.input.selectionEnd;\n }\n /**\n Sets HTMLElement selection\n @override\n */\n\n }, {\n key: \"_unsafeSelect\",\n value: function _unsafeSelect(start, end) {\n this.input.setSelectionRange(start, end);\n }\n /**\n HTMLElement value\n @override\n */\n\n }, {\n key: \"value\",\n get: function get() {\n return this.input.value;\n },\n set: function set(value) {\n this.input.value = value;\n }\n /**\n Binds HTMLElement events to mask internal events\n @override\n */\n\n }, {\n key: \"bindEvents\",\n value: function bindEvents(handlers) {\n var _this2 = this;\n\n Object.keys(handlers).forEach(function (event) {\n return _this2._toggleEventHandler(HTMLMaskElement.EVENTS_MAP[event], handlers[event]);\n });\n }\n /**\n Unbinds HTMLElement events to mask internal events\n @override\n */\n\n }, {\n key: \"unbindEvents\",\n value: function unbindEvents() {\n var _this3 = this;\n\n Object.keys(this._handlers).forEach(function (event) {\n return _this3._toggleEventHandler(event);\n });\n }\n /** */\n\n }, {\n key: \"_toggleEventHandler\",\n value: function _toggleEventHandler(event, handler) {\n if (this._handlers[event]) {\n this.input.removeEventListener(event, this._handlers[event]);\n delete this._handlers[event];\n }\n\n if (handler) {\n this.input.addEventListener(event, handler);\n this._handlers[event] = handler;\n }\n }\n }]);\n\n return HTMLMaskElement;\n}(MaskElement);\nHTMLMaskElement.EVENTS_MAP = {\n selectionChange: 'keydown',\n input: 'input',\n drop: 'drop',\n click: 'click',\n focus: 'focus',\n commit: 'blur'\n};\nIMask.HTMLMaskElement = HTMLMaskElement;\n\nexport { HTMLMaskElement as default };\n","import { d as _inherits, e as _createSuper, a as _classCallCheck, _ as _createClass } from '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport HTMLMaskElement from './html-mask-element.js';\nimport IMask from '../core/holder.js';\nimport './mask-element.js';\n\nvar HTMLContenteditableMaskElement = /*#__PURE__*/function (_HTMLMaskElement) {\n _inherits(HTMLContenteditableMaskElement, _HTMLMaskElement);\n\n var _super = _createSuper(HTMLContenteditableMaskElement);\n\n function HTMLContenteditableMaskElement() {\n _classCallCheck(this, HTMLContenteditableMaskElement);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(HTMLContenteditableMaskElement, [{\n key: \"_unsafeSelectionStart\",\n get:\n /**\n Returns HTMLElement selection start\n @override\n */\n function get() {\n var root = this.rootElement;\n var selection = root.getSelection && root.getSelection();\n var anchorOffset = selection && selection.anchorOffset;\n var focusOffset = selection && selection.focusOffset;\n\n if (focusOffset == null || anchorOffset == null || anchorOffset < focusOffset) {\n return anchorOffset;\n }\n\n return focusOffset;\n }\n /**\n Returns HTMLElement selection end\n @override\n */\n\n }, {\n key: \"_unsafeSelectionEnd\",\n get: function get() {\n var root = this.rootElement;\n var selection = root.getSelection && root.getSelection();\n var anchorOffset = selection && selection.anchorOffset;\n var focusOffset = selection && selection.focusOffset;\n\n if (focusOffset == null || anchorOffset == null || anchorOffset > focusOffset) {\n return anchorOffset;\n }\n\n return focusOffset;\n }\n /**\n Sets HTMLElement selection\n @override\n */\n\n }, {\n key: \"_unsafeSelect\",\n value: function _unsafeSelect(start, end) {\n if (!this.rootElement.createRange) return;\n var range = this.rootElement.createRange();\n range.setStart(this.input.firstChild || this.input, start);\n range.setEnd(this.input.lastChild || this.input, end);\n var root = this.rootElement;\n var selection = root.getSelection && root.getSelection();\n\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n /**\n HTMLElement value\n @override\n */\n\n }, {\n key: \"value\",\n get: function get() {\n // $FlowFixMe\n return this.input.textContent;\n },\n set: function set(value) {\n this.input.textContent = value;\n }\n }]);\n\n return HTMLContenteditableMaskElement;\n}(HTMLMaskElement);\nIMask.HTMLContenteditableMaskElement = HTMLContenteditableMaskElement;\n\nexport { HTMLContenteditableMaskElement as default };\n","import { _ as _createClass, a as _classCallCheck, b as _objectWithoutProperties } from '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport { objectIncludes, DIRECTION } from '../core/utils.js';\nimport ActionDetails from '../core/action-details.js';\nimport '../masked/date.js';\nimport createMask, { maskedClass } from '../masked/factory.js';\nimport MaskElement from './mask-element.js';\nimport HTMLMaskElement from './html-mask-element.js';\nimport HTMLContenteditableMaskElement from './html-contenteditable-mask-element.js';\nimport IMask from '../core/holder.js';\nimport '../core/change-details.js';\nimport '../masked/pattern.js';\nimport '../masked/base.js';\nimport '../core/continuous-tail-details.js';\nimport '../masked/pattern/input-definition.js';\nimport '../masked/pattern/fixed-definition.js';\nimport '../masked/pattern/chunk-tail-details.js';\nimport '../masked/pattern/cursor.js';\nimport '../masked/regexp.js';\nimport '../masked/range.js';\n\nvar _excluded = [\"mask\"];\n/** Listens to element events and controls changes between element and {@link Masked} */\n\nvar InputMask = /*#__PURE__*/function () {\n /**\n View element\n @readonly\n */\n\n /**\n Internal {@link Masked} model\n @readonly\n */\n\n /**\n @param {MaskElement|HTMLInputElement|HTMLTextAreaElement} el\n @param {Object} opts\n */\n function InputMask(el, opts) {\n _classCallCheck(this, InputMask);\n\n this.el = el instanceof MaskElement ? el : el.isContentEditable && el.tagName !== 'INPUT' && el.tagName !== 'TEXTAREA' ? new HTMLContenteditableMaskElement(el) : new HTMLMaskElement(el);\n this.masked = createMask(opts);\n this._listeners = {};\n this._value = '';\n this._unmaskedValue = '';\n this._saveSelection = this._saveSelection.bind(this);\n this._onInput = this._onInput.bind(this);\n this._onChange = this._onChange.bind(this);\n this._onDrop = this._onDrop.bind(this);\n this._onFocus = this._onFocus.bind(this);\n this._onClick = this._onClick.bind(this);\n this.alignCursor = this.alignCursor.bind(this);\n this.alignCursorFriendly = this.alignCursorFriendly.bind(this);\n\n this._bindEvents(); // refresh\n\n\n this.updateValue();\n\n this._onChange();\n }\n /** Read or update mask */\n\n\n _createClass(InputMask, [{\n key: \"mask\",\n get: function get() {\n return this.masked.mask;\n },\n set: function set(mask) {\n if (this.maskEquals(mask)) return; // $FlowFixMe No ideas ... after update\n\n if (!(mask instanceof IMask.Masked) && this.masked.constructor === maskedClass(mask)) {\n this.masked.updateOptions({\n mask: mask\n });\n return;\n }\n\n var masked = createMask({\n mask: mask\n });\n masked.unmaskedValue = this.masked.unmaskedValue;\n this.masked = masked;\n }\n /** Raw value */\n\n }, {\n key: \"maskEquals\",\n value: function maskEquals(mask) {\n var _this$masked;\n\n return mask == null || ((_this$masked = this.masked) === null || _this$masked === void 0 ? void 0 : _this$masked.maskEquals(mask));\n }\n }, {\n key: \"value\",\n get: function get() {\n return this._value;\n },\n set: function set(str) {\n this.masked.value = str;\n this.updateControl();\n this.alignCursor();\n }\n /** Unmasked value */\n\n }, {\n key: \"unmaskedValue\",\n get: function get() {\n return this._unmaskedValue;\n },\n set: function set(str) {\n this.masked.unmaskedValue = str;\n this.updateControl();\n this.alignCursor();\n }\n /** Typed unmasked value */\n\n }, {\n key: \"typedValue\",\n get: function get() {\n return this.masked.typedValue;\n },\n set: function set(val) {\n this.masked.typedValue = val;\n this.updateControl();\n this.alignCursor();\n }\n /**\n Starts listening to element events\n @protected\n */\n\n }, {\n key: \"_bindEvents\",\n value: function _bindEvents() {\n this.el.bindEvents({\n selectionChange: this._saveSelection,\n input: this._onInput,\n drop: this._onDrop,\n click: this._onClick,\n focus: this._onFocus,\n commit: this._onChange\n });\n }\n /**\n Stops listening to element events\n @protected\n */\n\n }, {\n key: \"_unbindEvents\",\n value: function _unbindEvents() {\n if (this.el) this.el.unbindEvents();\n }\n /**\n Fires custom event\n @protected\n */\n\n }, {\n key: \"_fireEvent\",\n value: function _fireEvent(ev) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var listeners = this._listeners[ev];\n if (!listeners) return;\n listeners.forEach(function (l) {\n return l.apply(void 0, args);\n });\n }\n /**\n Current selection start\n @readonly\n */\n\n }, {\n key: \"selectionStart\",\n get: function get() {\n return this._cursorChanging ? this._changingCursorPos : this.el.selectionStart;\n }\n /** Current cursor position */\n\n }, {\n key: \"cursorPos\",\n get: function get() {\n return this._cursorChanging ? this._changingCursorPos : this.el.selectionEnd;\n },\n set: function set(pos) {\n if (!this.el || !this.el.isActive) return;\n this.el.select(pos, pos);\n\n this._saveSelection();\n }\n /**\n Stores current selection\n @protected\n */\n\n }, {\n key: \"_saveSelection\",\n value: function\n /* ev */\n _saveSelection() {\n if (this.value !== this.el.value) {\n console.warn('Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly.'); // eslint-disable-line no-console\n }\n\n this._selection = {\n start: this.selectionStart,\n end: this.cursorPos\n };\n }\n /** Syncronizes model value from view */\n\n }, {\n key: \"updateValue\",\n value: function updateValue() {\n this.masked.value = this.el.value;\n this._value = this.masked.value;\n }\n /** Syncronizes view from model value, fires change events */\n\n }, {\n key: \"updateControl\",\n value: function updateControl() {\n var newUnmaskedValue = this.masked.unmaskedValue;\n var newValue = this.masked.value;\n var isChanged = this.unmaskedValue !== newUnmaskedValue || this.value !== newValue;\n this._unmaskedValue = newUnmaskedValue;\n this._value = newValue;\n if (this.el.value !== newValue) this.el.value = newValue;\n if (isChanged) this._fireChangeEvents();\n }\n /** Updates options with deep equal check, recreates @{link Masked} model if mask type changes */\n\n }, {\n key: \"updateOptions\",\n value: function updateOptions(opts) {\n var mask = opts.mask,\n restOpts = _objectWithoutProperties(opts, _excluded);\n\n var updateMask = !this.maskEquals(mask);\n var updateOpts = !objectIncludes(this.masked, restOpts);\n if (updateMask) this.mask = mask;\n if (updateOpts) this.masked.updateOptions(restOpts);\n if (updateMask || updateOpts) this.updateControl();\n }\n /** Updates cursor */\n\n }, {\n key: \"updateCursor\",\n value: function updateCursor(cursorPos) {\n if (cursorPos == null) return;\n this.cursorPos = cursorPos; // also queue change cursor for mobile browsers\n\n this._delayUpdateCursor(cursorPos);\n }\n /**\n Delays cursor update to support mobile browsers\n @private\n */\n\n }, {\n key: \"_delayUpdateCursor\",\n value: function _delayUpdateCursor(cursorPos) {\n var _this = this;\n\n this._abortUpdateCursor();\n\n this._changingCursorPos = cursorPos;\n this._cursorChanging = setTimeout(function () {\n if (!_this.el) return; // if was destroyed\n\n _this.cursorPos = _this._changingCursorPos;\n\n _this._abortUpdateCursor();\n }, 10);\n }\n /**\n Fires custom events\n @protected\n */\n\n }, {\n key: \"_fireChangeEvents\",\n value: function _fireChangeEvents() {\n this._fireEvent('accept', this._inputEvent);\n\n if (this.masked.isComplete) this._fireEvent('complete', this._inputEvent);\n }\n /**\n Aborts delayed cursor update\n @private\n */\n\n }, {\n key: \"_abortUpdateCursor\",\n value: function _abortUpdateCursor() {\n if (this._cursorChanging) {\n clearTimeout(this._cursorChanging);\n delete this._cursorChanging;\n }\n }\n /** Aligns cursor to nearest available position */\n\n }, {\n key: \"alignCursor\",\n value: function alignCursor() {\n this.cursorPos = this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos, DIRECTION.LEFT));\n }\n /** Aligns cursor only if selection is empty */\n\n }, {\n key: \"alignCursorFriendly\",\n value: function alignCursorFriendly() {\n if (this.selectionStart !== this.cursorPos) return; // skip if range is selected\n\n this.alignCursor();\n }\n /** Adds listener on custom event */\n\n }, {\n key: \"on\",\n value: function on(ev, handler) {\n if (!this._listeners[ev]) this._listeners[ev] = [];\n\n this._listeners[ev].push(handler);\n\n return this;\n }\n /** Removes custom event listener */\n\n }, {\n key: \"off\",\n value: function off(ev, handler) {\n if (!this._listeners[ev]) return this;\n\n if (!handler) {\n delete this._listeners[ev];\n return this;\n }\n\n var hIndex = this._listeners[ev].indexOf(handler);\n\n if (hIndex >= 0) this._listeners[ev].splice(hIndex, 1);\n return this;\n }\n /** Handles view input event */\n\n }, {\n key: \"_onInput\",\n value: function _onInput(e) {\n this._inputEvent = e;\n\n this._abortUpdateCursor(); // fix strange IE behavior\n\n\n if (!this._selection) return this.updateValue();\n var details = new ActionDetails( // new state\n this.el.value, this.cursorPos, // old state\n this.value, this._selection);\n var oldRawValue = this.masked.rawInputValue;\n var offset = this.masked.splice(details.startChangePos, details.removed.length, details.inserted, details.removeDirection).offset; // force align in remove direction only if no input chars were removed\n // otherwise we still need to align with NONE (to get out from fixed symbols for instance)\n\n var removeDirection = oldRawValue === this.masked.rawInputValue ? details.removeDirection : DIRECTION.NONE;\n var cursorPos = this.masked.nearestInputPos(details.startChangePos + offset, removeDirection);\n if (removeDirection !== DIRECTION.NONE) cursorPos = this.masked.nearestInputPos(cursorPos, DIRECTION.NONE);\n this.updateControl();\n this.updateCursor(cursorPos);\n delete this._inputEvent;\n }\n /** Handles view change event and commits model value */\n\n }, {\n key: \"_onChange\",\n value: function _onChange() {\n if (this.value !== this.el.value) {\n this.updateValue();\n }\n\n this.masked.doCommit();\n this.updateControl();\n\n this._saveSelection();\n }\n /** Handles view drop event, prevents by default */\n\n }, {\n key: \"_onDrop\",\n value: function _onDrop(ev) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n /** Restore last selection on focus */\n\n }, {\n key: \"_onFocus\",\n value: function _onFocus(ev) {\n this.alignCursorFriendly();\n }\n /** Restore last selection on focus */\n\n }, {\n key: \"_onClick\",\n value: function _onClick(ev) {\n this.alignCursorFriendly();\n }\n /** Unbind view events and removes element reference */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this._unbindEvents(); // $FlowFixMe why not do so?\n\n\n this._listeners.length = 0; // $FlowFixMe\n\n delete this.el;\n }\n }]);\n\n return InputMask;\n}();\nIMask.InputMask = InputMask;\n\nexport { InputMask as default };\n","import { d as _inherits, e as _createSuper, a as _classCallCheck, _ as _createClass, g as _get, h as _getPrototypeOf } from '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport MaskedPattern from './pattern.js';\nimport IMask from '../core/holder.js';\nimport '../core/utils.js';\nimport '../core/change-details.js';\nimport './base.js';\nimport '../core/continuous-tail-details.js';\nimport './pattern/input-definition.js';\nimport './factory.js';\nimport './pattern/fixed-definition.js';\nimport './pattern/chunk-tail-details.js';\nimport './pattern/cursor.js';\nimport './regexp.js';\n\n/** Pattern which validates enum values */\n\nvar MaskedEnum = /*#__PURE__*/function (_MaskedPattern) {\n _inherits(MaskedEnum, _MaskedPattern);\n\n var _super = _createSuper(MaskedEnum);\n\n function MaskedEnum() {\n _classCallCheck(this, MaskedEnum);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(MaskedEnum, [{\n key: \"_update\",\n value:\n /**\n @override\n @param {Object} opts\n */\n function _update(opts) {\n // TODO type\n if (opts.enum) opts.mask = '*'.repeat(opts.enum[0].length);\n\n _get(_getPrototypeOf(MaskedEnum.prototype), \"_update\", this).call(this, opts);\n }\n /**\n @override\n */\n\n }, {\n key: \"doValidate\",\n value: function doValidate() {\n var _this = this,\n _get2;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return this.enum.some(function (e) {\n return e.indexOf(_this.unmaskedValue) >= 0;\n }) && (_get2 = _get(_getPrototypeOf(MaskedEnum.prototype), \"doValidate\", this)).call.apply(_get2, [this].concat(args));\n }\n }]);\n\n return MaskedEnum;\n}(MaskedPattern);\nIMask.MaskedEnum = MaskedEnum;\n\nexport { MaskedEnum as default };\n","import { d as _inherits, e as _createSuper, a as _classCallCheck, _ as _createClass, g as _get, h as _getPrototypeOf, f as _slicedToArray, i as _set } from '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport { escapeRegExp, normalizePrepare, DIRECTION } from '../core/utils.js';\nimport ChangeDetails from '../core/change-details.js';\nimport Masked from './base.js';\nimport IMask from '../core/holder.js';\nimport '../core/continuous-tail-details.js';\n\n/**\n Number mask\n @param {Object} opts\n @param {string} opts.radix - Single char\n @param {string} opts.thousandsSeparator - Single char\n @param {Array<string>} opts.mapToRadix - Array of single chars\n @param {number} opts.min\n @param {number} opts.max\n @param {number} opts.scale - Digits after point\n @param {boolean} opts.signed - Allow negative\n @param {boolean} opts.normalizeZeros - Flag to remove leading and trailing zeros in the end of editing\n @param {boolean} opts.padFractionalZeros - Flag to pad trailing zeros after point in the end of editing\n*/\nvar MaskedNumber = /*#__PURE__*/function (_Masked) {\n _inherits(MaskedNumber, _Masked);\n\n var _super = _createSuper(MaskedNumber);\n\n /** Single char */\n\n /** Single char */\n\n /** Array of single chars */\n\n /** */\n\n /** */\n\n /** Digits after point */\n\n /** */\n\n /** Flag to remove leading and trailing zeros in the end of editing */\n\n /** Flag to pad trailing zeros after point in the end of editing */\n function MaskedNumber(opts) {\n _classCallCheck(this, MaskedNumber);\n\n return _super.call(this, Object.assign({}, MaskedNumber.DEFAULTS, opts));\n }\n /**\n @override\n */\n\n\n _createClass(MaskedNumber, [{\n key: \"_update\",\n value: function _update(opts) {\n _get(_getPrototypeOf(MaskedNumber.prototype), \"_update\", this).call(this, opts);\n\n this._updateRegExps();\n }\n /** */\n\n }, {\n key: \"_updateRegExps\",\n value: function _updateRegExps() {\n // use different regexp to process user input (more strict, input suffix) and tail shifting\n var start = '^' + (this.allowNegative ? '[+|\\\\-]?' : '');\n var midInput = '(0|([1-9]+\\\\d*))?';\n var mid = '\\\\d*';\n var end = (this.scale ? '(' + escapeRegExp(this.radix) + '\\\\d{0,' + this.scale + '})?' : '') + '$';\n this._numberRegExpInput = new RegExp(start + midInput + end);\n this._numberRegExp = new RegExp(start + mid + end);\n this._mapToRadixRegExp = new RegExp('[' + this.mapToRadix.map(escapeRegExp).join('') + ']', 'g');\n this._thousandsSeparatorRegExp = new RegExp(escapeRegExp(this.thousandsSeparator), 'g');\n }\n /** */\n\n }, {\n key: \"_removeThousandsSeparators\",\n value: function _removeThousandsSeparators(value) {\n return value.replace(this._thousandsSeparatorRegExp, '');\n }\n /** */\n\n }, {\n key: \"_insertThousandsSeparators\",\n value: function _insertThousandsSeparators(value) {\n // https://stackoverflow.com/questions/2901102/how-to-print-a-number-with-commas-as-thousands-separators-in-javascript\n var parts = value.split(this.radix);\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, this.thousandsSeparator);\n return parts.join(this.radix);\n }\n /**\n @override\n */\n\n }, {\n key: \"doPrepare\",\n value: function doPrepare(ch) {\n var _get2;\n\n ch = ch.replace(this._mapToRadixRegExp, this.radix);\n\n var noSepCh = this._removeThousandsSeparators(ch);\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var _normalizePrepare = normalizePrepare((_get2 = _get(_getPrototypeOf(MaskedNumber.prototype), \"doPrepare\", this)).call.apply(_get2, [this, noSepCh].concat(args))),\n _normalizePrepare2 = _slicedToArray(_normalizePrepare, 2),\n prepCh = _normalizePrepare2[0],\n details = _normalizePrepare2[1];\n\n if (ch && !noSepCh) details.skip = true;\n return [prepCh, details];\n }\n /** */\n\n }, {\n key: \"_separatorsCount\",\n value: function _separatorsCount(to) {\n var extendOnSeparators = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var count = 0;\n\n for (var pos = 0; pos < to; ++pos) {\n if (this._value.indexOf(this.thousandsSeparator, pos) === pos) {\n ++count;\n if (extendOnSeparators) to += this.thousandsSeparator.length;\n }\n }\n\n return count;\n }\n /** */\n\n }, {\n key: \"_separatorsCountFromSlice\",\n value: function _separatorsCountFromSlice() {\n var slice = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._value;\n return this._separatorsCount(this._removeThousandsSeparators(slice).length, true);\n }\n /**\n @override\n */\n\n }, {\n key: \"extractInput\",\n value: function extractInput() {\n var fromPos = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var toPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.value.length;\n var flags = arguments.length > 2 ? arguments[2] : undefined;\n\n var _this$_adjustRangeWit = this._adjustRangeWithSeparators(fromPos, toPos);\n\n var _this$_adjustRangeWit2 = _slicedToArray(_this$_adjustRangeWit, 2);\n\n fromPos = _this$_adjustRangeWit2[0];\n toPos = _this$_adjustRangeWit2[1];\n return this._removeThousandsSeparators(_get(_getPrototypeOf(MaskedNumber.prototype), \"extractInput\", this).call(this, fromPos, toPos, flags));\n }\n /**\n @override\n */\n\n }, {\n key: \"_appendCharRaw\",\n value: function _appendCharRaw(ch) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!this.thousandsSeparator) return _get(_getPrototypeOf(MaskedNumber.prototype), \"_appendCharRaw\", this).call(this, ch, flags);\n var prevBeforeTailValue = flags.tail && flags._beforeTailState ? flags._beforeTailState._value : this._value;\n\n var prevBeforeTailSeparatorsCount = this._separatorsCountFromSlice(prevBeforeTailValue);\n\n this._value = this._removeThousandsSeparators(this.value);\n\n var appendDetails = _get(_getPrototypeOf(MaskedNumber.prototype), \"_appendCharRaw\", this).call(this, ch, flags);\n\n this._value = this._insertThousandsSeparators(this._value);\n var beforeTailValue = flags.tail && flags._beforeTailState ? flags._beforeTailState._value : this._value;\n\n var beforeTailSeparatorsCount = this._separatorsCountFromSlice(beforeTailValue);\n\n appendDetails.tailShift += (beforeTailSeparatorsCount - prevBeforeTailSeparatorsCount) * this.thousandsSeparator.length;\n appendDetails.skip = !appendDetails.rawInserted && ch === this.thousandsSeparator;\n return appendDetails;\n }\n /** */\n\n }, {\n key: \"_findSeparatorAround\",\n value: function _findSeparatorAround(pos) {\n if (this.thousandsSeparator) {\n var searchFrom = pos - this.thousandsSeparator.length + 1;\n var separatorPos = this.value.indexOf(this.thousandsSeparator, searchFrom);\n if (separatorPos <= pos) return separatorPos;\n }\n\n return -1;\n }\n }, {\n key: \"_adjustRangeWithSeparators\",\n value: function _adjustRangeWithSeparators(from, to) {\n var separatorAroundFromPos = this._findSeparatorAround(from);\n\n if (separatorAroundFromPos >= 0) from = separatorAroundFromPos;\n\n var separatorAroundToPos = this._findSeparatorAround(to);\n\n if (separatorAroundToPos >= 0) to = separatorAroundToPos + this.thousandsSeparator.length;\n return [from, to];\n }\n /**\n @override\n */\n\n }, {\n key: \"remove\",\n value: function remove() {\n var fromPos = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var toPos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.value.length;\n\n var _this$_adjustRangeWit3 = this._adjustRangeWithSeparators(fromPos, toPos);\n\n var _this$_adjustRangeWit4 = _slicedToArray(_this$_adjustRangeWit3, 2);\n\n fromPos = _this$_adjustRangeWit4[0];\n toPos = _this$_adjustRangeWit4[1];\n var valueBeforePos = this.value.slice(0, fromPos);\n var valueAfterPos = this.value.slice(toPos);\n\n var prevBeforeTailSeparatorsCount = this._separatorsCount(valueBeforePos.length);\n\n this._value = this._insertThousandsSeparators(this._removeThousandsSeparators(valueBeforePos + valueAfterPos));\n\n var beforeTailSeparatorsCount = this._separatorsCountFromSlice(valueBeforePos);\n\n return new ChangeDetails({\n tailShift: (beforeTailSeparatorsCount - prevBeforeTailSeparatorsCount) * this.thousandsSeparator.length\n });\n }\n /**\n @override\n */\n\n }, {\n key: \"nearestInputPos\",\n value: function nearestInputPos(cursorPos, direction) {\n if (!this.thousandsSeparator) return cursorPos;\n\n switch (direction) {\n case DIRECTION.NONE:\n case DIRECTION.LEFT:\n case DIRECTION.FORCE_LEFT:\n {\n var separatorAtLeftPos = this._findSeparatorAround(cursorPos - 1);\n\n if (separatorAtLeftPos >= 0) {\n var separatorAtLeftEndPos = separatorAtLeftPos + this.thousandsSeparator.length;\n\n if (cursorPos < separatorAtLeftEndPos || this.value.length <= separatorAtLeftEndPos || direction === DIRECTION.FORCE_LEFT) {\n return separatorAtLeftPos;\n }\n }\n\n break;\n }\n\n case DIRECTION.RIGHT:\n case DIRECTION.FORCE_RIGHT:\n {\n var separatorAtRightPos = this._findSeparatorAround(cursorPos);\n\n if (separatorAtRightPos >= 0) {\n return separatorAtRightPos + this.thousandsSeparator.length;\n }\n }\n }\n\n return cursorPos;\n }\n /**\n @override\n */\n\n }, {\n key: \"doValidate\",\n value: function doValidate(flags) {\n var regexp = flags.input ? this._numberRegExpInput : this._numberRegExp; // validate as string\n\n var valid = regexp.test(this._removeThousandsSeparators(this.value));\n\n if (valid) {\n // validate as number\n var number = this.number;\n valid = valid && !isNaN(number) && ( // check min bound for negative values\n this.min == null || this.min >= 0 || this.min <= this.number) && ( // check max bound for positive values\n this.max == null || this.max <= 0 || this.number <= this.max);\n }\n\n return valid && _get(_getPrototypeOf(MaskedNumber.prototype), \"doValidate\", this).call(this, flags);\n }\n /**\n @override\n */\n\n }, {\n key: \"doCommit\",\n value: function doCommit() {\n if (this.value) {\n var number = this.number;\n var validnum = number; // check bounds\n\n if (this.min != null) validnum = Math.max(validnum, this.min);\n if (this.max != null) validnum = Math.min(validnum, this.max);\n if (validnum !== number) this.unmaskedValue = String(validnum);\n var formatted = this.value;\n if (this.normalizeZeros) formatted = this._normalizeZeros(formatted);\n if (this.padFractionalZeros && this.scale > 0) formatted = this._padFractionalZeros(formatted);\n this._value = formatted;\n }\n\n _get(_getPrototypeOf(MaskedNumber.prototype), \"doCommit\", this).call(this);\n }\n /** */\n\n }, {\n key: \"_normalizeZeros\",\n value: function _normalizeZeros(value) {\n var parts = this._removeThousandsSeparators(value).split(this.radix); // remove leading zeros\n\n\n parts[0] = parts[0].replace(/^(\\D*)(0*)(\\d*)/, function (match, sign, zeros, num) {\n return sign + num;\n }); // add leading zero\n\n if (value.length && !/\\d$/.test(parts[0])) parts[0] = parts[0] + '0';\n\n if (parts.length > 1) {\n parts[1] = parts[1].replace(/0*$/, ''); // remove trailing zeros\n\n if (!parts[1].length) parts.length = 1; // remove fractional\n }\n\n return this._insertThousandsSeparators(parts.join(this.radix));\n }\n /** */\n\n }, {\n key: \"_padFractionalZeros\",\n value: function _padFractionalZeros(value) {\n if (!value) return value;\n var parts = value.split(this.radix);\n if (parts.length < 2) parts.push('');\n parts[1] = parts[1].padEnd(this.scale, '0');\n return parts.join(this.radix);\n }\n /**\n @override\n */\n\n }, {\n key: \"unmaskedValue\",\n get: function get() {\n return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix, '.');\n },\n set: function set(unmaskedValue) {\n _set(_getPrototypeOf(MaskedNumber.prototype), \"unmaskedValue\", unmaskedValue.replace('.', this.radix), this, true);\n }\n /**\n @override\n */\n\n }, {\n key: \"typedValue\",\n get: function get() {\n return Number(this.unmaskedValue);\n },\n set: function set(n) {\n _set(_getPrototypeOf(MaskedNumber.prototype), \"unmaskedValue\", String(n), this, true);\n }\n /** Parsed Number */\n\n }, {\n key: \"number\",\n get: function get() {\n return this.typedValue;\n },\n set: function set(number) {\n this.typedValue = number;\n }\n /**\n Is negative allowed\n @readonly\n */\n\n }, {\n key: \"allowNegative\",\n get: function get() {\n return this.signed || this.min != null && this.min < 0 || this.max != null && this.max < 0;\n }\n }]);\n\n return MaskedNumber;\n}(Masked);\nMaskedNumber.DEFAULTS = {\n radix: ',',\n thousandsSeparator: '',\n mapToRadix: ['.'],\n scale: 2,\n signed: false,\n normalizeZeros: true,\n padFractionalZeros: false\n};\nIMask.MaskedNumber = MaskedNumber;\n\nexport { MaskedNumber as default };\n","import { d as _inherits, e as _createSuper, a as _classCallCheck, _ as _createClass, g as _get, h as _getPrototypeOf } from '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport Masked from './base.js';\nimport IMask from '../core/holder.js';\nimport '../core/change-details.js';\nimport '../core/continuous-tail-details.js';\nimport '../core/utils.js';\n\n/** Masking by custom Function */\n\nvar MaskedFunction = /*#__PURE__*/function (_Masked) {\n _inherits(MaskedFunction, _Masked);\n\n var _super = _createSuper(MaskedFunction);\n\n function MaskedFunction() {\n _classCallCheck(this, MaskedFunction);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(MaskedFunction, [{\n key: \"_update\",\n value:\n /**\n @override\n @param {Object} opts\n */\n function _update(opts) {\n if (opts.mask) opts.validate = opts.mask;\n\n _get(_getPrototypeOf(MaskedFunction.prototype), \"_update\", this).call(this, opts);\n }\n }]);\n\n return MaskedFunction;\n}(Masked);\nIMask.MaskedFunction = MaskedFunction;\n\nexport { MaskedFunction as default };\n","import { d as _inherits, e as _createSuper, a as _classCallCheck, _ as _createClass, g as _get, h as _getPrototypeOf, i as _set, b as _objectWithoutProperties } from '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport ChangeDetails from '../core/change-details.js';\nimport createMask from './factory.js';\nimport Masked from './base.js';\nimport IMask from '../core/holder.js';\nimport '../core/utils.js';\nimport '../core/continuous-tail-details.js';\n\nvar _excluded = [\"compiledMasks\", \"currentMaskRef\", \"currentMask\"];\n\n/** Dynamic mask for choosing apropriate mask in run-time */\nvar MaskedDynamic = /*#__PURE__*/function (_Masked) {\n _inherits(MaskedDynamic, _Masked);\n\n var _super = _createSuper(MaskedDynamic);\n\n /** Currently chosen mask */\n\n /** Compliled {@link Masked} options */\n\n /** Chooses {@link Masked} depending on input value */\n\n /**\n @param {Object} opts\n */\n function MaskedDynamic(opts) {\n var _this;\n\n _classCallCheck(this, MaskedDynamic);\n\n _this = _super.call(this, Object.assign({}, MaskedDynamic.DEFAULTS, opts));\n _this.currentMask = null;\n return _this;\n }\n /**\n @override\n */\n\n\n _createClass(MaskedDynamic, [{\n key: \"_update\",\n value: function _update(opts) {\n _get(_getPrototypeOf(MaskedDynamic.prototype), \"_update\", this).call(this, opts);\n\n if ('mask' in opts) {\n // mask could be totally dynamic with only `dispatch` option\n this.compiledMasks = Array.isArray(opts.mask) ? opts.mask.map(function (m) {\n return createMask(m);\n }) : [];\n }\n }\n /**\n @override\n */\n\n }, {\n key: \"_appendCharRaw\",\n value: function _appendCharRaw(ch) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var details = this._applyDispatch(ch, flags);\n\n if (this.currentMask) {\n details.aggregate(this.currentMask._appendChar(ch, flags));\n }\n\n return details;\n }\n }, {\n key: \"_applyDispatch\",\n value: function _applyDispatch() {\n var appended = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var prevValueBeforeTail = flags.tail && flags._beforeTailState != null ? flags._beforeTailState._value : this.value;\n var inputValue = this.rawInputValue;\n var insertValue = flags.tail && flags._beforeTailState != null ? // $FlowFixMe - tired to fight with type system\n flags._beforeTailState._rawInputValue : inputValue;\n var tailValue = inputValue.slice(insertValue.length);\n var prevMask = this.currentMask;\n var details = new ChangeDetails();\n var prevMaskState = prevMask && prevMask.state; // clone flags to prevent overwriting `_beforeTailState`\n\n this.currentMask = this.doDispatch(appended, Object.assign({}, flags)); // restore state after dispatch\n\n if (this.currentMask) {\n if (this.currentMask !== prevMask) {\n // if mask changed reapply input\n this.currentMask.reset();\n\n if (insertValue) {\n // $FlowFixMe - it's ok, we don't change current mask above\n var d = this.currentMask.append(insertValue, {\n raw: true\n });\n details.tailShift = d.inserted.length - prevValueBeforeTail.length;\n }\n\n if (tailValue) {\n // $FlowFixMe - it's ok, we don't change current mask above\n details.tailShift += this.currentMask.append(tailValue, {\n raw: true,\n tail: true\n }).tailShift;\n }\n } else {\n // Dispatch can do something bad with state, so\n // restore prev mask state\n this.currentMask.state = prevMaskState;\n }\n }\n\n return details;\n }\n }, {\n key: \"_appendPlaceholder\",\n value: function _appendPlaceholder() {\n var details = this._applyDispatch.apply(this, arguments);\n\n if (this.currentMask) {\n details.aggregate(this.currentMask._appendPlaceholder());\n }\n\n return details;\n }\n /**\n @override\n */\n\n }, {\n key: \"_appendEager\",\n value: function _appendEager() {\n var details = this._applyDispatch.apply(this, arguments);\n\n if (this.currentMask) {\n details.aggregate(this.currentMask._appendEager());\n }\n\n return details;\n }\n /**\n @override\n */\n\n }, {\n key: \"doDispatch\",\n value: function doDispatch(appended) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return this.dispatch(appended, this, flags);\n }\n /**\n @override\n */\n\n }, {\n key: \"doValidate\",\n value: function doValidate() {\n var _get2, _this$currentMask;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return (_get2 = _get(_getPrototypeOf(MaskedDynamic.prototype), \"doValidate\", this)).call.apply(_get2, [this].concat(args)) && (!this.currentMask || (_this$currentMask = this.currentMask).doValidate.apply(_this$currentMask, args));\n }\n /**\n @override\n */\n\n }, {\n key: \"reset\",\n value: function reset() {\n var _this$currentMask2;\n\n (_this$currentMask2 = this.currentMask) === null || _this$currentMask2 === void 0 ? void 0 : _this$currentMask2.reset();\n this.compiledMasks.forEach(function (m) {\n return m.reset();\n });\n }\n /**\n @override\n */\n\n }, {\n key: \"value\",\n get: function get() {\n return this.currentMask ? this.currentMask.value : '';\n },\n set: function set(value) {\n _set(_getPrototypeOf(MaskedDynamic.prototype), \"value\", value, this, true);\n }\n /**\n @override\n */\n\n }, {\n key: \"unmaskedValue\",\n get: function get() {\n return this.currentMask ? this.currentMask.unmaskedValue : '';\n },\n set: function set(unmaskedValue) {\n _set(_getPrototypeOf(MaskedDynamic.prototype), \"unmaskedValue\", unmaskedValue, this, true);\n }\n /**\n @override\n */\n\n }, {\n key: \"typedValue\",\n get: function get() {\n return this.currentMask ? this.currentMask.typedValue : '';\n } // probably typedValue should not be used with dynamic\n ,\n set: function set(value) {\n var unmaskedValue = String(value); // double check it\n\n if (this.currentMask) {\n this.currentMask.typedValue = value;\n unmaskedValue = this.currentMask.unmaskedValue;\n }\n\n this.unmaskedValue = unmaskedValue;\n }\n /**\n @override\n */\n\n }, {\n key: \"isComplete\",\n get: function get() {\n var _this$currentMask3;\n\n return Boolean((_this$currentMask3 = this.currentMask) === null || _this$currentMask3 === void 0 ? void 0 : _this$currentMask3.isComplete);\n }\n /**\n @override\n */\n\n }, {\n key: \"isFilled\",\n get: function get() {\n var _this$currentMask4;\n\n return Boolean((_this$currentMask4 = this.currentMask) === null || _this$currentMask4 === void 0 ? void 0 : _this$currentMask4.isFilled);\n }\n /**\n @override\n */\n\n }, {\n key: \"remove\",\n value: function remove() {\n var details = new ChangeDetails();\n\n if (this.currentMask) {\n var _this$currentMask5;\n\n details.aggregate((_this$currentMask5 = this.currentMask).remove.apply(_this$currentMask5, arguments)) // update with dispatch\n .aggregate(this._applyDispatch());\n }\n\n return details;\n }\n /**\n @override\n */\n\n }, {\n key: \"state\",\n get: function get() {\n return Object.assign({}, _get(_getPrototypeOf(MaskedDynamic.prototype), \"state\", this), {\n _rawInputValue: this.rawInputValue,\n compiledMasks: this.compiledMasks.map(function (m) {\n return m.state;\n }),\n currentMaskRef: this.currentMask,\n currentMask: this.currentMask && this.currentMask.state\n });\n },\n set: function set(state) {\n var compiledMasks = state.compiledMasks,\n currentMaskRef = state.currentMaskRef,\n currentMask = state.currentMask,\n maskedState = _objectWithoutProperties(state, _excluded);\n\n this.compiledMasks.forEach(function (m, mi) {\n return m.state = compiledMasks[mi];\n });\n\n if (currentMaskRef != null) {\n this.currentMask = currentMaskRef;\n this.currentMask.state = currentMask;\n }\n\n _set(_getPrototypeOf(MaskedDynamic.prototype), \"state\", maskedState, this, true);\n }\n /**\n @override\n */\n\n }, {\n key: \"extractInput\",\n value: function extractInput() {\n var _this$currentMask6;\n\n return this.currentMask ? (_this$currentMask6 = this.currentMask).extractInput.apply(_this$currentMask6, arguments) : '';\n }\n /**\n @override\n */\n\n }, {\n key: \"extractTail\",\n value: function extractTail() {\n var _this$currentMask7, _get3;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return this.currentMask ? (_this$currentMask7 = this.currentMask).extractTail.apply(_this$currentMask7, args) : (_get3 = _get(_getPrototypeOf(MaskedDynamic.prototype), \"extractTail\", this)).call.apply(_get3, [this].concat(args));\n }\n /**\n @override\n */\n\n }, {\n key: \"doCommit\",\n value: function doCommit() {\n if (this.currentMask) this.currentMask.doCommit();\n\n _get(_getPrototypeOf(MaskedDynamic.prototype), \"doCommit\", this).call(this);\n }\n /**\n @override\n */\n\n }, {\n key: \"nearestInputPos\",\n value: function nearestInputPos() {\n var _this$currentMask8, _get4;\n\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n return this.currentMask ? (_this$currentMask8 = this.currentMask).nearestInputPos.apply(_this$currentMask8, args) : (_get4 = _get(_getPrototypeOf(MaskedDynamic.prototype), \"nearestInputPos\", this)).call.apply(_get4, [this].concat(args));\n }\n }, {\n key: \"overwrite\",\n get: function get() {\n return this.currentMask ? this.currentMask.overwrite : _get(_getPrototypeOf(MaskedDynamic.prototype), \"overwrite\", this);\n },\n set: function set(overwrite) {\n console.warn('\"overwrite\" option is not available in dynamic mask, use this option in siblings');\n }\n }, {\n key: \"eager\",\n get: function get() {\n return this.currentMask ? this.currentMask.eager : _get(_getPrototypeOf(MaskedDynamic.prototype), \"eager\", this);\n },\n set: function set(eager) {\n console.warn('\"eager\" option is not available in dynamic mask, use this option in siblings');\n }\n /**\n @override\n */\n\n }, {\n key: \"maskEquals\",\n value: function maskEquals(mask) {\n return Array.isArray(mask) && this.compiledMasks.every(function (m, mi) {\n var _mask$mi;\n\n return m.maskEquals((_mask$mi = mask[mi]) === null || _mask$mi === void 0 ? void 0 : _mask$mi.mask);\n });\n }\n }]);\n\n return MaskedDynamic;\n}(Masked);\nMaskedDynamic.DEFAULTS = {\n dispatch: function dispatch(appended, masked, flags) {\n if (!masked.compiledMasks.length) return;\n var inputValue = masked.rawInputValue; // simulate input\n\n var inputs = masked.compiledMasks.map(function (m, index) {\n m.reset();\n m.append(inputValue, {\n raw: true\n });\n m.append(appended, flags);\n var weight = m.rawInputValue.length;\n return {\n weight: weight,\n index: index\n };\n }); // pop masks with longer values first\n\n inputs.sort(function (i1, i2) {\n return i2.weight - i1.weight;\n });\n return masked.compiledMasks[inputs[0].index];\n }\n};\nIMask.MaskedDynamic = MaskedDynamic;\n\nexport { MaskedDynamic as default };\n","import createMask from './factory.js';\nimport IMask from '../core/holder.js';\nimport '../core/utils.js';\nimport '../_rollupPluginBabelHelpers-b054ecd2.js';\nimport '../core/change-details.js';\n\n/** Mask pipe source and destination types */\n\nvar PIPE_TYPE = {\n MASKED: 'value',\n UNMASKED: 'unmaskedValue',\n TYPED: 'typedValue'\n};\n/** Creates new pipe function depending on mask type, source and destination options */\n\nfunction createPipe(mask) {\n var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : PIPE_TYPE.MASKED;\n var to = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : PIPE_TYPE.MASKED;\n var masked = createMask(mask);\n return function (value) {\n return masked.runIsolated(function (m) {\n m[from] = value;\n return m[to];\n });\n };\n}\n/** Pipes value through mask depending on mask type, source and destination options */\n\nfunction pipe(value) {\n for (var _len = arguments.length, pipeArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n pipeArgs[_key - 1] = arguments[_key];\n }\n\n return createPipe.apply(void 0, pipeArgs)(value);\n}\nIMask.PIPE_TYPE = PIPE_TYPE;\nIMask.createPipe = createPipe;\nIMask.pipe = pipe;\n\nexport { PIPE_TYPE, createPipe, pipe };\n","export { default as InputMask } from './controls/input.js';\nimport IMask from './core/holder.js';\nexport { default } from './core/holder.js';\nexport { default as Masked } from './masked/base.js';\nexport { default as MaskedPattern } from './masked/pattern.js';\nexport { default as MaskedEnum } from './masked/enum.js';\nexport { default as MaskedRange } from './masked/range.js';\nexport { default as MaskedNumber } from './masked/number.js';\nexport { default as MaskedDate } from './masked/date.js';\nexport { default as MaskedRegExp } from './masked/regexp.js';\nexport { default as MaskedFunction } from './masked/function.js';\nexport { default as MaskedDynamic } from './masked/dynamic.js';\nexport { default as createMask } from './masked/factory.js';\nexport { default as MaskElement } from './controls/mask-element.js';\nexport { default as HTMLMaskElement } from './controls/html-mask-element.js';\nexport { default as HTMLContenteditableMaskElement } from './controls/html-contenteditable-mask-element.js';\nexport { PIPE_TYPE, createPipe, pipe } from './masked/pipe.js';\nimport './_rollupPluginBabelHelpers-b054ecd2.js';\nimport './core/utils.js';\nimport './core/change-details.js';\nimport './core/action-details.js';\nimport './core/continuous-tail-details.js';\nimport './masked/pattern/input-definition.js';\nimport './masked/pattern/fixed-definition.js';\nimport './masked/pattern/chunk-tail-details.js';\nimport './masked/pattern/cursor.js';\n\ntry {\n globalThis.IMask = IMask;\n} catch (e) {}\n","import { Injectable, ɵɵdefineInjectable, forwardRef, EventEmitter, Directive, ElementRef, Renderer2, Optional, Inject, Input, Output, Pipe, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, COMPOSITION_BUFFER_MODE } from '@angular/forms';\nimport IMask, { pipe } from 'imask';\nimport * as ɵngcc0 from '@angular/core';\nexport { PIPE_TYPE, pipe } from 'imask';\nimport { CommonModule } from '@angular/common';\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\r\n/**\r\n * @abstract\r\n */\r\nclass IMaskFactory {\r\n}\nIMaskFactory.ɵfac = function IMaskFactory_Factory(t) { return new (t || IMaskFactory)(); };\nIMaskFactory.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: IMaskFactory, factory: IMaskFactory.ɵfac, providedIn: \"root\" });\r\n/** @nocollapse */ IMaskFactory.ngInjectableDef = ɵɵdefineInjectable({ factory: function IMaskFactory_Factory() { return new IMaskFactory(); }, token: IMaskFactory, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IMaskFactory, [{\n type: Injectable,\n args: [{ providedIn: \"root\" }]\n }], null, null); })();\r\nif (false) {\r\n /**\r\n * @abstract\r\n * @template Opts\r\n * @param {?} el\r\n * @param {?} opts\r\n * @return {?}\r\n */\r\n IMaskFactory.prototype.create = function (el, opts) { };\r\n}\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\r\n/** @type {?} */\r\nconst MASKEDINPUT_VALUE_ACCESSOR = {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef((/**\r\n * @return {?}\r\n */\r\n () => IMaskDirective)),\r\n multi: true\r\n};\r\n/** @type {?} */\r\nconst DEFAULT_IMASK_ELEMENT = (/**\r\n * @param {?} elementRef\r\n * @return {?}\r\n */\r\n(elementRef) => elementRef.nativeElement);\r\nconst ɵ0 = DEFAULT_IMASK_ELEMENT;\r\n/**\r\n * @template Opts\r\n */\r\nclass IMaskDirective {\r\n /**\r\n * @param {?} _elementRef\r\n * @param {?} _renderer\r\n * @param {?} _factory\r\n * @param {?} _compositionMode\r\n */\r\n constructor(_elementRef, _renderer, _factory, _compositionMode) {\r\n this._elementRef = _elementRef;\r\n this._renderer = _renderer;\r\n this._factory = _factory;\r\n this._compositionMode = _compositionMode;\r\n // init here to support AOT (TODO may be will work with ng-packgr - need to check)\r\n this.onTouched = (/**\r\n * @return {?}\r\n */\r\n () => { });\r\n this.onChange = (/**\r\n * @return {?}\r\n */\r\n () => { });\r\n this.imaskElement = DEFAULT_IMASK_ELEMENT;\r\n this.accept = new EventEmitter();\r\n this.complete = new EventEmitter();\r\n this._viewInitialized = false;\r\n this._composing = false;\r\n this._writing = false;\r\n if (this._compositionMode == null) {\r\n this._compositionMode = !this._isAndroid();\r\n }\r\n }\r\n /**\r\n * @return {?}\r\n */\r\n get element() {\r\n return this.imaskElement(this._elementRef, this);\r\n }\r\n /**\r\n * @return {?}\r\n */\r\n get maskValue() {\r\n if (!this.maskRef)\r\n return this.element.value;\r\n if (this.unmask === 'typed')\r\n return this.maskRef.typedValue;\r\n if (this.unmask)\r\n return this.maskRef.unmaskedValue;\r\n return this.maskRef.value;\r\n }\r\n /**\r\n * @param {?} value\r\n * @return {?}\r\n */\r\n set maskValue(value) {\r\n if (this.maskRef) {\r\n if (this.unmask === 'typed')\r\n this.maskRef.typedValue = value;\r\n else if (this.unmask)\r\n this.maskRef.unmaskedValue = value;\r\n else\r\n this.maskRef.value = value;\r\n }\r\n else {\r\n this._renderer.setProperty(this.element, 'value', value);\r\n }\r\n }\r\n /**\r\n * @return {?}\r\n */\r\n ngAfterViewInit() {\r\n if (this.imask)\r\n this.initMask();\r\n this._viewInitialized = true;\r\n }\r\n /**\r\n * @param {?} changes\r\n * @return {?}\r\n */\r\n ngOnChanges(changes) {\r\n if (changes.elementRef && !this.imaskElement)\r\n this.imaskElement = DEFAULT_IMASK_ELEMENT;\r\n if (!changes.imask || !this._viewInitialized)\r\n return;\r\n if (this.imask) {\r\n if (this.maskRef)\r\n this.maskRef.updateOptions(this.imask);\r\n else {\r\n this.initMask();\r\n this.onChange(this.maskValue);\r\n }\r\n }\r\n else {\r\n this.destroyMask();\r\n }\r\n }\r\n /**\r\n * @return {?}\r\n */\r\n destroyMask() {\r\n if (this.maskRef) {\r\n this.maskRef.destroy();\r\n delete this.maskRef;\r\n }\r\n }\r\n /**\r\n * @return {?}\r\n */\r\n ngOnDestroy() {\r\n this.destroyMask();\r\n this.accept.complete();\r\n this.complete.complete();\r\n }\r\n /**\r\n * @param {?} value\r\n * @return {?}\r\n */\r\n beginWrite(value) {\r\n this._writing = true;\r\n this._writingValue = value;\r\n }\r\n /**\r\n * @return {?}\r\n */\r\n endWrite() {\r\n this._writing = false;\r\n return this._writingValue;\r\n }\r\n /**\r\n * @param {?} value\r\n * @return {?}\r\n */\r\n writeValue(value) {\r\n value = value == null ? '' : value;\r\n if (this.maskRef) {\r\n this.beginWrite(value);\r\n if (this.maskValue !== value ||\r\n // handle cases like Number('') === 0,\r\n // for details see https://github.com/uNmAnNeR/imaskjs/issues/134\r\n (typeof value !== 'string' && this.maskRef.value === '') &&\r\n !this.maskRef.el.isActive) {\r\n this.maskValue = value;\r\n }\r\n }\r\n else {\r\n this._renderer.setProperty(this.element, 'value', value);\r\n }\r\n }\r\n /**\r\n * @return {?}\r\n */\r\n _onAccept() {\r\n /** @type {?} */\r\n const value = this.maskValue;\r\n // if value was not changed during writing don't fire events\r\n // for details see https://github.com/uNmAnNeR/imaskjs/issues/136\r\n if (this._writing && value === this.endWrite())\r\n return;\r\n this.onChange(value);\r\n this.accept.emit(value);\r\n }\r\n /**\r\n * @return {?}\r\n */\r\n _onComplete() {\r\n this.complete.emit(this.maskValue);\r\n }\r\n /**\r\n * @private\r\n * @return {?}\r\n */\r\n initMask() {\r\n this.maskRef = this._factory.create(this.element, (/** @type {?} */ (this.imask)))\r\n .on('accept', this._onAccept.bind(this))\r\n .on('complete', this._onComplete.bind(this));\r\n }\r\n /**\r\n * @param {?} isDisabled\r\n * @return {?}\r\n */\r\n setDisabledState(isDisabled) {\r\n this._renderer.setProperty(this.element, 'disabled', isDisabled);\r\n }\r\n /**\r\n * @param {?} fn\r\n * @return {?}\r\n */\r\n registerOnChange(fn) { this.onChange = fn; }\r\n /**\r\n * @param {?} fn\r\n * @return {?}\r\n */\r\n registerOnTouched(fn) { this.onTouched = fn; }\r\n /**\r\n * @param {?} value\r\n * @return {?}\r\n */\r\n _handleInput(value) {\r\n // if mask is attached all input goes throw mask\r\n if (this.maskRef)\r\n return;\r\n if (!this._compositionMode || (this._compositionMode && !this._composing)) {\r\n this.onChange(value);\r\n }\r\n }\r\n /**\r\n * @return {?}\r\n */\r\n _compositionStart() { this._composing = true; }\r\n /**\r\n * @param {?} value\r\n * @return {?}\r\n */\r\n _compositionEnd(value) {\r\n this._composing = false;\r\n this._compositionMode && this._handleInput(value);\r\n }\r\n /**\r\n * @private\r\n * @return {?}\r\n */\r\n _isAndroid() {\r\n return /android (\\d+)/.test(navigator.userAgent.toLowerCase());\r\n }\r\n}\nIMaskDirective.ɵfac = function IMaskDirective_Factory(t) { return new (t || IMaskDirective)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(IMaskFactory), ɵngcc0.ɵɵdirectiveInject(COMPOSITION_BUFFER_MODE, 8)); };\nIMaskDirective.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: IMaskDirective, selectors: [[\"\", \"imask\", \"\"]], hostBindings: function IMaskDirective_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"input\", function IMaskDirective_input_HostBindingHandler($event) { return ctx._handleInput($event.target.value); })(\"blur\", function IMaskDirective_blur_HostBindingHandler() { return ctx.onTouched(); })(\"compositionstart\", function IMaskDirective_compositionstart_HostBindingHandler() { return ctx._compositionStart(); })(\"compositionend\", function IMaskDirective_compositionend_HostBindingHandler($event) { return ctx._compositionEnd($event.target.value); });\n } }, inputs: { imaskElement: \"imaskElement\", imask: \"imask\", unmask: \"unmask\" }, outputs: { accept: \"accept\", complete: \"complete\" }, features: [ɵngcc0.ɵɵProvidersFeature([MASKEDINPUT_VALUE_ACCESSOR]), ɵngcc0.ɵɵNgOnChangesFeature] });\r\n/** @nocollapse */\r\nIMaskDirective.ctorParameters = () => [\r\n { type: ElementRef },\r\n { type: Renderer2 },\r\n { type: IMaskFactory },\r\n { type: Boolean, decorators: [{ type: Optional }, { type: Inject, args: [COMPOSITION_BUFFER_MODE,] }] }\r\n];\r\nIMaskDirective.propDecorators = {\r\n imask: [{ type: Input }],\r\n unmask: [{ type: Input }],\r\n imaskElement: [{ type: Input }],\r\n accept: [{ type: Output }],\r\n complete: [{ type: Output }]\r\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IMaskDirective, [{\n type: Directive,\n args: [{\n selector: '[imask]',\n host: {\n '(input)': '_handleInput($event.target.value)',\n '(blur)': 'onTouched()',\n '(compositionstart)': '_compositionStart()',\n '(compositionend)': '_compositionEnd($event.target.value)'\n },\n providers: [MASKEDINPUT_VALUE_ACCESSOR]\n }]\n }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: IMaskFactory }, { type: Boolean, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [COMPOSITION_BUFFER_MODE]\n }] }]; }, { imaskElement: [{\n type: Input\n }], accept: [{\n type: Output\n }], complete: [{\n type: Output\n }], imask: [{\n type: Input\n }], unmask: [{\n type: Input\n }] }); })();\r\nif (false) {\r\n /** @type {?} */\r\n IMaskDirective.prototype.maskRef;\r\n /** @type {?} */\r\n IMaskDirective.prototype.onTouched;\r\n /** @type {?} */\r\n IMaskDirective.prototype.onChange;\r\n /**\r\n * @type {?}\r\n * @private\r\n */\r\n IMaskDirective.prototype._viewInitialized;\r\n /**\r\n * @type {?}\r\n * @private\r\n */\r\n IMaskDirective.prototype._composing;\r\n /**\r\n * @type {?}\r\n * @private\r\n */\r\n IMaskDirective.prototype._writingValue;\r\n /**\r\n * @type {?}\r\n * @private\r\n */\r\n IMaskDirective.prototype._writing;\r\n /** @type {?} */\r\n IMaskDirective.prototype.imask;\r\n /** @type {?} */\r\n IMaskDirective.prototype.unmask;\r\n /** @type {?} */\r\n IMaskDirective.prototype.imaskElement;\r\n /** @type {?} */\r\n IMaskDirective.prototype.accept;\r\n /** @type {?} */\r\n IMaskDirective.prototype.complete;\r\n /**\r\n * @type {?}\r\n * @private\r\n */\r\n IMaskDirective.prototype._elementRef;\r\n /**\r\n * @type {?}\r\n * @private\r\n */\r\n IMaskDirective.prototype._renderer;\r\n /**\r\n * @type {?}\r\n * @private\r\n */\r\n IMaskDirective.prototype._factory;\r\n /**\r\n * @type {?}\r\n * @private\r\n */\r\n IMaskDirective.prototype._compositionMode;\r\n}\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\r\n/*\r\n * Transforms value through mask\r\n * Takes mask and optionally `from` and `to` pipe types.\r\n * Usage:\r\n * value | imask:MASK_OR_MASKED:opt_from:opt_to\r\n * Example:\r\n * {{ 2 | imask:mask }}\r\n*/\r\nclass IMaskPipe {\r\n /**\r\n * @param {...?} args\r\n * @return {?}\r\n */\r\n transform(...args) {\r\n return pipe(...args);\r\n }\r\n}\nIMaskPipe.ɵfac = function IMaskPipe_Factory(t) { return new (t || IMaskPipe)(); };\nIMaskPipe.ɵpipe = /*@__PURE__*/ ɵngcc0.ɵɵdefinePipe({ name: \"imask\", type: IMaskPipe, pure: true });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IMaskPipe, [{\n type: Pipe,\n args: [{ name: 'imask' }]\n }], null, null); })();\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\r\nclass DefaultImaskFactory {\r\n /**\r\n * @template Opts\r\n * @param {?} el\r\n * @param {?} opts\r\n * @return {?}\r\n */\r\n create(el, opts) {\r\n return IMask(el, opts);\r\n }\r\n}\nDefaultImaskFactory.ɵfac = function DefaultImaskFactory_Factory(t) { return new (t || DefaultImaskFactory)(); };\nDefaultImaskFactory.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: DefaultImaskFactory, factory: DefaultImaskFactory.ɵfac, providedIn: 'root' });\r\n/** @nocollapse */ DefaultImaskFactory.ngInjectableDef = ɵɵdefineInjectable({ factory: function DefaultImaskFactory_Factory() { return new DefaultImaskFactory(); }, token: DefaultImaskFactory, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(DefaultImaskFactory, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], null, null); })();\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\r\nclass IMaskDirectiveModule {\r\n}\nIMaskDirectiveModule.ɵfac = function IMaskDirectiveModule_Factory(t) { return new (t || IMaskDirectiveModule)(); };\nIMaskDirectiveModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: IMaskDirectiveModule });\nIMaskDirectiveModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: [{ provide: IMaskFactory, useClass: DefaultImaskFactory }], imports: [CommonModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IMaskDirectiveModule, [{\n type: NgModule,\n args: [{\n imports: [CommonModule],\n declarations: [IMaskDirective],\n providers: [{ provide: IMaskFactory, useClass: DefaultImaskFactory }],\n exports: [IMaskDirective]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(IMaskDirectiveModule, { declarations: function () { return [IMaskDirective]; }, imports: function () { return [CommonModule]; }, exports: function () { return [IMaskDirective]; } }); })();\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\r\nclass IMaskModule {\r\n}\nIMaskModule.ɵfac = function IMaskModule_Factory(t) { return new (t || IMaskModule)(); };\nIMaskModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: IMaskModule });\nIMaskModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ imports: [CommonModule, IMaskDirectiveModule, IMaskDirectiveModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IMaskModule, [{\n type: NgModule,\n args: [{\n imports: [CommonModule, IMaskDirectiveModule],\n declarations: [IMaskPipe],\n exports: [IMaskPipe, IMaskDirectiveModule]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(IMaskModule, { declarations: function () { return [IMaskPipe]; }, imports: function () { return [CommonModule, IMaskDirectiveModule]; }, exports: function () { return [IMaskPipe, IMaskDirectiveModule]; } }); })();\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\r\n */\n\nexport { IMaskDirective, IMaskDirectiveModule, IMaskFactory, IMaskModule, IMaskPipe, MASKEDINPUT_VALUE_ACCESSOR, DefaultImaskFactory as ɵa };\n\n","import { isObservable, of, Subject } from 'rxjs';\nimport * as i0 from '@angular/core';\nimport { Injectable, InjectionToken } 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 */\nclass DataSource {\n}\n/** Checks whether an object is a data source. */\nfunction isDataSource(value) {\n // Check if the value is a DataSource by observing if it has a connect function. Cannot\n // be checked as an `instanceof DataSource` since people could create their own sources\n // that match the interface, but don't extend DataSource.\n return value && typeof value.connect === '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/** DataSource wrapper for a native array. */\nclass ArrayDataSource extends DataSource {\n constructor(_data) {\n super();\n this._data = _data;\n }\n connect() {\n return isObservable(this._data) ? this._data : of(this._data);\n }\n disconnect() { }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 repeater that destroys views when they are removed from a\n * {@link ViewContainerRef}. When new items are inserted into the container,\n * the repeater will always construct a new embedded view for each item.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nclass _DisposeViewRepeaterStrategy {\n applyChanges(changes, viewContainerRef, itemContextFactory, itemValueResolver, itemViewChanged) {\n changes.forEachOperation((record, adjustedPreviousIndex, currentIndex) => {\n let view;\n let operation;\n if (record.previousIndex == null) {\n const insertContext = itemContextFactory(record, adjustedPreviousIndex, currentIndex);\n view = viewContainerRef.createEmbeddedView(insertContext.templateRef, insertContext.context, insertContext.index);\n operation = 1 /* _ViewRepeaterOperation.INSERTED */;\n }\n else if (currentIndex == null) {\n viewContainerRef.remove(adjustedPreviousIndex);\n operation = 3 /* _ViewRepeaterOperation.REMOVED */;\n }\n else {\n view = viewContainerRef.get(adjustedPreviousIndex);\n viewContainerRef.move(view, currentIndex);\n operation = 2 /* _ViewRepeaterOperation.MOVED */;\n }\n if (itemViewChanged) {\n itemViewChanged({\n context: view?.context,\n operation,\n record,\n });\n }\n });\n }\n detach() { }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 repeater that caches views when they are removed from a\n * {@link ViewContainerRef}. When new items are inserted into the container,\n * the repeater will reuse one of the cached views instead of creating a new\n * embedded view. Recycling cached views reduces the quantity of expensive DOM\n * inserts.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nclass _RecycleViewRepeaterStrategy {\n constructor() {\n /**\n * The size of the cache used to store unused views.\n * Setting the cache size to `0` will disable caching. Defaults to 20 views.\n */\n this.viewCacheSize = 20;\n /**\n * View cache that stores embedded view instances that have been previously stamped out,\n * but don't are not currently rendered. The view repeater will reuse these views rather than\n * creating brand new ones.\n *\n * TODO(michaeljamesparsons) Investigate whether using a linked list would improve performance.\n */\n this._viewCache = [];\n }\n /** Apply changes to the DOM. */\n applyChanges(changes, viewContainerRef, itemContextFactory, itemValueResolver, itemViewChanged) {\n // Rearrange the views to put them in the right location.\n changes.forEachOperation((record, adjustedPreviousIndex, currentIndex) => {\n let view;\n let operation;\n if (record.previousIndex == null) {\n // Item added.\n const viewArgsFactory = () => itemContextFactory(record, adjustedPreviousIndex, currentIndex);\n view = this._insertView(viewArgsFactory, currentIndex, viewContainerRef, itemValueResolver(record));\n operation = view ? 1 /* _ViewRepeaterOperation.INSERTED */ : 0 /* _ViewRepeaterOperation.REPLACED */;\n }\n else if (currentIndex == null) {\n // Item removed.\n this._detachAndCacheView(adjustedPreviousIndex, viewContainerRef);\n operation = 3 /* _ViewRepeaterOperation.REMOVED */;\n }\n else {\n // Item moved.\n view = this._moveView(adjustedPreviousIndex, currentIndex, viewContainerRef, itemValueResolver(record));\n operation = 2 /* _ViewRepeaterOperation.MOVED */;\n }\n if (itemViewChanged) {\n itemViewChanged({\n context: view?.context,\n operation,\n record,\n });\n }\n });\n }\n detach() {\n for (const view of this._viewCache) {\n view.destroy();\n }\n this._viewCache = [];\n }\n /**\n * Inserts a view for a new item, either from the cache or by creating a new\n * one. Returns `undefined` if the item was inserted into a cached view.\n */\n _insertView(viewArgsFactory, currentIndex, viewContainerRef, value) {\n const cachedView = this._insertViewFromCache(currentIndex, viewContainerRef);\n if (cachedView) {\n cachedView.context.$implicit = value;\n return undefined;\n }\n const viewArgs = viewArgsFactory();\n return viewContainerRef.createEmbeddedView(viewArgs.templateRef, viewArgs.context, viewArgs.index);\n }\n /** Detaches the view at the given index and inserts into the view cache. */\n _detachAndCacheView(index, viewContainerRef) {\n const detachedView = viewContainerRef.detach(index);\n this._maybeCacheView(detachedView, viewContainerRef);\n }\n /** Moves view at the previous index to the current index. */\n _moveView(adjustedPreviousIndex, currentIndex, viewContainerRef, value) {\n const view = viewContainerRef.get(adjustedPreviousIndex);\n viewContainerRef.move(view, currentIndex);\n view.context.$implicit = value;\n return view;\n }\n /**\n * Cache the given detached view. If the cache is full, the view will be\n * destroyed.\n */\n _maybeCacheView(view, viewContainerRef) {\n if (this._viewCache.length < this.viewCacheSize) {\n this._viewCache.push(view);\n }\n else {\n const index = viewContainerRef.indexOf(view);\n // The host component could remove views from the container outside of\n // the view repeater. It's unlikely this will occur, but just in case,\n // destroy the view on its own, otherwise destroy it through the\n // container to ensure that all the references are removed.\n if (index === -1) {\n view.destroy();\n }\n else {\n viewContainerRef.remove(index);\n }\n }\n }\n /** Inserts a recycled view from the cache at the given index. */\n _insertViewFromCache(index, viewContainerRef) {\n const cachedView = this._viewCache.pop();\n if (cachedView) {\n viewContainerRef.insert(cachedView, index);\n }\n return cachedView || 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 * Class to be used to power selecting one or more options from a list.\n */\nclass SelectionModel {\n constructor(_multiple = false, initiallySelectedValues, _emitChanges = true, compareWith) {\n this._multiple = _multiple;\n this._emitChanges = _emitChanges;\n this.compareWith = compareWith;\n /** Currently-selected values. */\n this._selection = new Set();\n /** Keeps track of the deselected options that haven't been emitted by the change event. */\n this._deselectedToEmit = [];\n /** Keeps track of the selected options that haven't been emitted by the change event. */\n this._selectedToEmit = [];\n /** Event emitted when the value has changed. */\n this.changed = new Subject();\n if (initiallySelectedValues && initiallySelectedValues.length) {\n if (_multiple) {\n initiallySelectedValues.forEach(value => this._markSelected(value));\n }\n else {\n this._markSelected(initiallySelectedValues[0]);\n }\n // Clear the array in order to avoid firing the change event for preselected values.\n this._selectedToEmit.length = 0;\n }\n }\n /** Selected values. */\n get selected() {\n if (!this._selected) {\n this._selected = Array.from(this._selection.values());\n }\n return this._selected;\n }\n /**\n * Selects a value or an array of values.\n * @param values The values to select\n * @return Whether the selection changed as a result of this call\n * @breaking-change 16.0.0 make return type boolean\n */\n select(...values) {\n this._verifyValueAssignment(values);\n values.forEach(value => this._markSelected(value));\n const changed = this._hasQueuedChanges();\n this._emitChangeEvent();\n return changed;\n }\n /**\n * Deselects a value or an array of values.\n * @param values The values to deselect\n * @return Whether the selection changed as a result of this call\n * @breaking-change 16.0.0 make return type boolean\n */\n deselect(...values) {\n this._verifyValueAssignment(values);\n values.forEach(value => this._unmarkSelected(value));\n const changed = this._hasQueuedChanges();\n this._emitChangeEvent();\n return changed;\n }\n /**\n * Sets the selected values\n * @param values The new selected values\n * @return Whether the selection changed as a result of this call\n * @breaking-change 16.0.0 make return type boolean\n */\n setSelection(...values) {\n this._verifyValueAssignment(values);\n const oldValues = this.selected;\n const newSelectedSet = new Set(values);\n values.forEach(value => this._markSelected(value));\n oldValues\n .filter(value => !newSelectedSet.has(value))\n .forEach(value => this._unmarkSelected(value));\n const changed = this._hasQueuedChanges();\n this._emitChangeEvent();\n return changed;\n }\n /**\n * Toggles a value between selected and deselected.\n * @param value The value to toggle\n * @return Whether the selection changed as a result of this call\n * @breaking-change 16.0.0 make return type boolean\n */\n toggle(value) {\n return this.isSelected(value) ? this.deselect(value) : this.select(value);\n }\n /**\n * Clears all of the selected values.\n * @param flushEvent Whether to flush the changes in an event.\n * If false, the changes to the selection will be flushed along with the next event.\n * @return Whether the selection changed as a result of this call\n * @breaking-change 16.0.0 make return type boolean\n */\n clear(flushEvent = true) {\n this._unmarkAll();\n const changed = this._hasQueuedChanges();\n if (flushEvent) {\n this._emitChangeEvent();\n }\n return changed;\n }\n /**\n * Determines whether a value is selected.\n */\n isSelected(value) {\n if (this.compareWith) {\n for (const otherValue of this._selection) {\n if (this.compareWith(otherValue, value)) {\n return true;\n }\n }\n return false;\n }\n return this._selection.has(value);\n }\n /**\n * Determines whether the model does not have a value.\n */\n isEmpty() {\n return this._selection.size === 0;\n }\n /**\n * Determines whether the model has a value.\n */\n hasValue() {\n return !this.isEmpty();\n }\n /**\n * Sorts the selected values based on a predicate function.\n */\n sort(predicate) {\n if (this._multiple && this.selected) {\n this._selected.sort(predicate);\n }\n }\n /**\n * Gets whether multiple values can be selected.\n */\n isMultipleSelection() {\n return this._multiple;\n }\n /** Emits a change event and clears the records of selected and deselected values. */\n _emitChangeEvent() {\n // Clear the selected values so they can be re-cached.\n this._selected = null;\n if (this._selectedToEmit.length || this._deselectedToEmit.length) {\n this.changed.next({\n source: this,\n added: this._selectedToEmit,\n removed: this._deselectedToEmit,\n });\n this._deselectedToEmit = [];\n this._selectedToEmit = [];\n }\n }\n /** Selects a value. */\n _markSelected(value) {\n if (!this.isSelected(value)) {\n if (!this._multiple) {\n this._unmarkAll();\n }\n if (!this.isSelected(value)) {\n this._selection.add(value);\n }\n if (this._emitChanges) {\n this._selectedToEmit.push(value);\n }\n }\n }\n /** Deselects a value. */\n _unmarkSelected(value) {\n if (this.isSelected(value)) {\n this._selection.delete(value);\n if (this._emitChanges) {\n this._deselectedToEmit.push(value);\n }\n }\n }\n /** Clears out the selected values. */\n _unmarkAll() {\n if (!this.isEmpty()) {\n this._selection.forEach(value => this._unmarkSelected(value));\n }\n }\n /**\n * Verifies the value assignment and throws an error if the specified value array is\n * including multiple values while the selection model is not supporting multiple values.\n */\n _verifyValueAssignment(values) {\n if (values.length > 1 && !this._multiple && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMultipleValuesInSingleSelectionError();\n }\n }\n /** Whether there are queued up change to be emitted. */\n _hasQueuedChanges() {\n return !!(this._deselectedToEmit.length || this._selectedToEmit.length);\n }\n}\n/**\n * Returns an error that reports that multiple values are passed into a selection model\n * with a single value.\n * @docs-private\n */\nfunction getMultipleValuesInSingleSelectionError() {\n return Error('Cannot pass multiple values into SelectionModel with single-value mode.');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Class to coordinate unique selection based on name.\n * Intended to be consumed as an Angular service.\n * This service is needed because native radio change events are only fired on the item currently\n * being selected, and we still need to uncheck the previous selection.\n *\n * This service does not *store* any IDs and names because they may change at any time, so it is\n * less error-prone if they are simply passed through when the events occur.\n */\nclass UniqueSelectionDispatcher {\n constructor() {\n this._listeners = [];\n }\n /**\n * Notify other items that selection for the given name has been set.\n * @param id ID of the item.\n * @param name Name of the item.\n */\n notify(id, name) {\n for (let listener of this._listeners) {\n listener(id, name);\n }\n }\n /**\n * Listen for future changes to item selection.\n * @return Function used to deregister listener\n */\n listen(listener) {\n this._listeners.push(listener);\n return () => {\n this._listeners = this._listeners.filter((registered) => {\n return listener !== registered;\n });\n };\n }\n ngOnDestroy() {\n this._listeners = [];\n }\n}\nUniqueSelectionDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: UniqueSelectionDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nUniqueSelectionDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: UniqueSelectionDispatcher, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: UniqueSelectionDispatcher, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Injection token for {@link _ViewRepeater}. This token is for use by Angular Material only.\n * @docs-private\n */\nconst _VIEW_REPEATER_STRATEGY = new InjectionToken('_ViewRepeater');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Generated bundle index. Do not edit.\n */\n\nexport { ArrayDataSource, DataSource, SelectionModel, UniqueSelectionDispatcher, _DisposeViewRepeaterStrategy, _RecycleViewRepeaterStrategy, _VIEW_REPEATER_STRATEGY, getMultipleValuesInSingleSelectionError, isDataSource };\n","import * as i8 from '@angular/cdk/overlay';\nimport { Overlay, CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';\nimport * as i7 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Directive, EventEmitter, Optional, Inject, Self, Attribute, Input, ViewChild, Output, Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChildren, ContentChild, NgModule } from '@angular/core';\nimport * as i2 from '@angular/material/core';\nimport { mixinDisableRipple, mixinTabIndex, mixinDisabled, mixinErrorState, _countGroupLabelsBeforeOption, _getOptionScrollPosition, MAT_OPTION_PARENT_COMPONENT, MatOption, MAT_OPTGROUP, MatOptionModule, MatCommonModule } from '@angular/material/core';\nimport * as i6 from '@angular/material/form-field';\nimport { MAT_FORM_FIELD, MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';\nimport * as i1 from '@angular/cdk/scrolling';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\nimport * as i5 from '@angular/cdk/a11y';\nimport { ActiveDescendantKeyManager } from '@angular/cdk/a11y';\nimport * as i3 from '@angular/cdk/bidi';\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { SelectionModel } from '@angular/cdk/collections';\nimport { DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, hasModifierKey, A } from '@angular/cdk/keycodes';\nimport * as i4 from '@angular/forms';\nimport { Validators } from '@angular/forms';\nimport { Subject, defer, merge } from 'rxjs';\nimport { startWith, switchMap, take, filter, map, distinctUntilChanged, takeUntil } from 'rxjs/operators';\nimport { trigger, transition, query, animateChild, state, style, animate } from '@angular/animations';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 following are all the animations for the mat-select component, with each\n * const containing the metadata for one animation.\n *\n * The values below match the implementation of the AngularJS Material mat-select animation.\n * @docs-private\n */\nconst matSelectAnimations = {\n /**\n * This animation ensures the select's overlay panel animation (transformPanel) is called when\n * closing the select.\n * This is needed due to https://github.com/angular/angular/issues/23302\n */\n transformPanelWrap: trigger('transformPanelWrap', [\n transition('* => void', query('@transformPanel', [animateChild()], { optional: true })),\n ]),\n /**\n * This animation transforms the select's overlay panel on and off the page.\n *\n * When the panel is attached to the DOM, it expands its width by the amount of padding, scales it\n * up to 100% on the Y axis, fades in its border, and translates slightly up and to the\n * side to ensure the option text correctly overlaps the trigger text.\n *\n * When the panel is removed from the DOM, it simply fades out linearly.\n */\n transformPanel: trigger('transformPanel', [\n state('void', style({\n transform: 'scaleY(0.8)',\n minWidth: '100%',\n opacity: 0,\n })),\n state('showing', style({\n opacity: 1,\n minWidth: 'calc(100% + 32px)',\n transform: 'scaleY(1)',\n })),\n state('showing-multiple', style({\n opacity: 1,\n minWidth: 'calc(100% + 64px)',\n transform: 'scaleY(1)',\n })),\n transition('void => *', animate('120ms cubic-bezier(0, 0, 0.2, 1)')),\n transition('* => void', animate('100ms 25ms linear', style({ opacity: 0 }))),\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 * Returns an exception to be thrown when attempting to change a select's `multiple` option\n * after initialization.\n * @docs-private\n */\nfunction getMatSelectDynamicMultipleError() {\n return Error('Cannot change `multiple` mode of select after initialization.');\n}\n/**\n * Returns an exception to be thrown when attempting to assign a non-array value to a select\n * in `multiple` mode. Note that `undefined` and `null` are still valid values to allow for\n * resetting the value.\n * @docs-private\n */\nfunction getMatSelectNonArrayValueError() {\n return Error('Value must be an array in multiple-selection mode.');\n}\n/**\n * Returns an exception to be thrown when assigning a non-function value to the comparator\n * used to determine if a value corresponds to an option. Note that whether the function\n * actually takes two values and returns a boolean is not checked.\n */\nfunction getMatSelectNonFunctionValueError() {\n return Error('`compareWith` must be a 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 */\nlet nextUniqueId = 0;\n/**\n * The following style constants are necessary to save here in order\n * to properly calculate the alignment of the selected option over\n * the trigger element.\n */\n/** The max height of the select's overlay panel. */\nconst SELECT_PANEL_MAX_HEIGHT = 256;\n/** The panel's padding on the x-axis. */\nconst SELECT_PANEL_PADDING_X = 16;\n/** The panel's x axis padding if it is indented (e.g. there is an option group). */\nconst SELECT_PANEL_INDENT_PADDING_X = SELECT_PANEL_PADDING_X * 2;\n/** The height of the select items in `em` units. */\nconst SELECT_ITEM_HEIGHT_EM = 3;\n// TODO(josephperrott): Revert to a constant after 2018 spec updates are fully merged.\n/**\n * Distance between the panel edge and the option text in\n * multi-selection mode.\n *\n * Calculated as:\n * (SELECT_PANEL_PADDING_X * 1.5) + 16 = 40\n * The padding is multiplied by 1.5 because the checkbox's margin is half the padding.\n * The checkbox width is 16px.\n */\nconst SELECT_MULTIPLE_PANEL_PADDING_X = SELECT_PANEL_PADDING_X * 1.5 + 16;\n/**\n * The select panel will only \"fit\" inside the viewport if it is positioned at\n * this value or more away from the viewport boundary.\n */\nconst SELECT_PANEL_VIEWPORT_PADDING = 8;\n/** Injection token that determines the scroll handling while a select is open. */\nconst MAT_SELECT_SCROLL_STRATEGY = new InjectionToken('mat-select-scroll-strategy');\n/** @docs-private */\nfunction MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n return () => overlay.scrollStrategies.reposition();\n}\n/** Injection token that can be used to provide the default options the select module. */\nconst MAT_SELECT_CONFIG = new InjectionToken('MAT_SELECT_CONFIG');\n/** @docs-private */\nconst MAT_SELECT_SCROLL_STRATEGY_PROVIDER = {\n provide: MAT_SELECT_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n/** Change event object that is emitted when the select value has changed. */\nclass MatSelectChange {\n constructor(\n /** Reference to the select that emitted the change event. */\n source, \n /** Current value of the select that emitted the event. */\n value) {\n this.source = source;\n this.value = value;\n }\n}\n// Boilerplate for applying mixins to MatSelect.\n/** @docs-private */\nconst _MatSelectMixinBase = mixinDisableRipple(mixinTabIndex(mixinDisabled(mixinErrorState(class {\n constructor(_elementRef, _defaultErrorStateMatcher, _parentForm, _parentFormGroup, \n /**\n * Form control bound to the component.\n * Implemented as part of `MatFormFieldControl`.\n * @docs-private\n */\n ngControl) {\n this._elementRef = _elementRef;\n this._defaultErrorStateMatcher = _defaultErrorStateMatcher;\n this._parentForm = _parentForm;\n this._parentFormGroup = _parentFormGroup;\n this.ngControl = ngControl;\n /**\n * Emits whenever the component state changes and should cause the parent\n * form-field to update. Implemented as part of `MatFormFieldControl`.\n * @docs-private\n */\n this.stateChanges = new Subject();\n }\n}))));\n/**\n * Injection token that can be used to reference instances of `MatSelectTrigger`. It serves as\n * alternative token to the actual `MatSelectTrigger` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_SELECT_TRIGGER = new InjectionToken('MatSelectTrigger');\n/**\n * Allows the user to customize the trigger that is displayed when the select has a value.\n */\nclass MatSelectTrigger {\n}\nMatSelectTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSelectTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatSelectTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatSelectTrigger, selector: \"mat-select-trigger\", providers: [{ provide: MAT_SELECT_TRIGGER, useExisting: MatSelectTrigger }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSelectTrigger, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-select-trigger',\n providers: [{ provide: MAT_SELECT_TRIGGER, useExisting: MatSelectTrigger }],\n }]\n }] });\n/** Base class with all of the `MatSelect` functionality. */\nclass _MatSelectBase extends _MatSelectMixinBase {\n constructor(_viewportRuler, _changeDetectorRef, _ngZone, _defaultErrorStateMatcher, elementRef, _dir, _parentForm, _parentFormGroup, _parentFormField, ngControl, tabIndex, scrollStrategyFactory, _liveAnnouncer, _defaultOptions) {\n super(elementRef, _defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl);\n this._viewportRuler = _viewportRuler;\n this._changeDetectorRef = _changeDetectorRef;\n this._ngZone = _ngZone;\n this._dir = _dir;\n this._parentFormField = _parentFormField;\n this._liveAnnouncer = _liveAnnouncer;\n this._defaultOptions = _defaultOptions;\n /** Whether or not the overlay panel is open. */\n this._panelOpen = false;\n /** Comparison function to specify which option is displayed. Defaults to object equality. */\n this._compareWith = (o1, o2) => o1 === o2;\n /** Unique id for this input. */\n this._uid = `mat-select-${nextUniqueId++}`;\n /** Current `aria-labelledby` value for the select trigger. */\n this._triggerAriaLabelledBy = null;\n /** Emits whenever the component is destroyed. */\n this._destroy = new Subject();\n /** `View -> model callback called when value changes` */\n this._onChange = () => { };\n /** `View -> model callback called when select has been touched` */\n this._onTouched = () => { };\n /** ID for the DOM node containing the select's value. */\n this._valueId = `mat-select-value-${nextUniqueId++}`;\n /** Emits when the panel element is finished transforming in. */\n this._panelDoneAnimatingStream = new Subject();\n this._overlayPanelClass = this._defaultOptions?.overlayPanelClass || '';\n this._focused = false;\n /** A name for this control that can be used by `mat-form-field`. */\n this.controlType = 'mat-select';\n this._multiple = false;\n this._disableOptionCentering = this._defaultOptions?.disableOptionCentering ?? false;\n /** Aria label of the select. */\n this.ariaLabel = '';\n /** Combined stream of all of the child options' change events. */\n this.optionSelectionChanges = defer(() => {\n const options = this.options;\n if (options) {\n return options.changes.pipe(startWith(options), switchMap(() => merge(...options.map(option => option.onSelectionChange))));\n }\n return this._ngZone.onStable.pipe(take(1), switchMap(() => this.optionSelectionChanges));\n });\n /** Event emitted when the select panel has been toggled. */\n this.openedChange = new EventEmitter();\n /** Event emitted when the select has been opened. */\n this._openedStream = this.openedChange.pipe(filter(o => o), map(() => { }));\n /** Event emitted when the select has been closed. */\n this._closedStream = this.openedChange.pipe(filter(o => !o), map(() => { }));\n /** Event emitted when the selected value has been changed by the user. */\n this.selectionChange = new EventEmitter();\n /**\n * Event that emits whenever the raw value of the select changes. This is here primarily\n * to facilitate the two-way binding for the `value` input.\n * @docs-private\n */\n this.valueChange = new EventEmitter();\n if (this.ngControl) {\n // Note: we provide the value accessor through here, instead of\n // the `providers` to avoid running into a circular import.\n this.ngControl.valueAccessor = this;\n }\n // Note that we only want to set this when the defaults pass it in, otherwise it should\n // stay as `undefined` so that it falls back to the default in the key manager.\n if (_defaultOptions?.typeaheadDebounceInterval != null) {\n this._typeaheadDebounceInterval = _defaultOptions.typeaheadDebounceInterval;\n }\n this._scrollStrategyFactory = scrollStrategyFactory;\n this._scrollStrategy = this._scrollStrategyFactory();\n this.tabIndex = parseInt(tabIndex) || 0;\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n }\n /** Whether the select is focused. */\n get focused() {\n return this._focused || this._panelOpen;\n }\n /** Placeholder to be shown if no value has been selected. */\n get placeholder() {\n return this._placeholder;\n }\n set placeholder(value) {\n this._placeholder = value;\n this.stateChanges.next();\n }\n /** Whether the component is required. */\n get required() {\n return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;\n }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n /** Whether the user should be allowed to select multiple options. */\n get multiple() {\n return this._multiple;\n }\n set multiple(value) {\n if (this._selectionModel && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatSelectDynamicMultipleError();\n }\n this._multiple = coerceBooleanProperty(value);\n }\n /** Whether to center the active option over the trigger. */\n get disableOptionCentering() {\n return this._disableOptionCentering;\n }\n set disableOptionCentering(value) {\n this._disableOptionCentering = coerceBooleanProperty(value);\n }\n /**\n * Function to compare the option values with the selected values. The first argument\n * is a value from an option. The second is a value from the selection. A boolean\n * should be returned.\n */\n get compareWith() {\n return this._compareWith;\n }\n set compareWith(fn) {\n if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatSelectNonFunctionValueError();\n }\n this._compareWith = fn;\n if (this._selectionModel) {\n // A different comparator means the selection could change.\n this._initializeSelection();\n }\n }\n /** Value of the select control. */\n get value() {\n return this._value;\n }\n set value(newValue) {\n const hasAssigned = this._assignValue(newValue);\n if (hasAssigned) {\n this._onChange(newValue);\n }\n }\n /** Time to wait in milliseconds after the last keystroke before moving focus to an item. */\n get typeaheadDebounceInterval() {\n return this._typeaheadDebounceInterval;\n }\n set typeaheadDebounceInterval(value) {\n this._typeaheadDebounceInterval = coerceNumberProperty(value);\n }\n /** Unique id of the element. */\n get id() {\n return this._id;\n }\n set id(value) {\n this._id = value || this._uid;\n this.stateChanges.next();\n }\n ngOnInit() {\n this._selectionModel = new SelectionModel(this.multiple);\n this.stateChanges.next();\n // We need `distinctUntilChanged` here, because some browsers will\n // fire the animation end event twice for the same animation. See:\n // https://github.com/angular/angular/issues/24084\n this._panelDoneAnimatingStream\n .pipe(distinctUntilChanged(), takeUntil(this._destroy))\n .subscribe(() => this._panelDoneAnimating(this.panelOpen));\n }\n ngAfterContentInit() {\n this._initKeyManager();\n this._selectionModel.changed.pipe(takeUntil(this._destroy)).subscribe(event => {\n event.added.forEach(option => option.select());\n event.removed.forEach(option => option.deselect());\n });\n this.options.changes.pipe(startWith(null), takeUntil(this._destroy)).subscribe(() => {\n this._resetOptions();\n this._initializeSelection();\n });\n }\n ngDoCheck() {\n const newAriaLabelledby = this._getTriggerAriaLabelledby();\n const ngControl = this.ngControl;\n // We have to manage setting the `aria-labelledby` ourselves, because part of its value\n // is computed as a result of a content query which can cause this binding to trigger a\n // \"changed after checked\" error.\n if (newAriaLabelledby !== this._triggerAriaLabelledBy) {\n const element = this._elementRef.nativeElement;\n this._triggerAriaLabelledBy = newAriaLabelledby;\n if (newAriaLabelledby) {\n element.setAttribute('aria-labelledby', newAriaLabelledby);\n }\n else {\n element.removeAttribute('aria-labelledby');\n }\n }\n if (ngControl) {\n // The disabled state might go out of sync if the form group is swapped out. See #17860.\n if (this._previousControl !== ngControl.control) {\n if (this._previousControl !== undefined &&\n ngControl.disabled !== null &&\n ngControl.disabled !== this.disabled) {\n this.disabled = ngControl.disabled;\n }\n this._previousControl = ngControl.control;\n }\n this.updateErrorState();\n }\n }\n ngOnChanges(changes) {\n // Updating the disabled state is handled by `mixinDisabled`, but we need to additionally let\n // the parent form field know to run change detection when the disabled state changes.\n if (changes['disabled'] || changes['userAriaDescribedBy']) {\n this.stateChanges.next();\n }\n if (changes['typeaheadDebounceInterval'] && this._keyManager) {\n this._keyManager.withTypeAhead(this._typeaheadDebounceInterval);\n }\n }\n ngOnDestroy() {\n this._destroy.next();\n this._destroy.complete();\n this.stateChanges.complete();\n }\n /** Toggles the overlay panel open or closed. */\n toggle() {\n this.panelOpen ? this.close() : this.open();\n }\n /** Opens the overlay panel. */\n open() {\n if (this._canOpen()) {\n this._panelOpen = true;\n this._keyManager.withHorizontalOrientation(null);\n this._highlightCorrectOption();\n this._changeDetectorRef.markForCheck();\n }\n }\n /** Closes the overlay panel and focuses the host element. */\n close() {\n if (this._panelOpen) {\n this._panelOpen = false;\n this._keyManager.withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr');\n this._changeDetectorRef.markForCheck();\n this._onTouched();\n }\n }\n /**\n * Sets the select's value. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param value New value to be written to the model.\n */\n writeValue(value) {\n this._assignValue(value);\n }\n /**\n * Saves a callback function to be invoked when the select's value\n * changes from user input. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the value changes.\n */\n registerOnChange(fn) {\n this._onChange = fn;\n }\n /**\n * Saves a callback function to be invoked when the select is blurred\n * by the user. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the component has been touched.\n */\n registerOnTouched(fn) {\n this._onTouched = fn;\n }\n /**\n * Disables the select. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param isDisabled Sets whether the component is disabled.\n */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n this._changeDetectorRef.markForCheck();\n this.stateChanges.next();\n }\n /** Whether or not the overlay panel is open. */\n get panelOpen() {\n return this._panelOpen;\n }\n /** The currently selected option. */\n get selected() {\n return this.multiple ? this._selectionModel?.selected || [] : this._selectionModel?.selected[0];\n }\n /** The value displayed in the trigger. */\n get triggerValue() {\n if (this.empty) {\n return '';\n }\n if (this._multiple) {\n const selectedOptions = this._selectionModel.selected.map(option => option.viewValue);\n if (this._isRtl()) {\n selectedOptions.reverse();\n }\n // TODO(crisbeto): delimiter should be configurable for proper localization.\n return selectedOptions.join(', ');\n }\n return this._selectionModel.selected[0].viewValue;\n }\n /** Whether the element is in RTL mode. */\n _isRtl() {\n return this._dir ? this._dir.value === 'rtl' : false;\n }\n /** Handles all keydown events on the select. */\n _handleKeydown(event) {\n if (!this.disabled) {\n this.panelOpen ? this._handleOpenKeydown(event) : this._handleClosedKeydown(event);\n }\n }\n /** Handles keyboard events while the select is closed. */\n _handleClosedKeydown(event) {\n const keyCode = event.keyCode;\n const isArrowKey = keyCode === DOWN_ARROW ||\n keyCode === UP_ARROW ||\n keyCode === LEFT_ARROW ||\n keyCode === RIGHT_ARROW;\n const isOpenKey = keyCode === ENTER || keyCode === SPACE;\n const manager = this._keyManager;\n // Open the select on ALT + arrow key to match the native <select>\n if ((!manager.isTyping() && isOpenKey && !hasModifierKey(event)) ||\n ((this.multiple || event.altKey) && isArrowKey)) {\n event.preventDefault(); // prevents the page from scrolling down when pressing space\n this.open();\n }\n else if (!this.multiple) {\n const previouslySelectedOption = this.selected;\n manager.onKeydown(event);\n const selectedOption = this.selected;\n // Since the value has changed, we need to announce it ourselves.\n if (selectedOption && previouslySelectedOption !== selectedOption) {\n // We set a duration on the live announcement, because we want the live element to be\n // cleared after a while so that users can't navigate to it using the arrow keys.\n this._liveAnnouncer.announce(selectedOption.viewValue, 10000);\n }\n }\n }\n /** Handles keyboard events when the selected is open. */\n _handleOpenKeydown(event) {\n const manager = this._keyManager;\n const keyCode = event.keyCode;\n const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW;\n const isTyping = manager.isTyping();\n if (isArrowKey && event.altKey) {\n // Close the select on ALT + arrow key to match the native <select>\n event.preventDefault();\n this.close();\n // Don't do anything in this case if the user is typing,\n // because the typing sequence can include the space key.\n }\n else if (!isTyping &&\n (keyCode === ENTER || keyCode === SPACE) &&\n manager.activeItem &&\n !hasModifierKey(event)) {\n event.preventDefault();\n manager.activeItem._selectViaInteraction();\n }\n else if (!isTyping && this._multiple && keyCode === A && event.ctrlKey) {\n event.preventDefault();\n const hasDeselectedOptions = this.options.some(opt => !opt.disabled && !opt.selected);\n this.options.forEach(option => {\n if (!option.disabled) {\n hasDeselectedOptions ? option.select() : option.deselect();\n }\n });\n }\n else {\n const previouslyFocusedIndex = manager.activeItemIndex;\n manager.onKeydown(event);\n if (this._multiple &&\n isArrowKey &&\n event.shiftKey &&\n manager.activeItem &&\n manager.activeItemIndex !== previouslyFocusedIndex) {\n manager.activeItem._selectViaInteraction();\n }\n }\n }\n _onFocus() {\n if (!this.disabled) {\n this._focused = true;\n this.stateChanges.next();\n }\n }\n /**\n * Calls the touched callback only if the panel is closed. Otherwise, the trigger will\n * \"blur\" to the panel when it opens, causing a false positive.\n */\n _onBlur() {\n this._focused = false;\n if (!this.disabled && !this.panelOpen) {\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n this.stateChanges.next();\n }\n }\n /**\n * Callback that is invoked when the overlay panel has been attached.\n */\n _onAttached() {\n this._overlayDir.positionChange.pipe(take(1)).subscribe(() => {\n this._changeDetectorRef.detectChanges();\n this._positioningSettled();\n });\n }\n /** Returns the theme to be used on the panel. */\n _getPanelTheme() {\n return this._parentFormField ? `mat-${this._parentFormField.color}` : '';\n }\n /** Whether the select has a value. */\n get empty() {\n return !this._selectionModel || this._selectionModel.isEmpty();\n }\n _initializeSelection() {\n // Defer setting the value in order to avoid the \"Expression\n // has changed after it was checked\" errors from Angular.\n Promise.resolve().then(() => {\n if (this.ngControl) {\n this._value = this.ngControl.value;\n }\n this._setSelectionByValue(this._value);\n this.stateChanges.next();\n });\n }\n /**\n * Sets the selected option based on a value. If no option can be\n * found with the designated value, the select trigger is cleared.\n */\n _setSelectionByValue(value) {\n this._selectionModel.selected.forEach(option => option.setInactiveStyles());\n this._selectionModel.clear();\n if (this.multiple && value) {\n if (!Array.isArray(value) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatSelectNonArrayValueError();\n }\n value.forEach((currentValue) => this._selectOptionByValue(currentValue));\n this._sortValues();\n }\n else {\n const correspondingOption = this._selectOptionByValue(value);\n // Shift focus to the active item. Note that we shouldn't do this in multiple\n // mode, because we don't know what option the user interacted with last.\n if (correspondingOption) {\n this._keyManager.updateActiveItem(correspondingOption);\n }\n else if (!this.panelOpen) {\n // Otherwise reset the highlighted option. Note that we only want to do this while\n // closed, because doing it while open can shift the user's focus unnecessarily.\n this._keyManager.updateActiveItem(-1);\n }\n }\n this._changeDetectorRef.markForCheck();\n }\n /**\n * Finds and selects and option based on its value.\n * @returns Option that has the corresponding value.\n */\n _selectOptionByValue(value) {\n const correspondingOption = this.options.find((option) => {\n // Skip options that are already in the model. This allows us to handle cases\n // where the same primitive value is selected multiple times.\n if (this._selectionModel.isSelected(option)) {\n return false;\n }\n try {\n // Treat null as a special reset value.\n return option.value != null && this._compareWith(option.value, value);\n }\n catch (error) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Notify developers of errors in their comparator.\n console.warn(error);\n }\n return false;\n }\n });\n if (correspondingOption) {\n this._selectionModel.select(correspondingOption);\n }\n return correspondingOption;\n }\n /** Assigns a specific value to the select. Returns whether the value has changed. */\n _assignValue(newValue) {\n // Always re-assign an array, because it might have been mutated.\n if (newValue !== this._value || (this._multiple && Array.isArray(newValue))) {\n if (this.options) {\n this._setSelectionByValue(newValue);\n }\n this._value = newValue;\n return true;\n }\n return false;\n }\n /** Sets up a key manager to listen to keyboard events on the overlay panel. */\n _initKeyManager() {\n this._keyManager = new ActiveDescendantKeyManager(this.options)\n .withTypeAhead(this._typeaheadDebounceInterval)\n .withVerticalOrientation()\n .withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr')\n .withHomeAndEnd()\n .withAllowedModifierKeys(['shiftKey']);\n this._keyManager.tabOut.pipe(takeUntil(this._destroy)).subscribe(() => {\n if (this.panelOpen) {\n // Select the active item when tabbing away. This is consistent with how the native\n // select behaves. Note that we only want to do this in single selection mode.\n if (!this.multiple && this._keyManager.activeItem) {\n this._keyManager.activeItem._selectViaInteraction();\n }\n // Restore focus to the trigger before closing. Ensures that the focus\n // position won't be lost if the user got focus into the overlay.\n this.focus();\n this.close();\n }\n });\n this._keyManager.change.pipe(takeUntil(this._destroy)).subscribe(() => {\n if (this._panelOpen && this.panel) {\n this._scrollOptionIntoView(this._keyManager.activeItemIndex || 0);\n }\n else if (!this._panelOpen && !this.multiple && this._keyManager.activeItem) {\n this._keyManager.activeItem._selectViaInteraction();\n }\n });\n }\n /** Drops current option subscriptions and IDs and resets from scratch. */\n _resetOptions() {\n const changedOrDestroyed = merge(this.options.changes, this._destroy);\n this.optionSelectionChanges.pipe(takeUntil(changedOrDestroyed)).subscribe(event => {\n this._onSelect(event.source, event.isUserInput);\n if (event.isUserInput && !this.multiple && this._panelOpen) {\n this.close();\n this.focus();\n }\n });\n // Listen to changes in the internal state of the options and react accordingly.\n // Handles cases like the labels of the selected options changing.\n merge(...this.options.map(option => option._stateChanges))\n .pipe(takeUntil(changedOrDestroyed))\n .subscribe(() => {\n this._changeDetectorRef.markForCheck();\n this.stateChanges.next();\n });\n }\n /** Invoked when an option is clicked. */\n _onSelect(option, isUserInput) {\n const wasSelected = this._selectionModel.isSelected(option);\n if (option.value == null && !this._multiple) {\n option.deselect();\n this._selectionModel.clear();\n if (this.value != null) {\n this._propagateChanges(option.value);\n }\n }\n else {\n if (wasSelected !== option.selected) {\n option.selected\n ? this._selectionModel.select(option)\n : this._selectionModel.deselect(option);\n }\n if (isUserInput) {\n this._keyManager.setActiveItem(option);\n }\n if (this.multiple) {\n this._sortValues();\n if (isUserInput) {\n // In case the user selected the option with their mouse, we\n // want to restore focus back to the trigger, in order to\n // prevent the select keyboard controls from clashing with\n // the ones from `mat-option`.\n this.focus();\n }\n }\n }\n if (wasSelected !== this._selectionModel.isSelected(option)) {\n this._propagateChanges();\n }\n this.stateChanges.next();\n }\n /** Sorts the selected values in the selected based on their order in the panel. */\n _sortValues() {\n if (this.multiple) {\n const options = this.options.toArray();\n this._selectionModel.sort((a, b) => {\n return this.sortComparator\n ? this.sortComparator(a, b, options)\n : options.indexOf(a) - options.indexOf(b);\n });\n this.stateChanges.next();\n }\n }\n /** Emits change event to set the model value. */\n _propagateChanges(fallbackValue) {\n let valueToEmit = null;\n if (this.multiple) {\n valueToEmit = this.selected.map(option => option.value);\n }\n else {\n valueToEmit = this.selected ? this.selected.value : fallbackValue;\n }\n this._value = valueToEmit;\n this.valueChange.emit(valueToEmit);\n this._onChange(valueToEmit);\n this.selectionChange.emit(this._getChangeEvent(valueToEmit));\n this._changeDetectorRef.markForCheck();\n }\n /**\n * Highlights the selected item. If no option is selected, it will highlight\n * the first item instead.\n */\n _highlightCorrectOption() {\n if (this._keyManager) {\n if (this.empty) {\n this._keyManager.setFirstItemActive();\n }\n else {\n this._keyManager.setActiveItem(this._selectionModel.selected[0]);\n }\n }\n }\n /** Whether the panel is allowed to open. */\n _canOpen() {\n return !this._panelOpen && !this.disabled && this.options?.length > 0;\n }\n /** Focuses the select element. */\n focus(options) {\n this._elementRef.nativeElement.focus(options);\n }\n /** Gets the aria-labelledby for the select panel. */\n _getPanelAriaLabelledby() {\n if (this.ariaLabel) {\n return null;\n }\n const labelId = this._parentFormField?.getLabelId();\n const labelExpression = labelId ? labelId + ' ' : '';\n return this.ariaLabelledby ? labelExpression + this.ariaLabelledby : labelId;\n }\n /** Determines the `aria-activedescendant` to be set on the host. */\n _getAriaActiveDescendant() {\n if (this.panelOpen && this._keyManager && this._keyManager.activeItem) {\n return this._keyManager.activeItem.id;\n }\n return null;\n }\n /** Gets the aria-labelledby of the select component trigger. */\n _getTriggerAriaLabelledby() {\n if (this.ariaLabel) {\n return null;\n }\n const labelId = this._parentFormField?.getLabelId();\n let value = (labelId ? labelId + ' ' : '') + this._valueId;\n if (this.ariaLabelledby) {\n value += ' ' + this.ariaLabelledby;\n }\n return value;\n }\n /** Called when the overlay panel is done animating. */\n _panelDoneAnimating(isOpen) {\n this.openedChange.emit(isOpen);\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids) {\n if (ids.length) {\n this._elementRef.nativeElement.setAttribute('aria-describedby', ids.join(' '));\n }\n else {\n this._elementRef.nativeElement.removeAttribute('aria-describedby');\n }\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n this.focus();\n this.open();\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldLabelFloat() {\n return this._panelOpen || !this.empty || (this._focused && !!this._placeholder);\n }\n}\n_MatSelectBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatSelectBase, deps: [{ token: i1.ViewportRuler }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i2.ErrorStateMatcher }, { token: i0.ElementRef }, { token: i3.Directionality, optional: true }, { token: i4.NgForm, optional: true }, { token: i4.FormGroupDirective, optional: true }, { token: MAT_FORM_FIELD, optional: true }, { token: i4.NgControl, optional: true, self: true }, { token: 'tabindex', attribute: true }, { token: MAT_SELECT_SCROLL_STRATEGY }, { token: i5.LiveAnnouncer }, { token: MAT_SELECT_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n_MatSelectBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _MatSelectBase, inputs: { userAriaDescribedBy: [\"aria-describedby\", \"userAriaDescribedBy\"], panelClass: \"panelClass\", placeholder: \"placeholder\", required: \"required\", multiple: \"multiple\", disableOptionCentering: \"disableOptionCentering\", compareWith: \"compareWith\", value: \"value\", ariaLabel: [\"aria-label\", \"ariaLabel\"], ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"], errorStateMatcher: \"errorStateMatcher\", typeaheadDebounceInterval: \"typeaheadDebounceInterval\", sortComparator: \"sortComparator\", id: \"id\" }, outputs: { openedChange: \"openedChange\", _openedStream: \"opened\", _closedStream: \"closed\", selectionChange: \"selectionChange\", valueChange: \"valueChange\" }, viewQueries: [{ propertyName: \"trigger\", first: true, predicate: [\"trigger\"], descendants: true }, { propertyName: \"panel\", first: true, predicate: [\"panel\"], descendants: true }, { propertyName: \"_overlayDir\", first: true, predicate: CdkConnectedOverlay, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatSelectBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i1.ViewportRuler }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i2.ErrorStateMatcher }, { type: i0.ElementRef }, { type: i3.Directionality, decorators: [{\n type: Optional\n }] }, { type: i4.NgForm, decorators: [{\n type: Optional\n }] }, { type: i4.FormGroupDirective, decorators: [{\n type: Optional\n }] }, { type: i6.MatFormField, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_FORM_FIELD]\n }] }, { type: i4.NgControl, decorators: [{\n type: Self\n }, {\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_SELECT_SCROLL_STRATEGY]\n }] }, { type: i5.LiveAnnouncer }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_SELECT_CONFIG]\n }] }]; }, propDecorators: { userAriaDescribedBy: [{\n type: Input,\n args: ['aria-describedby']\n }], trigger: [{\n type: ViewChild,\n args: ['trigger']\n }], panel: [{\n type: ViewChild,\n args: ['panel']\n }], _overlayDir: [{\n type: ViewChild,\n args: [CdkConnectedOverlay]\n }], panelClass: [{\n type: Input\n }], placeholder: [{\n type: Input\n }], required: [{\n type: Input\n }], multiple: [{\n type: Input\n }], disableOptionCentering: [{\n type: Input\n }], compareWith: [{\n type: Input\n }], value: [{\n type: Input\n }], ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], ariaLabelledby: [{\n type: Input,\n args: ['aria-labelledby']\n }], errorStateMatcher: [{\n type: Input\n }], typeaheadDebounceInterval: [{\n type: Input\n }], sortComparator: [{\n type: Input\n }], id: [{\n type: Input\n }], openedChange: [{\n type: Output\n }], _openedStream: [{\n type: Output,\n args: ['opened']\n }], _closedStream: [{\n type: Output,\n args: ['closed']\n }], selectionChange: [{\n type: Output\n }], valueChange: [{\n type: Output\n }] } });\nclass MatSelect extends _MatSelectBase {\n constructor() {\n super(...arguments);\n /** The scroll position of the overlay panel, calculated to center the selected option. */\n this._scrollTop = 0;\n /** The cached font-size of the trigger element. */\n this._triggerFontSize = 0;\n /** The value of the select panel's transform-origin property. */\n this._transformOrigin = 'top';\n /**\n * The y-offset of the overlay panel in relation to the trigger's top start corner.\n * This must be adjusted to align the selected option text over the trigger text.\n * when the panel opens. Will change based on the y-position of the selected option.\n */\n this._offsetY = 0;\n this._positions = [\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n },\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'bottom',\n },\n ];\n }\n /**\n * Calculates the scroll position of the select's overlay panel.\n *\n * Attempts to center the selected option in the panel. If the option is\n * too high or too low in the panel to be scrolled to the center, it clamps the\n * scroll position to the min or max scroll positions respectively.\n */\n _calculateOverlayScroll(selectedIndex, scrollBuffer, maxScroll) {\n const itemHeight = this._getItemHeight();\n const optionOffsetFromScrollTop = itemHeight * selectedIndex;\n const halfOptionHeight = itemHeight / 2;\n // Starts at the optionOffsetFromScrollTop, which scrolls the option to the top of the\n // scroll container, then subtracts the scroll buffer to scroll the option down to\n // the center of the overlay panel. Half the option height must be re-added to the\n // scrollTop so the option is centered based on its middle, not its top edge.\n const optimalScrollPosition = optionOffsetFromScrollTop - scrollBuffer + halfOptionHeight;\n return Math.min(Math.max(0, optimalScrollPosition), maxScroll);\n }\n ngOnInit() {\n super.ngOnInit();\n this._viewportRuler\n .change()\n .pipe(takeUntil(this._destroy))\n .subscribe(() => {\n if (this.panelOpen) {\n this._triggerRect = this.trigger.nativeElement.getBoundingClientRect();\n this._changeDetectorRef.markForCheck();\n }\n });\n }\n open() {\n if (super._canOpen()) {\n super.open();\n this._triggerRect = this.trigger.nativeElement.getBoundingClientRect();\n // Note: The computed font-size will be a string pixel value (e.g. \"16px\").\n // `parseInt` ignores the trailing 'px' and converts this to a number.\n this._triggerFontSize = parseInt(getComputedStyle(this.trigger.nativeElement).fontSize || '0');\n this._calculateOverlayPosition();\n // Set the font size on the panel element once it exists.\n this._ngZone.onStable.pipe(take(1)).subscribe(() => {\n if (this._triggerFontSize &&\n this._overlayDir.overlayRef &&\n this._overlayDir.overlayRef.overlayElement) {\n this._overlayDir.overlayRef.overlayElement.style.fontSize = `${this._triggerFontSize}px`;\n }\n });\n }\n }\n /** Scrolls the active option into view. */\n _scrollOptionIntoView(index) {\n const labelCount = _countGroupLabelsBeforeOption(index, this.options, this.optionGroups);\n const itemHeight = this._getItemHeight();\n if (index === 0 && labelCount === 1) {\n // If we've got one group label before the option and we're at the top option,\n // scroll the list to the top. This is better UX than scrolling the list to the\n // top of the option, because it allows the user to read the top group's label.\n this.panel.nativeElement.scrollTop = 0;\n }\n else {\n this.panel.nativeElement.scrollTop = _getOptionScrollPosition((index + labelCount) * itemHeight, itemHeight, this.panel.nativeElement.scrollTop, SELECT_PANEL_MAX_HEIGHT);\n }\n }\n _positioningSettled() {\n this._calculateOverlayOffsetX();\n this.panel.nativeElement.scrollTop = this._scrollTop;\n }\n _panelDoneAnimating(isOpen) {\n if (this.panelOpen) {\n this._scrollTop = 0;\n }\n else {\n this._overlayDir.offsetX = 0;\n this._changeDetectorRef.markForCheck();\n }\n super._panelDoneAnimating(isOpen);\n }\n _getChangeEvent(value) {\n return new MatSelectChange(this, value);\n }\n /**\n * Sets the x-offset of the overlay panel in relation to the trigger's top start corner.\n * This must be adjusted to align the selected option text over the trigger text when\n * the panel opens. Will change based on LTR or RTL text direction. Note that the offset\n * can't be calculated until the panel has been attached, because we need to know the\n * content width in order to constrain the panel within the viewport.\n */\n _calculateOverlayOffsetX() {\n const overlayRect = this._overlayDir.overlayRef.overlayElement.getBoundingClientRect();\n const viewportSize = this._viewportRuler.getViewportSize();\n const isRtl = this._isRtl();\n const paddingWidth = this.multiple\n ? SELECT_MULTIPLE_PANEL_PADDING_X + SELECT_PANEL_PADDING_X\n : SELECT_PANEL_PADDING_X * 2;\n let offsetX;\n // Adjust the offset, depending on the option padding.\n if (this.multiple) {\n offsetX = SELECT_MULTIPLE_PANEL_PADDING_X;\n }\n else if (this.disableOptionCentering) {\n offsetX = SELECT_PANEL_PADDING_X;\n }\n else {\n let selected = this._selectionModel.selected[0] || this.options.first;\n offsetX = selected && selected.group ? SELECT_PANEL_INDENT_PADDING_X : SELECT_PANEL_PADDING_X;\n }\n // Invert the offset in LTR.\n if (!isRtl) {\n offsetX *= -1;\n }\n // Determine how much the select overflows on each side.\n const leftOverflow = 0 - (overlayRect.left + offsetX - (isRtl ? paddingWidth : 0));\n const rightOverflow = overlayRect.right + offsetX - viewportSize.width + (isRtl ? 0 : paddingWidth);\n // If the element overflows on either side, reduce the offset to allow it to fit.\n if (leftOverflow > 0) {\n offsetX += leftOverflow + SELECT_PANEL_VIEWPORT_PADDING;\n }\n else if (rightOverflow > 0) {\n offsetX -= rightOverflow + SELECT_PANEL_VIEWPORT_PADDING;\n }\n // Set the offset directly in order to avoid having to go through change detection and\n // potentially triggering \"changed after it was checked\" errors. Round the value to avoid\n // blurry content in some browsers.\n this._overlayDir.offsetX = Math.round(offsetX);\n this._overlayDir.overlayRef.updatePosition();\n }\n /**\n * Calculates the y-offset of the select's overlay panel in relation to the\n * top start corner of the trigger. It has to be adjusted in order for the\n * selected option to be aligned over the trigger when the panel opens.\n */\n _calculateOverlayOffsetY(selectedIndex, scrollBuffer, maxScroll) {\n const itemHeight = this._getItemHeight();\n const optionHeightAdjustment = (itemHeight - this._triggerRect.height) / 2;\n const maxOptionsDisplayed = Math.floor(SELECT_PANEL_MAX_HEIGHT / itemHeight);\n let optionOffsetFromPanelTop;\n // Disable offset if requested by user by returning 0 as value to offset\n if (this.disableOptionCentering) {\n return 0;\n }\n if (this._scrollTop === 0) {\n optionOffsetFromPanelTop = selectedIndex * itemHeight;\n }\n else if (this._scrollTop === maxScroll) {\n const firstDisplayedIndex = this._getItemCount() - maxOptionsDisplayed;\n const selectedDisplayIndex = selectedIndex - firstDisplayedIndex;\n // The first item is partially out of the viewport. Therefore we need to calculate what\n // portion of it is shown in the viewport and account for it in our offset.\n let partialItemHeight = itemHeight - ((this._getItemCount() * itemHeight - SELECT_PANEL_MAX_HEIGHT) % itemHeight);\n // Because the panel height is longer than the height of the options alone,\n // there is always extra padding at the top or bottom of the panel. When\n // scrolled to the very bottom, this padding is at the top of the panel and\n // must be added to the offset.\n optionOffsetFromPanelTop = selectedDisplayIndex * itemHeight + partialItemHeight;\n }\n else {\n // If the option was scrolled to the middle of the panel using a scroll buffer,\n // its offset will be the scroll buffer minus the half height that was added to\n // center it.\n optionOffsetFromPanelTop = scrollBuffer - itemHeight / 2;\n }\n // The final offset is the option's offset from the top, adjusted for the height difference,\n // multiplied by -1 to ensure that the overlay moves in the correct direction up the page.\n // The value is rounded to prevent some browsers from blurring the content.\n return Math.round(optionOffsetFromPanelTop * -1 - optionHeightAdjustment);\n }\n /**\n * Checks that the attempted overlay position will fit within the viewport.\n * If it will not fit, tries to adjust the scroll position and the associated\n * y-offset so the panel can open fully on-screen. If it still won't fit,\n * sets the offset back to 0 to allow the fallback position to take over.\n */\n _checkOverlayWithinViewport(maxScroll) {\n const itemHeight = this._getItemHeight();\n const viewportSize = this._viewportRuler.getViewportSize();\n const topSpaceAvailable = this._triggerRect.top - SELECT_PANEL_VIEWPORT_PADDING;\n const bottomSpaceAvailable = viewportSize.height - this._triggerRect.bottom - SELECT_PANEL_VIEWPORT_PADDING;\n const panelHeightTop = Math.abs(this._offsetY);\n const totalPanelHeight = Math.min(this._getItemCount() * itemHeight, SELECT_PANEL_MAX_HEIGHT);\n const panelHeightBottom = totalPanelHeight - panelHeightTop - this._triggerRect.height;\n if (panelHeightBottom > bottomSpaceAvailable) {\n this._adjustPanelUp(panelHeightBottom, bottomSpaceAvailable);\n }\n else if (panelHeightTop > topSpaceAvailable) {\n this._adjustPanelDown(panelHeightTop, topSpaceAvailable, maxScroll);\n }\n else {\n this._transformOrigin = this._getOriginBasedOnOption();\n }\n }\n /** Adjusts the overlay panel up to fit in the viewport. */\n _adjustPanelUp(panelHeightBottom, bottomSpaceAvailable) {\n // Browsers ignore fractional scroll offsets, so we need to round.\n const distanceBelowViewport = Math.round(panelHeightBottom - bottomSpaceAvailable);\n // Scrolls the panel up by the distance it was extending past the boundary, then\n // adjusts the offset by that amount to move the panel up into the viewport.\n this._scrollTop -= distanceBelowViewport;\n this._offsetY -= distanceBelowViewport;\n this._transformOrigin = this._getOriginBasedOnOption();\n // If the panel is scrolled to the very top, it won't be able to fit the panel\n // by scrolling, so set the offset to 0 to allow the fallback position to take\n // effect.\n if (this._scrollTop <= 0) {\n this._scrollTop = 0;\n this._offsetY = 0;\n this._transformOrigin = `50% bottom 0px`;\n }\n }\n /** Adjusts the overlay panel down to fit in the viewport. */\n _adjustPanelDown(panelHeightTop, topSpaceAvailable, maxScroll) {\n // Browsers ignore fractional scroll offsets, so we need to round.\n const distanceAboveViewport = Math.round(panelHeightTop - topSpaceAvailable);\n // Scrolls the panel down by the distance it was extending past the boundary, then\n // adjusts the offset by that amount to move the panel down into the viewport.\n this._scrollTop += distanceAboveViewport;\n this._offsetY += distanceAboveViewport;\n this._transformOrigin = this._getOriginBasedOnOption();\n // If the panel is scrolled to the very bottom, it won't be able to fit the\n // panel by scrolling, so set the offset to 0 to allow the fallback position\n // to take effect.\n if (this._scrollTop >= maxScroll) {\n this._scrollTop = maxScroll;\n this._offsetY = 0;\n this._transformOrigin = `50% top 0px`;\n return;\n }\n }\n /** Calculates the scroll position and x- and y-offsets of the overlay panel. */\n _calculateOverlayPosition() {\n const itemHeight = this._getItemHeight();\n const items = this._getItemCount();\n const panelHeight = Math.min(items * itemHeight, SELECT_PANEL_MAX_HEIGHT);\n const scrollContainerHeight = items * itemHeight;\n // The farthest the panel can be scrolled before it hits the bottom\n const maxScroll = scrollContainerHeight - panelHeight;\n // If no value is selected we open the popup to the first item.\n let selectedOptionOffset;\n if (this.empty) {\n selectedOptionOffset = 0;\n }\n else {\n selectedOptionOffset = Math.max(this.options.toArray().indexOf(this._selectionModel.selected[0]), 0);\n }\n selectedOptionOffset += _countGroupLabelsBeforeOption(selectedOptionOffset, this.options, this.optionGroups);\n // We must maintain a scroll buffer so the selected option will be scrolled to the\n // center of the overlay panel rather than the top.\n const scrollBuffer = panelHeight / 2;\n this._scrollTop = this._calculateOverlayScroll(selectedOptionOffset, scrollBuffer, maxScroll);\n this._offsetY = this._calculateOverlayOffsetY(selectedOptionOffset, scrollBuffer, maxScroll);\n this._checkOverlayWithinViewport(maxScroll);\n }\n /** Sets the transform origin point based on the selected option. */\n _getOriginBasedOnOption() {\n const itemHeight = this._getItemHeight();\n const optionHeightAdjustment = (itemHeight - this._triggerRect.height) / 2;\n const originY = Math.abs(this._offsetY) - optionHeightAdjustment + itemHeight / 2;\n return `50% ${originY}px 0px`;\n }\n /** Calculates the height of the select's options. */\n _getItemHeight() {\n return this._triggerFontSize * SELECT_ITEM_HEIGHT_EM;\n }\n /** Calculates the amount of items in the select. This includes options and group labels. */\n _getItemCount() {\n return this.options.length + this.optionGroups.length;\n }\n}\nMatSelect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSelect, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatSelect, selector: \"mat-select\", inputs: { disabled: \"disabled\", disableRipple: \"disableRipple\", tabIndex: \"tabIndex\" }, host: { attributes: { \"role\": \"combobox\", \"aria-autocomplete\": \"none\", \"aria-haspopup\": \"true\" }, listeners: { \"keydown\": \"_handleKeydown($event)\", \"focus\": \"_onFocus()\", \"blur\": \"_onBlur()\" }, properties: { \"attr.id\": \"id\", \"attr.tabindex\": \"tabIndex\", \"attr.aria-controls\": \"panelOpen ? id + \\\"-panel\\\" : null\", \"attr.aria-expanded\": \"panelOpen\", \"attr.aria-label\": \"ariaLabel || null\", \"attr.aria-required\": \"required.toString()\", \"attr.aria-disabled\": \"disabled.toString()\", \"attr.aria-invalid\": \"errorState\", \"attr.aria-activedescendant\": \"_getAriaActiveDescendant()\", \"class.mat-select-disabled\": \"disabled\", \"class.mat-select-invalid\": \"errorState\", \"class.mat-select-required\": \"required\", \"class.mat-select-empty\": \"empty\", \"class.mat-select-multiple\": \"multiple\" }, classAttribute: \"mat-select\" }, providers: [\n { provide: MatFormFieldControl, useExisting: MatSelect },\n { provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatSelect },\n ], queries: [{ propertyName: \"customTrigger\", first: true, predicate: MAT_SELECT_TRIGGER, descendants: true }, { propertyName: \"options\", predicate: MatOption, descendants: true }, { propertyName: \"optionGroups\", predicate: MAT_OPTGROUP, descendants: true }], exportAs: [\"matSelect\"], usesInheritance: true, ngImport: i0, template: \"<!--\\n Note that the select trigger element specifies `aria-owns` pointing to the listbox overlay.\\n While aria-owns is not required for the ARIA 1.2 `role=\\\"combobox\\\"` interaction pattern,\\n it fixes an issue with VoiceOver when the select appears inside of an `aria-model=\\\"true\\\"`\\n element (e.g. a dialog). Without this `aria-owns`, the `aria-modal` on a dialog prevents\\n VoiceOver from \\\"seeing\\\" the select's listbox overlay for aria-activedescendant.\\n Using `aria-owns` re-parents the select overlay so that it works again.\\n See https://github.com/angular/components/issues/20694\\n-->\\n<div cdk-overlay-origin\\n [attr.aria-owns]=\\\"panelOpen ? id + '-panel' : null\\\"\\n class=\\\"mat-select-trigger\\\"\\n (click)=\\\"toggle()\\\"\\n #origin=\\\"cdkOverlayOrigin\\\"\\n #trigger>\\n <div class=\\\"mat-select-value\\\" [ngSwitch]=\\\"empty\\\" [attr.id]=\\\"_valueId\\\">\\n <span class=\\\"mat-select-placeholder mat-select-min-line\\\" *ngSwitchCase=\\\"true\\\">{{placeholder}}</span>\\n <span class=\\\"mat-select-value-text\\\" *ngSwitchCase=\\\"false\\\" [ngSwitch]=\\\"!!customTrigger\\\">\\n <span class=\\\"mat-select-min-line\\\" *ngSwitchDefault>{{triggerValue}}</span>\\n <ng-content select=\\\"mat-select-trigger\\\" *ngSwitchCase=\\\"true\\\"></ng-content>\\n </span>\\n </div>\\n\\n <div class=\\\"mat-select-arrow-wrapper\\\"><div class=\\\"mat-select-arrow\\\"></div></div>\\n</div>\\n\\n<ng-template\\n cdk-connected-overlay\\n cdkConnectedOverlayLockPosition\\n cdkConnectedOverlayHasBackdrop\\n cdkConnectedOverlayBackdropClass=\\\"cdk-overlay-transparent-backdrop\\\"\\n [cdkConnectedOverlayPanelClass]=\\\"_overlayPanelClass\\\"\\n [cdkConnectedOverlayScrollStrategy]=\\\"_scrollStrategy\\\"\\n [cdkConnectedOverlayOrigin]=\\\"origin\\\"\\n [cdkConnectedOverlayOpen]=\\\"panelOpen\\\"\\n [cdkConnectedOverlayPositions]=\\\"_positions\\\"\\n [cdkConnectedOverlayMinWidth]=\\\"_triggerRect?.width!\\\"\\n [cdkConnectedOverlayOffsetY]=\\\"_offsetY\\\"\\n (backdropClick)=\\\"close()\\\"\\n (attach)=\\\"_onAttached()\\\"\\n (detach)=\\\"close()\\\">\\n <div class=\\\"mat-select-panel-wrap\\\" [@transformPanelWrap]>\\n <div\\n #panel\\n role=\\\"listbox\\\"\\n tabindex=\\\"-1\\\"\\n class=\\\"mat-select-panel {{ _getPanelTheme() }}\\\"\\n [attr.id]=\\\"id + '-panel'\\\"\\n [attr.aria-multiselectable]=\\\"multiple\\\"\\n [attr.aria-label]=\\\"ariaLabel || null\\\"\\n [attr.aria-labelledby]=\\\"_getPanelAriaLabelledby()\\\"\\n [ngClass]=\\\"panelClass\\\"\\n [@transformPanel]=\\\"multiple ? 'showing-multiple' : 'showing'\\\"\\n (@transformPanel.done)=\\\"_panelDoneAnimatingStream.next($event.toState)\\\"\\n [style.transformOrigin]=\\\"_transformOrigin\\\"\\n [style.font-size.px]=\\\"_triggerFontSize\\\"\\n (keydown)=\\\"_handleKeydown($event)\\\">\\n <ng-content></ng-content>\\n </div>\\n </div>\\n</ng-template>\\n\", styles: [\".mat-select{display:inline-block;width:100%;outline:none}.mat-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{height:16px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;margin:0 4px}.mat-form-field.mat-focused .mat-select-arrow{transform:translateX(0)}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px;outline:0}.cdk-high-contrast-active .mat-select-panel{outline:solid 1px}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-select-min-line:empty::before{content:\\\" \\\";white-space:pre;width:1px;display:inline-block;visibility:hidden}\"], dependencies: [{ kind: \"directive\", type: i7.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i7.NgSwitch, selector: \"[ngSwitch]\", inputs: [\"ngSwitch\"] }, { kind: \"directive\", type: i7.NgSwitchCase, selector: \"[ngSwitchCase]\", inputs: [\"ngSwitchCase\"] }, { kind: \"directive\", type: i7.NgSwitchDefault, selector: \"[ngSwitchDefault]\" }, { kind: \"directive\", type: i8.CdkConnectedOverlay, selector: \"[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]\", inputs: [\"cdkConnectedOverlayOrigin\", \"cdkConnectedOverlayPositions\", \"cdkConnectedOverlayPositionStrategy\", \"cdkConnectedOverlayOffsetX\", \"cdkConnectedOverlayOffsetY\", \"cdkConnectedOverlayWidth\", \"cdkConnectedOverlayHeight\", \"cdkConnectedOverlayMinWidth\", \"cdkConnectedOverlayMinHeight\", \"cdkConnectedOverlayBackdropClass\", \"cdkConnectedOverlayPanelClass\", \"cdkConnectedOverlayViewportMargin\", \"cdkConnectedOverlayScrollStrategy\", \"cdkConnectedOverlayOpen\", \"cdkConnectedOverlayDisableClose\", \"cdkConnectedOverlayTransformOriginOn\", \"cdkConnectedOverlayHasBackdrop\", \"cdkConnectedOverlayLockPosition\", \"cdkConnectedOverlayFlexibleDimensions\", \"cdkConnectedOverlayGrowAfterOpen\", \"cdkConnectedOverlayPush\"], outputs: [\"backdropClick\", \"positionChange\", \"attach\", \"detach\", \"overlayKeydown\", \"overlayOutsideClick\"], exportAs: [\"cdkConnectedOverlay\"] }, { kind: \"directive\", type: i8.CdkOverlayOrigin, selector: \"[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]\", exportAs: [\"cdkOverlayOrigin\"] }], animations: [matSelectAnimations.transformPanelWrap, matSelectAnimations.transformPanel], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSelect, decorators: [{\n type: Component,\n args: [{ selector: 'mat-select', exportAs: 'matSelect', inputs: ['disabled', 'disableRipple', 'tabIndex'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {\n 'role': 'combobox',\n 'aria-autocomplete': 'none',\n // TODO(crisbeto): the value for aria-haspopup should be `listbox`, but currently it's difficult\n // to sync into Google, because of an outdated automated a11y check which flags it as an invalid\n // value. At some point we should try to switch it back to being `listbox`.\n 'aria-haspopup': 'true',\n 'class': 'mat-select',\n '[attr.id]': 'id',\n '[attr.tabindex]': 'tabIndex',\n '[attr.aria-controls]': 'panelOpen ? id + \"-panel\" : null',\n '[attr.aria-expanded]': 'panelOpen',\n '[attr.aria-label]': 'ariaLabel || null',\n '[attr.aria-required]': 'required.toString()',\n '[attr.aria-disabled]': 'disabled.toString()',\n '[attr.aria-invalid]': 'errorState',\n '[attr.aria-activedescendant]': '_getAriaActiveDescendant()',\n '[class.mat-select-disabled]': 'disabled',\n '[class.mat-select-invalid]': 'errorState',\n '[class.mat-select-required]': 'required',\n '[class.mat-select-empty]': 'empty',\n '[class.mat-select-multiple]': 'multiple',\n '(keydown)': '_handleKeydown($event)',\n '(focus)': '_onFocus()',\n '(blur)': '_onBlur()',\n }, animations: [matSelectAnimations.transformPanelWrap, matSelectAnimations.transformPanel], providers: [\n { provide: MatFormFieldControl, useExisting: MatSelect },\n { provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatSelect },\n ], template: \"<!--\\n Note that the select trigger element specifies `aria-owns` pointing to the listbox overlay.\\n While aria-owns is not required for the ARIA 1.2 `role=\\\"combobox\\\"` interaction pattern,\\n it fixes an issue with VoiceOver when the select appears inside of an `aria-model=\\\"true\\\"`\\n element (e.g. a dialog). Without this `aria-owns`, the `aria-modal` on a dialog prevents\\n VoiceOver from \\\"seeing\\\" the select's listbox overlay for aria-activedescendant.\\n Using `aria-owns` re-parents the select overlay so that it works again.\\n See https://github.com/angular/components/issues/20694\\n-->\\n<div cdk-overlay-origin\\n [attr.aria-owns]=\\\"panelOpen ? id + '-panel' : null\\\"\\n class=\\\"mat-select-trigger\\\"\\n (click)=\\\"toggle()\\\"\\n #origin=\\\"cdkOverlayOrigin\\\"\\n #trigger>\\n <div class=\\\"mat-select-value\\\" [ngSwitch]=\\\"empty\\\" [attr.id]=\\\"_valueId\\\">\\n <span class=\\\"mat-select-placeholder mat-select-min-line\\\" *ngSwitchCase=\\\"true\\\">{{placeholder}}</span>\\n <span class=\\\"mat-select-value-text\\\" *ngSwitchCase=\\\"false\\\" [ngSwitch]=\\\"!!customTrigger\\\">\\n <span class=\\\"mat-select-min-line\\\" *ngSwitchDefault>{{triggerValue}}</span>\\n <ng-content select=\\\"mat-select-trigger\\\" *ngSwitchCase=\\\"true\\\"></ng-content>\\n </span>\\n </div>\\n\\n <div class=\\\"mat-select-arrow-wrapper\\\"><div class=\\\"mat-select-arrow\\\"></div></div>\\n</div>\\n\\n<ng-template\\n cdk-connected-overlay\\n cdkConnectedOverlayLockPosition\\n cdkConnectedOverlayHasBackdrop\\n cdkConnectedOverlayBackdropClass=\\\"cdk-overlay-transparent-backdrop\\\"\\n [cdkConnectedOverlayPanelClass]=\\\"_overlayPanelClass\\\"\\n [cdkConnectedOverlayScrollStrategy]=\\\"_scrollStrategy\\\"\\n [cdkConnectedOverlayOrigin]=\\\"origin\\\"\\n [cdkConnectedOverlayOpen]=\\\"panelOpen\\\"\\n [cdkConnectedOverlayPositions]=\\\"_positions\\\"\\n [cdkConnectedOverlayMinWidth]=\\\"_triggerRect?.width!\\\"\\n [cdkConnectedOverlayOffsetY]=\\\"_offsetY\\\"\\n (backdropClick)=\\\"close()\\\"\\n (attach)=\\\"_onAttached()\\\"\\n (detach)=\\\"close()\\\">\\n <div class=\\\"mat-select-panel-wrap\\\" [@transformPanelWrap]>\\n <div\\n #panel\\n role=\\\"listbox\\\"\\n tabindex=\\\"-1\\\"\\n class=\\\"mat-select-panel {{ _getPanelTheme() }}\\\"\\n [attr.id]=\\\"id + '-panel'\\\"\\n [attr.aria-multiselectable]=\\\"multiple\\\"\\n [attr.aria-label]=\\\"ariaLabel || null\\\"\\n [attr.aria-labelledby]=\\\"_getPanelAriaLabelledby()\\\"\\n [ngClass]=\\\"panelClass\\\"\\n [@transformPanel]=\\\"multiple ? 'showing-multiple' : 'showing'\\\"\\n (@transformPanel.done)=\\\"_panelDoneAnimatingStream.next($event.toState)\\\"\\n [style.transformOrigin]=\\\"_transformOrigin\\\"\\n [style.font-size.px]=\\\"_triggerFontSize\\\"\\n (keydown)=\\\"_handleKeydown($event)\\\">\\n <ng-content></ng-content>\\n </div>\\n </div>\\n</ng-template>\\n\", styles: [\".mat-select{display:inline-block;width:100%;outline:none}.mat-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{height:16px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;margin:0 4px}.mat-form-field.mat-focused .mat-select-arrow{transform:translateX(0)}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px;outline:0}.cdk-high-contrast-active .mat-select-panel{outline:solid 1px}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-select-min-line:empty::before{content:\\\" \\\";white-space:pre;width:1px;display:inline-block;visibility:hidden}\"] }]\n }], propDecorators: { options: [{\n type: ContentChildren,\n args: [MatOption, { descendants: true }]\n }], optionGroups: [{\n type: ContentChildren,\n args: [MAT_OPTGROUP, { descendants: true }]\n }], customTrigger: [{\n type: ContentChild,\n args: [MAT_SELECT_TRIGGER]\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 MatSelectModule {\n}\nMatSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSelectModule, declarations: [MatSelect, MatSelectTrigger], imports: [CommonModule, OverlayModule, MatOptionModule, MatCommonModule], exports: [CdkScrollableModule,\n MatFormFieldModule,\n MatSelect,\n MatSelectTrigger,\n MatOptionModule,\n MatCommonModule] });\nMatSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSelectModule, providers: [MAT_SELECT_SCROLL_STRATEGY_PROVIDER], imports: [CommonModule, OverlayModule, MatOptionModule, MatCommonModule, CdkScrollableModule,\n MatFormFieldModule,\n MatOptionModule,\n MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSelectModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule, OverlayModule, MatOptionModule, MatCommonModule],\n exports: [\n CdkScrollableModule,\n MatFormFieldModule,\n MatSelect,\n MatSelectTrigger,\n MatOptionModule,\n MatCommonModule,\n ],\n declarations: [MatSelect, MatSelectTrigger],\n providers: [MAT_SELECT_SCROLL_STRATEGY_PROVIDER],\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 * Generated bundle index. Do not edit.\n */\n\nexport { MAT_SELECT_CONFIG, MAT_SELECT_SCROLL_STRATEGY, MAT_SELECT_SCROLL_STRATEGY_PROVIDER, MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY, MAT_SELECT_TRIGGER, MatSelect, MatSelectChange, MatSelectModule, MatSelectTrigger, _MatSelectBase, matSelectAnimations };\n","import * as i1 from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { SelectionModel } from '@angular/cdk/collections';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, forwardRef, EventEmitter, Directive, Optional, Inject, ContentChildren, Input, Output, Component, ViewEncapsulation, ChangeDetectionStrategy, Attribute, ViewChild, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport * as i2 from '@angular/material/core';\nimport { mixinDisableRipple, MatCommonModule, MatRippleModule } from '@angular/material/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 * Injection token that can be used to configure the\n * default options for all button toggles within an app.\n */\nconst MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS = new InjectionToken('MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS');\n/**\n * Injection token that can be used to reference instances of `MatButtonToggleGroup`.\n * It serves as alternative token to the actual `MatButtonToggleGroup` class which\n * could cause unnecessary retention of the class and its component metadata.\n */\nconst MAT_BUTTON_TOGGLE_GROUP = new InjectionToken('MatButtonToggleGroup');\n/**\n * Provider Expression that allows mat-button-toggle-group to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n */\nconst MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatButtonToggleGroup),\n multi: true,\n};\n// Counter used to generate unique IDs.\nlet uniqueIdCounter = 0;\n/** Change event object emitted by MatButtonToggle. */\nclass MatButtonToggleChange {\n constructor(\n /** The MatButtonToggle that emits the event. */\n source, \n /** The value assigned to the MatButtonToggle. */\n value) {\n this.source = source;\n this.value = value;\n }\n}\n/** Exclusive selection button toggle group that behaves like a radio-button group. */\nclass MatButtonToggleGroup {\n constructor(_changeDetector, defaultOptions) {\n this._changeDetector = _changeDetector;\n this._vertical = false;\n this._multiple = false;\n this._disabled = false;\n /**\n * The method to be called in order to update ngModel.\n * Now `ngModel` binding is not supported in multiple selection mode.\n */\n this._controlValueAccessorChangeFn = () => { };\n /** onTouch function registered via registerOnTouch (ControlValueAccessor). */\n this._onTouched = () => { };\n this._name = `mat-button-toggle-group-${uniqueIdCounter++}`;\n /**\n * Event that emits whenever the value of the group changes.\n * Used to facilitate two-way data binding.\n * @docs-private\n */\n this.valueChange = new EventEmitter();\n /** Event emitted when the group's value changes. */\n this.change = new EventEmitter();\n this.appearance =\n defaultOptions && defaultOptions.appearance ? defaultOptions.appearance : 'standard';\n }\n /** `name` attribute for the underlying `input` element. */\n get name() {\n return this._name;\n }\n set name(value) {\n this._name = value;\n if (this._buttonToggles) {\n this._buttonToggles.forEach(toggle => {\n toggle.name = this._name;\n toggle._markForCheck();\n });\n }\n }\n /** Whether the toggle group is vertical. */\n get vertical() {\n return this._vertical;\n }\n set vertical(value) {\n this._vertical = coerceBooleanProperty(value);\n }\n /** Value of the toggle group. */\n get value() {\n const selected = this._selectionModel ? this._selectionModel.selected : [];\n if (this.multiple) {\n return selected.map(toggle => toggle.value);\n }\n return selected[0] ? selected[0].value : undefined;\n }\n set value(newValue) {\n this._setSelectionByValue(newValue);\n this.valueChange.emit(this.value);\n }\n /** Selected button toggles in the group. */\n get selected() {\n const selected = this._selectionModel ? this._selectionModel.selected : [];\n return this.multiple ? selected : selected[0] || null;\n }\n /** Whether multiple button toggles can be selected. */\n get multiple() {\n return this._multiple;\n }\n set multiple(value) {\n this._multiple = coerceBooleanProperty(value);\n }\n /** Whether multiple button toggle group is disabled. */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n if (this._buttonToggles) {\n this._buttonToggles.forEach(toggle => toggle._markForCheck());\n }\n }\n ngOnInit() {\n this._selectionModel = new SelectionModel(this.multiple, undefined, false);\n }\n ngAfterContentInit() {\n this._selectionModel.select(...this._buttonToggles.filter(toggle => toggle.checked));\n }\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value Value to be set to the model.\n */\n writeValue(value) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn) {\n this._controlValueAccessorChangeFn = fn;\n }\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn) {\n this._onTouched = fn;\n }\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent() {\n const selected = this.selected;\n const source = Array.isArray(selected) ? selected[selected.length - 1] : selected;\n const event = new MatButtonToggleChange(source, this.value);\n this._controlValueAccessorChangeFn(event.value);\n this.change.emit(event);\n }\n /**\n * Syncs a button toggle's selected state with the model value.\n * @param toggle Toggle to be synced.\n * @param select Whether the toggle should be selected.\n * @param isUserInput Whether the change was a result of a user interaction.\n * @param deferEvents Whether to defer emitting the change events.\n */\n _syncButtonToggle(toggle, select, isUserInput = false, deferEvents = false) {\n // Deselect the currently-selected toggle, if we're in single-selection\n // mode and the button being toggled isn't selected at the moment.\n if (!this.multiple && this.selected && !toggle.checked) {\n this.selected.checked = false;\n }\n if (this._selectionModel) {\n if (select) {\n this._selectionModel.select(toggle);\n }\n else {\n this._selectionModel.deselect(toggle);\n }\n }\n else {\n deferEvents = true;\n }\n // We need to defer in some cases in order to avoid \"changed after checked errors\", however\n // the side-effect is that we may end up updating the model value out of sequence in others\n // The `deferEvents` flag allows us to decide whether to do it on a case-by-case basis.\n if (deferEvents) {\n Promise.resolve().then(() => this._updateModelValue(isUserInput));\n }\n else {\n this._updateModelValue(isUserInput);\n }\n }\n /** Checks whether a button toggle is selected. */\n _isSelected(toggle) {\n return this._selectionModel && this._selectionModel.isSelected(toggle);\n }\n /** Determines whether a button toggle should be checked on init. */\n _isPrechecked(toggle) {\n if (typeof this._rawValue === 'undefined') {\n return false;\n }\n if (this.multiple && Array.isArray(this._rawValue)) {\n return this._rawValue.some(value => toggle.value != null && value === toggle.value);\n }\n return toggle.value === this._rawValue;\n }\n /** Updates the selection state of the toggles in the group based on a value. */\n _setSelectionByValue(value) {\n this._rawValue = value;\n if (!this._buttonToggles) {\n return;\n }\n if (this.multiple && value) {\n if (!Array.isArray(value) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Value must be an array in multiple-selection mode.');\n }\n this._clearSelection();\n value.forEach((currentValue) => this._selectValue(currentValue));\n }\n else {\n this._clearSelection();\n this._selectValue(value);\n }\n }\n /** Clears the selected toggles. */\n _clearSelection() {\n this._selectionModel.clear();\n this._buttonToggles.forEach(toggle => (toggle.checked = false));\n }\n /** Selects a value if there's a toggle that corresponds to it. */\n _selectValue(value) {\n const correspondingOption = this._buttonToggles.find(toggle => {\n return toggle.value != null && toggle.value === value;\n });\n if (correspondingOption) {\n correspondingOption.checked = true;\n this._selectionModel.select(correspondingOption);\n }\n }\n /** Syncs up the group's value with the model and emits the change event. */\n _updateModelValue(isUserInput) {\n // Only emit the change event for user input.\n if (isUserInput) {\n this._emitChangeEvent();\n }\n // Note: we emit this one no matter whether it was a user interaction, because\n // it is used by Angular to sync up the two-way data binding.\n this.valueChange.emit(this.value);\n }\n}\nMatButtonToggleGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatButtonToggleGroup, deps: [{ token: i0.ChangeDetectorRef }, { token: MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatButtonToggleGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatButtonToggleGroup, selector: \"mat-button-toggle-group\", inputs: { appearance: \"appearance\", name: \"name\", vertical: \"vertical\", value: \"value\", multiple: \"multiple\", disabled: \"disabled\" }, outputs: { valueChange: \"valueChange\", change: \"change\" }, host: { attributes: { \"role\": \"group\" }, properties: { \"attr.aria-disabled\": \"disabled\", \"class.mat-button-toggle-vertical\": \"vertical\", \"class.mat-button-toggle-group-appearance-standard\": \"appearance === \\\"standard\\\"\" }, classAttribute: \"mat-button-toggle-group\" }, providers: [\n MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR,\n { provide: MAT_BUTTON_TOGGLE_GROUP, useExisting: MatButtonToggleGroup },\n ], queries: [{ propertyName: \"_buttonToggles\", predicate: i0.forwardRef(function () { return MatButtonToggle; }), descendants: true }], exportAs: [\"matButtonToggleGroup\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatButtonToggleGroup, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-button-toggle-group',\n providers: [\n MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR,\n { provide: MAT_BUTTON_TOGGLE_GROUP, useExisting: MatButtonToggleGroup },\n ],\n host: {\n 'role': 'group',\n 'class': 'mat-button-toggle-group',\n '[attr.aria-disabled]': 'disabled',\n '[class.mat-button-toggle-vertical]': 'vertical',\n '[class.mat-button-toggle-group-appearance-standard]': 'appearance === \"standard\"',\n },\n exportAs: 'matButtonToggleGroup',\n }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS]\n }] }]; }, propDecorators: { _buttonToggles: [{\n type: ContentChildren,\n args: [forwardRef(() => MatButtonToggle), {\n // Note that this would technically pick up toggles\n // from nested groups, but that's not a case that we support.\n descendants: true,\n }]\n }], appearance: [{\n type: Input\n }], name: [{\n type: Input\n }], vertical: [{\n type: Input\n }], value: [{\n type: Input\n }], valueChange: [{\n type: Output\n }], multiple: [{\n type: Input\n }], disabled: [{\n type: Input\n }], change: [{\n type: Output\n }] } });\n// Boilerplate for applying mixins to the MatButtonToggle class.\n/** @docs-private */\nconst _MatButtonToggleBase = mixinDisableRipple(class {\n});\n/** Single button inside of a toggle group. */\nclass MatButtonToggle extends _MatButtonToggleBase {\n constructor(toggleGroup, _changeDetectorRef, _elementRef, _focusMonitor, defaultTabIndex, defaultOptions) {\n super();\n this._changeDetectorRef = _changeDetectorRef;\n this._elementRef = _elementRef;\n this._focusMonitor = _focusMonitor;\n this._isSingleSelector = false;\n this._checked = false;\n /**\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n */\n this.ariaLabelledby = null;\n this._disabled = false;\n /** Event emitted when the group value changes. */\n this.change = new EventEmitter();\n const parsedTabIndex = Number(defaultTabIndex);\n this.tabIndex = parsedTabIndex || parsedTabIndex === 0 ? parsedTabIndex : null;\n this.buttonToggleGroup = toggleGroup;\n this.appearance =\n defaultOptions && defaultOptions.appearance ? defaultOptions.appearance : 'standard';\n }\n /** Unique ID for the underlying `button` element. */\n get buttonId() {\n return `${this.id}-button`;\n }\n /** The appearance style of the button. */\n get appearance() {\n return this.buttonToggleGroup ? this.buttonToggleGroup.appearance : this._appearance;\n }\n set appearance(value) {\n this._appearance = value;\n }\n /** Whether the button is checked. */\n get checked() {\n return this.buttonToggleGroup ? this.buttonToggleGroup._isSelected(this) : this._checked;\n }\n set checked(value) {\n const newValue = coerceBooleanProperty(value);\n if (newValue !== this._checked) {\n this._checked = newValue;\n if (this.buttonToggleGroup) {\n this.buttonToggleGroup._syncButtonToggle(this, this._checked);\n }\n this._changeDetectorRef.markForCheck();\n }\n }\n /** Whether the button is disabled. */\n get disabled() {\n return this._disabled || (this.buttonToggleGroup && this.buttonToggleGroup.disabled);\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n }\n ngOnInit() {\n const group = this.buttonToggleGroup;\n this._isSingleSelector = group && !group.multiple;\n this.id = this.id || `mat-button-toggle-${uniqueIdCounter++}`;\n if (this._isSingleSelector) {\n this.name = group.name;\n }\n if (group) {\n if (group._isPrechecked(this)) {\n this.checked = true;\n }\n else if (group._isSelected(this) !== this._checked) {\n // As as side effect of the circular dependency between the toggle group and the button,\n // we may end up in a state where the button is supposed to be checked on init, but it\n // isn't, because the checked value was assigned too early. This can happen when Ivy\n // assigns the static input value before the `ngOnInit` has run.\n group._syncButtonToggle(this, this._checked);\n }\n }\n }\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true);\n }\n ngOnDestroy() {\n const group = this.buttonToggleGroup;\n this._focusMonitor.stopMonitoring(this._elementRef);\n // Remove the toggle from the selection once it's destroyed. Needs to happen\n // on the next tick in order to avoid \"changed after checked\" errors.\n if (group && group._isSelected(this)) {\n group._syncButtonToggle(this, false, false, true);\n }\n }\n /** Focuses the button. */\n focus(options) {\n this._buttonElement.nativeElement.focus(options);\n }\n /** Checks the button toggle due to an interaction with the underlying native button. */\n _onButtonClick() {\n const newChecked = this._isSingleSelector ? true : !this._checked;\n if (newChecked !== this._checked) {\n this._checked = newChecked;\n if (this.buttonToggleGroup) {\n this.buttonToggleGroup._syncButtonToggle(this, this._checked, true);\n this.buttonToggleGroup._onTouched();\n }\n }\n // Emit a change event when it's the single selector\n this.change.emit(new MatButtonToggleChange(this, this.value));\n }\n /**\n * Marks the button toggle as needing checking for change detection.\n * This method is exposed because the parent button toggle group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When the group value changes, the button will not be notified.\n // Use `markForCheck` to explicit update button toggle's status.\n this._changeDetectorRef.markForCheck();\n }\n}\nMatButtonToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatButtonToggle, deps: [{ token: MAT_BUTTON_TOGGLE_GROUP, optional: true }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1.FocusMonitor }, { token: 'tabindex', attribute: true }, { token: MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatButtonToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatButtonToggle, selector: \"mat-button-toggle\", inputs: { disableRipple: \"disableRipple\", ariaLabel: [\"aria-label\", \"ariaLabel\"], ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"], id: \"id\", name: \"name\", value: \"value\", tabIndex: \"tabIndex\", appearance: \"appearance\", checked: \"checked\", disabled: \"disabled\" }, outputs: { change: \"change\" }, host: { attributes: { \"role\": \"presentation\" }, listeners: { \"focus\": \"focus()\" }, properties: { \"class.mat-button-toggle-standalone\": \"!buttonToggleGroup\", \"class.mat-button-toggle-checked\": \"checked\", \"class.mat-button-toggle-disabled\": \"disabled\", \"class.mat-button-toggle-appearance-standard\": \"appearance === \\\"standard\\\"\", \"attr.aria-label\": \"null\", \"attr.aria-labelledby\": \"null\", \"attr.id\": \"id\", \"attr.name\": \"null\" }, classAttribute: \"mat-button-toggle\" }, viewQueries: [{ propertyName: \"_buttonElement\", first: true, predicate: [\"button\"], descendants: true }], exportAs: [\"matButtonToggle\"], usesInheritance: true, ngImport: i0, template: \"<button #button class=\\\"mat-button-toggle-button mat-focus-indicator\\\"\\n type=\\\"button\\\"\\n [id]=\\\"buttonId\\\"\\n [attr.tabindex]=\\\"disabled ? -1 : tabIndex\\\"\\n [attr.aria-pressed]=\\\"checked\\\"\\n [disabled]=\\\"disabled || null\\\"\\n [attr.name]=\\\"name || null\\\"\\n [attr.aria-label]=\\\"ariaLabel\\\"\\n [attr.aria-labelledby]=\\\"ariaLabelledby\\\"\\n (click)=\\\"_onButtonClick()\\\">\\n <span class=\\\"mat-button-toggle-label-content\\\">\\n <ng-content></ng-content>\\n </span>\\n</button>\\n\\n<span class=\\\"mat-button-toggle-focus-overlay\\\"></span>\\n<span class=\\\"mat-button-toggle-ripple\\\" matRipple\\n [matRippleTrigger]=\\\"button\\\"\\n [matRippleDisabled]=\\\"this.disableRipple || this.disabled\\\">\\n</span>\\n\", styles: [\".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;border-radius:2px;-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0)}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:4px}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.04}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.12}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 36px;opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}\"], dependencies: [{ kind: \"directive\", type: i2.MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatButtonToggle, decorators: [{\n type: Component,\n args: [{ selector: 'mat-button-toggle', encapsulation: ViewEncapsulation.None, exportAs: 'matButtonToggle', changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['disableRipple'], host: {\n '[class.mat-button-toggle-standalone]': '!buttonToggleGroup',\n '[class.mat-button-toggle-checked]': 'checked',\n '[class.mat-button-toggle-disabled]': 'disabled',\n '[class.mat-button-toggle-appearance-standard]': 'appearance === \"standard\"',\n 'class': 'mat-button-toggle',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.id]': 'id',\n '[attr.name]': 'null',\n '(focus)': 'focus()',\n 'role': 'presentation',\n }, template: \"<button #button class=\\\"mat-button-toggle-button mat-focus-indicator\\\"\\n type=\\\"button\\\"\\n [id]=\\\"buttonId\\\"\\n [attr.tabindex]=\\\"disabled ? -1 : tabIndex\\\"\\n [attr.aria-pressed]=\\\"checked\\\"\\n [disabled]=\\\"disabled || null\\\"\\n [attr.name]=\\\"name || null\\\"\\n [attr.aria-label]=\\\"ariaLabel\\\"\\n [attr.aria-labelledby]=\\\"ariaLabelledby\\\"\\n (click)=\\\"_onButtonClick()\\\">\\n <span class=\\\"mat-button-toggle-label-content\\\">\\n <ng-content></ng-content>\\n </span>\\n</button>\\n\\n<span class=\\\"mat-button-toggle-focus-overlay\\\"></span>\\n<span class=\\\"mat-button-toggle-ripple\\\" matRipple\\n [matRippleTrigger]=\\\"button\\\"\\n [matRippleDisabled]=\\\"this.disableRipple || this.disabled\\\">\\n</span>\\n\", styles: [\".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;border-radius:2px;-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0)}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:4px}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.04}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.12}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 36px;opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}\"] }]\n }], ctorParameters: function () { return [{ type: MatButtonToggleGroup, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_BUTTON_TOGGLE_GROUP]\n }] }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.FocusMonitor }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS]\n }] }]; }, propDecorators: { ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], ariaLabelledby: [{\n type: Input,\n args: ['aria-labelledby']\n }], _buttonElement: [{\n type: ViewChild,\n args: ['button']\n }], id: [{\n type: Input\n }], name: [{\n type: Input\n }], value: [{\n type: Input\n }], tabIndex: [{\n type: Input\n }], appearance: [{\n type: Input\n }], checked: [{\n type: Input\n }], disabled: [{\n type: Input\n }], change: [{\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 */\nclass MatButtonToggleModule {\n}\nMatButtonToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatButtonToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatButtonToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatButtonToggleModule, declarations: [MatButtonToggleGroup, MatButtonToggle], imports: [MatCommonModule, MatRippleModule], exports: [MatCommonModule, MatButtonToggleGroup, MatButtonToggle] });\nMatButtonToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatButtonToggleModule, imports: [MatCommonModule, MatRippleModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatButtonToggleModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [MatCommonModule, MatRippleModule],\n exports: [MatCommonModule, MatButtonToggleGroup, MatButtonToggle],\n declarations: [MatButtonToggleGroup, MatButtonToggle],\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 * Generated bundle index. Do not edit.\n */\n\nexport { MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS, MAT_BUTTON_TOGGLE_GROUP, MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR, MatButtonToggle, MatButtonToggleChange, MatButtonToggleGroup, MatButtonToggleModule };\n","import * as i3 from '@angular/cdk/observers';\nimport { ObserversModule } from '@angular/cdk/observers';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, forwardRef, EventEmitter, Directive, Input, Output, Component, ViewEncapsulation, ChangeDetectionStrategy, Attribute, Inject, Optional, ViewChild, NgModule } from '@angular/core';\nimport * as i2 from '@angular/material/core';\nimport { mixinTabIndex, mixinColor, mixinDisableRipple, mixinDisabled, MatRippleModule, MatCommonModule } from '@angular/material/core';\nimport * as i1 from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxRequiredValidator } from '@angular/forms';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token to be used to override the default options for `mat-slide-toggle`. */\nconst MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS = new InjectionToken('mat-slide-toggle-default-options', {\n providedIn: 'root',\n factory: () => ({ disableToggleValue: 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// Increasing integer for generating unique ids for slide-toggle components.\nlet nextUniqueId = 0;\n/** @docs-private */\nconst MAT_SLIDE_TOGGLE_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatSlideToggle),\n multi: true,\n};\n/** Change event object emitted by a MatSlideToggle. */\nclass MatSlideToggleChange {\n constructor(\n /** The source MatSlideToggle of the event. */\n source, \n /** The new `checked` value of the MatSlideToggle. */\n checked) {\n this.source = source;\n this.checked = checked;\n }\n}\n// Boilerplate for applying mixins to MatSlideToggle.\n/** @docs-private */\nconst _MatSlideToggleMixinBase = mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(class {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n}))));\nclass _MatSlideToggleBase extends _MatSlideToggleMixinBase {\n constructor(elementRef, _focusMonitor, _changeDetectorRef, tabIndex, defaults, animationMode, idPrefix) {\n super(elementRef);\n this._focusMonitor = _focusMonitor;\n this._changeDetectorRef = _changeDetectorRef;\n this.defaults = defaults;\n this._onChange = (_) => { };\n this._onTouched = () => { };\n this._required = false;\n this._checked = false;\n /** Name value will be applied to the input element if present. */\n this.name = null;\n /** Whether the label should appear after or before the slide-toggle. Defaults to 'after'. */\n this.labelPosition = 'after';\n /** Used to set the aria-label attribute on the underlying input element. */\n this.ariaLabel = null;\n /** Used to set the aria-labelledby attribute on the underlying input element. */\n this.ariaLabelledby = null;\n /** An event will be dispatched each time the slide-toggle changes its value. */\n this.change = new EventEmitter();\n /**\n * An event will be dispatched each time the slide-toggle input is toggled.\n * This event is always emitted when the user toggles the slide toggle, but this does not mean\n * the slide toggle's value has changed.\n */\n this.toggleChange = new EventEmitter();\n this.tabIndex = parseInt(tabIndex) || 0;\n this.color = this.defaultColor = defaults.color || 'accent';\n this._noopAnimations = animationMode === 'NoopAnimations';\n this.id = this._uniqueId = `${idPrefix}${++nextUniqueId}`;\n }\n /** Whether the slide-toggle is required. */\n get required() {\n return this._required;\n }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n }\n /** Whether the slide-toggle element is checked or not. */\n get checked() {\n return this._checked;\n }\n set checked(value) {\n this._checked = coerceBooleanProperty(value);\n this._changeDetectorRef.markForCheck();\n }\n /** Returns the unique id for the visual hidden input. */\n get inputId() {\n return `${this.id || this._uniqueId}-input`;\n }\n ngAfterContentInit() {\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (focusOrigin === 'keyboard' || focusOrigin === 'program') {\n this._focused = true;\n }\n else if (!focusOrigin) {\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state\n // change (such as a form control's ng-touched) will cause a changed-after-checked error.\n // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n // telling the form control it has been touched until the next tick.\n Promise.resolve().then(() => {\n this._focused = false;\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n });\n }\n });\n }\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n /** Implemented as part of ControlValueAccessor. */\n writeValue(value) {\n this.checked = !!value;\n }\n /** Implemented as part of ControlValueAccessor. */\n registerOnChange(fn) {\n this._onChange = fn;\n }\n /** Implemented as part of ControlValueAccessor. */\n registerOnTouched(fn) {\n this._onTouched = fn;\n }\n /** Implemented as a part of ControlValueAccessor. */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n this._changeDetectorRef.markForCheck();\n }\n /** Toggles the checked state of the slide-toggle. */\n toggle() {\n this.checked = !this.checked;\n this._onChange(this.checked);\n }\n /**\n * Emits a change event on the `change` output. Also notifies the FormControl about the change.\n */\n _emitChangeEvent() {\n this._onChange(this.checked);\n this.change.emit(this._createChangeEvent(this.checked));\n }\n}\n_MatSlideToggleBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatSlideToggleBase, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Directive });\n_MatSlideToggleBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _MatSlideToggleBase, inputs: { name: \"name\", id: \"id\", labelPosition: \"labelPosition\", ariaLabel: [\"aria-label\", \"ariaLabel\"], ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"], ariaDescribedby: [\"aria-describedby\", \"ariaDescribedby\"], required: \"required\", checked: \"checked\" }, outputs: { change: \"change\", toggleChange: \"toggleChange\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatSlideToggleBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: undefined }, { type: undefined }, { type: undefined }, { type: undefined }]; }, propDecorators: { name: [{\n type: Input\n }], id: [{\n type: Input\n }], labelPosition: [{\n type: Input\n }], ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], ariaLabelledby: [{\n type: Input,\n args: ['aria-labelledby']\n }], ariaDescribedby: [{\n type: Input,\n args: ['aria-describedby']\n }], required: [{\n type: Input\n }], checked: [{\n type: Input\n }], change: [{\n type: Output\n }], toggleChange: [{\n type: Output\n }] } });\n/** Represents a slidable \"switch\" toggle that can be moved between on and off. */\nclass MatSlideToggle extends _MatSlideToggleBase {\n constructor(elementRef, focusMonitor, changeDetectorRef, tabIndex, defaults, animationMode) {\n super(elementRef, focusMonitor, changeDetectorRef, tabIndex, defaults, animationMode, 'mat-slide-toggle-');\n }\n _createChangeEvent(isChecked) {\n return new MatSlideToggleChange(this, isChecked);\n }\n /** Method being called whenever the underlying input emits a change event. */\n _onChangeEvent(event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the component's `change` output.\n event.stopPropagation();\n this.toggleChange.emit();\n // When the slide toggle's config disables toggle change event by setting\n // `disableToggleValue: true`, the slide toggle's value does not change, and the\n // checked state of the underlying input needs to be changed back.\n if (this.defaults.disableToggleValue) {\n this._inputElement.nativeElement.checked = this.checked;\n return;\n }\n // Sync the value from the underlying input element with the component instance.\n this.checked = this._inputElement.nativeElement.checked;\n // Emit our custom change event only if the underlying input emitted one. This ensures that\n // there is no change event, when the checked state changes programmatically.\n this._emitChangeEvent();\n }\n /** Method being called whenever the slide-toggle has been clicked. */\n _onInputClick(event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `slide-toggle` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n }\n /** Focuses the slide-toggle. */\n focus(options, origin) {\n if (origin) {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n }\n else {\n this._inputElement.nativeElement.focus(options);\n }\n }\n /** Method being called whenever the label text changes. */\n _onLabelTextChange() {\n // Since the event of the `cdkObserveContent` directive runs outside of the zone, the\n // slide-toggle component will be only marked for check, but no actual change detection runs\n // automatically. Instead of going back into the zone in order to trigger a change detection\n // which causes *all* components to be checked (if explicitly marked or not using OnPush),\n // we only trigger an explicit change detection for the slide-toggle view and its children.\n this._changeDetectorRef.detectChanges();\n }\n}\nMatSlideToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSlideToggle, deps: [{ token: i0.ElementRef }, { token: i1.FocusMonitor }, { token: i0.ChangeDetectorRef }, { token: 'tabindex', attribute: true }, { token: MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatSlideToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatSlideToggle, selector: \"mat-slide-toggle\", inputs: { disabled: \"disabled\", disableRipple: \"disableRipple\", color: \"color\", tabIndex: \"tabIndex\" }, host: { properties: { \"id\": \"id\", \"attr.tabindex\": \"null\", \"attr.aria-label\": \"null\", \"attr.aria-labelledby\": \"null\", \"attr.name\": \"null\", \"class.mat-checked\": \"checked\", \"class.mat-disabled\": \"disabled\", \"class.mat-slide-toggle-label-before\": \"labelPosition == \\\"before\\\"\", \"class._mat-animation-noopable\": \"_noopAnimations\" }, classAttribute: \"mat-slide-toggle\" }, providers: [MAT_SLIDE_TOGGLE_VALUE_ACCESSOR], viewQueries: [{ propertyName: \"_inputElement\", first: true, predicate: [\"input\"], descendants: true }], exportAs: [\"matSlideToggle\"], usesInheritance: true, ngImport: i0, template: \"<label [attr.for]=\\\"inputId\\\" class=\\\"mat-slide-toggle-label\\\" #label>\\n <span class=\\\"mat-slide-toggle-bar\\\"\\n [class.mat-slide-toggle-bar-no-side-margin]=\\\"!labelContent.textContent || !labelContent.textContent.trim()\\\">\\n\\n <input #input class=\\\"mat-slide-toggle-input cdk-visually-hidden\\\" type=\\\"checkbox\\\"\\n role=\\\"switch\\\"\\n [id]=\\\"inputId\\\"\\n [required]=\\\"required\\\"\\n [tabIndex]=\\\"tabIndex\\\"\\n [checked]=\\\"checked\\\"\\n [disabled]=\\\"disabled\\\"\\n [attr.name]=\\\"name\\\"\\n [attr.aria-checked]=\\\"checked\\\"\\n [attr.aria-label]=\\\"ariaLabel\\\"\\n [attr.aria-labelledby]=\\\"ariaLabelledby\\\"\\n [attr.aria-describedby]=\\\"ariaDescribedby\\\"\\n (change)=\\\"_onChangeEvent($event)\\\"\\n (click)=\\\"_onInputClick($event)\\\">\\n\\n <span class=\\\"mat-slide-toggle-thumb-container\\\">\\n <span class=\\\"mat-slide-toggle-thumb\\\"></span>\\n <span class=\\\"mat-slide-toggle-ripple mat-focus-indicator\\\" mat-ripple\\n [matRippleTrigger]=\\\"label\\\"\\n [matRippleDisabled]=\\\"disableRipple || disabled\\\"\\n [matRippleCentered]=\\\"true\\\"\\n [matRippleRadius]=\\\"20\\\"\\n [matRippleAnimation]=\\\"{enterDuration: _noopAnimations ? 0 : 150}\\\">\\n\\n <span class=\\\"mat-ripple-element mat-slide-toggle-persistent-ripple\\\"></span>\\n </span>\\n </span>\\n\\n </span>\\n\\n <span class=\\\"mat-slide-toggle-content\\\" #labelContent (cdkObserveContent)=\\\"_onLabelTextChange()\\\">\\n <!-- Add an invisible span so JAWS can read the label -->\\n <span style=\\\"display:none\\\"> </span>\\n <ng-content></ng-content>\\n </span>\\n</label>\\n\", styles: [\".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{-webkit-user-select:none;user-select:none;display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%;display:block}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.mat-slide-toggle-input:focus~.mat-slide-toggle-thumb-container .mat-focus-indicator::before{content:\\\"\\\"}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}\"], dependencies: [{ kind: \"directive\", type: i2.MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }, { kind: \"directive\", type: i3.CdkObserveContent, selector: \"[cdkObserveContent]\", inputs: [\"cdkObserveContentDisabled\", \"debounce\"], outputs: [\"cdkObserveContent\"], exportAs: [\"cdkObserveContent\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSlideToggle, decorators: [{\n type: Component,\n args: [{ selector: 'mat-slide-toggle', exportAs: 'matSlideToggle', host: {\n 'class': 'mat-slide-toggle',\n '[id]': 'id',\n // Needs to be removed since it causes some a11y issues (see #21266).\n '[attr.tabindex]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.name]': 'null',\n '[class.mat-checked]': 'checked',\n '[class.mat-disabled]': 'disabled',\n '[class.mat-slide-toggle-label-before]': 'labelPosition == \"before\"',\n '[class._mat-animation-noopable]': '_noopAnimations',\n }, providers: [MAT_SLIDE_TOGGLE_VALUE_ACCESSOR], inputs: ['disabled', 'disableRipple', 'color', 'tabIndex'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"<label [attr.for]=\\\"inputId\\\" class=\\\"mat-slide-toggle-label\\\" #label>\\n <span class=\\\"mat-slide-toggle-bar\\\"\\n [class.mat-slide-toggle-bar-no-side-margin]=\\\"!labelContent.textContent || !labelContent.textContent.trim()\\\">\\n\\n <input #input class=\\\"mat-slide-toggle-input cdk-visually-hidden\\\" type=\\\"checkbox\\\"\\n role=\\\"switch\\\"\\n [id]=\\\"inputId\\\"\\n [required]=\\\"required\\\"\\n [tabIndex]=\\\"tabIndex\\\"\\n [checked]=\\\"checked\\\"\\n [disabled]=\\\"disabled\\\"\\n [attr.name]=\\\"name\\\"\\n [attr.aria-checked]=\\\"checked\\\"\\n [attr.aria-label]=\\\"ariaLabel\\\"\\n [attr.aria-labelledby]=\\\"ariaLabelledby\\\"\\n [attr.aria-describedby]=\\\"ariaDescribedby\\\"\\n (change)=\\\"_onChangeEvent($event)\\\"\\n (click)=\\\"_onInputClick($event)\\\">\\n\\n <span class=\\\"mat-slide-toggle-thumb-container\\\">\\n <span class=\\\"mat-slide-toggle-thumb\\\"></span>\\n <span class=\\\"mat-slide-toggle-ripple mat-focus-indicator\\\" mat-ripple\\n [matRippleTrigger]=\\\"label\\\"\\n [matRippleDisabled]=\\\"disableRipple || disabled\\\"\\n [matRippleCentered]=\\\"true\\\"\\n [matRippleRadius]=\\\"20\\\"\\n [matRippleAnimation]=\\\"{enterDuration: _noopAnimations ? 0 : 150}\\\">\\n\\n <span class=\\\"mat-ripple-element mat-slide-toggle-persistent-ripple\\\"></span>\\n </span>\\n </span>\\n\\n </span>\\n\\n <span class=\\\"mat-slide-toggle-content\\\" #labelContent (cdkObserveContent)=\\\"_onLabelTextChange()\\\">\\n <!-- Add an invisible span so JAWS can read the label -->\\n <span style=\\\"display:none\\\"> </span>\\n <ng-content></ng-content>\\n </span>\\n</label>\\n\", styles: [\".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{-webkit-user-select:none;user-select:none;display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%;display:block}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.mat-slide-toggle-input:focus~.mat-slide-toggle-thumb-container .mat-focus-indicator::before{content:\\\"\\\"}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { _inputElement: [{\n type: ViewChild,\n args: ['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 MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MatSlideToggleRequiredValidator),\n multi: true,\n};\n/**\n * Validator for Material slide-toggle components with the required attribute in a\n * template-driven form. The default validator for required form controls asserts\n * that the control value is not undefined but that is not appropriate for a slide-toggle\n * where the value is always defined.\n *\n * Required slide-toggle form controls are valid when checked.\n */\nclass MatSlideToggleRequiredValidator extends CheckboxRequiredValidator {\n}\nMatSlideToggleRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSlideToggleRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatSlideToggleRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatSlideToggleRequiredValidator, selector: \"mat-slide-toggle[required][formControlName],\\n mat-slide-toggle[required][formControl], mat-slide-toggle[required][ngModel]\", providers: [MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSlideToggleRequiredValidator, decorators: [{\n type: Directive,\n args: [{\n selector: `mat-slide-toggle[required][formControlName],\n mat-slide-toggle[required][formControl], mat-slide-toggle[required][ngModel]`,\n providers: [MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR],\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 module is used by both original and MDC-based slide-toggle implementations. */\nclass _MatSlideToggleRequiredValidatorModule {\n}\n_MatSlideToggleRequiredValidatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatSlideToggleRequiredValidatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n_MatSlideToggleRequiredValidatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatSlideToggleRequiredValidatorModule, declarations: [MatSlideToggleRequiredValidator], exports: [MatSlideToggleRequiredValidator] });\n_MatSlideToggleRequiredValidatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatSlideToggleRequiredValidatorModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatSlideToggleRequiredValidatorModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [MatSlideToggleRequiredValidator],\n declarations: [MatSlideToggleRequiredValidator],\n }]\n }] });\nclass MatSlideToggleModule {\n}\nMatSlideToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSlideToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatSlideToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSlideToggleModule, declarations: [MatSlideToggle], imports: [_MatSlideToggleRequiredValidatorModule, MatRippleModule,\n MatCommonModule,\n ObserversModule], exports: [_MatSlideToggleRequiredValidatorModule, MatSlideToggle, MatCommonModule] });\nMatSlideToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSlideToggleModule, imports: [_MatSlideToggleRequiredValidatorModule,\n MatRippleModule,\n MatCommonModule,\n ObserversModule, _MatSlideToggleRequiredValidatorModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSlideToggleModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [\n _MatSlideToggleRequiredValidatorModule,\n MatRippleModule,\n MatCommonModule,\n ObserversModule,\n ],\n exports: [_MatSlideToggleRequiredValidatorModule, MatSlideToggle, MatCommonModule],\n declarations: [MatSlideToggle],\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 * Generated bundle index. Do not edit.\n */\n\nexport { MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS, MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR, MAT_SLIDE_TOGGLE_VALUE_ACCESSOR, MatSlideToggle, MatSlideToggleChange, MatSlideToggleModule, MatSlideToggleRequiredValidator, _MatSlideToggleBase, _MatSlideToggleRequiredValidatorModule };\n","import * as i1 from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, forwardRef, EventEmitter, Directive, Input, Output, ViewChild, Component, ViewEncapsulation, ChangeDetectionStrategy, Attribute, Optional, Inject, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxRequiredValidator } from '@angular/forms';\nimport * as i2 from '@angular/material/core';\nimport { mixinTabIndex, mixinColor, mixinDisableRipple, mixinDisabled, MatRipple, MatRippleModule, MatCommonModule } from '@angular/material/core';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\nimport * as i3 from '@angular/cdk/observers';\nimport { ObserversModule } from '@angular/cdk/observers';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token to be used to override the default options for `mat-checkbox`. */\nconst MAT_CHECKBOX_DEFAULT_OPTIONS = new InjectionToken('mat-checkbox-default-options', {\n providedIn: 'root',\n factory: MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY,\n});\n/** @docs-private */\nfunction MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY() {\n return {\n color: 'accent',\n clickAction: 'check-indeterminate',\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// Increasing integer for generating unique ids for checkbox components.\nlet nextUniqueId = 0;\n// Default checkbox configuration.\nconst defaults = MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY();\n/**\n * Provider Expression that allows mat-checkbox to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n */\nconst MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatCheckbox),\n multi: true,\n};\n/** Change event object emitted by MatCheckbox. */\nclass MatCheckboxChange {\n}\n// Boilerplate for applying mixins to MatCheckbox.\n/** @docs-private */\nconst _MatCheckboxMixinBase = mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(class {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n}))));\nclass _MatCheckboxBase extends _MatCheckboxMixinBase {\n constructor(idPrefix, elementRef, _changeDetectorRef, _ngZone, tabIndex, _animationMode, _options) {\n super(elementRef);\n this._changeDetectorRef = _changeDetectorRef;\n this._ngZone = _ngZone;\n this._animationMode = _animationMode;\n this._options = _options;\n /**\n * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will\n * take precedence so this may be omitted.\n */\n this.ariaLabel = '';\n /**\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n */\n this.ariaLabelledby = null;\n /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n this.labelPosition = 'after';\n /** Name value will be applied to the input element if present */\n this.name = null;\n /** Event emitted when the checkbox's `checked` value changes. */\n this.change = new EventEmitter();\n /** Event emitted when the checkbox's `indeterminate` value changes. */\n this.indeterminateChange = new EventEmitter();\n /**\n * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n * @docs-private\n */\n this._onTouched = () => { };\n this._currentAnimationClass = '';\n this._currentCheckState = 0 /* TransitionCheckState.Init */;\n this._controlValueAccessorChangeFn = () => { };\n this._checked = false;\n this._disabled = false;\n this._indeterminate = false;\n this._options = this._options || defaults;\n this.color = this.defaultColor = this._options.color || defaults.color;\n this.tabIndex = parseInt(tabIndex) || 0;\n this.id = this._uniqueId = `${idPrefix}${++nextUniqueId}`;\n }\n /** Returns the unique id for the visual hidden input. */\n get inputId() {\n return `${this.id || this._uniqueId}-input`;\n }\n /** Whether the checkbox is required. */\n get required() {\n return this._required;\n }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n }\n ngAfterViewInit() {\n this._syncIndeterminate(this._indeterminate);\n }\n /** Whether the checkbox is checked. */\n get checked() {\n return this._checked;\n }\n set checked(value) {\n const checked = coerceBooleanProperty(value);\n if (checked != this.checked) {\n this._checked = checked;\n this._changeDetectorRef.markForCheck();\n }\n }\n /**\n * Whether the checkbox is disabled. This fully overrides the implementation provided by\n * mixinDisabled, but the mixin is still required because mixinTabIndex requires it.\n */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n const newValue = coerceBooleanProperty(value);\n if (newValue !== this.disabled) {\n this._disabled = newValue;\n this._changeDetectorRef.markForCheck();\n }\n }\n /**\n * Whether the checkbox is indeterminate. This is also known as \"mixed\" mode and can be used to\n * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n * set to false.\n */\n get indeterminate() {\n return this._indeterminate;\n }\n set indeterminate(value) {\n const changed = value != this._indeterminate;\n this._indeterminate = coerceBooleanProperty(value);\n if (changed) {\n if (this._indeterminate) {\n this._transitionCheckState(3 /* TransitionCheckState.Indeterminate */);\n }\n else {\n this._transitionCheckState(this.checked ? 1 /* TransitionCheckState.Checked */ : 2 /* TransitionCheckState.Unchecked */);\n }\n this.indeterminateChange.emit(this._indeterminate);\n }\n this._syncIndeterminate(this._indeterminate);\n }\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n /** Method being called whenever the label text changes. */\n _onLabelTextChange() {\n // Since the event of the `cdkObserveContent` directive runs outside of the zone, the checkbox\n // component will be only marked for check, but no actual change detection runs automatically.\n // Instead of going back into the zone in order to trigger a change detection which causes\n // *all* components to be checked (if explicitly marked or not using OnPush), we only trigger\n // an explicit change detection for the checkbox view and its children.\n this._changeDetectorRef.detectChanges();\n }\n // Implemented as part of ControlValueAccessor.\n writeValue(value) {\n this.checked = !!value;\n }\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn) {\n this._controlValueAccessorChangeFn = fn;\n }\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn) {\n this._onTouched = fn;\n }\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n _getAriaChecked() {\n if (this.checked) {\n return 'true';\n }\n return this.indeterminate ? 'mixed' : 'false';\n }\n _transitionCheckState(newState) {\n let oldState = this._currentCheckState;\n let element = this._getAnimationTargetElement();\n if (oldState === newState || !element) {\n return;\n }\n if (this._currentAnimationClass) {\n element.classList.remove(this._currentAnimationClass);\n }\n this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(oldState, newState);\n this._currentCheckState = newState;\n if (this._currentAnimationClass.length > 0) {\n element.classList.add(this._currentAnimationClass);\n // Remove the animation class to avoid animation when the checkbox is moved between containers\n const animationClass = this._currentAnimationClass;\n this._ngZone.runOutsideAngular(() => {\n setTimeout(() => {\n element.classList.remove(animationClass);\n }, 1000);\n });\n }\n }\n _emitChangeEvent() {\n this._controlValueAccessorChangeFn(this.checked);\n this.change.emit(this._createChangeEvent(this.checked));\n // Assigning the value again here is redundant, but we have to do it in case it was\n // changed inside the `change` listener which will cause the input to be out of sync.\n if (this._inputElement) {\n this._inputElement.nativeElement.checked = this.checked;\n }\n }\n /** Toggles the `checked` state of the checkbox. */\n toggle() {\n this.checked = !this.checked;\n this._controlValueAccessorChangeFn(this.checked);\n }\n _handleInputClick() {\n const clickAction = this._options?.clickAction;\n // If resetIndeterminate is false, and the current state is indeterminate, do nothing on click\n if (!this.disabled && clickAction !== 'noop') {\n // When user manually click on the checkbox, `indeterminate` is set to false.\n if (this.indeterminate && clickAction !== 'check') {\n Promise.resolve().then(() => {\n this._indeterminate = false;\n this.indeterminateChange.emit(this._indeterminate);\n });\n }\n this._checked = !this._checked;\n this._transitionCheckState(this._checked ? 1 /* TransitionCheckState.Checked */ : 2 /* TransitionCheckState.Unchecked */);\n // Emit our custom change event if the native input emitted one.\n // It is important to only emit it, if the native input triggered one, because\n // we don't want to trigger a change event, when the `checked` variable changes for example.\n this._emitChangeEvent();\n }\n else if (!this.disabled && clickAction === 'noop') {\n // Reset native input when clicked with noop. The native checkbox becomes checked after\n // click, reset it to be align with `checked` value of `mat-checkbox`.\n this._inputElement.nativeElement.checked = this.checked;\n this._inputElement.nativeElement.indeterminate = this.indeterminate;\n }\n }\n _onInteractionEvent(event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n }\n _onBlur() {\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state change\n // (such as a form control's 'ng-touched') will cause a changed-after-checked error.\n // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n // telling the form control it has been touched until the next tick.\n Promise.resolve().then(() => {\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n });\n }\n _getAnimationClassForCheckStateTransition(oldState, newState) {\n // Don't transition if animations are disabled.\n if (this._animationMode === 'NoopAnimations') {\n return '';\n }\n switch (oldState) {\n case 0 /* TransitionCheckState.Init */:\n // Handle edge case where user interacts with checkbox that does not have [(ngModel)] or\n // [checked] bound to it.\n if (newState === 1 /* TransitionCheckState.Checked */) {\n return this._animationClasses.uncheckedToChecked;\n }\n else if (newState == 3 /* TransitionCheckState.Indeterminate */) {\n return this._checked\n ? this._animationClasses.checkedToIndeterminate\n : this._animationClasses.uncheckedToIndeterminate;\n }\n break;\n case 2 /* TransitionCheckState.Unchecked */:\n return newState === 1 /* TransitionCheckState.Checked */\n ? this._animationClasses.uncheckedToChecked\n : this._animationClasses.uncheckedToIndeterminate;\n case 1 /* TransitionCheckState.Checked */:\n return newState === 2 /* TransitionCheckState.Unchecked */\n ? this._animationClasses.checkedToUnchecked\n : this._animationClasses.checkedToIndeterminate;\n case 3 /* TransitionCheckState.Indeterminate */:\n return newState === 1 /* TransitionCheckState.Checked */\n ? this._animationClasses.indeterminateToChecked\n : this._animationClasses.indeterminateToUnchecked;\n }\n return '';\n }\n /**\n * Syncs the indeterminate value with the checkbox DOM node.\n *\n * We sync `indeterminate` directly on the DOM node, because in Ivy the check for whether a\n * property is supported on an element boils down to `if (propName in element)`. Domino's\n * HTMLInputElement doesn't have an `indeterminate` property so Ivy will warn during\n * server-side rendering.\n */\n _syncIndeterminate(value) {\n const nativeCheckbox = this._inputElement;\n if (nativeCheckbox) {\n nativeCheckbox.nativeElement.indeterminate = value;\n }\n }\n}\n_MatCheckboxBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatCheckboxBase, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Directive });\n_MatCheckboxBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _MatCheckboxBase, inputs: { ariaLabel: [\"aria-label\", \"ariaLabel\"], ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"], ariaDescribedby: [\"aria-describedby\", \"ariaDescribedby\"], id: \"id\", required: \"required\", labelPosition: \"labelPosition\", name: \"name\", value: \"value\", checked: \"checked\", disabled: \"disabled\", indeterminate: \"indeterminate\" }, outputs: { change: \"change\", indeterminateChange: \"indeterminateChange\" }, viewQueries: [{ propertyName: \"_inputElement\", first: true, predicate: [\"input\"], descendants: true }, { propertyName: \"_labelElement\", first: true, predicate: [\"label\"], descendants: true }, { propertyName: \"ripple\", first: true, predicate: MatRipple, descendants: true }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatCheckboxBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: undefined }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined }, { type: undefined }, { type: undefined }]; }, propDecorators: { ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], ariaLabelledby: [{\n type: Input,\n args: ['aria-labelledby']\n }], ariaDescribedby: [{\n type: Input,\n args: ['aria-describedby']\n }], id: [{\n type: Input\n }], required: [{\n type: Input\n }], labelPosition: [{\n type: Input\n }], name: [{\n type: Input\n }], change: [{\n type: Output\n }], indeterminateChange: [{\n type: Output\n }], value: [{\n type: Input\n }], _inputElement: [{\n type: ViewChild,\n args: ['input']\n }], _labelElement: [{\n type: ViewChild,\n args: ['label']\n }], ripple: [{\n type: ViewChild,\n args: [MatRipple]\n }], checked: [{\n type: Input\n }], disabled: [{\n type: Input\n }], indeterminate: [{\n type: Input\n }] } });\n/**\n * A material design checkbox component. Supports all of the functionality of an HTML5 checkbox,\n * and exposes a similar API. A MatCheckbox can be either checked, unchecked, indeterminate, or\n * disabled. Note that all additional accessibility attributes are taken care of by the component,\n * so there is no need to provide them yourself. However, if you want to omit a label and still\n * have the checkbox be accessible, you may supply an [aria-label] input.\n * See: https://material.io/design/components/selection-controls.html\n */\nclass MatCheckbox extends _MatCheckboxBase {\n constructor(elementRef, changeDetectorRef, _focusMonitor, ngZone, tabIndex, animationMode, options) {\n super('mat-checkbox-', elementRef, changeDetectorRef, ngZone, tabIndex, animationMode, options);\n this._focusMonitor = _focusMonitor;\n this._animationClasses = {\n uncheckedToChecked: 'mat-checkbox-anim-unchecked-checked',\n uncheckedToIndeterminate: 'mat-checkbox-anim-unchecked-indeterminate',\n checkedToUnchecked: 'mat-checkbox-anim-checked-unchecked',\n checkedToIndeterminate: 'mat-checkbox-anim-checked-indeterminate',\n indeterminateToChecked: 'mat-checkbox-anim-indeterminate-checked',\n indeterminateToUnchecked: 'mat-checkbox-anim-indeterminate-unchecked',\n };\n }\n _createChangeEvent(isChecked) {\n const event = new MatCheckboxChange();\n event.source = this;\n event.checked = isChecked;\n return event;\n }\n _getAnimationTargetElement() {\n return this._elementRef.nativeElement;\n }\n ngAfterViewInit() {\n super.ngAfterViewInit();\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (!focusOrigin) {\n this._onBlur();\n }\n });\n }\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n /**\n * Event handler for checkbox input element.\n * Toggles checked state if element is not disabled.\n * Do not toggle on (change) event since IE doesn't fire change event when\n * indeterminate checkbox is clicked.\n * @param event\n */\n _onInputClick(event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `checkbox` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n super._handleInputClick();\n }\n /** Focuses the checkbox. */\n focus(origin, options) {\n if (origin) {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n }\n else {\n this._inputElement.nativeElement.focus(options);\n }\n }\n}\nMatCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatCheckbox, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.FocusMonitor }, { token: i0.NgZone }, { token: 'tabindex', attribute: true }, { token: ANIMATION_MODULE_TYPE, optional: true }, { token: MAT_CHECKBOX_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatCheckbox, selector: \"mat-checkbox\", inputs: { disableRipple: \"disableRipple\", color: \"color\", tabIndex: \"tabIndex\" }, host: { properties: { \"id\": \"id\", \"attr.tabindex\": \"null\", \"attr.aria-label\": \"null\", \"attr.aria-labelledby\": \"null\", \"class.mat-checkbox-indeterminate\": \"indeterminate\", \"class.mat-checkbox-checked\": \"checked\", \"class.mat-checkbox-disabled\": \"disabled\", \"class.mat-checkbox-label-before\": \"labelPosition == \\\"before\\\"\", \"class._mat-animation-noopable\": \"_animationMode === 'NoopAnimations'\" }, classAttribute: \"mat-checkbox\" }, providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR], exportAs: [\"matCheckbox\"], usesInheritance: true, ngImport: i0, template: \"<label [attr.for]=\\\"inputId\\\" class=\\\"mat-checkbox-layout\\\" #label>\\n <span class=\\\"mat-checkbox-inner-container\\\"\\n [class.mat-checkbox-inner-container-no-side-margin]=\\\"!checkboxLabel.textContent || !checkboxLabel.textContent.trim()\\\">\\n <input #input\\n class=\\\"mat-checkbox-input cdk-visually-hidden\\\" type=\\\"checkbox\\\"\\n [id]=\\\"inputId\\\"\\n [required]=\\\"required\\\"\\n [checked]=\\\"checked\\\"\\n [attr.value]=\\\"value\\\"\\n [disabled]=\\\"disabled\\\"\\n [attr.name]=\\\"name\\\"\\n [tabIndex]=\\\"tabIndex\\\"\\n [attr.aria-label]=\\\"ariaLabel || null\\\"\\n [attr.aria-labelledby]=\\\"ariaLabelledby\\\"\\n [attr.aria-checked]=\\\"_getAriaChecked()\\\"\\n [attr.aria-describedby]=\\\"ariaDescribedby\\\"\\n (change)=\\\"_onInteractionEvent($event)\\\"\\n (click)=\\\"_onInputClick($event)\\\">\\n <span matRipple class=\\\"mat-checkbox-ripple mat-focus-indicator\\\"\\n [matRippleTrigger]=\\\"label\\\"\\n [matRippleDisabled]=\\\"_isRippleDisabled()\\\"\\n [matRippleRadius]=\\\"20\\\"\\n [matRippleCentered]=\\\"true\\\"\\n [matRippleAnimation]=\\\"{enterDuration: _animationMode === 'NoopAnimations' ? 0 : 150}\\\">\\n <span class=\\\"mat-ripple-element mat-checkbox-persistent-ripple\\\"></span>\\n </span>\\n <span class=\\\"mat-checkbox-frame\\\"></span>\\n <span class=\\\"mat-checkbox-background\\\">\\n <svg version=\\\"1.1\\\"\\n focusable=\\\"false\\\"\\n class=\\\"mat-checkbox-checkmark\\\"\\n viewBox=\\\"0 0 24 24\\\"\\n aria-hidden=\\\"true\\\">\\n <path class=\\\"mat-checkbox-checkmark-path\\\"\\n fill=\\\"none\\\"\\n stroke=\\\"white\\\"\\n d=\\\"M4.1,12.7 9,17.6 20.3,6.3\\\"/>\\n </svg>\\n <!-- Element for rendering the indeterminate state checkbox. -->\\n <span class=\\\"mat-checkbox-mixedmark\\\"></span>\\n </span>\\n </span>\\n <span class=\\\"mat-checkbox-label\\\" #checkboxLabel (cdkObserveContent)=\\\"_onLabelTextChange()\\\">\\n <!-- Add an invisible span so JAWS can read the label -->\\n <span style=\\\"display:none\\\"> </span>\\n <ng-content></ng-content>\\n </span>\\n</label>\\n\", styles: [\"@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{display:inline-block;transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative}.mat-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-checkbox-layout{-webkit-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:rgba(0,0,0,0);transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1);-webkit-print-color-adjust:exact;color-adjust:exact}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{display:block;width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:rgba(0,0,0,0)}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox-input:focus~.mat-focus-indicator::before{content:\\\"\\\"}\"], dependencies: [{ kind: \"directive\", type: i2.MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }, { kind: \"directive\", type: i3.CdkObserveContent, selector: \"[cdkObserveContent]\", inputs: [\"cdkObserveContentDisabled\", \"debounce\"], outputs: [\"cdkObserveContent\"], exportAs: [\"cdkObserveContent\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatCheckbox, decorators: [{\n type: Component,\n args: [{ selector: 'mat-checkbox', exportAs: 'matCheckbox', host: {\n 'class': 'mat-checkbox',\n '[id]': 'id',\n '[attr.tabindex]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[class.mat-checkbox-indeterminate]': 'indeterminate',\n '[class.mat-checkbox-checked]': 'checked',\n '[class.mat-checkbox-disabled]': 'disabled',\n '[class.mat-checkbox-label-before]': 'labelPosition == \"before\"',\n '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,\n }, providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR], inputs: ['disableRipple', 'color', 'tabIndex'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"<label [attr.for]=\\\"inputId\\\" class=\\\"mat-checkbox-layout\\\" #label>\\n <span class=\\\"mat-checkbox-inner-container\\\"\\n [class.mat-checkbox-inner-container-no-side-margin]=\\\"!checkboxLabel.textContent || !checkboxLabel.textContent.trim()\\\">\\n <input #input\\n class=\\\"mat-checkbox-input cdk-visually-hidden\\\" type=\\\"checkbox\\\"\\n [id]=\\\"inputId\\\"\\n [required]=\\\"required\\\"\\n [checked]=\\\"checked\\\"\\n [attr.value]=\\\"value\\\"\\n [disabled]=\\\"disabled\\\"\\n [attr.name]=\\\"name\\\"\\n [tabIndex]=\\\"tabIndex\\\"\\n [attr.aria-label]=\\\"ariaLabel || null\\\"\\n [attr.aria-labelledby]=\\\"ariaLabelledby\\\"\\n [attr.aria-checked]=\\\"_getAriaChecked()\\\"\\n [attr.aria-describedby]=\\\"ariaDescribedby\\\"\\n (change)=\\\"_onInteractionEvent($event)\\\"\\n (click)=\\\"_onInputClick($event)\\\">\\n <span matRipple class=\\\"mat-checkbox-ripple mat-focus-indicator\\\"\\n [matRippleTrigger]=\\\"label\\\"\\n [matRippleDisabled]=\\\"_isRippleDisabled()\\\"\\n [matRippleRadius]=\\\"20\\\"\\n [matRippleCentered]=\\\"true\\\"\\n [matRippleAnimation]=\\\"{enterDuration: _animationMode === 'NoopAnimations' ? 0 : 150}\\\">\\n <span class=\\\"mat-ripple-element mat-checkbox-persistent-ripple\\\"></span>\\n </span>\\n <span class=\\\"mat-checkbox-frame\\\"></span>\\n <span class=\\\"mat-checkbox-background\\\">\\n <svg version=\\\"1.1\\\"\\n focusable=\\\"false\\\"\\n class=\\\"mat-checkbox-checkmark\\\"\\n viewBox=\\\"0 0 24 24\\\"\\n aria-hidden=\\\"true\\\">\\n <path class=\\\"mat-checkbox-checkmark-path\\\"\\n fill=\\\"none\\\"\\n stroke=\\\"white\\\"\\n d=\\\"M4.1,12.7 9,17.6 20.3,6.3\\\"/>\\n </svg>\\n <!-- Element for rendering the indeterminate state checkbox. -->\\n <span class=\\\"mat-checkbox-mixedmark\\\"></span>\\n </span>\\n </span>\\n <span class=\\\"mat-checkbox-label\\\" #checkboxLabel (cdkObserveContent)=\\\"_onLabelTextChange()\\\">\\n <!-- Add an invisible span so JAWS can read the label -->\\n <span style=\\\"display:none\\\"> </span>\\n <ng-content></ng-content>\\n </span>\\n</label>\\n\", styles: [\"@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{display:inline-block;transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative}.mat-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-checkbox-layout{-webkit-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:rgba(0,0,0,0);transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1);-webkit-print-color-adjust:exact;color-adjust:exact}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{display:block;width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:rgba(0,0,0,0)}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox-input:focus~.mat-focus-indicator::before{content:\\\"\\\"}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.FocusMonitor }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_CHECKBOX_DEFAULT_OPTIONS]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 MAT_CHECKBOX_REQUIRED_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MatCheckboxRequiredValidator),\n multi: true,\n};\n/**\n * Validator for Material checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `mat-checkbox`.\n */\nclass MatCheckboxRequiredValidator extends CheckboxRequiredValidator {\n}\nMatCheckboxRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatCheckboxRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatCheckboxRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatCheckboxRequiredValidator, selector: \"mat-checkbox[required][formControlName],\\n mat-checkbox[required][formControl], mat-checkbox[required][ngModel]\", providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatCheckboxRequiredValidator, decorators: [{\n type: Directive,\n args: [{\n selector: `mat-checkbox[required][formControlName],\n mat-checkbox[required][formControl], mat-checkbox[required][ngModel]`,\n providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR],\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 module is used by both original and MDC-based checkbox implementations. */\nclass _MatCheckboxRequiredValidatorModule {\n}\n_MatCheckboxRequiredValidatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatCheckboxRequiredValidatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n_MatCheckboxRequiredValidatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatCheckboxRequiredValidatorModule, declarations: [MatCheckboxRequiredValidator], exports: [MatCheckboxRequiredValidator] });\n_MatCheckboxRequiredValidatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatCheckboxRequiredValidatorModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatCheckboxRequiredValidatorModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [MatCheckboxRequiredValidator],\n declarations: [MatCheckboxRequiredValidator],\n }]\n }] });\nclass MatCheckboxModule {\n}\nMatCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatCheckboxModule, declarations: [MatCheckbox], imports: [MatRippleModule, MatCommonModule, ObserversModule, _MatCheckboxRequiredValidatorModule], exports: [MatCheckbox, MatCommonModule, _MatCheckboxRequiredValidatorModule] });\nMatCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatCheckboxModule, imports: [MatRippleModule, MatCommonModule, ObserversModule, _MatCheckboxRequiredValidatorModule, MatCommonModule, _MatCheckboxRequiredValidatorModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatCheckboxModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [MatRippleModule, MatCommonModule, ObserversModule, _MatCheckboxRequiredValidatorModule],\n exports: [MatCheckbox, MatCommonModule, _MatCheckboxRequiredValidatorModule],\n declarations: [MatCheckbox],\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 * Generated bundle index. Do not edit.\n */\n\nexport { MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR, MAT_CHECKBOX_DEFAULT_OPTIONS, MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY, MAT_CHECKBOX_REQUIRED_VALIDATOR, MatCheckbox, MatCheckboxChange, MatCheckboxModule, MatCheckboxRequiredValidator, _MatCheckboxBase, _MatCheckboxRequiredValidatorModule };\n","import { Observable } from '../Observable';\nimport { isFunction } from './isFunction';\nexport function isObservable(obj) {\n return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe)));\n}\n","import * as i1 from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { _VIEW_REPEATER_STRATEGY, _RecycleViewRepeaterStrategy, isDataSource, _DisposeViewRepeaterStrategy } from '@angular/cdk/collections';\nexport { DataSource } from '@angular/cdk/collections';\nimport * as i2 from '@angular/cdk/platform';\nimport * as i3 from '@angular/cdk/scrolling';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Directive, Inject, Optional, Input, ContentChild, Injectable, Component, ChangeDetectionStrategy, ViewEncapsulation, EmbeddedViewRef, EventEmitter, NgZone, Attribute, SkipSelf, Output, ViewChild, ContentChildren, NgModule } from '@angular/core';\nimport { Subject, from, BehaviorSubject, isObservable, of } from 'rxjs';\nimport { takeUntil, take } 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 * Mixin to provide a directive with a function that checks if the sticky input has been\n * changed since the last time the function was called. Essentially adds a dirty-check to the\n * sticky value.\n * @docs-private\n */\nfunction mixinHasStickyInput(base) {\n return class extends base {\n constructor(...args) {\n super(...args);\n this._sticky = false;\n /** Whether the sticky input has changed since it was last checked. */\n this._hasStickyChanged = false;\n }\n /** Whether sticky positioning should be applied. */\n get sticky() {\n return this._sticky;\n }\n set sticky(v) {\n const prevValue = this._sticky;\n this._sticky = coerceBooleanProperty(v);\n this._hasStickyChanged = prevValue !== this._sticky;\n }\n /** Whether the sticky value has changed since this was last called. */\n hasStickyChanged() {\n const hasStickyChanged = this._hasStickyChanged;\n this._hasStickyChanged = false;\n return hasStickyChanged;\n }\n /** Resets the dirty check for cases where the sticky state has been used without checking. */\n resetStickyChanged() {\n this._hasStickyChanged = false;\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 * Used to provide a table to some of the sub-components without causing a circular dependency.\n * @docs-private\n */\nconst CDK_TABLE = new InjectionToken('CDK_TABLE');\n/** Injection token that can be used to specify the text column options. */\nconst TEXT_COLUMN_OPTIONS = new InjectionToken('text-column-options');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Cell definition for a CDK table.\n * Captures the template of a column's data row cell as well as cell-specific properties.\n */\nclass CdkCellDef {\n constructor(/** @docs-private */ template) {\n this.template = template;\n }\n}\nCdkCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkCellDef, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkCellDef, selector: \"[cdkCellDef]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkCellDef, decorators: [{\n type: Directive,\n args: [{ selector: '[cdkCellDef]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/**\n * Header cell definition for a CDK table.\n * Captures the template of a column's header cell and as well as cell-specific properties.\n */\nclass CdkHeaderCellDef {\n constructor(/** @docs-private */ template) {\n this.template = template;\n }\n}\nCdkHeaderCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkHeaderCellDef, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkHeaderCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkHeaderCellDef, selector: \"[cdkHeaderCellDef]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkHeaderCellDef, decorators: [{\n type: Directive,\n args: [{ selector: '[cdkHeaderCellDef]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/**\n * Footer cell definition for a CDK table.\n * Captures the template of a column's footer cell and as well as cell-specific properties.\n */\nclass CdkFooterCellDef {\n constructor(/** @docs-private */ template) {\n this.template = template;\n }\n}\nCdkFooterCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkFooterCellDef, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkFooterCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkFooterCellDef, selector: \"[cdkFooterCellDef]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkFooterCellDef, decorators: [{\n type: Directive,\n args: [{ selector: '[cdkFooterCellDef]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n// Boilerplate for applying mixins to CdkColumnDef.\n/** @docs-private */\nclass CdkColumnDefBase {\n}\nconst _CdkColumnDefBase = mixinHasStickyInput(CdkColumnDefBase);\n/**\n * Column definition for the CDK table.\n * Defines a set of cells available for a table column.\n */\nclass CdkColumnDef extends _CdkColumnDefBase {\n constructor(_table) {\n super();\n this._table = _table;\n this._stickyEnd = false;\n }\n /** Unique name for this column. */\n get name() {\n return this._name;\n }\n set name(name) {\n this._setNameInput(name);\n }\n /**\n * Whether this column should be sticky positioned on the end of the row. Should make sure\n * that it mimics the `CanStick` mixin such that `_hasStickyChanged` is set to true if the value\n * has been changed.\n */\n get stickyEnd() {\n return this._stickyEnd;\n }\n set stickyEnd(v) {\n const prevValue = this._stickyEnd;\n this._stickyEnd = coerceBooleanProperty(v);\n this._hasStickyChanged = prevValue !== this._stickyEnd;\n }\n /**\n * Overridable method that sets the css classes that will be added to every cell in this\n * column.\n * In the future, columnCssClassName will change from type string[] to string and this\n * will set a single string value.\n * @docs-private\n */\n _updateColumnCssClassName() {\n this._columnCssClassName = [`cdk-column-${this.cssClassFriendlyName}`];\n }\n /**\n * This has been extracted to a util because of TS 4 and VE.\n * View Engine doesn't support property rename inheritance.\n * TS 4.0 doesn't allow properties to override accessors or vice-versa.\n * @docs-private\n */\n _setNameInput(value) {\n // If the directive is set without a name (updated programmatically), then this setter will\n // trigger with an empty string and should not overwrite the programmatically set value.\n if (value) {\n this._name = value;\n this.cssClassFriendlyName = value.replace(/[^a-z0-9_-]/gi, '-');\n this._updateColumnCssClassName();\n }\n }\n}\nCdkColumnDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkColumnDef, deps: [{ token: CDK_TABLE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkColumnDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkColumnDef, selector: \"[cdkColumnDef]\", inputs: { sticky: \"sticky\", name: [\"cdkColumnDef\", \"name\"], stickyEnd: \"stickyEnd\" }, providers: [{ provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: CdkColumnDef }], queries: [{ propertyName: \"cell\", first: true, predicate: CdkCellDef, descendants: true }, { propertyName: \"headerCell\", first: true, predicate: CdkHeaderCellDef, descendants: true }, { propertyName: \"footerCell\", first: true, predicate: CdkFooterCellDef, descendants: true }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkColumnDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkColumnDef]',\n inputs: ['sticky'],\n providers: [{ provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: CdkColumnDef }],\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [CDK_TABLE]\n }, {\n type: Optional\n }] }]; }, propDecorators: { name: [{\n type: Input,\n args: ['cdkColumnDef']\n }], stickyEnd: [{\n type: Input,\n args: ['stickyEnd']\n }], cell: [{\n type: ContentChild,\n args: [CdkCellDef]\n }], headerCell: [{\n type: ContentChild,\n args: [CdkHeaderCellDef]\n }], footerCell: [{\n type: ContentChild,\n args: [CdkFooterCellDef]\n }] } });\n/** Base class for the cells. Adds a CSS classname that identifies the column it renders in. */\nclass BaseCdkCell {\n constructor(columnDef, elementRef) {\n elementRef.nativeElement.classList.add(...columnDef._columnCssClassName);\n }\n}\n/** Header cell template container that adds the right classes and role. */\nclass CdkHeaderCell extends BaseCdkCell {\n constructor(columnDef, elementRef) {\n super(columnDef, elementRef);\n }\n}\nCdkHeaderCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkHeaderCell, deps: [{ token: CdkColumnDef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkHeaderCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkHeaderCell, selector: \"cdk-header-cell, th[cdk-header-cell]\", host: { attributes: { \"role\": \"columnheader\" }, classAttribute: \"cdk-header-cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkHeaderCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-header-cell, th[cdk-header-cell]',\n host: {\n 'class': 'cdk-header-cell',\n 'role': 'columnheader',\n },\n }]\n }], ctorParameters: function () { return [{ type: CdkColumnDef }, { type: i0.ElementRef }]; } });\n/** Footer cell template container that adds the right classes and role. */\nclass CdkFooterCell extends BaseCdkCell {\n constructor(columnDef, elementRef) {\n super(columnDef, elementRef);\n if (columnDef._table?._elementRef.nativeElement.nodeType === 1) {\n const tableRole = columnDef._table._elementRef.nativeElement.getAttribute('role');\n const role = tableRole === 'grid' || tableRole === 'treegrid' ? 'gridcell' : 'cell';\n elementRef.nativeElement.setAttribute('role', role);\n }\n }\n}\nCdkFooterCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkFooterCell, deps: [{ token: CdkColumnDef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkFooterCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkFooterCell, selector: \"cdk-footer-cell, td[cdk-footer-cell]\", host: { classAttribute: \"cdk-footer-cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkFooterCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-footer-cell, td[cdk-footer-cell]',\n host: {\n 'class': 'cdk-footer-cell',\n },\n }]\n }], ctorParameters: function () { return [{ type: CdkColumnDef }, { type: i0.ElementRef }]; } });\n/** Cell template container that adds the right classes and role. */\nclass CdkCell extends BaseCdkCell {\n constructor(columnDef, elementRef) {\n super(columnDef, elementRef);\n if (columnDef._table?._elementRef.nativeElement.nodeType === 1) {\n const tableRole = columnDef._table._elementRef.nativeElement.getAttribute('role');\n const role = tableRole === 'grid' || tableRole === 'treegrid' ? 'gridcell' : 'cell';\n elementRef.nativeElement.setAttribute('role', role);\n }\n }\n}\nCdkCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkCell, deps: [{ token: CdkColumnDef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkCell, selector: \"cdk-cell, td[cdk-cell]\", host: { classAttribute: \"cdk-cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-cell, td[cdk-cell]',\n host: {\n 'class': 'cdk-cell',\n },\n }]\n }], ctorParameters: function () { return [{ type: CdkColumnDef }, { type: i0.ElementRef }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * @docs-private\n */\nclass _Schedule {\n constructor() {\n this.tasks = [];\n this.endTasks = [];\n }\n}\n/** Injection token used to provide a coalesced style scheduler. */\nconst _COALESCED_STYLE_SCHEDULER = new InjectionToken('_COALESCED_STYLE_SCHEDULER');\n/**\n * Allows grouping up CSSDom mutations after the current execution context.\n * This can significantly improve performance when separate consecutive functions are\n * reading from the CSSDom and then mutating it.\n *\n * @docs-private\n */\nclass _CoalescedStyleScheduler {\n constructor(_ngZone) {\n this._ngZone = _ngZone;\n this._currentSchedule = null;\n this._destroyed = new Subject();\n }\n /**\n * Schedules the specified task to run at the end of the current VM turn.\n */\n schedule(task) {\n this._createScheduleIfNeeded();\n this._currentSchedule.tasks.push(task);\n }\n /**\n * Schedules the specified task to run after other scheduled tasks at the end of the current\n * VM turn.\n */\n scheduleEnd(task) {\n this._createScheduleIfNeeded();\n this._currentSchedule.endTasks.push(task);\n }\n /** Prevent any further tasks from running. */\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n _createScheduleIfNeeded() {\n if (this._currentSchedule) {\n return;\n }\n this._currentSchedule = new _Schedule();\n this._getScheduleObservable()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => {\n while (this._currentSchedule.tasks.length || this._currentSchedule.endTasks.length) {\n const schedule = this._currentSchedule;\n // Capture new tasks scheduled by the current set of tasks.\n this._currentSchedule = new _Schedule();\n for (const task of schedule.tasks) {\n task();\n }\n for (const task of schedule.endTasks) {\n task();\n }\n }\n this._currentSchedule = null;\n });\n }\n _getScheduleObservable() {\n // Use onStable when in the context of an ongoing change detection cycle so that we\n // do not accidentally trigger additional cycles.\n return this._ngZone.isStable\n ? from(Promise.resolve(undefined))\n : this._ngZone.onStable.pipe(take(1));\n }\n}\n_CoalescedStyleScheduler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _CoalescedStyleScheduler, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });\n_CoalescedStyleScheduler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _CoalescedStyleScheduler });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _CoalescedStyleScheduler, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 row template that can be used by the mat-table. Should not be used outside of the\n * material library.\n */\nconst CDK_ROW_TEMPLATE = `<ng-container cdkCellOutlet></ng-container>`;\n/**\n * Base class for the CdkHeaderRowDef and CdkRowDef that handles checking their columns inputs\n * for changes and notifying the table.\n */\nclass BaseRowDef {\n constructor(\n /** @docs-private */ template, _differs) {\n this.template = template;\n this._differs = _differs;\n }\n ngOnChanges(changes) {\n // Create a new columns differ if one does not yet exist. Initialize it based on initial value\n // of the columns property or an empty array if none is provided.\n if (!this._columnsDiffer) {\n const columns = (changes['columns'] && changes['columns'].currentValue) || [];\n this._columnsDiffer = this._differs.find(columns).create();\n this._columnsDiffer.diff(columns);\n }\n }\n /**\n * Returns the difference between the current columns and the columns from the last diff, or null\n * if there is no difference.\n */\n getColumnsDiff() {\n return this._columnsDiffer.diff(this.columns);\n }\n /** Gets this row def's relevant cell template from the provided column def. */\n extractCellTemplate(column) {\n if (this instanceof CdkHeaderRowDef) {\n return column.headerCell.template;\n }\n if (this instanceof CdkFooterRowDef) {\n return column.footerCell.template;\n }\n else {\n return column.cell.template;\n }\n }\n}\nBaseRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: BaseRowDef, deps: [{ token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });\nBaseRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: BaseRowDef, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: BaseRowDef, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.IterableDiffers }]; } });\n// Boilerplate for applying mixins to CdkHeaderRowDef.\n/** @docs-private */\nclass CdkHeaderRowDefBase extends BaseRowDef {\n}\nconst _CdkHeaderRowDefBase = mixinHasStickyInput(CdkHeaderRowDefBase);\n/**\n * Header row definition for the CDK table.\n * Captures the header row's template and other header properties such as the columns to display.\n */\nclass CdkHeaderRowDef extends _CdkHeaderRowDefBase {\n constructor(template, _differs, _table) {\n super(template, _differs);\n this._table = _table;\n }\n // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.\n // Explicitly define it so that the method is called as part of the Angular lifecycle.\n ngOnChanges(changes) {\n super.ngOnChanges(changes);\n }\n}\nCdkHeaderRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkHeaderRowDef, deps: [{ token: i0.TemplateRef }, { token: i0.IterableDiffers }, { token: CDK_TABLE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkHeaderRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkHeaderRowDef, selector: \"[cdkHeaderRowDef]\", inputs: { columns: [\"cdkHeaderRowDef\", \"columns\"], sticky: [\"cdkHeaderRowDefSticky\", \"sticky\"] }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkHeaderRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkHeaderRowDef]',\n inputs: ['columns: cdkHeaderRowDef', 'sticky: cdkHeaderRowDefSticky'],\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.IterableDiffers }, { type: undefined, decorators: [{\n type: Inject,\n args: [CDK_TABLE]\n }, {\n type: Optional\n }] }]; } });\n// Boilerplate for applying mixins to CdkFooterRowDef.\n/** @docs-private */\nclass CdkFooterRowDefBase extends BaseRowDef {\n}\nconst _CdkFooterRowDefBase = mixinHasStickyInput(CdkFooterRowDefBase);\n/**\n * Footer row definition for the CDK table.\n * Captures the footer row's template and other footer properties such as the columns to display.\n */\nclass CdkFooterRowDef extends _CdkFooterRowDefBase {\n constructor(template, _differs, _table) {\n super(template, _differs);\n this._table = _table;\n }\n // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.\n // Explicitly define it so that the method is called as part of the Angular lifecycle.\n ngOnChanges(changes) {\n super.ngOnChanges(changes);\n }\n}\nCdkFooterRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkFooterRowDef, deps: [{ token: i0.TemplateRef }, { token: i0.IterableDiffers }, { token: CDK_TABLE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkFooterRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkFooterRowDef, selector: \"[cdkFooterRowDef]\", inputs: { columns: [\"cdkFooterRowDef\", \"columns\"], sticky: [\"cdkFooterRowDefSticky\", \"sticky\"] }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkFooterRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkFooterRowDef]',\n inputs: ['columns: cdkFooterRowDef', 'sticky: cdkFooterRowDefSticky'],\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.IterableDiffers }, { type: undefined, decorators: [{\n type: Inject,\n args: [CDK_TABLE]\n }, {\n type: Optional\n }] }]; } });\n/**\n * Data row definition for the CDK table.\n * Captures the header row's template and other row properties such as the columns to display and\n * a when predicate that describes when this row should be used.\n */\nclass CdkRowDef extends BaseRowDef {\n // TODO(andrewseguin): Add an input for providing a switch function to determine\n // if this template should be used.\n constructor(template, _differs, _table) {\n super(template, _differs);\n this._table = _table;\n }\n}\nCdkRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkRowDef, deps: [{ token: i0.TemplateRef }, { token: i0.IterableDiffers }, { token: CDK_TABLE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkRowDef, selector: \"[cdkRowDef]\", inputs: { columns: [\"cdkRowDefColumns\", \"columns\"], when: [\"cdkRowDefWhen\", \"when\"] }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkRowDef]',\n inputs: ['columns: cdkRowDefColumns', 'when: cdkRowDefWhen'],\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.IterableDiffers }, { type: undefined, decorators: [{\n type: Inject,\n args: [CDK_TABLE]\n }, {\n type: Optional\n }] }]; } });\n/**\n * Outlet for rendering cells inside of a row or header row.\n * @docs-private\n */\nclass CdkCellOutlet {\n constructor(_viewContainer) {\n this._viewContainer = _viewContainer;\n CdkCellOutlet.mostRecentCellOutlet = this;\n }\n ngOnDestroy() {\n // If this was the last outlet being rendered in the view, remove the reference\n // from the static property after it has been destroyed to avoid leaking memory.\n if (CdkCellOutlet.mostRecentCellOutlet === this) {\n CdkCellOutlet.mostRecentCellOutlet = null;\n }\n }\n}\n/**\n * Static property containing the latest constructed instance of this class.\n * Used by the CDK table when each CdkHeaderRow and CdkRow component is created using\n * createEmbeddedView. After one of these components are created, this property will provide\n * a handle to provide that component's cells and context. After init, the CdkCellOutlet will\n * construct the cells with the provided context.\n */\nCdkCellOutlet.mostRecentCellOutlet = null;\nCdkCellOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkCellOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkCellOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkCellOutlet, decorators: [{\n type: Directive,\n args: [{ selector: '[cdkCellOutlet]' }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });\n/** Header template container that contains the cell outlet. Adds the right class and role. */\nclass CdkHeaderRow {\n}\nCdkHeaderRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkHeaderRow, deps: [], target: i0.ɵɵFactoryTarget.Component });\nCdkHeaderRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkHeaderRow, selector: \"cdk-header-row, tr[cdk-header-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"cdk-header-row\" }, ngImport: i0, template: \"<ng-container cdkCellOutlet></ng-container>\", isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkHeaderRow, decorators: [{\n type: Component,\n args: [{\n selector: 'cdk-header-row, tr[cdk-header-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'cdk-header-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n }]\n }] });\n/** Footer template container that contains the cell outlet. Adds the right class and role. */\nclass CdkFooterRow {\n}\nCdkFooterRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkFooterRow, deps: [], target: i0.ɵɵFactoryTarget.Component });\nCdkFooterRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkFooterRow, selector: \"cdk-footer-row, tr[cdk-footer-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"cdk-footer-row\" }, ngImport: i0, template: \"<ng-container cdkCellOutlet></ng-container>\", isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkFooterRow, decorators: [{\n type: Component,\n args: [{\n selector: 'cdk-footer-row, tr[cdk-footer-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'cdk-footer-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n }]\n }] });\n/** Data row template container that contains the cell outlet. Adds the right class and role. */\nclass CdkRow {\n}\nCdkRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkRow, deps: [], target: i0.ɵɵFactoryTarget.Component });\nCdkRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkRow, selector: \"cdk-row, tr[cdk-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"cdk-row\" }, ngImport: i0, template: \"<ng-container cdkCellOutlet></ng-container>\", isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkRow, decorators: [{\n type: Component,\n args: [{\n selector: 'cdk-row, tr[cdk-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'cdk-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n }]\n }] });\n/** Row that can be used to display a message when no data is shown in the table. */\nclass CdkNoDataRow {\n constructor(templateRef) {\n this.templateRef = templateRef;\n this._contentClassName = 'cdk-no-data-row';\n }\n}\nCdkNoDataRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkNoDataRow, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkNoDataRow.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkNoDataRow, selector: \"ng-template[cdkNoDataRow]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkNoDataRow, decorators: [{\n type: Directive,\n args: [{\n selector: 'ng-template[cdkNoDataRow]',\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * List of all possible directions that can be used for sticky positioning.\n * @docs-private\n */\nconst STICKY_DIRECTIONS = ['top', 'bottom', 'left', 'right'];\n/**\n * Applies and removes sticky positioning styles to the `CdkTable` rows and columns cells.\n * @docs-private\n */\nclass StickyStyler {\n /**\n * @param _isNativeHtmlTable Whether the sticky logic should be based on a table\n * that uses the native `<table>` element.\n * @param _stickCellCss The CSS class that will be applied to every row/cell that has\n * sticky positioning applied.\n * @param direction The directionality context of the table (ltr/rtl); affects column positioning\n * by reversing left/right positions.\n * @param _isBrowser Whether the table is currently being rendered on the server or the client.\n * @param _needsPositionStickyOnElement Whether we need to specify position: sticky on cells\n * using inline styles. If false, it is assumed that position: sticky is included in\n * the component stylesheet for _stickCellCss.\n * @param _positionListener A listener that is notified of changes to sticky rows/columns\n * and their dimensions.\n */\n constructor(_isNativeHtmlTable, _stickCellCss, direction, _coalescedStyleScheduler, _isBrowser = true, _needsPositionStickyOnElement = true, _positionListener) {\n this._isNativeHtmlTable = _isNativeHtmlTable;\n this._stickCellCss = _stickCellCss;\n this.direction = direction;\n this._coalescedStyleScheduler = _coalescedStyleScheduler;\n this._isBrowser = _isBrowser;\n this._needsPositionStickyOnElement = _needsPositionStickyOnElement;\n this._positionListener = _positionListener;\n this._cachedCellWidths = [];\n this._borderCellCss = {\n 'top': `${_stickCellCss}-border-elem-top`,\n 'bottom': `${_stickCellCss}-border-elem-bottom`,\n 'left': `${_stickCellCss}-border-elem-left`,\n 'right': `${_stickCellCss}-border-elem-right`,\n };\n }\n /**\n * Clears the sticky positioning styles from the row and its cells by resetting the `position`\n * style, setting the zIndex to 0, and unsetting each provided sticky direction.\n * @param rows The list of rows that should be cleared from sticking in the provided directions\n * @param stickyDirections The directions that should no longer be set as sticky on the rows.\n */\n clearStickyPositioning(rows, stickyDirections) {\n const elementsToClear = [];\n for (const row of rows) {\n // If the row isn't an element (e.g. if it's an `ng-container`),\n // it won't have inline styles or `children` so we skip it.\n if (row.nodeType !== row.ELEMENT_NODE) {\n continue;\n }\n elementsToClear.push(row);\n for (let i = 0; i < row.children.length; i++) {\n elementsToClear.push(row.children[i]);\n }\n }\n // Coalesce with sticky row/column updates (and potentially other changes like column resize).\n this._coalescedStyleScheduler.schedule(() => {\n for (const element of elementsToClear) {\n this._removeStickyStyle(element, stickyDirections);\n }\n });\n }\n /**\n * Applies sticky left and right positions to the cells of each row according to the sticky\n * states of the rendered column definitions.\n * @param rows The rows that should have its set of cells stuck according to the sticky states.\n * @param stickyStartStates A list of boolean states where each state represents whether the cell\n * in this index position should be stuck to the start of the row.\n * @param stickyEndStates A list of boolean states where each state represents whether the cell\n * in this index position should be stuck to the end of the row.\n * @param recalculateCellWidths Whether the sticky styler should recalculate the width of each\n * column cell. If `false` cached widths will be used instead.\n */\n updateStickyColumns(rows, stickyStartStates, stickyEndStates, recalculateCellWidths = true) {\n if (!rows.length ||\n !this._isBrowser ||\n !(stickyStartStates.some(state => state) || stickyEndStates.some(state => state))) {\n if (this._positionListener) {\n this._positionListener.stickyColumnsUpdated({ sizes: [] });\n this._positionListener.stickyEndColumnsUpdated({ sizes: [] });\n }\n return;\n }\n const firstRow = rows[0];\n const numCells = firstRow.children.length;\n const cellWidths = this._getCellWidths(firstRow, recalculateCellWidths);\n const startPositions = this._getStickyStartColumnPositions(cellWidths, stickyStartStates);\n const endPositions = this._getStickyEndColumnPositions(cellWidths, stickyEndStates);\n const lastStickyStart = stickyStartStates.lastIndexOf(true);\n const firstStickyEnd = stickyEndStates.indexOf(true);\n // Coalesce with sticky row updates (and potentially other changes like column resize).\n this._coalescedStyleScheduler.schedule(() => {\n const isRtl = this.direction === 'rtl';\n const start = isRtl ? 'right' : 'left';\n const end = isRtl ? 'left' : 'right';\n for (const row of rows) {\n for (let i = 0; i < numCells; i++) {\n const cell = row.children[i];\n if (stickyStartStates[i]) {\n this._addStickyStyle(cell, start, startPositions[i], i === lastStickyStart);\n }\n if (stickyEndStates[i]) {\n this._addStickyStyle(cell, end, endPositions[i], i === firstStickyEnd);\n }\n }\n }\n if (this._positionListener) {\n this._positionListener.stickyColumnsUpdated({\n sizes: lastStickyStart === -1\n ? []\n : cellWidths\n .slice(0, lastStickyStart + 1)\n .map((width, index) => (stickyStartStates[index] ? width : null)),\n });\n this._positionListener.stickyEndColumnsUpdated({\n sizes: firstStickyEnd === -1\n ? []\n : cellWidths\n .slice(firstStickyEnd)\n .map((width, index) => (stickyEndStates[index + firstStickyEnd] ? width : null))\n .reverse(),\n });\n }\n });\n }\n /**\n * Applies sticky positioning to the row's cells if using the native table layout, and to the\n * row itself otherwise.\n * @param rowsToStick The list of rows that should be stuck according to their corresponding\n * sticky state and to the provided top or bottom position.\n * @param stickyStates A list of boolean states where each state represents whether the row\n * should be stuck in the particular top or bottom position.\n * @param position The position direction in which the row should be stuck if that row should be\n * sticky.\n *\n */\n stickRows(rowsToStick, stickyStates, position) {\n // Since we can't measure the rows on the server, we can't stick the rows properly.\n if (!this._isBrowser) {\n return;\n }\n // If positioning the rows to the bottom, reverse their order when evaluating the sticky\n // position such that the last row stuck will be \"bottom: 0px\" and so on. Note that the\n // sticky states need to be reversed as well.\n const rows = position === 'bottom' ? rowsToStick.slice().reverse() : rowsToStick;\n const states = position === 'bottom' ? stickyStates.slice().reverse() : stickyStates;\n // Measure row heights all at once before adding sticky styles to reduce layout thrashing.\n const stickyOffsets = [];\n const stickyCellHeights = [];\n const elementsToStick = [];\n for (let rowIndex = 0, stickyOffset = 0; rowIndex < rows.length; rowIndex++) {\n if (!states[rowIndex]) {\n continue;\n }\n stickyOffsets[rowIndex] = stickyOffset;\n const row = rows[rowIndex];\n elementsToStick[rowIndex] = this._isNativeHtmlTable\n ? Array.from(row.children)\n : [row];\n const height = row.getBoundingClientRect().height;\n stickyOffset += height;\n stickyCellHeights[rowIndex] = height;\n }\n const borderedRowIndex = states.lastIndexOf(true);\n // Coalesce with other sticky row updates (top/bottom), sticky columns updates\n // (and potentially other changes like column resize).\n this._coalescedStyleScheduler.schedule(() => {\n for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {\n if (!states[rowIndex]) {\n continue;\n }\n const offset = stickyOffsets[rowIndex];\n const isBorderedRowIndex = rowIndex === borderedRowIndex;\n for (const element of elementsToStick[rowIndex]) {\n this._addStickyStyle(element, position, offset, isBorderedRowIndex);\n }\n }\n if (position === 'top') {\n this._positionListener?.stickyHeaderRowsUpdated({\n sizes: stickyCellHeights,\n offsets: stickyOffsets,\n elements: elementsToStick,\n });\n }\n else {\n this._positionListener?.stickyFooterRowsUpdated({\n sizes: stickyCellHeights,\n offsets: stickyOffsets,\n elements: elementsToStick,\n });\n }\n });\n }\n /**\n * When using the native table in Safari, sticky footer cells do not stick. The only way to stick\n * footer rows is to apply sticky styling to the tfoot container. This should only be done if\n * all footer rows are sticky. If not all footer rows are sticky, remove sticky positioning from\n * the tfoot element.\n */\n updateStickyFooterContainer(tableElement, stickyStates) {\n if (!this._isNativeHtmlTable) {\n return;\n }\n const tfoot = tableElement.querySelector('tfoot');\n // Coalesce with other sticky updates (and potentially other changes like column resize).\n this._coalescedStyleScheduler.schedule(() => {\n if (stickyStates.some(state => !state)) {\n this._removeStickyStyle(tfoot, ['bottom']);\n }\n else {\n this._addStickyStyle(tfoot, 'bottom', 0, false);\n }\n });\n }\n /**\n * Removes the sticky style on the element by removing the sticky cell CSS class, re-evaluating\n * the zIndex, removing each of the provided sticky directions, and removing the\n * sticky position if there are no more directions.\n */\n _removeStickyStyle(element, stickyDirections) {\n for (const dir of stickyDirections) {\n element.style[dir] = '';\n element.classList.remove(this._borderCellCss[dir]);\n }\n // If the element no longer has any more sticky directions, remove sticky positioning and\n // the sticky CSS class.\n // Short-circuit checking element.style[dir] for stickyDirections as they\n // were already removed above.\n const hasDirection = STICKY_DIRECTIONS.some(dir => stickyDirections.indexOf(dir) === -1 && element.style[dir]);\n if (hasDirection) {\n element.style.zIndex = this._getCalculatedZIndex(element);\n }\n else {\n // When not hasDirection, _getCalculatedZIndex will always return ''.\n element.style.zIndex = '';\n if (this._needsPositionStickyOnElement) {\n element.style.position = '';\n }\n element.classList.remove(this._stickCellCss);\n }\n }\n /**\n * Adds the sticky styling to the element by adding the sticky style class, changing position\n * to be sticky (and -webkit-sticky), setting the appropriate zIndex, and adding a sticky\n * direction and value.\n */\n _addStickyStyle(element, dir, dirValue, isBorderElement) {\n element.classList.add(this._stickCellCss);\n if (isBorderElement) {\n element.classList.add(this._borderCellCss[dir]);\n }\n element.style[dir] = `${dirValue}px`;\n element.style.zIndex = this._getCalculatedZIndex(element);\n if (this._needsPositionStickyOnElement) {\n element.style.cssText += 'position: -webkit-sticky; position: sticky; ';\n }\n }\n /**\n * Calculate what the z-index should be for the element, depending on what directions (top,\n * bottom, left, right) have been set. It should be true that elements with a top direction\n * should have the highest index since these are elements like a table header. If any of those\n * elements are also sticky in another direction, then they should appear above other elements\n * that are only sticky top (e.g. a sticky column on a sticky header). Bottom-sticky elements\n * (e.g. footer rows) should then be next in the ordering such that they are below the header\n * but above any non-sticky elements. Finally, left/right sticky elements (e.g. sticky columns)\n * should minimally increment so that they are above non-sticky elements but below top and bottom\n * elements.\n */\n _getCalculatedZIndex(element) {\n const zIndexIncrements = {\n top: 100,\n bottom: 10,\n left: 1,\n right: 1,\n };\n let zIndex = 0;\n // Use `Iterable` instead of `Array` because TypeScript, as of 3.6.3,\n // loses the array generic type in the `for of`. But we *also* have to use `Array` because\n // typescript won't iterate over an `Iterable` unless you compile with `--downlevelIteration`\n for (const dir of STICKY_DIRECTIONS) {\n if (element.style[dir]) {\n zIndex += zIndexIncrements[dir];\n }\n }\n return zIndex ? `${zIndex}` : '';\n }\n /** Gets the widths for each cell in the provided row. */\n _getCellWidths(row, recalculateCellWidths = true) {\n if (!recalculateCellWidths && this._cachedCellWidths.length) {\n return this._cachedCellWidths;\n }\n const cellWidths = [];\n const firstRowCells = row.children;\n for (let i = 0; i < firstRowCells.length; i++) {\n let cell = firstRowCells[i];\n cellWidths.push(cell.getBoundingClientRect().width);\n }\n this._cachedCellWidths = cellWidths;\n return cellWidths;\n }\n /**\n * Determines the left and right positions of each sticky column cell, which will be the\n * accumulation of all sticky column cell widths to the left and right, respectively.\n * Non-sticky cells do not need to have a value set since their positions will not be applied.\n */\n _getStickyStartColumnPositions(widths, stickyStates) {\n const positions = [];\n let nextPosition = 0;\n for (let i = 0; i < widths.length; i++) {\n if (stickyStates[i]) {\n positions[i] = nextPosition;\n nextPosition += widths[i];\n }\n }\n return positions;\n }\n /**\n * Determines the left and right positions of each sticky column cell, which will be the\n * accumulation of all sticky column cell widths to the left and right, respectively.\n * Non-sticky cells do not need to have a value set since their positions will not be applied.\n */\n _getStickyEndColumnPositions(widths, stickyStates) {\n const positions = [];\n let nextPosition = 0;\n for (let i = widths.length; i > 0; i--) {\n if (stickyStates[i]) {\n positions[i] = nextPosition;\n nextPosition += widths[i];\n }\n }\n return positions;\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 * Returns an error to be thrown when attempting to find an nonexistent column.\n * @param id Id whose lookup failed.\n * @docs-private\n */\nfunction getTableUnknownColumnError(id) {\n return Error(`Could not find column with id \"${id}\".`);\n}\n/**\n * Returns an error to be thrown when two column definitions have the same name.\n * @docs-private\n */\nfunction getTableDuplicateColumnNameError(name) {\n return Error(`Duplicate column definition name provided: \"${name}\".`);\n}\n/**\n * Returns an error to be thrown when there are multiple rows that are missing a when function.\n * @docs-private\n */\nfunction getTableMultipleDefaultRowDefsError() {\n return Error(`There can only be one default row without a when predicate function.`);\n}\n/**\n * Returns an error to be thrown when there are no matching row defs for a particular set of data.\n * @docs-private\n */\nfunction getTableMissingMatchingRowDefError(data) {\n return Error(`Could not find a matching row definition for the` +\n `provided row data: ${JSON.stringify(data)}`);\n}\n/**\n * Returns an error to be thrown when there is no row definitions present in the content.\n * @docs-private\n */\nfunction getTableMissingRowDefsError() {\n return Error('Missing definitions for header, footer, and row; ' +\n 'cannot determine which columns should be rendered.');\n}\n/**\n * Returns an error to be thrown when the data source does not match the compatible types.\n * @docs-private\n */\nfunction getTableUnknownDataSourceError() {\n return Error(`Provided data source did not match an array, Observable, or DataSource`);\n}\n/**\n * Returns an error to be thrown when the text column cannot find a parent table to inject.\n * @docs-private\n */\nfunction getTableTextColumnMissingParentTableError() {\n return Error(`Text column could not find a parent table for registration.`);\n}\n/**\n * Returns an error to be thrown when a table text column doesn't have a name.\n * @docs-private\n */\nfunction getTableTextColumnMissingNameError() {\n return Error(`Table text column must have a name.`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** The injection token used to specify the StickyPositioningListener. */\nconst STICKY_POSITIONING_LISTENER = new InjectionToken('CDK_SPL');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 recycle view repeater strategy, which reduces rendering latency. Not compatible with\n * tables that animate rows.\n */\nclass CdkRecycleRows {\n}\nCdkRecycleRows.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkRecycleRows, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nCdkRecycleRows.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkRecycleRows, selector: \"cdk-table[recycleRows], table[cdk-table][recycleRows]\", providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkRecycleRows, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-table[recycleRows], table[cdk-table][recycleRows]',\n providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }],\n }]\n }] });\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert data rows.\n * @docs-private\n */\nclass DataRowOutlet {\n constructor(viewContainer, elementRef) {\n this.viewContainer = viewContainer;\n this.elementRef = elementRef;\n }\n}\nDataRowOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: DataRowOutlet, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nDataRowOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: DataRowOutlet, selector: \"[rowOutlet]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: DataRowOutlet, decorators: [{\n type: Directive,\n args: [{ selector: '[rowOutlet]' }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ElementRef }]; } });\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert the header.\n * @docs-private\n */\nclass HeaderRowOutlet {\n constructor(viewContainer, elementRef) {\n this.viewContainer = viewContainer;\n this.elementRef = elementRef;\n }\n}\nHeaderRowOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: HeaderRowOutlet, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nHeaderRowOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: HeaderRowOutlet, selector: \"[headerRowOutlet]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: HeaderRowOutlet, decorators: [{\n type: Directive,\n args: [{ selector: '[headerRowOutlet]' }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ElementRef }]; } });\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert the footer.\n * @docs-private\n */\nclass FooterRowOutlet {\n constructor(viewContainer, elementRef) {\n this.viewContainer = viewContainer;\n this.elementRef = elementRef;\n }\n}\nFooterRowOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: FooterRowOutlet, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nFooterRowOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: FooterRowOutlet, selector: \"[footerRowOutlet]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: FooterRowOutlet, decorators: [{\n type: Directive,\n args: [{ selector: '[footerRowOutlet]' }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ElementRef }]; } });\n/**\n * Provides a handle for the table to grab the view\n * container's ng-container to insert the no data row.\n * @docs-private\n */\nclass NoDataRowOutlet {\n constructor(viewContainer, elementRef) {\n this.viewContainer = viewContainer;\n this.elementRef = elementRef;\n }\n}\nNoDataRowOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: NoDataRowOutlet, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nNoDataRowOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: NoDataRowOutlet, selector: \"[noDataRowOutlet]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: NoDataRowOutlet, decorators: [{\n type: Directive,\n args: [{ selector: '[noDataRowOutlet]' }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ElementRef }]; } });\n/**\n * The table template that can be used by the mat-table. Should not be used outside of the\n * material library.\n * @docs-private\n */\nconst CDK_TABLE_TEMPLATE = \n// Note that according to MDN, the `caption` element has to be projected as the **first**\n// element in the table. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption\n`\n <ng-content select=\"caption\"></ng-content>\n <ng-content select=\"colgroup, col\"></ng-content>\n <ng-container headerRowOutlet></ng-container>\n <ng-container rowOutlet></ng-container>\n <ng-container noDataRowOutlet></ng-container>\n <ng-container footerRowOutlet></ng-container>\n`;\n/**\n * Class used to conveniently type the embedded view ref for rows with a context.\n * @docs-private\n */\nclass RowViewRef extends EmbeddedViewRef {\n}\n/**\n * A data table that can render a header row, data rows, and a footer row.\n * Uses the dataSource input to determine the data to be rendered. The data can be provided either\n * as a data array, an Observable stream that emits the data array to render, or a DataSource with a\n * connect function that will return an Observable stream that emits the data array to render.\n */\nclass CdkTable {\n constructor(_differs, _changeDetectorRef, _elementRef, role, _dir, _document, _platform, _viewRepeater, _coalescedStyleScheduler, _viewportRuler, \n /**\n * @deprecated `_stickyPositioningListener` parameter to become required.\n * @breaking-change 13.0.0\n */\n _stickyPositioningListener, \n /**\n * @deprecated `_ngZone` parameter to become required.\n * @breaking-change 14.0.0\n */\n _ngZone) {\n this._differs = _differs;\n this._changeDetectorRef = _changeDetectorRef;\n this._elementRef = _elementRef;\n this._dir = _dir;\n this._platform = _platform;\n this._viewRepeater = _viewRepeater;\n this._coalescedStyleScheduler = _coalescedStyleScheduler;\n this._viewportRuler = _viewportRuler;\n this._stickyPositioningListener = _stickyPositioningListener;\n this._ngZone = _ngZone;\n /** Subject that emits when the component has been destroyed. */\n this._onDestroy = new Subject();\n /**\n * Map of all the user's defined columns (header, data, and footer cell template) identified by\n * name. Collection populated by the column definitions gathered by `ContentChildren` as well as\n * any custom column definitions added to `_customColumnDefs`.\n */\n this._columnDefsByName = new Map();\n /**\n * Column definitions that were defined outside of the direct content children of the table.\n * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n * column definitions as *its* content child.\n */\n this._customColumnDefs = new Set();\n /**\n * Data row definitions that were defined outside of the direct content children of the table.\n * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n * built-in data rows as *its* content child.\n */\n this._customRowDefs = new Set();\n /**\n * Header row definitions that were defined outside of the direct content children of the table.\n * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n * built-in header rows as *its* content child.\n */\n this._customHeaderRowDefs = new Set();\n /**\n * Footer row definitions that were defined outside of the direct content children of the table.\n * These will be defined when, e.g., creating a wrapper around the cdkTable that has a\n * built-in footer row as *its* content child.\n */\n this._customFooterRowDefs = new Set();\n /**\n * Whether the header row definition has been changed. Triggers an update to the header row after\n * content is checked. Initialized as true so that the table renders the initial set of rows.\n */\n this._headerRowDefChanged = true;\n /**\n * Whether the footer row definition has been changed. Triggers an update to the footer row after\n * content is checked. Initialized as true so that the table renders the initial set of rows.\n */\n this._footerRowDefChanged = true;\n /**\n * Whether the sticky column styles need to be updated. Set to `true` when the visible columns\n * change.\n */\n this._stickyColumnStylesNeedReset = true;\n /**\n * Whether the sticky styler should recalculate cell widths when applying sticky styles. If\n * `false`, cached values will be used instead. This is only applicable to tables with\n * {@link fixedLayout} enabled. For other tables, cell widths will always be recalculated.\n */\n this._forceRecalculateCellWidths = true;\n /**\n * Cache of the latest rendered `RenderRow` objects as a map for easy retrieval when constructing\n * a new list of `RenderRow` objects for rendering rows. Since the new list is constructed with\n * the cached `RenderRow` objects when possible, the row identity is preserved when the data\n * and row template matches, which allows the `IterableDiffer` to check rows by reference\n * and understand which rows are added/moved/removed.\n *\n * Implemented as a map of maps where the first key is the `data: T` object and the second is the\n * `CdkRowDef<T>` object. With the two keys, the cache points to a `RenderRow<T>` object that\n * contains an array of created pairs. The array is necessary to handle cases where the data\n * array contains multiple duplicate data objects and each instantiated `RenderRow` must be\n * stored.\n */\n this._cachedRenderRowsMap = new Map();\n /**\n * CSS class added to any row or cell that has sticky positioning applied. May be overridden by\n * table subclasses.\n */\n this.stickyCssClass = 'cdk-table-sticky';\n /**\n * Whether to manually add position: sticky to all sticky cell elements. Not needed if\n * the position is set in a selector associated with the value of stickyCssClass. May be\n * overridden by table subclasses\n */\n this.needsPositionStickyOnElement = true;\n /** Whether the no data row is currently showing anything. */\n this._isShowingNoDataRow = false;\n this._multiTemplateDataRows = false;\n this._fixedLayout = false;\n /**\n * Emits when the table completes rendering a set of data rows based on the latest data from the\n * data source, even if the set of rows is empty.\n */\n this.contentChanged = new EventEmitter();\n // TODO(andrewseguin): Remove max value as the end index\n // and instead calculate the view on init and scroll.\n /**\n * Stream containing the latest information on what rows are being displayed on screen.\n * Can be used by the data source to as a heuristic of what data should be provided.\n *\n * @docs-private\n */\n this.viewChange = new BehaviorSubject({\n start: 0,\n end: Number.MAX_VALUE,\n });\n if (!role) {\n this._elementRef.nativeElement.setAttribute('role', 'table');\n }\n this._document = _document;\n this._isNativeHtmlTable = this._elementRef.nativeElement.nodeName === 'TABLE';\n }\n /**\n * Tracking function that will be used to check the differences in data changes. Used similarly\n * to `ngFor` `trackBy` function. Optimize row operations by identifying a row based on its data\n * relative to the function to know if a row should be added/removed/moved.\n * Accepts a function that takes two parameters, `index` and `item`.\n */\n get trackBy() {\n return this._trackByFn;\n }\n set trackBy(fn) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && fn != null && typeof fn !== 'function') {\n console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}.`);\n }\n this._trackByFn = fn;\n }\n /**\n * The table's source of data, which can be provided in three ways (in order of complexity):\n * - Simple data array (each object represents one table row)\n * - Stream that emits a data array each time the array changes\n * - `DataSource` object that implements the connect/disconnect interface.\n *\n * If a data array is provided, the table must be notified when the array's objects are\n * added, removed, or moved. This can be done by calling the `renderRows()` function which will\n * render the diff since the last table render. If the data array reference is changed, the table\n * will automatically trigger an update to the rows.\n *\n * When providing an Observable stream, the table will trigger an update automatically when the\n * stream emits a new array of data.\n *\n * Finally, when providing a `DataSource` object, the table will use the Observable stream\n * provided by the connect function and trigger updates when that stream emits new data array\n * values. During the table's ngOnDestroy or when the data source is removed from the table, the\n * table will call the DataSource's `disconnect` function (may be useful for cleaning up any\n * subscriptions registered during the connect process).\n */\n get dataSource() {\n return this._dataSource;\n }\n set dataSource(dataSource) {\n if (this._dataSource !== dataSource) {\n this._switchDataSource(dataSource);\n }\n }\n /**\n * Whether to allow multiple rows per data object by evaluating which rows evaluate their 'when'\n * predicate to true. If `multiTemplateDataRows` is false, which is the default value, then each\n * dataobject will render the first row that evaluates its when predicate to true, in the order\n * defined in the table, or otherwise the default row which does not have a when predicate.\n */\n get multiTemplateDataRows() {\n return this._multiTemplateDataRows;\n }\n set multiTemplateDataRows(v) {\n this._multiTemplateDataRows = coerceBooleanProperty(v);\n // In Ivy if this value is set via a static attribute (e.g. <table multiTemplateDataRows>),\n // this setter will be invoked before the row outlet has been defined hence the null check.\n if (this._rowOutlet && this._rowOutlet.viewContainer.length) {\n this._forceRenderDataRows();\n this.updateStickyColumnStyles();\n }\n }\n /**\n * Whether to use a fixed table layout. Enabling this option will enforce consistent column widths\n * and optimize rendering sticky styles for native tables. No-op for flex tables.\n */\n get fixedLayout() {\n return this._fixedLayout;\n }\n set fixedLayout(v) {\n this._fixedLayout = coerceBooleanProperty(v);\n // Toggling `fixedLayout` may change column widths. Sticky column styles should be recalculated.\n this._forceRecalculateCellWidths = true;\n this._stickyColumnStylesNeedReset = true;\n }\n ngOnInit() {\n this._setupStickyStyler();\n if (this._isNativeHtmlTable) {\n this._applyNativeTableSections();\n }\n // Set up the trackBy function so that it uses the `RenderRow` as its identity by default. If\n // the user has provided a custom trackBy, return the result of that function as evaluated\n // with the values of the `RenderRow`'s data and index.\n this._dataDiffer = this._differs.find([]).create((_i, dataRow) => {\n return this.trackBy ? this.trackBy(dataRow.dataIndex, dataRow.data) : dataRow;\n });\n this._viewportRuler\n .change()\n .pipe(takeUntil(this._onDestroy))\n .subscribe(() => {\n this._forceRecalculateCellWidths = true;\n });\n }\n ngAfterContentChecked() {\n // Cache the row and column definitions gathered by ContentChildren and programmatic injection.\n this._cacheRowDefs();\n this._cacheColumnDefs();\n // Make sure that the user has at least added header, footer, or data row def.\n if (!this._headerRowDefs.length &&\n !this._footerRowDefs.length &&\n !this._rowDefs.length &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableMissingRowDefsError();\n }\n // Render updates if the list of columns have been changed for the header, row, or footer defs.\n const columnsChanged = this._renderUpdatedColumns();\n const rowDefsChanged = columnsChanged || this._headerRowDefChanged || this._footerRowDefChanged;\n // Ensure sticky column styles are reset if set to `true` elsewhere.\n this._stickyColumnStylesNeedReset = this._stickyColumnStylesNeedReset || rowDefsChanged;\n this._forceRecalculateCellWidths = rowDefsChanged;\n // If the header row definition has been changed, trigger a render to the header row.\n if (this._headerRowDefChanged) {\n this._forceRenderHeaderRows();\n this._headerRowDefChanged = false;\n }\n // If the footer row definition has been changed, trigger a render to the footer row.\n if (this._footerRowDefChanged) {\n this._forceRenderFooterRows();\n this._footerRowDefChanged = false;\n }\n // If there is a data source and row definitions, connect to the data source unless a\n // connection has already been made.\n if (this.dataSource && this._rowDefs.length > 0 && !this._renderChangeSubscription) {\n this._observeRenderChanges();\n }\n else if (this._stickyColumnStylesNeedReset) {\n // In the above case, _observeRenderChanges will result in updateStickyColumnStyles being\n // called when it row data arrives. Otherwise, we need to call it proactively.\n this.updateStickyColumnStyles();\n }\n this._checkStickyStates();\n }\n ngOnDestroy() {\n [\n this._rowOutlet.viewContainer,\n this._headerRowOutlet.viewContainer,\n this._footerRowOutlet.viewContainer,\n this._cachedRenderRowsMap,\n this._customColumnDefs,\n this._customRowDefs,\n this._customHeaderRowDefs,\n this._customFooterRowDefs,\n this._columnDefsByName,\n ].forEach(def => {\n def.clear();\n });\n this._headerRowDefs = [];\n this._footerRowDefs = [];\n this._defaultRowDef = null;\n this._onDestroy.next();\n this._onDestroy.complete();\n if (isDataSource(this.dataSource)) {\n this.dataSource.disconnect(this);\n }\n }\n /**\n * Renders rows based on the table's latest set of data, which was either provided directly as an\n * input or retrieved through an Observable stream (directly or from a DataSource).\n * Checks for differences in the data since the last diff to perform only the necessary\n * changes (add/remove/move rows).\n *\n * If the table's data source is a DataSource or Observable, this will be invoked automatically\n * each time the provided Observable stream emits a new data array. Otherwise if your data is\n * an array, this function will need to be called to render any changes.\n */\n renderRows() {\n this._renderRows = this._getAllRenderRows();\n const changes = this._dataDiffer.diff(this._renderRows);\n if (!changes) {\n this._updateNoDataRow();\n this.contentChanged.next();\n return;\n }\n const viewContainer = this._rowOutlet.viewContainer;\n this._viewRepeater.applyChanges(changes, viewContainer, (record, _adjustedPreviousIndex, currentIndex) => this._getEmbeddedViewArgs(record.item, currentIndex), record => record.item.data, (change) => {\n if (change.operation === 1 /* _ViewRepeaterOperation.INSERTED */ && change.context) {\n this._renderCellTemplateForItem(change.record.item.rowDef, change.context);\n }\n });\n // Update the meta context of a row's context data (index, count, first, last, ...)\n this._updateRowIndexContext();\n // Update rows that did not get added/removed/moved but may have had their identity changed,\n // e.g. if trackBy matched data on some property but the actual data reference changed.\n changes.forEachIdentityChange((record) => {\n const rowView = viewContainer.get(record.currentIndex);\n rowView.context.$implicit = record.item.data;\n });\n this._updateNoDataRow();\n // Allow the new row data to render before measuring it.\n // @breaking-change 14.0.0 Remove undefined check once _ngZone is required.\n if (this._ngZone && NgZone.isInAngularZone()) {\n this._ngZone.onStable.pipe(take(1), takeUntil(this._onDestroy)).subscribe(() => {\n this.updateStickyColumnStyles();\n });\n }\n else {\n this.updateStickyColumnStyles();\n }\n this.contentChanged.next();\n }\n /** Adds a column definition that was not included as part of the content children. */\n addColumnDef(columnDef) {\n this._customColumnDefs.add(columnDef);\n }\n /** Removes a column definition that was not included as part of the content children. */\n removeColumnDef(columnDef) {\n this._customColumnDefs.delete(columnDef);\n }\n /** Adds a row definition that was not included as part of the content children. */\n addRowDef(rowDef) {\n this._customRowDefs.add(rowDef);\n }\n /** Removes a row definition that was not included as part of the content children. */\n removeRowDef(rowDef) {\n this._customRowDefs.delete(rowDef);\n }\n /** Adds a header row definition that was not included as part of the content children. */\n addHeaderRowDef(headerRowDef) {\n this._customHeaderRowDefs.add(headerRowDef);\n this._headerRowDefChanged = true;\n }\n /** Removes a header row definition that was not included as part of the content children. */\n removeHeaderRowDef(headerRowDef) {\n this._customHeaderRowDefs.delete(headerRowDef);\n this._headerRowDefChanged = true;\n }\n /** Adds a footer row definition that was not included as part of the content children. */\n addFooterRowDef(footerRowDef) {\n this._customFooterRowDefs.add(footerRowDef);\n this._footerRowDefChanged = true;\n }\n /** Removes a footer row definition that was not included as part of the content children. */\n removeFooterRowDef(footerRowDef) {\n this._customFooterRowDefs.delete(footerRowDef);\n this._footerRowDefChanged = true;\n }\n /** Sets a no data row definition that was not included as a part of the content children. */\n setNoDataRow(noDataRow) {\n this._customNoDataRow = noDataRow;\n }\n /**\n * Updates the header sticky styles. First resets all applied styles with respect to the cells\n * sticking to the top. Then, evaluating which cells need to be stuck to the top. This is\n * automatically called when the header row changes its displayed set of columns, or if its\n * sticky input changes. May be called manually for cases where the cell content changes outside\n * of these events.\n */\n updateStickyHeaderRowStyles() {\n const headerRows = this._getRenderedRows(this._headerRowOutlet);\n const tableElement = this._elementRef.nativeElement;\n // Hide the thead element if there are no header rows. This is necessary to satisfy\n // overzealous a11y checkers that fail because the `rowgroup` element does not contain\n // required child `row`.\n const thead = tableElement.querySelector('thead');\n if (thead) {\n thead.style.display = headerRows.length ? '' : 'none';\n }\n const stickyStates = this._headerRowDefs.map(def => def.sticky);\n this._stickyStyler.clearStickyPositioning(headerRows, ['top']);\n this._stickyStyler.stickRows(headerRows, stickyStates, 'top');\n // Reset the dirty state of the sticky input change since it has been used.\n this._headerRowDefs.forEach(def => def.resetStickyChanged());\n }\n /**\n * Updates the footer sticky styles. First resets all applied styles with respect to the cells\n * sticking to the bottom. Then, evaluating which cells need to be stuck to the bottom. This is\n * automatically called when the footer row changes its displayed set of columns, or if its\n * sticky input changes. May be called manually for cases where the cell content changes outside\n * of these events.\n */\n updateStickyFooterRowStyles() {\n const footerRows = this._getRenderedRows(this._footerRowOutlet);\n const tableElement = this._elementRef.nativeElement;\n // Hide the tfoot element if there are no footer rows. This is necessary to satisfy\n // overzealous a11y checkers that fail because the `rowgroup` element does not contain\n // required child `row`.\n const tfoot = tableElement.querySelector('tfoot');\n if (tfoot) {\n tfoot.style.display = footerRows.length ? '' : 'none';\n }\n const stickyStates = this._footerRowDefs.map(def => def.sticky);\n this._stickyStyler.clearStickyPositioning(footerRows, ['bottom']);\n this._stickyStyler.stickRows(footerRows, stickyStates, 'bottom');\n this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement, stickyStates);\n // Reset the dirty state of the sticky input change since it has been used.\n this._footerRowDefs.forEach(def => def.resetStickyChanged());\n }\n /**\n * Updates the column sticky styles. First resets all applied styles with respect to the cells\n * sticking to the left and right. Then sticky styles are added for the left and right according\n * to the column definitions for each cell in each row. This is automatically called when\n * the data source provides a new set of data or when a column definition changes its sticky\n * input. May be called manually for cases where the cell content changes outside of these events.\n */\n updateStickyColumnStyles() {\n const headerRows = this._getRenderedRows(this._headerRowOutlet);\n const dataRows = this._getRenderedRows(this._rowOutlet);\n const footerRows = this._getRenderedRows(this._footerRowOutlet);\n // For tables not using a fixed layout, the column widths may change when new rows are rendered.\n // In a table using a fixed layout, row content won't affect column width, so sticky styles\n // don't need to be cleared unless either the sticky column config changes or one of the row\n // defs change.\n if ((this._isNativeHtmlTable && !this._fixedLayout) || this._stickyColumnStylesNeedReset) {\n // Clear the left and right positioning from all columns in the table across all rows since\n // sticky columns span across all table sections (header, data, footer)\n this._stickyStyler.clearStickyPositioning([...headerRows, ...dataRows, ...footerRows], ['left', 'right']);\n this._stickyColumnStylesNeedReset = false;\n }\n // Update the sticky styles for each header row depending on the def's sticky state\n headerRows.forEach((headerRow, i) => {\n this._addStickyColumnStyles([headerRow], this._headerRowDefs[i]);\n });\n // Update the sticky styles for each data row depending on its def's sticky state\n this._rowDefs.forEach(rowDef => {\n // Collect all the rows rendered with this row definition.\n const rows = [];\n for (let i = 0; i < dataRows.length; i++) {\n if (this._renderRows[i].rowDef === rowDef) {\n rows.push(dataRows[i]);\n }\n }\n this._addStickyColumnStyles(rows, rowDef);\n });\n // Update the sticky styles for each footer row depending on the def's sticky state\n footerRows.forEach((footerRow, i) => {\n this._addStickyColumnStyles([footerRow], this._footerRowDefs[i]);\n });\n // Reset the dirty state of the sticky input change since it has been used.\n Array.from(this._columnDefsByName.values()).forEach(def => def.resetStickyChanged());\n }\n /**\n * Get the list of RenderRow objects to render according to the current list of data and defined\n * row definitions. If the previous list already contained a particular pair, it should be reused\n * so that the differ equates their references.\n */\n _getAllRenderRows() {\n const renderRows = [];\n // Store the cache and create a new one. Any re-used RenderRow objects will be moved into the\n // new cache while unused ones can be picked up by garbage collection.\n const prevCachedRenderRows = this._cachedRenderRowsMap;\n this._cachedRenderRowsMap = new Map();\n // For each data object, get the list of rows that should be rendered, represented by the\n // respective `RenderRow` object which is the pair of `data` and `CdkRowDef`.\n for (let i = 0; i < this._data.length; i++) {\n let data = this._data[i];\n const renderRowsForData = this._getRenderRowsForData(data, i, prevCachedRenderRows.get(data));\n if (!this._cachedRenderRowsMap.has(data)) {\n this._cachedRenderRowsMap.set(data, new WeakMap());\n }\n for (let j = 0; j < renderRowsForData.length; j++) {\n let renderRow = renderRowsForData[j];\n const cache = this._cachedRenderRowsMap.get(renderRow.data);\n if (cache.has(renderRow.rowDef)) {\n cache.get(renderRow.rowDef).push(renderRow);\n }\n else {\n cache.set(renderRow.rowDef, [renderRow]);\n }\n renderRows.push(renderRow);\n }\n }\n return renderRows;\n }\n /**\n * Gets a list of `RenderRow<T>` for the provided data object and any `CdkRowDef` objects that\n * should be rendered for this data. Reuses the cached RenderRow objects if they match the same\n * `(T, CdkRowDef)` pair.\n */\n _getRenderRowsForData(data, dataIndex, cache) {\n const rowDefs = this._getRowDefs(data, dataIndex);\n return rowDefs.map(rowDef => {\n const cachedRenderRows = cache && cache.has(rowDef) ? cache.get(rowDef) : [];\n if (cachedRenderRows.length) {\n const dataRow = cachedRenderRows.shift();\n dataRow.dataIndex = dataIndex;\n return dataRow;\n }\n else {\n return { data, rowDef, dataIndex };\n }\n });\n }\n /** Update the map containing the content's column definitions. */\n _cacheColumnDefs() {\n this._columnDefsByName.clear();\n const columnDefs = mergeArrayAndSet(this._getOwnDefs(this._contentColumnDefs), this._customColumnDefs);\n columnDefs.forEach(columnDef => {\n if (this._columnDefsByName.has(columnDef.name) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableDuplicateColumnNameError(columnDef.name);\n }\n this._columnDefsByName.set(columnDef.name, columnDef);\n });\n }\n /** Update the list of all available row definitions that can be used. */\n _cacheRowDefs() {\n this._headerRowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentHeaderRowDefs), this._customHeaderRowDefs);\n this._footerRowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentFooterRowDefs), this._customFooterRowDefs);\n this._rowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentRowDefs), this._customRowDefs);\n // After all row definitions are determined, find the row definition to be considered default.\n const defaultRowDefs = this._rowDefs.filter(def => !def.when);\n if (!this.multiTemplateDataRows &&\n defaultRowDefs.length > 1 &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableMultipleDefaultRowDefsError();\n }\n this._defaultRowDef = defaultRowDefs[0];\n }\n /**\n * Check if the header, data, or footer rows have changed what columns they want to display or\n * whether the sticky states have changed for the header or footer. If there is a diff, then\n * re-render that section.\n */\n _renderUpdatedColumns() {\n const columnsDiffReducer = (acc, def) => acc || !!def.getColumnsDiff();\n // Force re-render data rows if the list of column definitions have changed.\n const dataColumnsChanged = this._rowDefs.reduce(columnsDiffReducer, false);\n if (dataColumnsChanged) {\n this._forceRenderDataRows();\n }\n // Force re-render header/footer rows if the list of column definitions have changed.\n const headerColumnsChanged = this._headerRowDefs.reduce(columnsDiffReducer, false);\n if (headerColumnsChanged) {\n this._forceRenderHeaderRows();\n }\n const footerColumnsChanged = this._footerRowDefs.reduce(columnsDiffReducer, false);\n if (footerColumnsChanged) {\n this._forceRenderFooterRows();\n }\n return dataColumnsChanged || headerColumnsChanged || footerColumnsChanged;\n }\n /**\n * Switch to the provided data source by resetting the data and unsubscribing from the current\n * render change subscription if one exists. If the data source is null, interpret this by\n * clearing the row outlet. Otherwise start listening for new data.\n */\n _switchDataSource(dataSource) {\n this._data = [];\n if (isDataSource(this.dataSource)) {\n this.dataSource.disconnect(this);\n }\n // Stop listening for data from the previous data source.\n if (this._renderChangeSubscription) {\n this._renderChangeSubscription.unsubscribe();\n this._renderChangeSubscription = null;\n }\n if (!dataSource) {\n if (this._dataDiffer) {\n this._dataDiffer.diff([]);\n }\n this._rowOutlet.viewContainer.clear();\n }\n this._dataSource = dataSource;\n }\n /** Set up a subscription for the data provided by the data source. */\n _observeRenderChanges() {\n // If no data source has been set, there is nothing to observe for changes.\n if (!this.dataSource) {\n return;\n }\n let dataStream;\n if (isDataSource(this.dataSource)) {\n dataStream = this.dataSource.connect(this);\n }\n else if (isObservable(this.dataSource)) {\n dataStream = this.dataSource;\n }\n else if (Array.isArray(this.dataSource)) {\n dataStream = of(this.dataSource);\n }\n if (dataStream === undefined && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableUnknownDataSourceError();\n }\n this._renderChangeSubscription = dataStream\n .pipe(takeUntil(this._onDestroy))\n .subscribe(data => {\n this._data = data || [];\n this.renderRows();\n });\n }\n /**\n * Clears any existing content in the header row outlet and creates a new embedded view\n * in the outlet using the header row definition.\n */\n _forceRenderHeaderRows() {\n // Clear the header row outlet if any content exists.\n if (this._headerRowOutlet.viewContainer.length > 0) {\n this._headerRowOutlet.viewContainer.clear();\n }\n this._headerRowDefs.forEach((def, i) => this._renderRow(this._headerRowOutlet, def, i));\n this.updateStickyHeaderRowStyles();\n }\n /**\n * Clears any existing content in the footer row outlet and creates a new embedded view\n * in the outlet using the footer row definition.\n */\n _forceRenderFooterRows() {\n // Clear the footer row outlet if any content exists.\n if (this._footerRowOutlet.viewContainer.length > 0) {\n this._footerRowOutlet.viewContainer.clear();\n }\n this._footerRowDefs.forEach((def, i) => this._renderRow(this._footerRowOutlet, def, i));\n this.updateStickyFooterRowStyles();\n }\n /** Adds the sticky column styles for the rows according to the columns' stick states. */\n _addStickyColumnStyles(rows, rowDef) {\n const columnDefs = Array.from(rowDef.columns || []).map(columnName => {\n const columnDef = this._columnDefsByName.get(columnName);\n if (!columnDef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableUnknownColumnError(columnName);\n }\n return columnDef;\n });\n const stickyStartStates = columnDefs.map(columnDef => columnDef.sticky);\n const stickyEndStates = columnDefs.map(columnDef => columnDef.stickyEnd);\n this._stickyStyler.updateStickyColumns(rows, stickyStartStates, stickyEndStates, !this._fixedLayout || this._forceRecalculateCellWidths);\n }\n /** Gets the list of rows that have been rendered in the row outlet. */\n _getRenderedRows(rowOutlet) {\n const renderedRows = [];\n for (let i = 0; i < rowOutlet.viewContainer.length; i++) {\n const viewRef = rowOutlet.viewContainer.get(i);\n renderedRows.push(viewRef.rootNodes[0]);\n }\n return renderedRows;\n }\n /**\n * Get the matching row definitions that should be used for this row data. If there is only\n * one row definition, it is returned. Otherwise, find the row definitions that has a when\n * predicate that returns true with the data. If none return true, return the default row\n * definition.\n */\n _getRowDefs(data, dataIndex) {\n if (this._rowDefs.length == 1) {\n return [this._rowDefs[0]];\n }\n let rowDefs = [];\n if (this.multiTemplateDataRows) {\n rowDefs = this._rowDefs.filter(def => !def.when || def.when(dataIndex, data));\n }\n else {\n let rowDef = this._rowDefs.find(def => def.when && def.when(dataIndex, data)) || this._defaultRowDef;\n if (rowDef) {\n rowDefs.push(rowDef);\n }\n }\n if (!rowDefs.length && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableMissingMatchingRowDefError(data);\n }\n return rowDefs;\n }\n _getEmbeddedViewArgs(renderRow, index) {\n const rowDef = renderRow.rowDef;\n const context = { $implicit: renderRow.data };\n return {\n templateRef: rowDef.template,\n context,\n index,\n };\n }\n /**\n * Creates a new row template in the outlet and fills it with the set of cell templates.\n * Optionally takes a context to provide to the row and cells, as well as an optional index\n * of where to place the new row template in the outlet.\n */\n _renderRow(outlet, rowDef, index, context = {}) {\n // TODO(andrewseguin): enforce that one outlet was instantiated from createEmbeddedView\n const view = outlet.viewContainer.createEmbeddedView(rowDef.template, context, index);\n this._renderCellTemplateForItem(rowDef, context);\n return view;\n }\n _renderCellTemplateForItem(rowDef, context) {\n for (let cellTemplate of this._getCellTemplates(rowDef)) {\n if (CdkCellOutlet.mostRecentCellOutlet) {\n CdkCellOutlet.mostRecentCellOutlet._viewContainer.createEmbeddedView(cellTemplate, context);\n }\n }\n this._changeDetectorRef.markForCheck();\n }\n /**\n * Updates the index-related context for each row to reflect any changes in the index of the rows,\n * e.g. first/last/even/odd.\n */\n _updateRowIndexContext() {\n const viewContainer = this._rowOutlet.viewContainer;\n for (let renderIndex = 0, count = viewContainer.length; renderIndex < count; renderIndex++) {\n const viewRef = viewContainer.get(renderIndex);\n const context = viewRef.context;\n context.count = count;\n context.first = renderIndex === 0;\n context.last = renderIndex === count - 1;\n context.even = renderIndex % 2 === 0;\n context.odd = !context.even;\n if (this.multiTemplateDataRows) {\n context.dataIndex = this._renderRows[renderIndex].dataIndex;\n context.renderIndex = renderIndex;\n }\n else {\n context.index = this._renderRows[renderIndex].dataIndex;\n }\n }\n }\n /** Gets the column definitions for the provided row def. */\n _getCellTemplates(rowDef) {\n if (!rowDef || !rowDef.columns) {\n return [];\n }\n return Array.from(rowDef.columns, columnId => {\n const column = this._columnDefsByName.get(columnId);\n if (!column && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableUnknownColumnError(columnId);\n }\n return rowDef.extractCellTemplate(column);\n });\n }\n /** Adds native table sections (e.g. tbody) and moves the row outlets into them. */\n _applyNativeTableSections() {\n const documentFragment = this._document.createDocumentFragment();\n const sections = [\n { tag: 'thead', outlets: [this._headerRowOutlet] },\n { tag: 'tbody', outlets: [this._rowOutlet, this._noDataRowOutlet] },\n { tag: 'tfoot', outlets: [this._footerRowOutlet] },\n ];\n for (const section of sections) {\n const element = this._document.createElement(section.tag);\n element.setAttribute('role', 'rowgroup');\n for (const outlet of section.outlets) {\n element.appendChild(outlet.elementRef.nativeElement);\n }\n documentFragment.appendChild(element);\n }\n // Use a DocumentFragment so we don't hit the DOM on each iteration.\n this._elementRef.nativeElement.appendChild(documentFragment);\n }\n /**\n * Forces a re-render of the data rows. Should be called in cases where there has been an input\n * change that affects the evaluation of which rows should be rendered, e.g. toggling\n * `multiTemplateDataRows` or adding/removing row definitions.\n */\n _forceRenderDataRows() {\n this._dataDiffer.diff([]);\n this._rowOutlet.viewContainer.clear();\n this.renderRows();\n }\n /**\n * Checks if there has been a change in sticky states since last check and applies the correct\n * sticky styles. Since checking resets the \"dirty\" state, this should only be performed once\n * during a change detection and after the inputs are settled (after content check).\n */\n _checkStickyStates() {\n const stickyCheckReducer = (acc, d) => {\n return acc || d.hasStickyChanged();\n };\n // Note that the check needs to occur for every definition since it notifies the definition\n // that it can reset its dirty state. Using another operator like `some` may short-circuit\n // remaining definitions and leave them in an unchecked state.\n if (this._headerRowDefs.reduce(stickyCheckReducer, false)) {\n this.updateStickyHeaderRowStyles();\n }\n if (this._footerRowDefs.reduce(stickyCheckReducer, false)) {\n this.updateStickyFooterRowStyles();\n }\n if (Array.from(this._columnDefsByName.values()).reduce(stickyCheckReducer, false)) {\n this._stickyColumnStylesNeedReset = true;\n this.updateStickyColumnStyles();\n }\n }\n /**\n * Creates the sticky styler that will be used for sticky rows and columns. Listens\n * for directionality changes and provides the latest direction to the styler. Re-applies column\n * stickiness when directionality changes.\n */\n _setupStickyStyler() {\n const direction = this._dir ? this._dir.value : 'ltr';\n this._stickyStyler = new StickyStyler(this._isNativeHtmlTable, this.stickyCssClass, direction, this._coalescedStyleScheduler, this._platform.isBrowser, this.needsPositionStickyOnElement, this._stickyPositioningListener);\n (this._dir ? this._dir.change : of())\n .pipe(takeUntil(this._onDestroy))\n .subscribe(value => {\n this._stickyStyler.direction = value;\n this.updateStickyColumnStyles();\n });\n }\n /** Filters definitions that belong to this table from a QueryList. */\n _getOwnDefs(items) {\n return items.filter(item => !item._table || item._table === this);\n }\n /** Creates or removes the no data row, depending on whether any data is being shown. */\n _updateNoDataRow() {\n const noDataRow = this._customNoDataRow || this._noDataRow;\n if (!noDataRow) {\n return;\n }\n const shouldShow = this._rowOutlet.viewContainer.length === 0;\n if (shouldShow === this._isShowingNoDataRow) {\n return;\n }\n const container = this._noDataRowOutlet.viewContainer;\n if (shouldShow) {\n const view = container.createEmbeddedView(noDataRow.templateRef);\n const rootNode = view.rootNodes[0];\n // Only add the attributes if we have a single root node since it's hard\n // to figure out which one to add it to when there are multiple.\n if (view.rootNodes.length === 1 && rootNode?.nodeType === this._document.ELEMENT_NODE) {\n rootNode.setAttribute('role', 'row');\n rootNode.classList.add(noDataRow._contentClassName);\n }\n }\n else {\n container.clear();\n }\n this._isShowingNoDataRow = shouldShow;\n }\n}\nCdkTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTable, deps: [{ token: i0.IterableDiffers }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: 'role', attribute: true }, { token: i1.Directionality, optional: true }, { token: DOCUMENT }, { token: i2.Platform }, { token: _VIEW_REPEATER_STRATEGY }, { token: _COALESCED_STYLE_SCHEDULER }, { token: i3.ViewportRuler }, { token: STICKY_POSITIONING_LISTENER, optional: true, skipSelf: true }, { token: i0.NgZone, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nCdkTable.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkTable, selector: \"cdk-table, table[cdk-table]\", inputs: { trackBy: \"trackBy\", dataSource: \"dataSource\", multiTemplateDataRows: \"multiTemplateDataRows\", fixedLayout: \"fixedLayout\" }, outputs: { contentChanged: \"contentChanged\" }, host: { properties: { \"class.cdk-table-fixed-layout\": \"fixedLayout\" }, classAttribute: \"cdk-table\" }, providers: [\n { provide: CDK_TABLE, useExisting: CdkTable },\n { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },\n { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },\n // Prevent nested tables from seeing this table's StickyPositioningListener.\n { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n ], queries: [{ propertyName: \"_noDataRow\", first: true, predicate: CdkNoDataRow, descendants: true }, { propertyName: \"_contentColumnDefs\", predicate: CdkColumnDef, descendants: true }, { propertyName: \"_contentRowDefs\", predicate: CdkRowDef, descendants: true }, { propertyName: \"_contentHeaderRowDefs\", predicate: CdkHeaderRowDef, descendants: true }, { propertyName: \"_contentFooterRowDefs\", predicate: CdkFooterRowDef, descendants: true }], viewQueries: [{ propertyName: \"_rowOutlet\", first: true, predicate: DataRowOutlet, descendants: true, static: true }, { propertyName: \"_headerRowOutlet\", first: true, predicate: HeaderRowOutlet, descendants: true, static: true }, { propertyName: \"_footerRowOutlet\", first: true, predicate: FooterRowOutlet, descendants: true, static: true }, { propertyName: \"_noDataRowOutlet\", first: true, predicate: NoDataRowOutlet, descendants: true, static: true }], exportAs: [\"cdkTable\"], ngImport: i0, template: \"\\n <ng-content select=\\\"caption\\\"></ng-content>\\n <ng-content select=\\\"colgroup, col\\\"></ng-content>\\n <ng-container headerRowOutlet></ng-container>\\n <ng-container rowOutlet></ng-container>\\n <ng-container noDataRowOutlet></ng-container>\\n <ng-container footerRowOutlet></ng-container>\\n\", isInline: true, styles: [\".cdk-table-fixed-layout{table-layout:fixed}\"], dependencies: [{ kind: \"directive\", type: DataRowOutlet, selector: \"[rowOutlet]\" }, { kind: \"directive\", type: HeaderRowOutlet, selector: \"[headerRowOutlet]\" }, { kind: \"directive\", type: FooterRowOutlet, selector: \"[footerRowOutlet]\" }, { kind: \"directive\", type: NoDataRowOutlet, selector: \"[noDataRowOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTable, decorators: [{\n type: Component,\n args: [{ selector: 'cdk-table, table[cdk-table]', exportAs: 'cdkTable', template: CDK_TABLE_TEMPLATE, host: {\n 'class': 'cdk-table',\n '[class.cdk-table-fixed-layout]': 'fixedLayout',\n }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, providers: [\n { provide: CDK_TABLE, useExisting: CdkTable },\n { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },\n { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },\n // Prevent nested tables from seeing this table's StickyPositioningListener.\n { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n ], styles: [\".cdk-table-fixed-layout{table-layout:fixed}\"] }]\n }], ctorParameters: function () { return [{ type: i0.IterableDiffers }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['role']\n }] }, { type: i1.Directionality, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i2.Platform }, { type: undefined, decorators: [{\n type: Inject,\n args: [_VIEW_REPEATER_STRATEGY]\n }] }, { type: _CoalescedStyleScheduler, decorators: [{\n type: Inject,\n args: [_COALESCED_STYLE_SCHEDULER]\n }] }, { type: i3.ViewportRuler }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }, {\n type: Inject,\n args: [STICKY_POSITIONING_LISTENER]\n }] }, { type: i0.NgZone, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { trackBy: [{\n type: Input\n }], dataSource: [{\n type: Input\n }], multiTemplateDataRows: [{\n type: Input\n }], fixedLayout: [{\n type: Input\n }], contentChanged: [{\n type: Output\n }], _rowOutlet: [{\n type: ViewChild,\n args: [DataRowOutlet, { static: true }]\n }], _headerRowOutlet: [{\n type: ViewChild,\n args: [HeaderRowOutlet, { static: true }]\n }], _footerRowOutlet: [{\n type: ViewChild,\n args: [FooterRowOutlet, { static: true }]\n }], _noDataRowOutlet: [{\n type: ViewChild,\n args: [NoDataRowOutlet, { static: true }]\n }], _contentColumnDefs: [{\n type: ContentChildren,\n args: [CdkColumnDef, { descendants: true }]\n }], _contentRowDefs: [{\n type: ContentChildren,\n args: [CdkRowDef, { descendants: true }]\n }], _contentHeaderRowDefs: [{\n type: ContentChildren,\n args: [CdkHeaderRowDef, {\n descendants: true,\n }]\n }], _contentFooterRowDefs: [{\n type: ContentChildren,\n args: [CdkFooterRowDef, {\n descendants: true,\n }]\n }], _noDataRow: [{\n type: ContentChild,\n args: [CdkNoDataRow]\n }] } });\n/** Utility function that gets a merged list of the entries in an array and values of a Set. */\nfunction mergeArrayAndSet(array, set) {\n return array.concat(Array.from(set));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Column that simply shows text content for the header and row cells. Assumes that the table\n * is using the native table implementation (`<table>`).\n *\n * By default, the name of this column will be the header text and data property accessor.\n * The header text can be overridden with the `headerText` input. Cell values can be overridden with\n * the `dataAccessor` input. Change the text justification to the start or end using the `justify`\n * input.\n */\nclass CdkTextColumn {\n constructor(\n // `CdkTextColumn` is always requiring a table, but we just assert it manually\n // for better error reporting.\n // tslint:disable-next-line: lightweight-tokens\n _table, _options) {\n this._table = _table;\n this._options = _options;\n /** Alignment of the cell values. */\n this.justify = 'start';\n this._options = _options || {};\n }\n /** Column name that should be used to reference this column. */\n get name() {\n return this._name;\n }\n set name(name) {\n this._name = name;\n // With Ivy, inputs can be initialized before static query results are\n // available. In that case, we defer the synchronization until \"ngOnInit\" fires.\n this._syncColumnDefName();\n }\n ngOnInit() {\n this._syncColumnDefName();\n if (this.headerText === undefined) {\n this.headerText = this._createDefaultHeaderText();\n }\n if (!this.dataAccessor) {\n this.dataAccessor =\n this._options.defaultDataAccessor || ((data, name) => data[name]);\n }\n if (this._table) {\n // Provide the cell and headerCell directly to the table with the static `ViewChild` query,\n // since the columnDef will not pick up its content by the time the table finishes checking\n // its content and initializing the rows.\n this.columnDef.cell = this.cell;\n this.columnDef.headerCell = this.headerCell;\n this._table.addColumnDef(this.columnDef);\n }\n else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throw getTableTextColumnMissingParentTableError();\n }\n }\n ngOnDestroy() {\n if (this._table) {\n this._table.removeColumnDef(this.columnDef);\n }\n }\n /**\n * Creates a default header text. Use the options' header text transformation function if one\n * has been provided. Otherwise simply capitalize the column name.\n */\n _createDefaultHeaderText() {\n const name = this.name;\n if (!name && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableTextColumnMissingNameError();\n }\n if (this._options && this._options.defaultHeaderTextTransform) {\n return this._options.defaultHeaderTextTransform(name);\n }\n return name[0].toUpperCase() + name.slice(1);\n }\n /** Synchronizes the column definition name with the text column name. */\n _syncColumnDefName() {\n if (this.columnDef) {\n this.columnDef.name = this.name;\n }\n }\n}\nCdkTextColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTextColumn, deps: [{ token: CdkTable, optional: true }, { token: TEXT_COLUMN_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nCdkTextColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkTextColumn, selector: \"cdk-text-column\", inputs: { name: \"name\", headerText: \"headerText\", dataAccessor: \"dataAccessor\", justify: \"justify\" }, viewQueries: [{ propertyName: \"columnDef\", first: true, predicate: CdkColumnDef, descendants: true, static: true }, { propertyName: \"cell\", first: true, predicate: CdkCellDef, descendants: true, static: true }, { propertyName: \"headerCell\", first: true, predicate: CdkHeaderCellDef, descendants: true, static: true }], ngImport: i0, template: `\n <ng-container cdkColumnDef>\n <th cdk-header-cell *cdkHeaderCellDef [style.text-align]=\"justify\">\n {{headerText}}\n </th>\n <td cdk-cell *cdkCellDef=\"let data\" [style.text-align]=\"justify\">\n {{dataAccessor(data, name)}}\n </td>\n </ng-container>\n `, isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellDef, selector: \"[cdkCellDef]\" }, { kind: \"directive\", type: CdkHeaderCellDef, selector: \"[cdkHeaderCellDef]\" }, { kind: \"directive\", type: CdkColumnDef, selector: \"[cdkColumnDef]\", inputs: [\"sticky\", \"cdkColumnDef\", \"stickyEnd\"] }, { kind: \"directive\", type: CdkCell, selector: \"cdk-cell, td[cdk-cell]\" }, { kind: \"directive\", type: CdkHeaderCell, selector: \"cdk-header-cell, th[cdk-header-cell]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTextColumn, decorators: [{\n type: Component,\n args: [{\n selector: 'cdk-text-column',\n template: `\n <ng-container cdkColumnDef>\n <th cdk-header-cell *cdkHeaderCellDef [style.text-align]=\"justify\">\n {{headerText}}\n </th>\n <td cdk-cell *cdkCellDef=\"let data\" [style.text-align]=\"justify\">\n {{dataAccessor(data, name)}}\n </td>\n </ng-container>\n `,\n encapsulation: ViewEncapsulation.None,\n // Change detection is intentionally not set to OnPush. This component's template will be provided\n // to the table to be inserted into its view. This is problematic when change detection runs since\n // the bindings in this template will be evaluated _after_ the table's view is evaluated, which\n // mean's the template in the table's view will not have the updated value (and in fact will cause\n // an ExpressionChangedAfterItHasBeenCheckedError).\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n }]\n }], ctorParameters: function () { return [{ type: CdkTable, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [TEXT_COLUMN_OPTIONS]\n }] }]; }, propDecorators: { name: [{\n type: Input\n }], headerText: [{\n type: Input\n }], dataAccessor: [{\n type: Input\n }], justify: [{\n type: Input\n }], columnDef: [{\n type: ViewChild,\n args: [CdkColumnDef, { static: true }]\n }], cell: [{\n type: ViewChild,\n args: [CdkCellDef, { static: true }]\n }], headerCell: [{\n type: ViewChild,\n args: [CdkHeaderCellDef, { static: 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 */\nconst EXPORTED_DECLARATIONS = [\n CdkTable,\n CdkRowDef,\n CdkCellDef,\n CdkCellOutlet,\n CdkHeaderCellDef,\n CdkFooterCellDef,\n CdkColumnDef,\n CdkCell,\n CdkRow,\n CdkHeaderCell,\n CdkFooterCell,\n CdkHeaderRow,\n CdkHeaderRowDef,\n CdkFooterRow,\n CdkFooterRowDef,\n DataRowOutlet,\n HeaderRowOutlet,\n FooterRowOutlet,\n CdkTextColumn,\n CdkNoDataRow,\n CdkRecycleRows,\n NoDataRowOutlet,\n];\nclass CdkTableModule {\n}\nCdkTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nCdkTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTableModule, declarations: [CdkTable,\n CdkRowDef,\n CdkCellDef,\n CdkCellOutlet,\n CdkHeaderCellDef,\n CdkFooterCellDef,\n CdkColumnDef,\n CdkCell,\n CdkRow,\n CdkHeaderCell,\n CdkFooterCell,\n CdkHeaderRow,\n CdkHeaderRowDef,\n CdkFooterRow,\n CdkFooterRowDef,\n DataRowOutlet,\n HeaderRowOutlet,\n FooterRowOutlet,\n CdkTextColumn,\n CdkNoDataRow,\n CdkRecycleRows,\n NoDataRowOutlet], imports: [ScrollingModule], exports: [CdkTable,\n CdkRowDef,\n CdkCellDef,\n CdkCellOutlet,\n CdkHeaderCellDef,\n CdkFooterCellDef,\n CdkColumnDef,\n CdkCell,\n CdkRow,\n CdkHeaderCell,\n CdkFooterCell,\n CdkHeaderRow,\n CdkHeaderRowDef,\n CdkFooterRow,\n CdkFooterRowDef,\n DataRowOutlet,\n HeaderRowOutlet,\n FooterRowOutlet,\n CdkTextColumn,\n CdkNoDataRow,\n CdkRecycleRows,\n NoDataRowOutlet] });\nCdkTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTableModule, imports: [ScrollingModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTableModule, decorators: [{\n type: NgModule,\n args: [{\n exports: EXPORTED_DECLARATIONS,\n declarations: EXPORTED_DECLARATIONS,\n imports: [ScrollingModule],\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 * Generated bundle index. Do not edit.\n */\n\nexport { BaseCdkCell, BaseRowDef, CDK_ROW_TEMPLATE, CDK_TABLE, CDK_TABLE_TEMPLATE, CdkCell, CdkCellDef, CdkCellOutlet, CdkColumnDef, CdkFooterCell, CdkFooterCellDef, CdkFooterRow, CdkFooterRowDef, CdkHeaderCell, CdkHeaderCellDef, CdkHeaderRow, CdkHeaderRowDef, CdkNoDataRow, CdkRecycleRows, CdkRow, CdkRowDef, CdkTable, CdkTableModule, CdkTextColumn, DataRowOutlet, FooterRowOutlet, HeaderRowOutlet, NoDataRowOutlet, STICKY_DIRECTIONS, STICKY_POSITIONING_LISTENER, StickyStyler, TEXT_COLUMN_OPTIONS, _COALESCED_STYLE_SCHEDULER, _CoalescedStyleScheduler, _Schedule, mixinHasStickyInput };\n","import * as i0 from '@angular/core';\nimport { Directive, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';\nimport * as i1 from '@angular/cdk/table';\nimport { CdkTable, CDK_TABLE, _COALESCED_STYLE_SCHEDULER, _CoalescedStyleScheduler, STICKY_POSITIONING_LISTENER, CDK_TABLE_TEMPLATE, CdkCellDef, CdkHeaderCellDef, CdkFooterCellDef, CdkColumnDef, CdkHeaderCell, CdkFooterCell, CdkCell, CdkHeaderRowDef, CdkFooterRowDef, CdkRowDef, CdkHeaderRow, CDK_ROW_TEMPLATE, CdkFooterRow, CdkRow, CdkNoDataRow, CdkTextColumn, CdkTableModule, DataSource } from '@angular/cdk/table';\nimport { _VIEW_REPEATER_STRATEGY, _RecycleViewRepeaterStrategy, _DisposeViewRepeaterStrategy } from '@angular/cdk/collections';\nimport { MatCommonModule } from '@angular/material/core';\nimport { _isNumberValue } from '@angular/cdk/coercion';\nimport { BehaviorSubject, Subject, merge, of, combineLatest } 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 * Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with\n * tables that animate rows.\n */\nclass MatRecycleRows {\n}\nMatRecycleRows.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatRecycleRows, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatRecycleRows.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatRecycleRows, selector: \"mat-table[recycleRows], table[mat-table][recycleRows]\", providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatRecycleRows, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-table[recycleRows], table[mat-table][recycleRows]',\n providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }],\n }]\n }] });\n/**\n * Wrapper for the CdkTable with Material design styles.\n */\nclass MatTable extends CdkTable {\n constructor() {\n super(...arguments);\n /** Overrides the sticky CSS class set by the `CdkTable`. */\n this.stickyCssClass = 'mat-table-sticky';\n /** Overrides the need to add position: sticky on every sticky cell element in `CdkTable`. */\n this.needsPositionStickyOnElement = false;\n }\n}\nMatTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTable, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatTable.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTable, selector: \"mat-table, table[mat-table]\", host: { properties: { \"class.mat-table-fixed-layout\": \"fixedLayout\" }, classAttribute: \"mat-table\" }, providers: [\n // TODO(michaeljamesparsons) Abstract the view repeater strategy to a directive API so this code\n // is only included in the build if used.\n { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },\n { provide: CdkTable, useExisting: MatTable },\n { provide: CDK_TABLE, useExisting: MatTable },\n { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },\n // Prevent nested tables from seeing this table's StickyPositioningListener.\n { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n ], exportAs: [\"matTable\"], usesInheritance: true, ngImport: i0, template: \"\\n <ng-content select=\\\"caption\\\"></ng-content>\\n <ng-content select=\\\"colgroup, col\\\"></ng-content>\\n <ng-container headerRowOutlet></ng-container>\\n <ng-container rowOutlet></ng-container>\\n <ng-container noDataRowOutlet></ng-container>\\n <ng-container footerRowOutlet></ng-container>\\n\", isInline: true, styles: [\"mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}table.mat-table{border-spacing:0}tr.mat-header-row{height:56px}tr.mat-row,tr.mat-footer-row{height:48px}th.mat-header-cell{text-align:left}[dir=rtl] th.mat-header-cell{text-align:right}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0;border-bottom-width:1px;border-bottom-style:solid}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] th.mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] th.mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}.mat-table-sticky{position:sticky !important}.mat-table-fixed-layout{table-layout:fixed}\"], dependencies: [{ kind: \"directive\", type: i1.DataRowOutlet, selector: \"[rowOutlet]\" }, { kind: \"directive\", type: i1.HeaderRowOutlet, selector: \"[headerRowOutlet]\" }, { kind: \"directive\", type: i1.FooterRowOutlet, selector: \"[footerRowOutlet]\" }, { kind: \"directive\", type: i1.NoDataRowOutlet, selector: \"[noDataRowOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTable, decorators: [{\n type: Component,\n args: [{ selector: 'mat-table, table[mat-table]', exportAs: 'matTable', template: CDK_TABLE_TEMPLATE, host: {\n 'class': 'mat-table',\n '[class.mat-table-fixed-layout]': 'fixedLayout',\n }, providers: [\n // TODO(michaeljamesparsons) Abstract the view repeater strategy to a directive API so this code\n // is only included in the build if used.\n { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },\n { provide: CdkTable, useExisting: MatTable },\n { provide: CDK_TABLE, useExisting: MatTable },\n { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },\n // Prevent nested tables from seeing this table's StickyPositioningListener.\n { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, styles: [\"mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}table.mat-table{border-spacing:0}tr.mat-header-row{height:56px}tr.mat-row,tr.mat-footer-row{height:48px}th.mat-header-cell{text-align:left}[dir=rtl] th.mat-header-cell{text-align:right}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0;border-bottom-width:1px;border-bottom-style:solid}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] th.mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] th.mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}.mat-table-sticky{position:sticky !important}.mat-table-fixed-layout{table-layout:fixed}\"] }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Cell definition for the mat-table.\n * Captures the template of a column's data row cell as well as cell-specific properties.\n */\nclass MatCellDef extends CdkCellDef {\n}\nMatCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatCellDef, selector: \"[matCellDef]\", providers: [{ provide: CdkCellDef, useExisting: MatCellDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatCellDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matCellDef]',\n providers: [{ provide: CdkCellDef, useExisting: MatCellDef }],\n }]\n }] });\n/**\n * Header cell definition for the mat-table.\n * Captures the template of a column's header cell and as well as cell-specific properties.\n */\nclass MatHeaderCellDef extends CdkHeaderCellDef {\n}\nMatHeaderCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatHeaderCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatHeaderCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatHeaderCellDef, selector: \"[matHeaderCellDef]\", providers: [{ provide: CdkHeaderCellDef, useExisting: MatHeaderCellDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatHeaderCellDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matHeaderCellDef]',\n providers: [{ provide: CdkHeaderCellDef, useExisting: MatHeaderCellDef }],\n }]\n }] });\n/**\n * Footer cell definition for the mat-table.\n * Captures the template of a column's footer cell and as well as cell-specific properties.\n */\nclass MatFooterCellDef extends CdkFooterCellDef {\n}\nMatFooterCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatFooterCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatFooterCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatFooterCellDef, selector: \"[matFooterCellDef]\", providers: [{ provide: CdkFooterCellDef, useExisting: MatFooterCellDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatFooterCellDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matFooterCellDef]',\n providers: [{ provide: CdkFooterCellDef, useExisting: MatFooterCellDef }],\n }]\n }] });\n/**\n * Column definition for the mat-table.\n * Defines a set of cells available for a table column.\n */\nclass MatColumnDef extends CdkColumnDef {\n /** Unique name for this column. */\n get name() {\n return this._name;\n }\n set name(name) {\n this._setNameInput(name);\n }\n /**\n * Add \"mat-column-\" prefix in addition to \"cdk-column-\" prefix.\n * In the future, this will only add \"mat-column-\" and columnCssClassName\n * will change from type string[] to string.\n * @docs-private\n */\n _updateColumnCssClassName() {\n super._updateColumnCssClassName();\n this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`);\n }\n}\nMatColumnDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatColumnDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatColumnDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatColumnDef, selector: \"[matColumnDef]\", inputs: { sticky: \"sticky\", name: [\"matColumnDef\", \"name\"] }, providers: [\n { provide: CdkColumnDef, useExisting: MatColumnDef },\n { provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: MatColumnDef },\n ], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatColumnDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matColumnDef]',\n inputs: ['sticky'],\n providers: [\n { provide: CdkColumnDef, useExisting: MatColumnDef },\n { provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: MatColumnDef },\n ],\n }]\n }], propDecorators: { name: [{\n type: Input,\n args: ['matColumnDef']\n }] } });\n/** Header cell template container that adds the right classes and role. */\nclass MatHeaderCell extends CdkHeaderCell {\n}\nMatHeaderCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatHeaderCell, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatHeaderCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatHeaderCell, selector: \"mat-header-cell, th[mat-header-cell]\", host: { attributes: { \"role\": \"columnheader\" }, classAttribute: \"mat-header-cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatHeaderCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-header-cell, th[mat-header-cell]',\n host: {\n 'class': 'mat-header-cell',\n 'role': 'columnheader',\n },\n }]\n }] });\n/** Footer cell template container that adds the right classes and role. */\nclass MatFooterCell extends CdkFooterCell {\n}\nMatFooterCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatFooterCell, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatFooterCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatFooterCell, selector: \"mat-footer-cell, td[mat-footer-cell]\", host: { attributes: { \"role\": \"gridcell\" }, classAttribute: \"mat-footer-cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatFooterCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-footer-cell, td[mat-footer-cell]',\n host: {\n 'class': 'mat-footer-cell',\n 'role': 'gridcell',\n },\n }]\n }] });\n/** Cell template container that adds the right classes and role. */\nclass MatCell extends CdkCell {\n}\nMatCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatCell, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatCell, selector: \"mat-cell, td[mat-cell]\", host: { attributes: { \"role\": \"gridcell\" }, classAttribute: \"mat-cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-cell, td[mat-cell]',\n host: {\n 'class': 'mat-cell',\n 'role': 'gridcell',\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 * Header row definition for the mat-table.\n * Captures the header row's template and other header properties such as the columns to display.\n */\nclass MatHeaderRowDef extends CdkHeaderRowDef {\n}\nMatHeaderRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatHeaderRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatHeaderRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatHeaderRowDef, selector: \"[matHeaderRowDef]\", inputs: { columns: [\"matHeaderRowDef\", \"columns\"], sticky: [\"matHeaderRowDefSticky\", \"sticky\"] }, providers: [{ provide: CdkHeaderRowDef, useExisting: MatHeaderRowDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatHeaderRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matHeaderRowDef]',\n providers: [{ provide: CdkHeaderRowDef, useExisting: MatHeaderRowDef }],\n inputs: ['columns: matHeaderRowDef', 'sticky: matHeaderRowDefSticky'],\n }]\n }] });\n/**\n * Footer row definition for the mat-table.\n * Captures the footer row's template and other footer properties such as the columns to display.\n */\nclass MatFooterRowDef extends CdkFooterRowDef {\n}\nMatFooterRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatFooterRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatFooterRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatFooterRowDef, selector: \"[matFooterRowDef]\", inputs: { columns: [\"matFooterRowDef\", \"columns\"], sticky: [\"matFooterRowDefSticky\", \"sticky\"] }, providers: [{ provide: CdkFooterRowDef, useExisting: MatFooterRowDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatFooterRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matFooterRowDef]',\n providers: [{ provide: CdkFooterRowDef, useExisting: MatFooterRowDef }],\n inputs: ['columns: matFooterRowDef', 'sticky: matFooterRowDefSticky'],\n }]\n }] });\n/**\n * Data row definition for the mat-table.\n * Captures the data row's template and other properties such as the columns to display and\n * a when predicate that describes when this row should be used.\n */\nclass MatRowDef extends CdkRowDef {\n}\nMatRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatRowDef, selector: \"[matRowDef]\", inputs: { columns: [\"matRowDefColumns\", \"columns\"], when: [\"matRowDefWhen\", \"when\"] }, providers: [{ provide: CdkRowDef, useExisting: MatRowDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matRowDef]',\n providers: [{ provide: CdkRowDef, useExisting: MatRowDef }],\n inputs: ['columns: matRowDefColumns', 'when: matRowDefWhen'],\n }]\n }] });\n/** Header template container that contains the cell outlet. Adds the right class and role. */\nclass MatHeaderRow extends CdkHeaderRow {\n}\nMatHeaderRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatHeaderRow, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatHeaderRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatHeaderRow, selector: \"mat-header-row, tr[mat-header-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"mat-header-row\" }, providers: [{ provide: CdkHeaderRow, useExisting: MatHeaderRow }], exportAs: [\"matHeaderRow\"], usesInheritance: true, ngImport: i0, template: \"<ng-container cdkCellOutlet></ng-container>\", isInline: true, dependencies: [{ kind: \"directive\", type: i1.CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatHeaderRow, decorators: [{\n type: Component,\n args: [{\n selector: 'mat-header-row, tr[mat-header-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'mat-header-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matHeaderRow',\n providers: [{ provide: CdkHeaderRow, useExisting: MatHeaderRow }],\n }]\n }] });\n/** Footer template container that contains the cell outlet. Adds the right class and role. */\nclass MatFooterRow extends CdkFooterRow {\n}\nMatFooterRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatFooterRow, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatFooterRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatFooterRow, selector: \"mat-footer-row, tr[mat-footer-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"mat-footer-row\" }, providers: [{ provide: CdkFooterRow, useExisting: MatFooterRow }], exportAs: [\"matFooterRow\"], usesInheritance: true, ngImport: i0, template: \"<ng-container cdkCellOutlet></ng-container>\", isInline: true, dependencies: [{ kind: \"directive\", type: i1.CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatFooterRow, decorators: [{\n type: Component,\n args: [{\n selector: 'mat-footer-row, tr[mat-footer-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'mat-footer-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matFooterRow',\n providers: [{ provide: CdkFooterRow, useExisting: MatFooterRow }],\n }]\n }] });\n/** Data row template container that contains the cell outlet. Adds the right class and role. */\nclass MatRow extends CdkRow {\n}\nMatRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatRow, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatRow, selector: \"mat-row, tr[mat-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"mat-row\" }, providers: [{ provide: CdkRow, useExisting: MatRow }], exportAs: [\"matRow\"], usesInheritance: true, ngImport: i0, template: \"<ng-container cdkCellOutlet></ng-container>\", isInline: true, dependencies: [{ kind: \"directive\", type: i1.CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatRow, decorators: [{\n type: Component,\n args: [{\n selector: 'mat-row, tr[mat-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'mat-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matRow',\n providers: [{ provide: CdkRow, useExisting: MatRow }],\n }]\n }] });\n/** Row that can be used to display a message when no data is shown in the table. */\nclass MatNoDataRow extends CdkNoDataRow {\n constructor() {\n super(...arguments);\n this._contentClassName = 'mat-no-data-row';\n }\n}\nMatNoDataRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatNoDataRow, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatNoDataRow.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatNoDataRow, selector: \"ng-template[matNoDataRow]\", providers: [{ provide: CdkNoDataRow, useExisting: MatNoDataRow }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatNoDataRow, decorators: [{\n type: Directive,\n args: [{\n selector: 'ng-template[matNoDataRow]',\n providers: [{ provide: CdkNoDataRow, useExisting: MatNoDataRow }],\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 * Column that simply shows text content for the header and row cells. Assumes that the table\n * is using the native table implementation (`<table>`).\n *\n * By default, the name of this column will be the header text and data property accessor.\n * The header text can be overridden with the `headerText` input. Cell values can be overridden with\n * the `dataAccessor` input. Change the text justification to the start or end using the `justify`\n * input.\n */\nclass MatTextColumn extends CdkTextColumn {\n}\nMatTextColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTextColumn, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatTextColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTextColumn, selector: \"mat-text-column\", usesInheritance: true, ngImport: i0, template: `\n <ng-container matColumnDef>\n <th mat-header-cell *matHeaderCellDef [style.text-align]=\"justify\">\n {{headerText}}\n </th>\n <td mat-cell *matCellDef=\"let data\" [style.text-align]=\"justify\">\n {{dataAccessor(data, name)}}\n </td>\n </ng-container>\n `, isInline: true, dependencies: [{ kind: \"directive\", type: MatHeaderCellDef, selector: \"[matHeaderCellDef]\" }, { kind: \"directive\", type: MatColumnDef, selector: \"[matColumnDef]\", inputs: [\"sticky\", \"matColumnDef\"] }, { kind: \"directive\", type: MatCellDef, selector: \"[matCellDef]\" }, { kind: \"directive\", type: MatHeaderCell, selector: \"mat-header-cell, th[mat-header-cell]\" }, { kind: \"directive\", type: MatCell, selector: \"mat-cell, td[mat-cell]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTextColumn, decorators: [{\n type: Component,\n args: [{\n selector: 'mat-text-column',\n template: `\n <ng-container matColumnDef>\n <th mat-header-cell *matHeaderCellDef [style.text-align]=\"justify\">\n {{headerText}}\n </th>\n <td mat-cell *matCellDef=\"let data\" [style.text-align]=\"justify\">\n {{dataAccessor(data, name)}}\n </td>\n </ng-container>\n `,\n encapsulation: ViewEncapsulation.None,\n // Change detection is intentionally not set to OnPush. This component's template will be provided\n // to the table to be inserted into its view. This is problematic when change detection runs since\n // the bindings in this template will be evaluated _after_ the table's view is evaluated, which\n // mean's the template in the table's view will not have the updated value (and in fact will cause\n // an ExpressionChangedAfterItHasBeenCheckedError).\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\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 EXPORTED_DECLARATIONS = [\n // Table\n MatTable,\n MatRecycleRows,\n // Template defs\n MatHeaderCellDef,\n MatHeaderRowDef,\n MatColumnDef,\n MatCellDef,\n MatRowDef,\n MatFooterCellDef,\n MatFooterRowDef,\n // Cell directives\n MatHeaderCell,\n MatCell,\n MatFooterCell,\n // Row directives\n MatHeaderRow,\n MatRow,\n MatFooterRow,\n MatNoDataRow,\n MatTextColumn,\n];\nclass MatTableModule {\n}\nMatTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTableModule, declarations: [\n // Table\n MatTable,\n MatRecycleRows,\n // Template defs\n MatHeaderCellDef,\n MatHeaderRowDef,\n MatColumnDef,\n MatCellDef,\n MatRowDef,\n MatFooterCellDef,\n MatFooterRowDef,\n // Cell directives\n MatHeaderCell,\n MatCell,\n MatFooterCell,\n // Row directives\n MatHeaderRow,\n MatRow,\n MatFooterRow,\n MatNoDataRow,\n MatTextColumn], imports: [CdkTableModule, MatCommonModule], exports: [MatCommonModule, \n // Table\n MatTable,\n MatRecycleRows,\n // Template defs\n MatHeaderCellDef,\n MatHeaderRowDef,\n MatColumnDef,\n MatCellDef,\n MatRowDef,\n MatFooterCellDef,\n MatFooterRowDef,\n // Cell directives\n MatHeaderCell,\n MatCell,\n MatFooterCell,\n // Row directives\n MatHeaderRow,\n MatRow,\n MatFooterRow,\n MatNoDataRow,\n MatTextColumn] });\nMatTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTableModule, imports: [CdkTableModule, MatCommonModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTableModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CdkTableModule, MatCommonModule],\n exports: [MatCommonModule, EXPORTED_DECLARATIONS],\n declarations: EXPORTED_DECLARATIONS,\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 * Corresponds to `Number.MAX_SAFE_INTEGER`. Moved out into a variable here due to\n * flaky browser support and the value not being defined in Closure's typings.\n */\nconst MAX_SAFE_INTEGER = 9007199254740991;\n/** Shared base class with MDC-based implementation. */\nclass _MatTableDataSource extends DataSource {\n constructor(initialData = []) {\n super();\n /** Stream emitting render data to the table (depends on ordered data changes). */\n this._renderData = new BehaviorSubject([]);\n /** Stream that emits when a new filter string is set on the data source. */\n this._filter = new BehaviorSubject('');\n /** Used to react to internal changes of the paginator that are made by the data source itself. */\n this._internalPageChanges = new Subject();\n /**\n * Subscription to the changes that should trigger an update to the table's rendered rows, such\n * as filtering, sorting, pagination, or base data changes.\n */\n this._renderChangesSubscription = null;\n /**\n * Data accessor function that is used for accessing data properties for sorting through\n * the default sortData function.\n * This default function assumes that the sort header IDs (which defaults to the column name)\n * matches the data's properties (e.g. column Xyz represents data['Xyz']).\n * May be set to a custom function for different behavior.\n * @param data Data object that is being accessed.\n * @param sortHeaderId The name of the column that represents the data.\n */\n this.sortingDataAccessor = (data, sortHeaderId) => {\n const value = data[sortHeaderId];\n if (_isNumberValue(value)) {\n const numberValue = Number(value);\n // Numbers beyond `MAX_SAFE_INTEGER` can't be compared reliably so we\n // leave them as strings. For more info: https://goo.gl/y5vbSg\n return numberValue < MAX_SAFE_INTEGER ? numberValue : value;\n }\n return value;\n };\n /**\n * Gets a sorted copy of the data array based on the state of the MatSort. Called\n * after changes are made to the filtered data or when sort changes are emitted from MatSort.\n * By default, the function retrieves the active sort and its direction and compares data\n * by retrieving data using the sortingDataAccessor. May be overridden for a custom implementation\n * of data ordering.\n * @param data The array of data that should be sorted.\n * @param sort The connected MatSort that holds the current sort state.\n */\n this.sortData = (data, sort) => {\n const active = sort.active;\n const direction = sort.direction;\n if (!active || direction == '') {\n return data;\n }\n return data.sort((a, b) => {\n let valueA = this.sortingDataAccessor(a, active);\n let valueB = this.sortingDataAccessor(b, active);\n // If there are data in the column that can be converted to a number,\n // it must be ensured that the rest of the data\n // is of the same type so as not to order incorrectly.\n const valueAType = typeof valueA;\n const valueBType = typeof valueB;\n if (valueAType !== valueBType) {\n if (valueAType === 'number') {\n valueA += '';\n }\n if (valueBType === 'number') {\n valueB += '';\n }\n }\n // If both valueA and valueB exist (truthy), then compare the two. Otherwise, check if\n // one value exists while the other doesn't. In this case, existing value should come last.\n // This avoids inconsistent results when comparing values to undefined/null.\n // If neither value exists, return 0 (equal).\n let comparatorResult = 0;\n if (valueA != null && valueB != null) {\n // Check if one value is greater than the other; if equal, comparatorResult should remain 0.\n if (valueA > valueB) {\n comparatorResult = 1;\n }\n else if (valueA < valueB) {\n comparatorResult = -1;\n }\n }\n else if (valueA != null) {\n comparatorResult = 1;\n }\n else if (valueB != null) {\n comparatorResult = -1;\n }\n return comparatorResult * (direction == 'asc' ? 1 : -1);\n });\n };\n /**\n * Checks if a data object matches the data source's filter string. By default, each data object\n * is converted to a string of its properties and returns true if the filter has\n * at least one occurrence in that string. By default, the filter string has its whitespace\n * trimmed and the match is case-insensitive. May be overridden for a custom implementation of\n * filter matching.\n * @param data Data object used to check against the filter.\n * @param filter Filter string that has been set on the data source.\n * @returns Whether the filter matches against the data\n */\n this.filterPredicate = (data, filter) => {\n // Transform the data into a lowercase string of all property values.\n const dataStr = Object.keys(data)\n .reduce((currentTerm, key) => {\n // Use an obscure Unicode character to delimit the words in the concatenated string.\n // This avoids matches where the values of two columns combined will match the user's query\n // (e.g. `Flute` and `Stop` will match `Test`). The character is intended to be something\n // that has a very low chance of being typed in by somebody in a text field. This one in\n // particular is \"White up-pointing triangle with dot\" from\n // https://en.wikipedia.org/wiki/List_of_Unicode_characters\n return currentTerm + data[key] + '◬';\n }, '')\n .toLowerCase();\n // Transform the filter by converting it to lowercase and removing whitespace.\n const transformedFilter = filter.trim().toLowerCase();\n return dataStr.indexOf(transformedFilter) != -1;\n };\n this._data = new BehaviorSubject(initialData);\n this._updateChangeSubscription();\n }\n /** Array of data that should be rendered by the table, where each object represents one row. */\n get data() {\n return this._data.value;\n }\n set data(data) {\n data = Array.isArray(data) ? data : [];\n this._data.next(data);\n // Normally the `filteredData` is updated by the re-render\n // subscription, but that won't happen if it's inactive.\n if (!this._renderChangesSubscription) {\n this._filterData(data);\n }\n }\n /**\n * Filter term that should be used to filter out objects from the data array. To override how\n * data objects match to this filter string, provide a custom function for filterPredicate.\n */\n get filter() {\n return this._filter.value;\n }\n set filter(filter) {\n this._filter.next(filter);\n // Normally the `filteredData` is updated by the re-render\n // subscription, but that won't happen if it's inactive.\n if (!this._renderChangesSubscription) {\n this._filterData(this.data);\n }\n }\n /**\n * Instance of the MatSort directive used by the table to control its sorting. Sort changes\n * emitted by the MatSort will trigger an update to the table's rendered data.\n */\n get sort() {\n return this._sort;\n }\n set sort(sort) {\n this._sort = sort;\n this._updateChangeSubscription();\n }\n /**\n * Instance of the MatPaginator component used by the table to control what page of the data is\n * displayed. Page changes emitted by the MatPaginator will trigger an update to the\n * table's rendered data.\n *\n * Note that the data source uses the paginator's properties to calculate which page of data\n * should be displayed. If the paginator receives its properties as template inputs,\n * e.g. `[pageLength]=100` or `[pageIndex]=1`, then be sure that the paginator's view has been\n * initialized before assigning it to this data source.\n */\n get paginator() {\n return this._paginator;\n }\n set paginator(paginator) {\n this._paginator = paginator;\n this._updateChangeSubscription();\n }\n /**\n * Subscribe to changes that should trigger an update to the table's rendered rows. When the\n * changes occur, process the current state of the filter, sort, and pagination along with\n * the provided base data and send it to the table for rendering.\n */\n _updateChangeSubscription() {\n // Sorting and/or pagination should be watched if MatSort and/or MatPaginator are provided.\n // The events should emit whenever the component emits a change or initializes, or if no\n // component is provided, a stream with just a null event should be provided.\n // The `sortChange` and `pageChange` acts as a signal to the combineLatests below so that the\n // pipeline can progress to the next step. Note that the value from these streams are not used,\n // they purely act as a signal to progress in the pipeline.\n const sortChange = this._sort\n ? merge(this._sort.sortChange, this._sort.initialized)\n : of(null);\n const pageChange = this._paginator\n ? merge(this._paginator.page, this._internalPageChanges, this._paginator.initialized)\n : of(null);\n const dataStream = this._data;\n // Watch for base data or filter changes to provide a filtered set of data.\n const filteredData = combineLatest([dataStream, this._filter]).pipe(map(([data]) => this._filterData(data)));\n // Watch for filtered data or sort changes to provide an ordered set of data.\n const orderedData = combineLatest([filteredData, sortChange]).pipe(map(([data]) => this._orderData(data)));\n // Watch for ordered data or page changes to provide a paged set of data.\n const paginatedData = combineLatest([orderedData, pageChange]).pipe(map(([data]) => this._pageData(data)));\n // Watched for paged data changes and send the result to the table to render.\n this._renderChangesSubscription?.unsubscribe();\n this._renderChangesSubscription = paginatedData.subscribe(data => this._renderData.next(data));\n }\n /**\n * Returns a filtered data array where each filter object contains the filter string within\n * the result of the filterTermAccessor function. If no filter is set, returns the data array\n * as provided.\n */\n _filterData(data) {\n // If there is a filter string, filter out data that does not contain it.\n // Each data object is converted to a string using the function defined by filterTermAccessor.\n // May be overridden for customization.\n this.filteredData =\n this.filter == null || this.filter === ''\n ? data\n : data.filter(obj => this.filterPredicate(obj, this.filter));\n if (this.paginator) {\n this._updatePaginator(this.filteredData.length);\n }\n return this.filteredData;\n }\n /**\n * Returns a sorted copy of the data if MatSort has a sort applied, otherwise just returns the\n * data array as provided. Uses the default data accessor for data lookup, unless a\n * sortDataAccessor function is defined.\n */\n _orderData(data) {\n // If there is no active sort or direction, return the data without trying to sort.\n if (!this.sort) {\n return data;\n }\n return this.sortData(data.slice(), this.sort);\n }\n /**\n * Returns a paged slice of the provided data array according to the provided MatPaginator's page\n * index and length. If there is no paginator provided, returns the data array as provided.\n */\n _pageData(data) {\n if (!this.paginator) {\n return data;\n }\n const startIndex = this.paginator.pageIndex * this.paginator.pageSize;\n return data.slice(startIndex, startIndex + this.paginator.pageSize);\n }\n /**\n * Updates the paginator to reflect the length of the filtered data, and makes sure that the page\n * index does not exceed the paginator's last page. Values are changed in a resolved promise to\n * guard against making property changes within a round of change detection.\n */\n _updatePaginator(filteredDataLength) {\n Promise.resolve().then(() => {\n const paginator = this.paginator;\n if (!paginator) {\n return;\n }\n paginator.length = filteredDataLength;\n // If the page index is set beyond the page, reduce it to the last page.\n if (paginator.pageIndex > 0) {\n const lastPageIndex = Math.ceil(paginator.length / paginator.pageSize) - 1 || 0;\n const newPageIndex = Math.min(paginator.pageIndex, lastPageIndex);\n if (newPageIndex !== paginator.pageIndex) {\n paginator.pageIndex = newPageIndex;\n // Since the paginator only emits after user-generated changes,\n // we need our own stream so we know to should re-render the data.\n this._internalPageChanges.next();\n }\n }\n });\n }\n /**\n * Used by the MatTable. Called when it connects to the data source.\n * @docs-private\n */\n connect() {\n if (!this._renderChangesSubscription) {\n this._updateChangeSubscription();\n }\n return this._renderData;\n }\n /**\n * Used by the MatTable. Called when it disconnects from the data source.\n * @docs-private\n */\n disconnect() {\n this._renderChangesSubscription?.unsubscribe();\n this._renderChangesSubscription = null;\n }\n}\n/**\n * Data source that accepts a client-side data array and includes native support of filtering,\n * sorting (using MatSort), and pagination (using MatPaginator).\n *\n * Allows for sort customization by overriding sortingDataAccessor, which defines how data\n * properties are accessed. Also allows for filter customization by overriding filterTermAccessor,\n * which defines how row data is converted to a string for filter matching.\n *\n * **Note:** This class is meant to be a simple data source to help you get started. As such\n * it isn't equipped to handle some more advanced cases like robust i18n support or server-side\n * interactions. If your app needs to support more advanced use cases, consider implementing your\n * own `DataSource`.\n */\nclass MatTableDataSource extends _MatTableDataSource {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Generated bundle index. Do not edit.\n */\n\nexport { MatCell, MatCellDef, MatColumnDef, MatFooterCell, MatFooterCellDef, MatFooterRow, MatFooterRowDef, MatHeaderCell, MatHeaderCellDef, MatHeaderRow, MatHeaderRowDef, MatNoDataRow, MatRecycleRows, MatRow, MatRowDef, MatTable, MatTableDataSource, MatTableModule, MatTextColumn, _MatTableDataSource };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, EventEmitter, Directive, Optional, Inject, Input, Output, Injectable, SkipSelf, Component, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';\nimport * as i3 from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { SPACE, ENTER } from '@angular/cdk/keycodes';\nimport { mixinInitialized, mixinDisabled, AnimationDurations, AnimationCurves, MatCommonModule } from '@angular/material/core';\nimport { Subject, merge } from 'rxjs';\nimport { trigger, state, style, transition, animate, keyframes, query, animateChild } from '@angular/animations';\nimport * as i4 from '@angular/common';\nimport { CommonModule } from '@angular/common';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** @docs-private */\nfunction getSortDuplicateSortableIdError(id) {\n return Error(`Cannot have two MatSortables with the same id (${id}).`);\n}\n/** @docs-private */\nfunction getSortHeaderNotContainedWithinSortError() {\n return Error(`MatSortHeader must be placed within a parent element with the MatSort directive.`);\n}\n/** @docs-private */\nfunction getSortHeaderMissingIdError() {\n return Error(`MatSortHeader must be provided with a unique id.`);\n}\n/** @docs-private */\nfunction getSortInvalidDirectionError(direction) {\n return Error(`${direction} is not a valid sort direction ('asc' or 'desc').`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token to be used to override the default options for `mat-sort`. */\nconst MAT_SORT_DEFAULT_OPTIONS = new InjectionToken('MAT_SORT_DEFAULT_OPTIONS');\n// Boilerplate for applying mixins to MatSort.\n/** @docs-private */\nconst _MatSortBase = mixinInitialized(mixinDisabled(class {\n}));\n/** Container for MatSortables to manage the sort state and provide default sort parameters. */\nclass MatSort extends _MatSortBase {\n constructor(_defaultOptions) {\n super();\n this._defaultOptions = _defaultOptions;\n /** Collection of all registered sortables that this directive manages. */\n this.sortables = new Map();\n /** Used to notify any child components listening to state changes. */\n this._stateChanges = new Subject();\n /**\n * The direction to set when an MatSortable is initially sorted.\n * May be overridden by the MatSortable's sort start.\n */\n this.start = 'asc';\n this._direction = '';\n /** Event emitted when the user changes either the active sort or sort direction. */\n this.sortChange = new EventEmitter();\n }\n /** The sort direction of the currently active MatSortable. */\n get direction() {\n return this._direction;\n }\n set direction(direction) {\n if (direction &&\n direction !== 'asc' &&\n direction !== 'desc' &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getSortInvalidDirectionError(direction);\n }\n this._direction = direction;\n }\n /**\n * Whether to disable the user from clearing the sort by finishing the sort direction cycle.\n * May be overridden by the MatSortable's disable clear input.\n */\n get disableClear() {\n return this._disableClear;\n }\n set disableClear(v) {\n this._disableClear = coerceBooleanProperty(v);\n }\n /**\n * Register function to be used by the contained MatSortables. Adds the MatSortable to the\n * collection of MatSortables.\n */\n register(sortable) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!sortable.id) {\n throw getSortHeaderMissingIdError();\n }\n if (this.sortables.has(sortable.id)) {\n throw getSortDuplicateSortableIdError(sortable.id);\n }\n }\n this.sortables.set(sortable.id, sortable);\n }\n /**\n * Unregister function to be used by the contained MatSortables. Removes the MatSortable from the\n * collection of contained MatSortables.\n */\n deregister(sortable) {\n this.sortables.delete(sortable.id);\n }\n /** Sets the active sort id and determines the new sort direction. */\n sort(sortable) {\n if (this.active != sortable.id) {\n this.active = sortable.id;\n this.direction = sortable.start ? sortable.start : this.start;\n }\n else {\n this.direction = this.getNextSortDirection(sortable);\n }\n this.sortChange.emit({ active: this.active, direction: this.direction });\n }\n /** Returns the next sort direction of the active sortable, checking for potential overrides. */\n getNextSortDirection(sortable) {\n if (!sortable) {\n return '';\n }\n // Get the sort direction cycle with the potential sortable overrides.\n const disableClear = sortable?.disableClear ?? this.disableClear ?? !!this._defaultOptions?.disableClear;\n let sortDirectionCycle = getSortDirectionCycle(sortable.start || this.start, disableClear);\n // Get and return the next direction in the cycle\n let nextDirectionIndex = sortDirectionCycle.indexOf(this.direction) + 1;\n if (nextDirectionIndex >= sortDirectionCycle.length) {\n nextDirectionIndex = 0;\n }\n return sortDirectionCycle[nextDirectionIndex];\n }\n ngOnInit() {\n this._markInitialized();\n }\n ngOnChanges() {\n this._stateChanges.next();\n }\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n}\nMatSort.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSort, deps: [{ token: MAT_SORT_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatSort.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatSort, selector: \"[matSort]\", inputs: { disabled: [\"matSortDisabled\", \"disabled\"], active: [\"matSortActive\", \"active\"], start: [\"matSortStart\", \"start\"], direction: [\"matSortDirection\", \"direction\"], disableClear: [\"matSortDisableClear\", \"disableClear\"] }, outputs: { sortChange: \"matSortChange\" }, host: { classAttribute: \"mat-sort\" }, exportAs: [\"matSort\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSort, decorators: [{\n type: Directive,\n args: [{\n selector: '[matSort]',\n exportAs: 'matSort',\n host: { 'class': 'mat-sort' },\n inputs: ['disabled: matSortDisabled'],\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_SORT_DEFAULT_OPTIONS]\n }] }]; }, propDecorators: { active: [{\n type: Input,\n args: ['matSortActive']\n }], start: [{\n type: Input,\n args: ['matSortStart']\n }], direction: [{\n type: Input,\n args: ['matSortDirection']\n }], disableClear: [{\n type: Input,\n args: ['matSortDisableClear']\n }], sortChange: [{\n type: Output,\n args: ['matSortChange']\n }] } });\n/** Returns the sort direction cycle to use given the provided parameters of order and clear. */\nfunction getSortDirectionCycle(start, disableClear) {\n let sortOrder = ['asc', 'desc'];\n if (start == 'desc') {\n sortOrder.reverse();\n }\n if (!disableClear) {\n sortOrder.push('');\n }\n return sortOrder;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 SORT_ANIMATION_TRANSITION = AnimationDurations.ENTERING + ' ' + AnimationCurves.STANDARD_CURVE;\n/**\n * Animations used by MatSort.\n * @docs-private\n */\nconst matSortAnimations = {\n /** Animation that moves the sort indicator. */\n indicator: trigger('indicator', [\n state('active-asc, asc', style({ transform: 'translateY(0px)' })),\n // 10px is the height of the sort indicator, minus the width of the pointers\n state('active-desc, desc', style({ transform: 'translateY(10px)' })),\n transition('active-asc <=> active-desc', animate(SORT_ANIMATION_TRANSITION)),\n ]),\n /** Animation that rotates the left pointer of the indicator based on the sorting direction. */\n leftPointer: trigger('leftPointer', [\n state('active-asc, asc', style({ transform: 'rotate(-45deg)' })),\n state('active-desc, desc', style({ transform: 'rotate(45deg)' })),\n transition('active-asc <=> active-desc', animate(SORT_ANIMATION_TRANSITION)),\n ]),\n /** Animation that rotates the right pointer of the indicator based on the sorting direction. */\n rightPointer: trigger('rightPointer', [\n state('active-asc, asc', style({ transform: 'rotate(45deg)' })),\n state('active-desc, desc', style({ transform: 'rotate(-45deg)' })),\n transition('active-asc <=> active-desc', animate(SORT_ANIMATION_TRANSITION)),\n ]),\n /** Animation that controls the arrow opacity. */\n arrowOpacity: trigger('arrowOpacity', [\n state('desc-to-active, asc-to-active, active', style({ opacity: 1 })),\n state('desc-to-hint, asc-to-hint, hint', style({ opacity: 0.54 })),\n state('hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void', style({ opacity: 0 })),\n // Transition between all states except for immediate transitions\n transition('* => asc, * => desc, * => active, * => hint, * => void', animate('0ms')),\n transition('* <=> *', animate(SORT_ANIMATION_TRANSITION)),\n ]),\n /**\n * Animation for the translation of the arrow as a whole. States are separated into two\n * groups: ones with animations and others that are immediate. Immediate states are asc, desc,\n * peek, and active. The other states define a specific animation (source-to-destination)\n * and are determined as a function of their prev user-perceived state and what the next state\n * should be.\n */\n arrowPosition: trigger('arrowPosition', [\n // Hidden Above => Hint Center\n transition('* => desc-to-hint, * => desc-to-active', animate(SORT_ANIMATION_TRANSITION, keyframes([style({ transform: 'translateY(-25%)' }), style({ transform: 'translateY(0)' })]))),\n // Hint Center => Hidden Below\n transition('* => hint-to-desc, * => active-to-desc', animate(SORT_ANIMATION_TRANSITION, keyframes([style({ transform: 'translateY(0)' }), style({ transform: 'translateY(25%)' })]))),\n // Hidden Below => Hint Center\n transition('* => asc-to-hint, * => asc-to-active', animate(SORT_ANIMATION_TRANSITION, keyframes([style({ transform: 'translateY(25%)' }), style({ transform: 'translateY(0)' })]))),\n // Hint Center => Hidden Above\n transition('* => hint-to-asc, * => active-to-asc', animate(SORT_ANIMATION_TRANSITION, keyframes([style({ transform: 'translateY(0)' }), style({ transform: 'translateY(-25%)' })]))),\n state('desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active', style({ transform: 'translateY(0)' })),\n state('hint-to-desc, active-to-desc, desc', style({ transform: 'translateY(-25%)' })),\n state('hint-to-asc, active-to-asc, asc', style({ transform: 'translateY(25%)' })),\n ]),\n /** Necessary trigger that calls animate on children animations. */\n allowChildren: trigger('allowChildren', [\n transition('* <=> *', [query('@*', animateChild(), { optional: 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 * To modify the labels and text displayed, create a new instance of MatSortHeaderIntl and\n * include it in a custom provider.\n */\nclass MatSortHeaderIntl {\n constructor() {\n /**\n * Stream that emits whenever the labels here are changed. Use this to notify\n * components if the labels have changed after initialization.\n */\n this.changes = new Subject();\n }\n}\nMatSortHeaderIntl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSortHeaderIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nMatSortHeaderIntl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSortHeaderIntl, providedIn: 'root' });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSortHeaderIntl, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n/** @docs-private */\nfunction MAT_SORT_HEADER_INTL_PROVIDER_FACTORY(parentIntl) {\n return parentIntl || new MatSortHeaderIntl();\n}\n/** @docs-private */\nconst MAT_SORT_HEADER_INTL_PROVIDER = {\n // If there is already an MatSortHeaderIntl available, use that. Otherwise, provide a new one.\n provide: MatSortHeaderIntl,\n deps: [[new Optional(), new SkipSelf(), MatSortHeaderIntl]],\n useFactory: MAT_SORT_HEADER_INTL_PROVIDER_FACTORY,\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Boilerplate for applying mixins to the sort header.\n/** @docs-private */\nconst _MatSortHeaderBase = mixinDisabled(class {\n});\n/**\n * Applies sorting behavior (click to change sort) and styles to an element, including an\n * arrow to display the current sort direction.\n *\n * Must be provided with an id and contained within a parent MatSort directive.\n *\n * If used on header cells in a CdkTable, it will automatically default its id from its containing\n * column definition.\n */\nclass MatSortHeader extends _MatSortHeaderBase {\n constructor(\n /**\n * @deprecated `_intl` parameter isn't being used anymore and it'll be removed.\n * @breaking-change 13.0.0\n */\n _intl, _changeDetectorRef, \n // `MatSort` is not optionally injected, but just asserted manually w/ better error.\n // tslint:disable-next-line: lightweight-tokens\n _sort, _columnDef, _focusMonitor, _elementRef, \n /** @breaking-change 14.0.0 _ariaDescriber will be required. */\n _ariaDescriber, defaultOptions) {\n // Note that we use a string token for the `_columnDef`, because the value is provided both by\n // `material/table` and `cdk/table` and we can't have the CDK depending on Material,\n // and we want to avoid having the sort header depending on the CDK table because\n // of this single reference.\n super();\n this._intl = _intl;\n this._changeDetectorRef = _changeDetectorRef;\n this._sort = _sort;\n this._columnDef = _columnDef;\n this._focusMonitor = _focusMonitor;\n this._elementRef = _elementRef;\n this._ariaDescriber = _ariaDescriber;\n /**\n * Flag set to true when the indicator should be displayed while the sort is not active. Used to\n * provide an affordance that the header is sortable by showing on focus and hover.\n */\n this._showIndicatorHint = false;\n /**\n * The view transition state of the arrow (translation/ opacity) - indicates its `from` and `to`\n * position through the animation. If animations are currently disabled, the fromState is removed\n * so that there is no animation displayed.\n */\n this._viewState = {};\n /** The direction the arrow should be facing according to the current state. */\n this._arrowDirection = '';\n /**\n * Whether the view state animation should show the transition between the `from` and `to` states.\n */\n this._disableViewStateAnimation = false;\n /** Sets the position of the arrow that displays when sorted. */\n this.arrowPosition = 'after';\n // Default the action description to \"Sort\" because it's better than nothing.\n // Without a description, the button's label comes from the sort header text content,\n // which doesn't give any indication that it performs a sorting operation.\n this._sortActionDescription = 'Sort';\n if (!_sort && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getSortHeaderNotContainedWithinSortError();\n }\n if (defaultOptions?.arrowPosition) {\n this.arrowPosition = defaultOptions?.arrowPosition;\n }\n this._handleStateChanges();\n }\n /**\n * Description applied to MatSortHeader's button element with aria-describedby. This text should\n * describe the action that will occur when the user clicks the sort header.\n */\n get sortActionDescription() {\n return this._sortActionDescription;\n }\n set sortActionDescription(value) {\n this._updateSortActionDescription(value);\n }\n /** Overrides the disable clear value of the containing MatSort for this MatSortable. */\n get disableClear() {\n return this._disableClear;\n }\n set disableClear(v) {\n this._disableClear = coerceBooleanProperty(v);\n }\n ngOnInit() {\n if (!this.id && this._columnDef) {\n this.id = this._columnDef.name;\n }\n // Initialize the direction of the arrow and set the view state to be immediately that state.\n this._updateArrowDirection();\n this._setAnimationTransitionState({\n toState: this._isSorted() ? 'active' : this._arrowDirection,\n });\n this._sort.register(this);\n this._sortButton = this._elementRef.nativeElement.querySelector('.mat-sort-header-container');\n this._updateSortActionDescription(this._sortActionDescription);\n }\n ngAfterViewInit() {\n // We use the focus monitor because we also want to style\n // things differently based on the focus origin.\n this._focusMonitor.monitor(this._elementRef, true).subscribe(origin => {\n const newState = !!origin;\n if (newState !== this._showIndicatorHint) {\n this._setIndicatorHintVisible(newState);\n this._changeDetectorRef.markForCheck();\n }\n });\n }\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._sort.deregister(this);\n this._rerenderSubscription.unsubscribe();\n }\n /**\n * Sets the \"hint\" state such that the arrow will be semi-transparently displayed as a hint to the\n * user showing what the active sort will become. If set to false, the arrow will fade away.\n */\n _setIndicatorHintVisible(visible) {\n // No-op if the sort header is disabled - should not make the hint visible.\n if (this._isDisabled() && visible) {\n return;\n }\n this._showIndicatorHint = visible;\n if (!this._isSorted()) {\n this._updateArrowDirection();\n if (this._showIndicatorHint) {\n this._setAnimationTransitionState({ fromState: this._arrowDirection, toState: 'hint' });\n }\n else {\n this._setAnimationTransitionState({ fromState: 'hint', toState: this._arrowDirection });\n }\n }\n }\n /**\n * Sets the animation transition view state for the arrow's position and opacity. If the\n * `disableViewStateAnimation` flag is set to true, the `fromState` will be ignored so that\n * no animation appears.\n */\n _setAnimationTransitionState(viewState) {\n this._viewState = viewState || {};\n // If the animation for arrow position state (opacity/translation) should be disabled,\n // remove the fromState so that it jumps right to the toState.\n if (this._disableViewStateAnimation) {\n this._viewState = { toState: viewState.toState };\n }\n }\n /** Triggers the sort on this sort header and removes the indicator hint. */\n _toggleOnInteraction() {\n this._sort.sort(this);\n // Do not show the animation if the header was already shown in the right position.\n if (this._viewState.toState === 'hint' || this._viewState.toState === 'active') {\n this._disableViewStateAnimation = true;\n }\n }\n _handleClick() {\n if (!this._isDisabled()) {\n this._sort.sort(this);\n }\n }\n _handleKeydown(event) {\n if (!this._isDisabled() && (event.keyCode === SPACE || event.keyCode === ENTER)) {\n event.preventDefault();\n this._toggleOnInteraction();\n }\n }\n /** Whether this MatSortHeader is currently sorted in either ascending or descending order. */\n _isSorted() {\n return (this._sort.active == this.id &&\n (this._sort.direction === 'asc' || this._sort.direction === 'desc'));\n }\n /** Returns the animation state for the arrow direction (indicator and pointers). */\n _getArrowDirectionState() {\n return `${this._isSorted() ? 'active-' : ''}${this._arrowDirection}`;\n }\n /** Returns the arrow position state (opacity, translation). */\n _getArrowViewState() {\n const fromState = this._viewState.fromState;\n return (fromState ? `${fromState}-to-` : '') + this._viewState.toState;\n }\n /**\n * Updates the direction the arrow should be pointing. If it is not sorted, the arrow should be\n * facing the start direction. Otherwise if it is sorted, the arrow should point in the currently\n * active sorted direction. The reason this is updated through a function is because the direction\n * should only be changed at specific times - when deactivated but the hint is displayed and when\n * the sort is active and the direction changes. Otherwise the arrow's direction should linger\n * in cases such as the sort becoming deactivated but we want to animate the arrow away while\n * preserving its direction, even though the next sort direction is actually different and should\n * only be changed once the arrow displays again (hint or activation).\n */\n _updateArrowDirection() {\n this._arrowDirection = this._isSorted() ? this._sort.direction : this.start || this._sort.start;\n }\n _isDisabled() {\n return this._sort.disabled || this.disabled;\n }\n /**\n * Gets the aria-sort attribute that should be applied to this sort header. If this header\n * is not sorted, returns null so that the attribute is removed from the host element. Aria spec\n * says that the aria-sort property should only be present on one header at a time, so removing\n * ensures this is true.\n */\n _getAriaSortAttribute() {\n if (!this._isSorted()) {\n return 'none';\n }\n return this._sort.direction == 'asc' ? 'ascending' : 'descending';\n }\n /** Whether the arrow inside the sort header should be rendered. */\n _renderArrow() {\n return !this._isDisabled() || this._isSorted();\n }\n _updateSortActionDescription(newDescription) {\n // We use AriaDescriber for the sort button instead of setting an `aria-label` because some\n // screen readers (notably VoiceOver) will read both the column header *and* the button's label\n // for every *cell* in the table, creating a lot of unnecessary noise.\n // If _sortButton is undefined, the component hasn't been initialized yet so there's\n // nothing to update in the DOM.\n if (this._sortButton) {\n // removeDescription will no-op if there is no existing message.\n // TODO(jelbourn): remove optional chaining when AriaDescriber is required.\n this._ariaDescriber?.removeDescription(this._sortButton, this._sortActionDescription);\n this._ariaDescriber?.describe(this._sortButton, newDescription);\n }\n this._sortActionDescription = newDescription;\n }\n /** Handles changes in the sorting state. */\n _handleStateChanges() {\n this._rerenderSubscription = merge(this._sort.sortChange, this._sort._stateChanges, this._intl.changes).subscribe(() => {\n if (this._isSorted()) {\n this._updateArrowDirection();\n // Do not show the animation if the header was already shown in the right position.\n if (this._viewState.toState === 'hint' || this._viewState.toState === 'active') {\n this._disableViewStateAnimation = true;\n }\n this._setAnimationTransitionState({ fromState: this._arrowDirection, toState: 'active' });\n this._showIndicatorHint = false;\n }\n // If this header was recently active and now no longer sorted, animate away the arrow.\n if (!this._isSorted() && this._viewState && this._viewState.toState === 'active') {\n this._disableViewStateAnimation = false;\n this._setAnimationTransitionState({ fromState: 'active', toState: this._arrowDirection });\n }\n this._changeDetectorRef.markForCheck();\n });\n }\n}\nMatSortHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSortHeader, deps: [{ token: MatSortHeaderIntl }, { token: i0.ChangeDetectorRef }, { token: MatSort, optional: true }, { token: 'MAT_SORT_HEADER_COLUMN_DEF', optional: true }, { token: i3.FocusMonitor }, { token: i0.ElementRef }, { token: i3.AriaDescriber, optional: true }, { token: MAT_SORT_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatSortHeader.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatSortHeader, selector: \"[mat-sort-header]\", inputs: { disabled: \"disabled\", id: [\"mat-sort-header\", \"id\"], arrowPosition: \"arrowPosition\", start: \"start\", sortActionDescription: \"sortActionDescription\", disableClear: \"disableClear\" }, host: { listeners: { \"click\": \"_handleClick()\", \"keydown\": \"_handleKeydown($event)\", \"mouseenter\": \"_setIndicatorHintVisible(true)\", \"mouseleave\": \"_setIndicatorHintVisible(false)\" }, properties: { \"attr.aria-sort\": \"_getAriaSortAttribute()\", \"class.mat-sort-header-disabled\": \"_isDisabled()\" }, classAttribute: \"mat-sort-header\" }, exportAs: [\"matSortHeader\"], usesInheritance: true, ngImport: i0, template: \"<!--\\n We set the `tabindex` on an element inside the table header, rather than the header itself,\\n because of a bug in NVDA where having a `tabindex` on a `th` breaks keyboard navigation in the\\n table (see https://github.com/nvaccess/nvda/issues/7718). This allows for the header to both\\n be focusable, and have screen readers read out its `aria-sort` state. We prefer this approach\\n over having a button with an `aria-label` inside the header, because the button's `aria-label`\\n will be read out as the user is navigating the table's cell (see #13012).\\n\\n The approach is based off of: https://dequeuniversity.com/library/aria/tables/sf-sortable-grid\\n-->\\n<div class=\\\"mat-sort-header-container mat-focus-indicator\\\"\\n [class.mat-sort-header-sorted]=\\\"_isSorted()\\\"\\n [class.mat-sort-header-position-before]=\\\"arrowPosition === 'before'\\\"\\n [attr.tabindex]=\\\"_isDisabled() ? null : 0\\\"\\n [attr.role]=\\\"_isDisabled() ? null : 'button'\\\">\\n\\n <!--\\n TODO(crisbeto): this div isn't strictly necessary, but we have to keep it due to a large\\n number of screenshot diff failures. It should be removed eventually. Note that the difference\\n isn't visible with a shorter header, but once it breaks up into multiple lines, this element\\n causes it to be center-aligned, whereas removing it will keep the text to the left.\\n -->\\n <div class=\\\"mat-sort-header-content\\\">\\n <ng-content></ng-content>\\n </div>\\n\\n <!-- Disable animations while a current animation is running -->\\n <div class=\\\"mat-sort-header-arrow\\\"\\n *ngIf=\\\"_renderArrow()\\\"\\n [@arrowOpacity]=\\\"_getArrowViewState()\\\"\\n [@arrowPosition]=\\\"_getArrowViewState()\\\"\\n [@allowChildren]=\\\"_getArrowDirectionState()\\\"\\n (@arrowPosition.start)=\\\"_disableViewStateAnimation = true\\\"\\n (@arrowPosition.done)=\\\"_disableViewStateAnimation = false\\\">\\n <div class=\\\"mat-sort-header-stem\\\"></div>\\n <div class=\\\"mat-sort-header-indicator\\\" [@indicator]=\\\"_getArrowDirectionState()\\\">\\n <div class=\\\"mat-sort-header-pointer-left\\\" [@leftPointer]=\\\"_getArrowDirectionState()\\\"></div>\\n <div class=\\\"mat-sort-header-pointer-right\\\" [@rightPointer]=\\\"_getArrowDirectionState()\\\"></div>\\n <div class=\\\"mat-sort-header-pointer-middle\\\"></div>\\n </div>\\n </div>\\n</div>\\n\", styles: [\".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\"], dependencies: [{ kind: \"directive\", type: i4.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }], animations: [\n matSortAnimations.indicator,\n matSortAnimations.leftPointer,\n matSortAnimations.rightPointer,\n matSortAnimations.arrowOpacity,\n matSortAnimations.arrowPosition,\n matSortAnimations.allowChildren,\n ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSortHeader, decorators: [{\n type: Component,\n args: [{ selector: '[mat-sort-header]', exportAs: 'matSortHeader', host: {\n 'class': 'mat-sort-header',\n '(click)': '_handleClick()',\n '(keydown)': '_handleKeydown($event)',\n '(mouseenter)': '_setIndicatorHintVisible(true)',\n '(mouseleave)': '_setIndicatorHintVisible(false)',\n '[attr.aria-sort]': '_getAriaSortAttribute()',\n '[class.mat-sort-header-disabled]': '_isDisabled()',\n }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['disabled'], animations: [\n matSortAnimations.indicator,\n matSortAnimations.leftPointer,\n matSortAnimations.rightPointer,\n matSortAnimations.arrowOpacity,\n matSortAnimations.arrowPosition,\n matSortAnimations.allowChildren,\n ], template: \"<!--\\n We set the `tabindex` on an element inside the table header, rather than the header itself,\\n because of a bug in NVDA where having a `tabindex` on a `th` breaks keyboard navigation in the\\n table (see https://github.com/nvaccess/nvda/issues/7718). This allows for the header to both\\n be focusable, and have screen readers read out its `aria-sort` state. We prefer this approach\\n over having a button with an `aria-label` inside the header, because the button's `aria-label`\\n will be read out as the user is navigating the table's cell (see #13012).\\n\\n The approach is based off of: https://dequeuniversity.com/library/aria/tables/sf-sortable-grid\\n-->\\n<div class=\\\"mat-sort-header-container mat-focus-indicator\\\"\\n [class.mat-sort-header-sorted]=\\\"_isSorted()\\\"\\n [class.mat-sort-header-position-before]=\\\"arrowPosition === 'before'\\\"\\n [attr.tabindex]=\\\"_isDisabled() ? null : 0\\\"\\n [attr.role]=\\\"_isDisabled() ? null : 'button'\\\">\\n\\n <!--\\n TODO(crisbeto): this div isn't strictly necessary, but we have to keep it due to a large\\n number of screenshot diff failures. It should be removed eventually. Note that the difference\\n isn't visible with a shorter header, but once it breaks up into multiple lines, this element\\n causes it to be center-aligned, whereas removing it will keep the text to the left.\\n -->\\n <div class=\\\"mat-sort-header-content\\\">\\n <ng-content></ng-content>\\n </div>\\n\\n <!-- Disable animations while a current animation is running -->\\n <div class=\\\"mat-sort-header-arrow\\\"\\n *ngIf=\\\"_renderArrow()\\\"\\n [@arrowOpacity]=\\\"_getArrowViewState()\\\"\\n [@arrowPosition]=\\\"_getArrowViewState()\\\"\\n [@allowChildren]=\\\"_getArrowDirectionState()\\\"\\n (@arrowPosition.start)=\\\"_disableViewStateAnimation = true\\\"\\n (@arrowPosition.done)=\\\"_disableViewStateAnimation = false\\\">\\n <div class=\\\"mat-sort-header-stem\\\"></div>\\n <div class=\\\"mat-sort-header-indicator\\\" [@indicator]=\\\"_getArrowDirectionState()\\\">\\n <div class=\\\"mat-sort-header-pointer-left\\\" [@leftPointer]=\\\"_getArrowDirectionState()\\\"></div>\\n <div class=\\\"mat-sort-header-pointer-right\\\" [@rightPointer]=\\\"_getArrowDirectionState()\\\"></div>\\n <div class=\\\"mat-sort-header-pointer-middle\\\"></div>\\n </div>\\n </div>\\n</div>\\n\", styles: [\".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\"] }]\n }], ctorParameters: function () { return [{ type: MatSortHeaderIntl }, { type: i0.ChangeDetectorRef }, { type: MatSort, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: ['MAT_SORT_HEADER_COLUMN_DEF']\n }, {\n type: Optional\n }] }, { type: i3.FocusMonitor }, { type: i0.ElementRef }, { type: i3.AriaDescriber, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_SORT_DEFAULT_OPTIONS]\n }] }]; }, propDecorators: { id: [{\n type: Input,\n args: ['mat-sort-header']\n }], arrowPosition: [{\n type: Input\n }], start: [{\n type: Input\n }], sortActionDescription: [{\n type: Input\n }], disableClear: [{\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 */\nclass MatSortModule {\n}\nMatSortModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSortModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatSortModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSortModule, declarations: [MatSort, MatSortHeader], imports: [CommonModule, MatCommonModule], exports: [MatSort, MatSortHeader] });\nMatSortModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSortModule, providers: [MAT_SORT_HEADER_INTL_PROVIDER], imports: [CommonModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatSortModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule, MatCommonModule],\n exports: [MatSort, MatSortHeader],\n declarations: [MatSort, MatSortHeader],\n providers: [MAT_SORT_HEADER_INTL_PROVIDER],\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/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_SORT_DEFAULT_OPTIONS, MAT_SORT_HEADER_INTL_PROVIDER, MAT_SORT_HEADER_INTL_PROVIDER_FACTORY, MatSort, MatSortHeader, MatSortHeaderIntl, MatSortModule, matSortAnimations };\n","import { Directive, HostListener } from \"@angular/core\";\n\n@Directive({\n selector: \"[libStopPropagation]\"\n})\nexport class StopPropagationDirective {\n constructor() {}\n\n @HostListener(\"click\", [\"$event\"])\n onClick(event: Event) {\n\n event.preventDefault();\n event.stopPropagation();\n }\n}\n","<div class=\"outer-container\" [ngClass]=\"{ 'disabled': disabled, 'large-button': largeButton }\">\n <button [type]=\"type\" mat-button [disableRipple]=\"disabled\" (click)=\"onClick()\" libStopPropagation\n [ngClass]=\"{'large-button': largeButton, 'disabled': disabled, 'primary-kind': (kind === ActionButtonKind.PRIMARY), 'secondary-kind': (kind === ActionButtonKind.SECONDARY), 'alert-kind': (kind === ActionButtonKind.ALERT), 'alert-tone-positive': (alertTone === ActionButtonAlertTone.Positive), 'alert-tone-neutral': (alertTone === ActionButtonAlertTone.Neutral), 'stroked-kind': (kind === ActionButtonKind.STROKED), 'filter-kind': (kind === ActionButtonKind.FILTER) }\"\n [ngStyle]=\"{'min-width': minWidthInPixels + 'px'}\">\n <div class=\"inner-container\" [ngClass]=\"{ 'icon-after-text': iconAfterText, 'large-button': largeButton }\">\n <div *ngIf=\"image && !fontImage\" class=\"vertical-center\">\n <img [src]=\"image\" />\n </div>\n <div *ngIf=\"!image && fontImage\" class=\"vertical-center\">\n <i [class]=\"fontImage\"></i>\n <i *ngIf=\"fontImageExtra\" [class]=\"fontImageExtra\"></i>\n </div>\n <div *ngIf=\"label && ((image && !fontImage) || (!image && fontImage))\" class=\"spacer\"></div>\n <div class=\"label vertical-center\">{{ label }}</div>\n </div>\n </button>\n <span *ngIf=\"badge\" class=\"badge\">\n {{ badge }}\n </span>\n</div>\n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\n\nexport enum ActionButtonKind {\n PRIMARY,\n SECONDARY,\n STROKED,\n ALERT,\n FILTER\n}\n\nexport enum ActionButtonAlertTone {\n Neutral = 1,\n Positive = 2,\n Negative = 3\n}\n\n@Component({\n selector: \"lib-action-button\",\n templateUrl: \"./action-button.component.html\",\n styleUrls: [\"./action-button.component.less\"],\n})\nexport class ActionButtonComponent implements OnInit {\n\n @Input() label: string;\n @Input() kind: ActionButtonKind = ActionButtonKind.PRIMARY;\n @Input() disabled: boolean;\n @Input() badge: number;\n @Input() image: string;\n @Input() fontImage: string;\n @Input() fontImageExtra: string;\n @Input() iconAfterText: boolean;\n @Input() minWidthInPixels = 0;\n @Input() alertTone = ActionButtonAlertTone.Negative;\n\n @Input() set largeButton(value: any) {\n this._largeButton = !(value === false);\n };\n get largeButton() { return this._largeButton; }\n private _largeButton = false;\n\n type = \"button\";\n\n ActionButtonKind = ActionButtonKind;\n ActionButtonAlertTone = ActionButtonAlertTone;\n\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() click = new EventEmitter<void>();\n\n ngOnInit() {\n if (this.iconAfterText === undefined) {\n this.iconAfterText = (this.kind === ActionButtonKind.FILTER);\n }\n\n if (!this.minWidthInPixels && this.largeButton) {\n this.minWidthInPixels = 150;\n }\n }\n\n onClick(): void {\n if (!this.disabled) {\n this.click.emit();\n }\n }\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { StopPropagationDirective } from \"./stop-propagation.directive\";\n\n@NgModule({\n declarations: [\n StopPropagationDirective\n ],\n imports: [\n CommonModule\n ],\n exports: [\n StopPropagationDirective\n ]\n})\nexport class StopPropagationModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { MatButtonModule } from \"@angular/material/button\";\nimport { ActionButtonComponent } from \"./action-button.component\";\nimport { StopPropagationModule } from \"../stop-propagation/stop-propagation.module\";\n\n@NgModule({\n declarations: [\n ActionButtonComponent\n ],\n imports: [\n CommonModule,\n MatButtonModule,\n StopPropagationModule\n ],\n exports: [\n ActionButtonComponent\n ]\n})\nexport class ActionButtonModule { }\n","<div #outerContainer class=\"outer-container\" [ngClass]=\"{ 'always-in-front': alwaysInFront }\">\n <div *ngIf=\"dimBehind\" [ngClass]=\"{ 'dim-behind-layer': dimBehind }\">\n </div>\n\n <div class=\"circles-layer\">\n\n <div class=\"circles-container\" [ngStyle]=\"{ 'width': (3 * maxCircleDiameterInPixels + (2 * horizontalGapBetweenCirclesInPixels)) + 'px', 'height': maxCircleDiameterInPixels + 'px' }\">\n\n <div class=\"circle-size-max\" [ngStyle]=\"{ 'width': maxCircleDiameterInPixels + 'px', 'height': maxCircleDiameterInPixels + 'px' }\">\n <div class=\"circle-expand left\"></div>\n </div>\n <div class=\"circle-spacer\" [ngStyle]=\"{ 'margin-left': horizontalGapBetweenCirclesInPixels + 'px' }\"></div>\n <div class=\"circle-size-max\" [ngStyle]=\"{ 'width': maxCircleDiameterInPixels + 'px', 'height': maxCircleDiameterInPixels + 'px' }\">\n <div class=\"circle-expand center\"></div>\n </div>\n <div class=\"circle-spacer\" [ngStyle]=\"{ 'margin-left': horizontalGapBetweenCirclesInPixels + 'px' }\"></div>\n <div class=\"circle-size-max\" [ngStyle]=\"{ 'width': maxCircleDiameterInPixels + 'px', 'height': maxCircleDiameterInPixels + 'px' }\">\n <div class=\"circle-expand right\"></div>\n </div>\n\n </div>\n\n </div>\n\n</div>\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"lib-busy-indicator\",\n templateUrl: \"./busy-indicator.component.html\",\n styleUrls: [\"./busy-indicator.component.less\"],\n})\nexport class BusyIndicatorComponent {\n\n @Input() alwaysInFront = false;\n\n dimBehind = true;\n maxCircleDiameterInPixels = 30;\n horizontalGapBetweenCirclesInPixels = this.maxCircleDiameterInPixels / 2;\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { BusyIndicatorComponent } from \"./busy-indicator.component\";\n\n@NgModule({\n declarations: [\n BusyIndicatorComponent,\n ],\n imports: [\n CommonModule\n ],\n exports: [\n BusyIndicatorComponent\n ]\n})\nexport class BusyIndicatorModule { }\n","import { Component, Input } from \"@angular/core\";\nimport { Clipboard } from \"@angular/cdk/clipboard\";\nimport { ActionButtonKind } from \"../action-button\";\n\n@Component({\n selector: \"lib-copy-to-clipboard-button\",\n templateUrl: \"./copy-to-clipboard-button.component.html\",\n styleUrls: [\"./copy-to-clipboard-button.component.less\"],\n})\nexport class CopyToClipboardButtonComponent {\n\n @Input() value: string;\n\n ActionButtonKind = ActionButtonKind;\n\n constructor(private clipboard: Clipboard) {}\n\n onClick(): void {\n if (this.value) {\n this.clipboard.copy(this.value);\n }\n }\n\n}\n","<lib-action-button\n [kind]=\"ActionButtonKind.FILTER\"\n fontImage=\"far fa-copy fa-bg\"\n (click)=\"onClick()\">\n</lib-action-button>\n","<div mat-dialog-title>\n <div>{{ data?.title }}</div>\n <i *ngIf=\"!noCancel\" class=\"fal fa-times global-dialog-close-button\" (click)=\"onCancel()\"></i>\n</div>\n\n<div mat-dialog-content>\n <div class=\"sub-title-container\">\n <div class=\"subtitle\">\n <div>\n {{ data?.subtitle }}\n </div>\n <div *ngIf=\"copySubtitle\" class=\"subtitle-copy\">\n <lib-copy-to-clipboard-button [value]=\"data?.subtitle\">\n </lib-copy-to-clipboard-button>\n </div>\n </div>\n <div *ngIf=\"data?.subtitle2\" class=\"subtitle2\">\n {{ data?.subtitle2 }}\n </div>\n </div>\n</div>\n\n<div mat-dialog-actions>\n\n <lib-action-button *ngIf=\"!noCancel\" largeButton [kind]=\"ActionButtonKind.STROKED\" label=\"Cancel\" (click)=\"onCancel()\">\n </lib-action-button>\n\n <lib-action-button *ngIf=\"thirdButtonText\" largeButton [kind]=\"ActionButtonKind.SECONDARY\" [label]=\"thirdButtonText\" (click)=\"onThirdButton()\">\n </lib-action-button>\n\n <lib-action-button *ngIf=\"secondButtonText\" largeButton [kind]=\"ActionButtonKind.SECONDARY\" [label]=\"secondButtonText\" (click)=\"onSecondButton()\">\n </lib-action-button>\n\n <lib-action-button largeButton [label]=\"data.confirmButtonText\" (click)=\"onSubmit()\" [kind]=\"kind\">\n </lib-action-button>\n\n</div>\n","import { Component, Inject, Input } from \"@angular/core\";\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\nimport { ActionButtonKind } from \"../action-button/action-button.component\";\n\nexport interface ConfirmationModalData {\n title: string;\n subtitle: string;\n subtitle2: string;\n confirmButtonText: string;\n secondButtonText: string;\n thirdButtonText: string;\n noCancel?: boolean;\n copySubtitle?: boolean;\n}\n\n@Component({\n selector: \"lib-confirmation-modal\",\n templateUrl: \"./confirmation-modal.component.html\",\n styleUrls: [\"./confirmation-modal.component.less\"],\n})\nexport class ConfirmationModalComponent {\n\n @Input() kind = ActionButtonKind.PRIMARY;\n\n noCancel = false;\n secondButtonText: string;\n thirdButtonText: string;\n copySubtitle = false;\n\n ActionButtonKind = ActionButtonKind;\n\n constructor(\n @Inject(MAT_DIALOG_DATA) public data: ConfirmationModalData,\n private dialogRef: MatDialogRef<ConfirmationModalComponent>\n ) {\n if (data?.noCancel) {\n this.noCancel = true;\n dialogRef.disableClose = true;\n }\n if (!data?.confirmButtonText) {\n data.confirmButtonText = \"OK\";\n }\n if (data?.secondButtonText) {\n this.secondButtonText = data.secondButtonText;\n }\n if (data?.thirdButtonText) {\n this.thirdButtonText = data.thirdButtonText;\n }\n if (data?.copySubtitle) {\n this.copySubtitle = data.copySubtitle;\n }\n }\n\n onCancel() {\n this.dialogRef.close(0);\n }\n\n onSubmit() {\n this.dialogRef.close(1);\n }\n\n onSecondButton() {\n this.dialogRef.close(2);\n }\n\n onThirdButton() {\n this.dialogRef.close(3);\n }\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { ActionButtonModule } from \"../action-button\";\nimport { ClipboardModule } from \"@angular/cdk/clipboard\";\nimport { CopyToClipboardButtonComponent } from \"./copy-to-clipboard-button.component\";\n\n@NgModule({\n declarations: [\n CopyToClipboardButtonComponent\n ],\n imports: [\n CommonModule,\n ActionButtonModule,\n ClipboardModule\n ],\n exports: [\n CopyToClipboardButtonComponent\n ]\n})\nexport class CopyToClipboardButtonModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { MatDialogModule } from \"@angular/material/dialog\";\nimport { ConfirmationModalComponent } from \"./confirmation-modal.component\";\nimport { ActionButtonModule } from \"../action-button/action-button.module\";\nimport { CopyToClipboardButtonModule } from \"../copy-to-clipboard-button/copy-to-clipboard-button.module\";\n\n@NgModule({\n declarations: [\n ConfirmationModalComponent,\n ],\n imports: [\n CommonModule,\n MatDialogModule,\n ActionButtonModule,\n CopyToClipboardButtonModule\n ],\n exports: [\n ConfirmationModalComponent\n ]\n})\nexport class ConfirmationModalModule { }\n","import { Injectable } from \"@angular/core\";\nimport { BehaviorSubject, Observable } from \"rxjs\";\n\n@Injectable({\n providedIn: \"root\",\n })\nexport class DashboardService {\n\n title$: Observable<string>;\n private titleEmitter = new BehaviorSubject<string>(\"\");\n\n constructor() {\n this.title$ = this.titleEmitter.asObservable();\n }\n\n setTitle(title: string) {\n this.titleEmitter.next(title);\n }\n\n}\n","export class PermissionUtils {\n\n static hasPermissions(current: string[], required: string[]): boolean {\n\n if (!required) {\n required = [];\n }\n\n let firstMissing = null;\n\n if (!current && (required.length > 0)) {\n firstMissing = required[0];\n } else {\n for (const reqItem of required) {\n if (current.indexOf(reqItem) === -1) {\n firstMissing = reqItem;\n break;\n }\n }\n }\n\n // if (firstMissing) {\n // console.log(`Permission missing : ${firstMissing}`);\n // }\n\n return !firstMissing;\n\n }\n\n}\n","import { Component, Input } from \"@angular/core\";\nimport { TooltipPosition } from \"@angular/material/tooltip\";\n\n@Component({\n selector: \"lib-vitu-tooltip\",\n templateUrl: \"./vitu-tooltip.component.html\",\n styleUrls: [\"./vitu-tooltip.component.less\"],\n})\nexport class VituTooltipComponent {\n\n @Input() text = \"\";\n @Input() isDisabled = false;\n @Input() showDelayInMillis = 500;\n @Input() position: TooltipPosition | \"right-arrow\" = \"below\";\n\n get tooltipClass(): string {\n if (this.position === \"right-arrow\") {\n return \"vitu-tooltip-with-right-arrow\";\n }\n return \"vitu-tooltip\";\n }\n\n get calculatePosition(): TooltipPosition {\n if (this.position === \"right-arrow\") {\n return \"right\";\n }\n return this.position;\n }\n\n}\n","<div \n class=\"outer-container\"\n [matTooltip]=\"text\"\n [matTooltipDisabled]=\"isDisabled\"\n [matTooltipClass]=\"tooltipClass\"\n [matTooltipShowDelay]=\"showDelayInMillis\"\n [matTooltipPosition]=\"calculatePosition\">\n\n <ng-content></ng-content>\n\n</div>\n","<div #outerContainer class=\"outer-container\" [ngClass]=\"{'right-aligned': (horizAlign === 'right')}\">\n\n <div #innerContainer class=\"inner-container\">\n\n <lib-vitu-tooltip\n [text]=\"text\"\n [isDisabled]=\"isTooltipDisabled\">\n\n <span [ngClass]=\"{'link' : link}\" (mousedown)=\"onLinkMouseDown($event)\" (mouseup)=\"onLinkMouseUp($event, link ? link : null)\">\n <span #contentInnerContainer>\n <ng-content></ng-content>\n </span>\n <ng-container *ngIf=\"!text\">{{ \"—\" }}</ng-container>\n </span>\n <span *ngIf=\"infoTip\">\n\n <lib-vitu-tooltip\n [text]=\"infoTip\">\n <i class=\"far fa-info-circle\"></i>\n </lib-vitu-tooltip>\n\n </span>\n\n </lib-vitu-tooltip>\n\n </div>\n\n</div>\n","import { AfterViewChecked, ChangeDetectorRef,\n Component, ElementRef, HostBinding, Input, ViewChild } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\n\n@Component({\n selector: \"lib-text-common\",\n templateUrl: \"./text-common.component.html\",\n styleUrls: [\"./text-common.component.less\"],\n})\nexport class TextCommonComponent implements AfterViewChecked {\n\n @Input() link: string;\n @Input() tooltipDisabled = false;\n @Input() tooltipMaxLengthInChars = 1000;\n @Input() horizAlign = \"left\";\n @Input() infoTip: string;\n\n @HostBinding(\"style.width\") @Input() width = \"100%\";\n\n @ViewChild(\"outerContainer\") outerContainer: ElementRef;\n @ViewChild(\"innerContainer\") innerContainer: ElementRef;\n @ViewChild(\"contentInnerContainer\") contentInnerContainer: ElementRef;\n\n get isTooltipDisabled(): boolean {\n return this.tooltipDisabled || !this.isTooltipRequired;\n }\n\n isTooltipRequired = false;\n text = \"\";\n\n private mouseDownX: number;\n private mouseDownY: number;\n\n ngAfterViewChecked(): void {\n const innerElement = this.innerContainer?.nativeElement;\n const isTooltipRequired = (innerElement && (innerElement.scrollWidth > innerElement.offsetWidth));\n\n let changed = false;\n\n if (isTooltipRequired !== this.isTooltipRequired) {\n this.isTooltipRequired = isTooltipRequired;\n changed = true;\n }\n\n const contentElement = this.contentInnerContainer?.nativeElement;\n const text = contentElement.textContent?.trim()?.substring(0, this.tooltipMaxLengthInChars);\n if (text !== this.text) {\n this.text = text;\n changed = true;\n }\n\n if (changed) { // guard against any possible loop\n this.cd.detectChanges();\n }\n }\n\n constructor(private cd: ChangeDetectorRef, private router: Router) {}\n\n onLinkMouseDown(event: MouseEvent) {\n this.mouseDownX = event.x;\n this.mouseDownY = event.y;\n }\n\n onLinkMouseUp(event: MouseEvent, link: string) {\n if (link) {\n const mousePositionTolerance = 3;\n if ((event.button === 0) &&\n (Math.abs(event.x - this.mouseDownX) < mousePositionTolerance) &&\n (Math.abs(event.y - this.mouseDownY) < mousePositionTolerance)) {\n this.router.navigate([link]);\n }\n }\n }\n\n}\n","<div class=\"outer-container\" [ngClass]=\"{'padding-transition': !isSubmenuItem, 'outer-container-open': sidebarOpen}\">\n <a class=\"menu-link\" [ngClass]=\"{'active': isItemActive, 'sub-menu-active': subMenuActive, 'sub-menu-link': !item.faIcon, 'no-primary-route': noPrimaryRoute}\"\n matRipple [matRippleDisabled]=\"sidebarOpen\" (click)=\"onClickItem()\">\n <div class=\"menu-link-inner\">\n <div class=\"menu-item-icon\" [ngClass]=\"{'sidebar-open': sidebarOpen }\">\n\n <lib-vitu-tooltip\n [text]=\"item.name\"\n [isDisabled]=\"sidebarOpen || (item.subItems?.length > 0)\"\n position=\"right-arrow\">\n\n <ng-container *ngIf=\"item.faIcon; else noProvidedIcon\">\n <span class=\"fa-stack fa-xs\">\n <i [class]=\"item.faIcon + ' fa-stack-2x main-icon'\" [style]=\"item.faIconStyleCustom\"></i>\n </span> \n </ng-container>\n <ng-template #noProvidedIcon>\n <div class=\"hide-contents\" [ngClass]=\"{'opacity-transition': !isSubmenuItem, 'show-contents': !sidebarOpen }\">\n\n <div class=\"sub-item-icon-container\">\n <i class=\"fal fa-circle sub-item-icon-outer\"></i>\n <span class=\"sub-item-icon-inner\">{{ item.name.substring(0, 1) }}</span>\n </div>\n\n </div>\n </ng-template>\n\n </lib-vitu-tooltip>\n\n </div>\n\n <div class=\"menu-item-text\">\n <lib-text-common [tooltipDisabled]=\"!sidebarOpen\">\n {{ item.name }}\n </lib-text-common>\n </div>\n\n <div *ngIf=\"sidebarOpen && item?.subItems\" class=\"menu-item-sub-icon\">\n <i class=\"far fa-chevron-right\"></i>\n </div>\n\n </div>\n </a>\n</div>\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { SidebarItem } from \"../sidebar-item\";\n\n@Component({\n selector: \"lib-dashboard-sidebar-menu-item\",\n templateUrl: \"./dashboard-sidebar-menu-item.component.html\",\n styleUrls: [\"./dashboard-sidebar-menu-item.component.less\"],\n})\nexport class DashboardSidebarMenuItemComponent {\n\n @Input() item: SidebarItem;\n @Input() sidebarOpen: boolean;\n @Input() isItemActionable: boolean;\n @Input() isItemActive: boolean;\n @Input() subMenuActive = false;\n @Input() isSubmenuItem = false;\n\n @Output() navigateTo = new EventEmitter<string>();\n\n onClickItem() {\n if (this.isItemActionable) {\n this.navigateTo.emit(this.item.primaryRouteToActivate);\n }\n }\n\n get noPrimaryRoute() {\n return !this.item || !this.item.primaryRouteToActivate;\n }\n\n}\n","<div class=\"outer-container\" [ngClass]=\"{'outer-container-open': sidebarOpen }\">\n <div class=\"menu\">\n <ng-container *ngFor=\"let item of sidebarItems\">\n\n <!-- <div *ngIf=\"item.hasSeparatorBefore\" class=\"separator\" [ngClass]=\"{'separator-open': sidebarOpen }\"></div> -->\n\n <div #itemDiv *ngIf=\"hasPermissions(currentUserPermissions, item)\"\n (mouseover)=\"onMouseOverItem(item, itemDiv)\" (mouseout)=\"onMouseOutItem()\">\n\n <lib-dashboard-sidebar-menu-item\n [item]=\"item\"\n [sidebarOpen]=\"sidebarOpen\"\n [isItemActionable]=\"isItemActionable(item)\"\n [isItemActive]=\"isItemActive(item)\"\n [subMenuActive]=\"isItemSubMenuActive(item)\"\n (navigateTo)=\"onNavigateTo($event)\">\n </lib-dashboard-sidebar-menu-item>\n </div>\n\n </ng-container>\n\n </div>\n\n <div>\n\n <!-- <div *ngIf=\"helpItem.hasSeparatorBefore\" class=\"separator\" [ngClass]=\"{'separator-open': sidebarOpen }\"></div> -->\n\n <lib-dashboard-sidebar-menu-item\n [item]=\"helpItem\"\n [sidebarOpen]=\"sidebarOpen\"\n [isItemActionable]=\"isItemActionable(helpItem)\"\n [isItemActive]=\"isItemActive(helpItem)\"\n [subMenuActive]=\"isItemSubMenuActive(helpItem)\"\n (navigateTo)=\"onNavigateTo($event)\">\n </lib-dashboard-sidebar-menu-item>\n\n <div class=\"copyright-container\">\n <div class=\"hide-contents\" [ngClass]=\"{'show-contents': sidebarOpen }\">\n <div class=\"copyright-note\">\n <lib-text-common>\n {{ copyrightInfo }}\n </lib-text-common>\n </div>\n </div>\n </div>\n </div>\n\n</div>\n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { SidebarItem } from \"../sidebar-item\";\nimport { isEqual } from \"lodash\";\nimport { PermissionUtils } from \"../../misc/permission-utils\";\n\n@Component({\n selector: \"lib-dashboard-sidebar\",\n templateUrl: \"./dashboard-sidebar.component.html\",\n styleUrls: [\"./dashboard-sidebar.component.less\"],\n})\nexport class DashboardSidebarComponent implements OnInit {\n\n @Input() userName: string;\n @Input() currentUserPermissions: any[] = [];\n @Input() sidebarOpen: boolean;\n @Input() sidebarItems: SidebarItem[];\n @Input() subMenuShownForItem: SidebarItem;\n @Output() logout = new EventEmitter<void>();\n @Output() mouseOverItem = new EventEmitter<{item: SidebarItem; vertPosInPixels: number}>();\n @Output() mouseOutItem = new EventEmitter<void>();\n @Output() navigateTo = new EventEmitter<string>();\n\n helpItem: SidebarItem;\n\n ngOnInit() {\n this.helpItem = {\n name: \"Help\",\n primaryRouteToActivate: \"/dashboard/help\",\n permissions: [],\n hasSeparatorBefore: true,\n faIcon: \"far fa-question-circle\"\n };\n }\n\n constructor(private router: Router) {}\n\n get copyrightInfo(): string {\n const copyrightYear = new Date().getFullYear(); // adequate just to use local time\n return `© ${copyrightYear} VITU\\u00a0\\u00a0|\\u00a0\\u00a0v1.0.0`;\n }\n\n isItemActive(item: SidebarItem) {\n\n return (\n this.isPrimaryRouteToActivate(item) ||\n this.isSecondaryRouteToCapture(item)\n );\n }\n\n isItemActionable(item: SidebarItem) {\n\n return !this.isPrimaryRouteToActivate(item, true);\n }\n\n isItemSubMenuActive(item: SidebarItem) {\n\n return isEqual(this.subMenuShownForItem, item);\n }\n\n hasPermissions(currentPermissions: string[], item: SidebarItem): boolean {\n let retVal: boolean;\n if (item.subItems?.length > 0) {\n retVal = false;\n for (const subItem of item.subItems) {\n if (PermissionUtils.hasPermissions(currentPermissions, subItem.permissions)) {\n retVal = true;\n break;\n }\n }\n }\n else {\n retVal = PermissionUtils.hasPermissions(currentPermissions, item.permissions);\n }\n return retVal;\n }\n\n onMouseOverItem(menuItem: SidebarItem, itemDiv: HTMLDivElement): void {\n this.mouseOverItem.emit({\n item: menuItem,\n vertPosInPixels: itemDiv.offsetTop\n });\n }\n\n onMouseOutItem(): void {\n this.mouseOutItem.emit();\n }\n\n onNavigateTo(location: string): void {\n this.navigateTo.emit(location);\n }\n\n private isPrimaryRouteToActivate(item: SidebarItem, mustBeAtEnd = false) {\n\n const matchIndex = this.router.url.indexOf(item.primaryRouteToActivate);\n\n if (matchIndex < 0) {\n return false;\n }\n return (\n !mustBeAtEnd ||\n this.router.url.substring(matchIndex) ===\n item.primaryRouteToActivate\n );\n }\n\n private isSecondaryRouteToCapture(item: SidebarItem) {\n\n return (\n item.secondaryRouteToCapture &&\n this.router.url.indexOf(item.secondaryRouteToCapture) > -1\n );\n }\n}\n","export const GetAppRootUrl = () => window.location.origin;\n\nexport const GetCurrentUrl = () => window.location.origin + window.location.pathname;\n","import { Injectable } from \"@angular/core\";\nimport { OAuthService, AuthConfig } from \"angular-oauth2-oidc\";\nimport { GetAppRootUrl, GetCurrentUrl } from \"./urls\";\n\nclass UserInfoModel {\n preferred_username: string;\n email: string;\n}\n\n@Injectable({ providedIn: \"root\" })\nexport class AuthService {\n\n constructor(\n private oauthService: OAuthService,\n private authConfig: AuthConfig\n ) {}\n\n private discoveryDocumentRequest: Promise<any>;\n\n async configure() {\n\n this.oauthService.configure(this.authConfig);\n\n await this.loadDiscoveryDocument();\n }\n\n initTokenRefreshListener() {\n\n this.oauthService.setupAutomaticSilentRefresh();\n }\n\n private loadDiscoveryDocument() {\n\n this.discoveryDocumentRequest = this.discoveryDocumentRequest\n ?? this.oauthService.loadDiscoveryDocument()\n .catch(() => { delete this.discoveryDocumentRequest; });\n\n return this.discoveryDocumentRequest;\n }\n\n async validateToken() {\n\n let loginCodeFlowError = false;\n try {\n // Try to extract credentials from current URL (handle redirect from keycloak)\n await this.oauthService.tryLoginCodeFlow();\n }\n catch (error) {\n // eg. credentials in URL aren't valid\n loginCodeFlowError = true;\n }\n\n if (!loginCodeFlowError && this.oauthService.hasValidAccessToken()) {\n return true;\n }\n else {\n this.openLoginPageIfNecessary();\n return false;\n }\n }\n\n openLoginPageIfNecessary() {\n\n this.oauthService.redirectUri = GetCurrentUrl();\n // Initially goes to login page, but after can refresh expired token & bypass login form.\n this.oauthService.initCodeFlow();\n }\n\n logout() {\n\n // Signal to any other active tabs that they should logout too\n // (even though they will no longer have a valid token after this tab logs out.)\n const newValue = Math.floor((Math.random() * Number.MAX_SAFE_INTEGER) + 1);\n localStorage.setItem(\"DO_LOGOUT\", newValue.toString());\n\n this.oauthService.redirectUri = GetAppRootUrl();\n this.oauthService.logOut();\n }\n\n getUserClaims() {\n\n return this.oauthService.getIdentityClaims() as UserInfoModel;\n }\n\n getAccessToken() {\n\n return this.oauthService.getAccessToken();\n }\n\n loadUserProfile() {\n\n return this.oauthService.loadUserProfile();\n }\n\n}\n","import * as E from \"linq\";\n\nexport enum VituHttpStatus {\n BadRequest = 400,\n Unauthorized = 401,\n Forbidden = 403,\n NotFound = 404,\n InternalServerError = 500,\n NotImplemented = 501,\n BadGateway = 502,\n ServiceUnavailable = 503\n}\n\nexport class VituHttpError extends Error {\n\n status: number;\n baseError: any;\n\n constructor(message: string, baseError: any) {\n super(message);\n this.baseError = baseError;\n }\n\n}\n\nexport class VituHttpErrorUnauthorized extends VituHttpError {\n\n static create = (err: any) => new VituHttpErrorUnauthorized(err);\n\n private constructor(err: any) {\n super(\"Unauthorized\", err);\n this.status = VituHttpStatus.Unauthorized;\n }\n\n}\n\nexport class VituHttpErrorInternalServerError extends VituHttpError {\n\n static create = (err: any) => new VituHttpErrorInternalServerError(err);\n\n private constructor(err: any) {\n\n super(\"Internal Server Error\", err);\n this.status = VituHttpStatus.InternalServerError;\n }\n\n}\n\nexport class VituHttpErrorForbidden extends VituHttpError {\n\n static create = (err: any) => new VituHttpErrorForbidden(err);\n\n private constructor(err: any) {\n super(\"Forbidden\", err);\n this.status = VituHttpStatus.Forbidden;\n }\n\n}\n\nexport class VituHttpErrorNotFound extends VituHttpError {\n\n static create = (err: any) => new VituHttpErrorNotFound(err);\n\n private constructor(err: any) {\n super(\"Not Found\", err);\n this.status = VituHttpStatus.NotFound;\n }\n\n}\n\nexport class VituHttpErrorServiceUnavailable extends VituHttpError {\n\n static create = (err: any) => new VituHttpErrorServiceUnavailable(err);\n\n private constructor(err: any) {\n super(\"Service Unavailable\", err);\n this.status = VituHttpStatus.ServiceUnavailable;\n }\n\n}\n\nexport class VituHttpErrorUnknown extends VituHttpError {\n\n static create = (err: any) => new VituHttpErrorUnknown(err);\n\n private constructor(err: any) {\n super(\"Unknown Error\", err);\n this.status = err.status;\n }\n\n}\n\nexport class VituHttpErrorUnableToConnect extends VituHttpError {\n\n static create = (err: any) => new VituHttpErrorUnableToConnect(err);\n\n private constructor(err: any) {\n super(\"Unable to connect\", err);\n this.status = err.status;\n }\n\n}\n\nexport class VituHttpErrorBadRequest extends VituHttpError {\n\n static create(err: any): VituHttpErrorBadRequest {\n\n let errorMessage: string;\n\n let errorResponse = err.error;\n\n try {\n\n errorResponse = JSON.parse(errorResponse);\n }\n catch {}\n\n if (errorResponse?.errors) {\n\n errorMessage = JSON.stringify(errorResponse.errors);\n }\n\n let errors = errorResponse?.errors;\n\n if (errors) {\n\n if (typeof errors == \"object\" && !Array.isArray(errors)) {\n\n errors = E.from(Object.keys(errors))\n .selectMany(i => Array.isArray(errors[i]) ? errors[i] : [errors[i]])\n .toArray();\n }\n\n if (Array.isArray(errors)) {\n\n errorMessage = E.from(errors)\n .select(i => i.value || i)\n .firstOrDefault();\n }\n }\n\n if (!errorMessage && errorResponse?.detail) {\n if ((typeof errorResponse.detail === \"string\") && errorResponse.detail.length) {\n errorMessage = errorResponse.detail;\n }\n }\n\n if (!errorMessage && errorResponse?.title) {\n if ((typeof errorResponse.title === \"string\") && errorResponse.title.length) {\n errorMessage = errorResponse.title;\n }\n }\n\n if (!errorMessage) {\n errorMessage = \"Bad Request\";\n }\n\n return new VituHttpErrorBadRequest(errorMessage, err);\n }\n\n private constructor(errorMessage: string, err: any) {\n super(errorMessage, err);\n this.status = VituHttpStatus.BadRequest;\n }\n\n}\n","\nexport class VituCommonErrorEntityIdMustBeNumber extends Error {\n\n constructor() {\n super(\"Entity id must be a number.\");\n }\n\n}\n","export class Pager {\n pageSize = 20;\n page = 1;\n pageCount: number = null;\n morePagesMode = true;\n\n constructor(pageSize?: number) {\n if (pageSize) {\n this.pageSize = pageSize;\n }\n }\n}\n","export class Environment {\n isDevelopment: boolean;\n descriptor: string;\n portalApiRootUrl: string;\n coreApiRootUrl: string;\n authRootUrl: string;\n stackDriverErrorReporting: {\n projectId: string;\n key: string;\n appName: string;\n };\n};\n","<div class=\"outer-container\">\n\n <div class=\"submenu-anchor\">\n\n <div class=\"submenu-container\" [ngStyle]=\"{'top': menuVertPosInPixels + 'px', 'display': menuShown ? 'flex' : 'none'}\"\n (mouseover)=\"showMenu.emit()\" (mouseout)=\"hideMenu.emit()\">\n\n <div class=\"items-container\">\n\n <ng-container *ngFor=\"let item of items\">\n\n <div #itemDiv (mouseover)=\"onMouseOverItem(item, itemDiv)\" (mouseout)=\"onMouseOutItem()\">\n\n <ng-container *ngIf=\"hasPermissions(currentUserPermissions, item)\">\n\n <lib-dashboard-sidebar-menu-item\n [item]=\"item\"\n [sidebarOpen]=\"true\"\n [isSubmenuItem]=\"true\"\n [isItemActionable]=\"true\"\n [isItemActive]=\"false\"\n (navigateTo)=\"navigateTo.emit($event)\"\n [subMenuActive]=\"isItemSubMenuActive(item)\">\n </lib-dashboard-sidebar-menu-item>\n\n </ng-container>\n\n </div>\n \n </ng-container>\n\n </div>\n\n <lib-dashboard-submenu\n *ngIf=\"items?.length > 0\"\n [items]=\"subMenuParentItem?.subItems\"\n [menuVertPosInPixels]=\"subMenuVertPosInPixels\"\n [menuShown]=\"subMenuShown\"\n [currentUserPermissions]=\"currentUserPermissions\"\n (showMenu)=\"onShowSubMenu()\"\n (hideMenu)=\"onHideSubMenu()\"\n (navigateTo)=\"navigateTo.emit($event)\">\n </lib-dashboard-submenu>\n\n </div>\n\n </div>\n\n</div>\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { PermissionUtils } from \"../../misc\";\nimport { SidebarItem } from \"../sidebar-item\";\nimport { isEqual } from \"lodash\";\n\n@Component({\n selector: \"lib-dashboard-submenu\",\n templateUrl: \"./dashboard-submenu.component.html\",\n styleUrls: [\"./dashboard-submenu.component.less\"],\n})\nexport class DashboardSubmenuComponent {\n\n @Input() items: Array<SidebarItem>;\n @Input() menuVertPosInPixels: number;\n @Input() menuShown = false;\n @Input() currentUserPermissions: any[] = [];\n\n @Output() showMenu = new EventEmitter<void>();\n @Output() hideMenu = new EventEmitter<void>();\n @Output() navigateTo = new EventEmitter<any>();\n\n subMenuParentItem: SidebarItem = null;\n subMenuVertPosInPixels: number;\n subMenuShown = false;\n private hideSubMenuTimer: any;\n\n hasPermissions(currentPermissions: string[], item: SidebarItem): boolean {\n let retVal: boolean;\n if (item.subItems?.length > 0) {\n retVal = false;\n for (const subItem of item.subItems) {\n if (PermissionUtils.hasPermissions(currentPermissions, subItem.permissions)) {\n retVal = true;\n break;\n }\n }\n }\n else {\n retVal = PermissionUtils.hasPermissions(currentPermissions, item.permissions);\n }\n return retVal;\n }\n\n onMouseOverItem(menuItem: SidebarItem, itemDiv: HTMLDivElement): void {\n this.subMenuParentItem = menuItem;\n if (this.subMenuParentItem?.subItems) {\n this.subMenuVertPosInPixels = itemDiv.offsetTop;\n this.showSubMenu();\n }\n }\n\n onMouseOutItem(): void {\n this.triggerHideSubMenu();\n }\n\n showSubMenu() {\n clearTimeout(this.hideSubMenuTimer);\n this.subMenuShown = true;\n }\n\n triggerHideSubMenu() {\n clearTimeout(this.hideSubMenuTimer);\n this.hideSubMenuTimer = setTimeout(() => {\n this.hideSubMenu();\n }, 200);\n }\n\n onShowSubMenu() {\n this.showSubMenu();\n }\n\n onHideSubMenu() {\n this.triggerHideSubMenu();\n }\n\n isItemSubMenuActive(item: SidebarItem) {\n const subMenuShownForItem = this.subMenuShown ? this.subMenuParentItem : null;\n return isEqual(subMenuShownForItem, item);\n }\n\n private hideSubMenu() {\n this.subMenuShown = false;\n }\n\n}\n","import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, Input, ViewChild } from \"@angular/core\";\n\n@Component({\n selector: \"lib-multi-stage-expansion-panel\",\n templateUrl: \"./multi-stage-expansion-panel.component.html\",\n styleUrls: [\"./multi-stage-expansion-panel.component.less\"]\n})\nexport class MultiStageExpansionPanelComponent implements AfterViewInit {\n\n @Input() isVertical = true;\n @Input() midStageSizesInPixels: number[] = [];\n @Input() stage: number;\n\n @ViewChild(\"contentWrapper\") contentWrapper: ElementRef;\n\n get panelSizeInPixels() {\n const stageSizesInPixels = [0];\n stageSizesInPixels.push(...this.midStageSizesInPixels);\n stageSizesInPixels.push(this.maxSizeInPixels);\n return ((this.stage >= 0) && (this.stage < stageSizesInPixels.length)) ? stageSizesInPixels[this.stage] : 0;\n }\n\n // Set the following value to a deliberately large value, as it gets overwritten by the real value\n // in ngAfterViewInit, but if we set it to 0 there is a visual 'growing' of a panel which is initialized\n // in the max stage (i.e. initing it to this high value means the panel appears instantly in the max state)\n maxSizeInPixels = 9999;\n\n constructor(private cd: ChangeDetectorRef) {}\n\n ngAfterViewInit(): void {\n this.maxSizeInPixels = this.isVertical\n ? this.contentWrapper.nativeElement.scrollHeight\n : this.contentWrapper.nativeElement.scrollWidth;\n this.cd.detectChanges();\n }\n\n}\n","<div #contentWrapper class=\"outer-container\" [ngClass]=\"{'is-vertical': isVertical, 'is-horizontal': !isVertical}\"\n [ngStyle]=\"{'max-height': (isVertical ? panelSizeInPixels + 'px' : null), 'max-width': (!isVertical ? panelSizeInPixels + 'px' : null), 'opacity': (panelSizeInPixels ? 1 : 0)}\">\n <ng-content></ng-content>\n</div>\n","<div class=\"top-bar-container\">\n\n <div class=\"top-bar-icons-container\">\n\n <div class=\"hamburger-menu\">\n\n <button mat-button (click)=\"onClickHamburger()\">\n <div class=\"hamburger-menu-inner\">\n <svg focusable=\"false\" viewBox=\"0 0 24 24\" class=\"hamburger-icon\"><path d=\"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z\"></path></svg>\n </div>\n </button>\n\n </div>\n\n <button mat-button routerLink='/' class=\"title-button\">\n <img [src]=\"brandIconPath\" class=\"title-button-image\" [ngStyle]=\"{'top': brandIconOffsetInPixelsY + 'px'}\" />\n </button>\n\n </div>\n\n <div class=\"user-menu-container\">\n <div class=\"display-name-container\" [ngClass]=\"{ 'display-name-container-hide': hideDashboardUserName }\">\n {{ userName }}\n </div>\n <button mat-button class=\"user-menu-button\" [matMenuTriggerFor]=\"userMenu\" (menuOpened)=\"onUserMenuShowChange(true)\" (menuClosed)=\"onUserMenuShowChange(false)\">\n <span class=\"user-menu-button-inner\">\n <span class=\"user-menu-user-icon\"><i class=\"fas fa-user-circle\"></i></span>\n <span class=\"user-menu-caret-icon\"><i class=\"far fa-chevron-down\"></i></span>\n </span>\n </button>\n <mat-menu #userMenu=\"matMenu\">\n <div class=\"user-menu-details-container\">\n <div class=\"user-menu-username\">\n {{ userName }}\n </div>\n <div *ngIf=\"email?.length\" class=\"user-menu-email\">\n {{ email }}\n </div>\n <div *ngIf=\"merchantName?.length\" class=\"user-menu-merchant\">\n {{ merchantName }}\n </div>\n </div>\n <button mat-menu-item class=\"user-menu-option-button\" (click)=\"onLogout()\">\n <span class=\"user-menu-option-icon\"><i class=\"far fa-sign-out-alt\"></i></span>\n <span>Logout</span>\n </button>\n </mat-menu>\n </div>\n\n</div>\n\n<div class=\"main-container\">\n\n <div class=\"sidebar-container\">\n\n <lib-multi-stage-expansion-panel class=\"sidebar-inner-container\" [isVertical]=\"false\" [midStageSizesInPixels]=\"[60]\" [stage]=\"sidebarOpen ? 2 : 1\">\n\n <lib-dashboard-sidebar\n [userName]=\"userName\"\n [currentUserPermissions]=\"currentUserPermissions\"\n [sidebarOpen]=\"sidebarOpen\"\n [sidebarItems]=\"sidebarItems\"\n (mouseOverItem)=\"onMouseOverItem($event)\"\n (mouseOutItem)=\"onMouseOutItem()\"\n [subMenuShownForItem]=\"subMenuShown ? subMenuParentItem : null\"\n (navigateTo)=\"onNavigateTo($event)\">\n </lib-dashboard-sidebar>\n\n </lib-multi-stage-expansion-panel>\n\n <lib-dashboard-submenu\n [items]=\"subMenuParentItem?.subItems\"\n [menuVertPosInPixels]=\"subMenuVertPosInPixels\"\n [menuShown]=\"subMenuShown\"\n [currentUserPermissions]=\"currentUserPermissions\"\n (showMenu)=\"onShowSubMenu()\"\n (hideMenu)=\"onHideSubMenu()\"\n (navigateTo)=\"onNavigateTo($event)\">\n </lib-dashboard-submenu>\n\n </div>\n\n <div class=\"page-container\">\n\n <ng-content></ng-content>\n\n </div>\n\n</div>\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { SidebarItem } from \"./sidebar-item\";\nimport { DashboardService } from \"./dashboard.service\";\nimport { Router } from \"@angular/router\";\nimport { PermissionUtils } from \"../misc/permission-utils\";\n\n@Component({\n selector: \"lib-dashboard-common\",\n templateUrl: \"./dashboard-common.component.html\",\n styleUrls: [\"./dashboard-common.component.less\"]\n})\nexport class DashboardCommonComponent {\n\n @Input() merchantName = \"\";\n @Input() email = \"\";\n @Input() userName = \"\";\n\n @Input() brandIconPath = \"\";\n @Input() brandIconOffsetInPixelsY = 0;\n @Input() currentUserPermissions: any[] = [];\n @Input() sidebarOpen = true;\n @Input() sidebarItems: SidebarItem[] = [];\n @Output() logout = new EventEmitter<void>();\n\n subMenuParentItem: SidebarItem = null;\n subMenuVertPosInPixels: number;\n subMenuShown = false;\n private hideSubMenuTimer: any;\n\n hideDashboardUserName = false;\n\n constructor(public dashboardService: DashboardService, private router: Router) { }\n\n onClickHamburger() {\n this.sidebarOpen = !this.sidebarOpen;\n }\n\n onLogout() {\n this.logout.emit();\n }\n\n onNavigateTo(location: string): void {\n this.hideSubMenu();\n if (location) {\n this.router.navigate([location]);\n }\n }\n\n onMouseOverItem(payload: {item: SidebarItem; vertPosInPixels: number}) {\n this.subMenuParentItem = payload.item;\n if (this.subMenuParentItem?.subItems) {\n this.subMenuVertPosInPixels = payload.vertPosInPixels;\n this.showSubMenu();\n }\n }\n\n onMouseOutItem() {\n this.triggerHideSubMenu();\n }\n\n onShowSubMenu() {\n this.showSubMenu();\n }\n\n onHideSubMenu() {\n this.triggerHideSubMenu();\n }\n\n showSubMenu() {\n clearTimeout(this.hideSubMenuTimer);\n this.subMenuShown = true;\n }\n\n triggerHideSubMenu() {\n clearTimeout(this.hideSubMenuTimer);\n this.hideSubMenuTimer = setTimeout(() => {\n this.hideSubMenu();\n }, 200);\n }\n\n onUserMenuShowChange(show: boolean) {\n this.hideDashboardUserName = show;\n }\n\n hasPermissions(currentPermissions: string[], requiredPermissions: string[]): boolean {\n return PermissionUtils.hasPermissions(currentPermissions, requiredPermissions);\n }\n\n private hideSubMenu() {\n this.subMenuShown = false;\n }\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { MultiStageExpansionPanelComponent } from \"./multi-stage-expansion-panel.component\";\n\n@NgModule({\n declarations: [\n MultiStageExpansionPanelComponent\n ],\n imports: [\n CommonModule\n ],\n exports: [\n MultiStageExpansionPanelComponent\n ]\n})\nexport class MultiStageExpansionPanelModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { MatTooltipModule } from \"@angular/material/tooltip\";\nimport { VituTooltipComponent } from \"./vitu-tooltip.component\";\n\n@NgModule({\n declarations: [\n VituTooltipComponent\n ],\n imports: [\n CommonModule,\n MatTooltipModule\n ],\n exports: [\n VituTooltipComponent\n ]\n})\nexport class VituTooltipModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { TextCommonComponent } from \"./text-common.component\";\nimport { RouterModule } from \"@angular/router\";\nimport { TextTruncateSafeLengthPipe } from \"./text-truncate-safe-length.pipe\";\nimport { VituTooltipModule } from \"../../tooltip\";\n\n@NgModule({\n declarations: [\n TextCommonComponent,\n TextTruncateSafeLengthPipe\n ],\n imports: [\n CommonModule,\n VituTooltipModule,\n RouterModule\n ],\n exports: [\n TextCommonComponent,\n TextTruncateSafeLengthPipe\n ]\n})\nexport class TextCommonModule { }\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"lib-text-table-column\",\n templateUrl: \"./text-table-column.component.html\",\n styleUrls: [\"./text-table-column.component.less\"],\n})\nexport class TextTableColumnComponent {\n\n @Input() link: string;\n @Input() tooltipDisabled = false;\n @Input() horizAlign = \"left\";\n\n}\n","<lib-text-common\n [link]=\"link\"\n [tooltipDisabled]=\"tooltipDisabled\"\n [horizAlign]=\"horizAlign\">\n\n <ng-content>\n </ng-content>\n\n</lib-text-common>\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { TextTableColumnComponent } from \"./text-table-column.component\";\nimport { TextCommonModule } from \"../text-common/text-common.module\";\n\n@NgModule({\n declarations: [\n TextTableColumnComponent\n ],\n imports: [\n CommonModule,\n TextCommonModule\n ],\n exports: [\n TextTableColumnComponent\n ]\n})\nexport class TextTableColumnModule { }\n","import { Component, Input, OnInit } from \"@angular/core\";\n\n@Component({\n selector: \"lib-text-field\",\n templateUrl: \"./text-field.component.html\",\n styleUrls: [\"./text-field.component.less\"]\n})\nexport class TextFieldComponent {\n\n @Input() label = \"\";\n @Input() infoTip: string;\n\n}\n","<div class=\"outer-container\" [ngClass]=\"{'field-empty': label.length === 0}\">\n <div class=\"label\">\n <lib-text-common [infoTip]=\"infoTip\">\n {{ label }}\n </lib-text-common>\n </div>\n <div class=\"value\">\n <lib-text-common>\n <ng-content></ng-content>\n </lib-text-common>\n </div>\n</div>\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { TextFieldComponent } from \"./text-field.component\";\nimport { TextCommonModule } from \"../text-common/text-common.module\";\n\n@NgModule({\n declarations: [\n TextFieldComponent\n ],\n imports: [\n CommonModule,\n TextCommonModule\n ],\n exports: [\n TextFieldComponent\n ]\n})\nexport class TextFieldModule { }\n","<div class=\"outer-container\" [ngClass]=\"{'field-empty': label.length === 0}\">\n <div class=\"label\">\n <lib-text-common [infoTip]=\"infoTip\">\n {{ label }}\n </lib-text-common>\n </div>\n <div *ngIf=\"hasFontImage; else noFontImage\" class=\"value-font-image\">\n <i [class]=\"fontImage\"></i>\n </div>\n <ng-template #noFontImage>\n <div *ngIf=\"fontImage !== false; else noImage\" class=\"value-no-font-image\">\n <lib-text-common>\n </lib-text-common>\n </div>\n <ng-template #noImage>\n <div class=\"value-no-font-image\">\n <ng-content></ng-content>\n </div>\n </ng-template>\n </ng-template>\n</div>\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"lib-image-field\",\n templateUrl: \"./image-field.component.html\",\n styleUrls: [\"./image-field.component.less\"]\n})\nexport class ImageFieldComponent {\n\n @Input() label = \"\";\n @Input() infoTip: string;\n @Input() fontImage: string|boolean; // use boolean false to turn it off (& supply by ng-content)\n\n get hasFontImage() {\n return (typeof this.fontImage === \"string\") && (this.fontImage.length > 0);\n }\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { ImageFieldComponent } from \"./image-field.component\";\nimport { TextCommonModule } from \"../text-common/text-common.module\";\n\n@NgModule({\n declarations: [\n ImageFieldComponent\n ],\n imports: [\n CommonModule,\n TextCommonModule\n ],\n exports: [\n ImageFieldComponent\n ]\n})\nexport class ImageFieldModule { }\n","<lib-image-field label=\"Digital Wallet\" [fontImage]=\"digitalWalletFontImage\">\n <ng-container *ngIf=\"!digitalWalletFontImage && digitalWalletImageFile\">\n <img [src]=\"digitalWalletImageFile\" height=\"32px\" style=\"margin-top: -5px;\" />\n </ng-container>\n</lib-image-field>\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"lib-digital-wallet-image-field\",\n templateUrl: \"./digital-wallet-image-field.component.html\",\n styleUrls: [\"./digital-wallet-image-field.component.less\"]\n})\nexport class DigitalWalletImageFieldComponent {\n\n @Input() kind: string;\n\n get digitalWalletFontImage() {\n let retVal = null;\n switch (this.kind) {\n case \"GooglePay\": {\n retVal = \"fab fa-google-pay\";\n break;\n }\n case \"ApplePay\": {\n retVal = \"fab fa-apple-pay\";\n break;\n }\n case \"PayPal\": {\n retVal = \"fab fa-paypal fa-xs\";\n break;\n }\n case \"Venmo\": {\n retVal = false; // supplied instead by digitalWalletImageFile\n break;\n }\n }\n return retVal;\n }\n\n get digitalWalletImageFile() {\n let retVal = null;\n switch (this.kind) {\n case \"Venmo\": {\n retVal = \"/assets/img/venmo-icon-dark.png\";\n break;\n }\n }\n return retVal;\n }\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { DigitalWalletImageFieldComponent } from \"./digital-wallet-image-field.component\";\nimport { ImageFieldModule } from \"../image-field\";\n\n@NgModule({\n declarations: [\n DigitalWalletImageFieldComponent\n ],\n imports: [\n CommonModule,\n ImageFieldModule\n ],\n exports: [\n DigitalWalletImageFieldComponent\n ]\n})\nexport class DigitalWalletImageFieldModule { }\n","<span *ngIf=\"kind === 'GooglePay'\" class=\"digital-wallet-image\">\n <div style=\"margin-top: 5px;\">\n <i [class]=\"'fab fa-google-pay fa-2x'\"></i>\n </div>\n</span>\n<span *ngIf=\"kind === 'ApplePay'\" class=\"digital-wallet-image\">\n <div style=\"margin-top: 5px;\">\n <i [class]=\"'fab fa-apple-pay fa-2x'\"></i>\n </div>\n</span>\n<span *ngIf=\"kind === 'PayPal'\" class=\"digital-wallet-image\">\n <div style=\"margin-top: 5px;\">\n <i [class]=\"'fab fa-paypal fa-lg'\"></i>\n </div>\n</span>\n<span *ngIf=\"kind === 'Venmo'\" class=\"digital-wallet-image\">\n <img src=\"/assets/img/venmo-icon.png\" height=\"32px\" />\n</span>\n<lib-text-table-column *ngIf=\"!kind\">\n</lib-text-table-column>\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"lib-digital-wallet-image-table-column\",\n templateUrl: \"./digital-wallet-image-table-column.component.html\",\n styleUrls: [\"./digital-wallet-image-table-column.component.less\"],\n})\nexport class DigitalWalletImageTableColumnComponent {\n\n @Input() kind: string;\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { TextTableColumnModule } from \"../text-table-column\";\nimport { DigitalWalletImageTableColumnComponent } from \"./digital-wallet-image-table-column.component\";\n\n@NgModule({\n declarations: [\n DigitalWalletImageTableColumnComponent\n ],\n imports: [\n CommonModule,\n TextTableColumnModule\n ],\n exports: [\n DigitalWalletImageTableColumnComponent\n ]\n})\nexport class DigitalWalletImageTableColumnModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { TextTableColumnModule } from \"./text-table-column/text-table-column.module\";\nimport { TextCommonModule } from \"./text-common/text-common.module\";\nimport { TextFieldModule } from \"./text-field/text-field.module\";\nimport { ImageFieldModule } from \"./image-field/image-field.module\";\nimport { DigitalWalletImageFieldModule } from \"./digital-wallet-image-field\";\nimport { DigitalWalletImageTableColumnModule } from \"./digital-wallet-image-table-column\";\n\n\n@NgModule({\n imports: [\n CommonModule,\n TextCommonModule,\n TextTableColumnModule,\n TextFieldModule,\n ImageFieldModule,\n DigitalWalletImageFieldModule,\n DigitalWalletImageTableColumnModule\n ],\n exports: [\n TextCommonModule,\n TextTableColumnModule,\n TextFieldModule,\n ImageFieldModule,\n DigitalWalletImageFieldModule,\n DigitalWalletImageTableColumnModule\n ]\n})\nexport class TextModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { DashboardSidebarMenuItemComponent } from \"./dashboard-sidebar-menu-item.component\";\nimport { MatRippleModule } from \"@angular/material/core\";\nimport { TextModule } from \"../../text\";\nimport { VituTooltipModule } from \"../../tooltip\";\n\n@NgModule({\n declarations: [\n DashboardSidebarMenuItemComponent\n ],\n imports: [\n CommonModule,\n MatRippleModule,\n TextModule,\n VituTooltipModule\n ],\n exports: [\n DashboardSidebarMenuItemComponent\n ]\n})\nexport class DashboardSidebarMenuItemModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { RouterModule } from \"@angular/router\";\nimport { DashboardSidebarComponent } from \"./dashboard-sidebar.component\";\nimport { DashboardSidebarMenuItemModule } from \"../dashboard-sidebar-menu-item/dashboard-sidebar-menu-item.module\";\nimport { TextModule } from \"../../text\";\n\n@NgModule({\n declarations: [\n DashboardSidebarComponent\n ],\n imports: [\n CommonModule,\n RouterModule,\n TextModule,\n DashboardSidebarMenuItemModule\n ],\n exports: [\n DashboardSidebarComponent\n ]\n})\nexport class DashboardSidebarModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { DashboardSubmenuComponent } from \"./dashboard-submenu.component\";\nimport { DashboardSidebarMenuItemModule } from \"../dashboard-sidebar-menu-item/dashboard-sidebar-menu-item.module\";\n\n@NgModule({\n declarations: [\n DashboardSubmenuComponent\n ],\n imports: [\n CommonModule,\n DashboardSidebarMenuItemModule\n ],\n exports: [\n DashboardSubmenuComponent\n ]\n})\nexport class DashboardSubmenuModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { RouterModule } from \"@angular/router\";\nimport { MatButtonModule } from \"@angular/material/button\";\nimport { MatMenuModule } from \"@angular/material/menu\";\n\nimport { MultiStageExpansionPanelModule } from \"../multi-stage-expansion-panel/multi-stage-expansion-panel.module\";\nimport { DashboardCommonComponent } from \"./dashboard-common.component\";\nimport { DashboardSidebarModule } from \"./dashboard-sidebar/dashboard-sidebar.module\";\nimport { DashboardSubmenuModule } from \"./dashboard-submenu/dashboard-submenu.module\";\n\n@NgModule({\n declarations: [\n DashboardCommonComponent\n ],\n imports: [\n CommonModule,\n MatButtonModule,\n MatMenuModule,\n RouterModule,\n DashboardSidebarModule,\n DashboardSubmenuModule,\n MultiStageExpansionPanelModule\n ],\n exports: [\n DashboardCommonComponent\n ]\n})\nexport class DashboardCommonModule { }\n","import { DateTime } from \"luxon\";\n\n/**\n * Various utility methods for converting the DateTime format, typically for display.\n *\n * NOTE: There is no time zone conversion in these methods\n * (various methods enforce UTC mode simply to guard against conversion which might not be needed).\n */\nexport class DateTimeFormatUtils {\n\n static isSameDay(date1: string, date2: string): boolean {\n const d1 = DateTime.fromISO(date1).toUTC();\n const d2 = DateTime.fromISO(date2).toUTC();\n return d1.hasSame(d2, \"day\");\n }\n\n static startOfDayOn(day: number, month: number, year: number): string {\n return DateTime.utc(year, month, day).startOf(\"day\").toISO();\n }\n\n static endOfDayOn(day: number, month: number, year: number): string {\n return DateTime.utc(year, month, day).endOf(\"day\").toISO();\n }\n\n static getDateObjectForDateRangeDate(date: string) {\n const parsedDate = DateTime.fromISO(date).toUTC();\n return {\n year: parsedDate.year,\n month: parsedDate.month,\n day: parsedDate.day\n };\n }\n\n static getSameTimeOnDate(day: number, month: number, year: number): string {\n const currentTime = DateTime.utc();\n const date = DateTime.utc(year, month, day, currentTime.hour,\n currentTime.minute, currentTime.second, currentTime.millisecond);\n return date.toISO();\n }\n\n static formatDateShort(date: string): string {\n const dateUtc = DateTime.fromISO(date).toUTC();\n return `${dateUtc.month}/${dateUtc.day}/${dateUtc.year % 100}`;\n }\n\n static formatDateShort2(day: number, month: number, year: number): string {\n const dateUtc = DateTime.utc(year, month, day);\n return `${dateUtc.month}/${dateUtc.day}/${dateUtc.year % 100}`;\n }\n\n static compareDates(date1: string, date2: string): number {\n const dateVal1 = (new Date(date1)).getTime();\n const dateVal2 = (new Date(date2)).getTime();\n return dateVal1 - dateVal2;\n }\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { NgbDateAdapter, NgbDateStruct } from \"@ng-bootstrap/ng-bootstrap\";\nimport { DateTimeFormatUtils } from \"./date-time-format-utils\";\n\n@Injectable({\n providedIn: \"root\"\n})\nexport class NgbCustomDateAdapter extends NgbDateAdapter<string> {\n\n fromModel(date: string): NgbDateStruct {\n\n if (!date) {\n\n return {\n year: null,\n month: null,\n day: null,\n };\n }\n\n return DateTimeFormatUtils.getDateObjectForDateRangeDate(date) as NgbDateStruct;\n }\n\n toModel(date: NgbDateStruct): string {\n\n if (!date) return null;\n\n return DateTimeFormatUtils.getSameTimeOnDate(date.day, date.month, date.year);\n }\n}\n","import { Injectable } from \"@angular/core\";\nimport { NgbDatepickerConfig } from \"@ng-bootstrap/ng-bootstrap\";\n\n@Injectable()\nexport class NgbCustomDatePickerConfig extends NgbDatepickerConfig {\n firstDayOfWeek = 7;\n}\n","import { Injectable } from \"@angular/core\";\nimport {\n NgbDateParserFormatter,\n NgbDateStruct\n} from \"@ng-bootstrap/ng-bootstrap\";\nimport { DateTimeFormatUtils } from \"./date-time-format-utils\";\n\n@Injectable({\n providedIn: \"root\"\n})\nexport class NgbDateCustomParserFormatter extends NgbDateParserFormatter {\n\n parse(value: string): NgbDateStruct {\n if (value) {\n const dateParts = value.trim().split(\"/\");\n if (dateParts?.length === 1 && Number(dateParts[0])) {\n return { month: parseInt(dateParts[0], 10), day: null, year: null };\n } else if (\n dateParts?.length === 2 &&\n Number(dateParts[0]) &&\n Number(dateParts[1])\n ) {\n return {\n month: parseInt(dateParts[0], 10),\n day: parseInt(dateParts[1], 10),\n year: null\n };\n } else if (\n dateParts?.length === 3 &&\n Number(dateParts[0]) &&\n Number(dateParts[1]) &&\n Number(dateParts[2])\n ) {\n return {\n month: parseInt(dateParts[0], 10),\n day: parseInt(dateParts[1], 10),\n year: parseInt(dateParts[2], 10)\n };\n }\n }\n return null;\n }\n\n format(date: NgbDateStruct): string {\n if (date) {\n return DateTimeFormatUtils.formatDateShort2(date.day, date.month, date.year);\n }\n return null;\n }\n}\n","export enum DateLabel {\n TODAY = \"Today\",\n YESTERDAY = \"Yesterday\",\n THIS_WEEK = \"This week\",\n LAST_7_DAYS = \"Last 7 days\",\n LAST_30_DAYS = \"Last 30 days\",\n THIS_MONTH = \"This Month\",\n LAST_MONTH = \"Last Month\",\n CUSTOM = \"Custom Date\",\n}\n","import { NgbDate } from \"@ng-bootstrap/ng-bootstrap\";\nimport { DateRange } from \"./date-inputs/date-range-picker/date-range\";\nimport { DateLabel } from \"./date-inputs/date-range-picker/date-range-modal/date-label\";\nimport { DateTime } from \"luxon\";\n\n/**\n * Represents a single (immutable) point in time at the point of construction.\n *\n * NOTE: Contains a point in time which is shifted for 'timeZone'.\n */\nexport class LocalTimePoint {\n\n private static timeZone = \"America/Los_Angeles\";\n private static timeZoneLocale = \"en-US\";\n\n// private static timeZone = \"Europe/London\";\n// private static timeZoneLocale = \"en-GB\";\n\n// private static timeZone = \"UTC\";\n// private static timeZoneLocale;\n\n private static timeZoneOffsetFromUtc = DateTime.now().setZone(LocalTimePoint.timeZone).offset;\n\n // To get good timezone abbreviated names need to use the locale as well as timezone\n // (otherwise luxon will use the browser's system locale, and user may see GMT-8 instead of PST)\n private static timeZoneOffsetShortName = LocalTimePoint.timeZone === \"UTC\"\n ? DateTime.now().setZone(LocalTimePoint.timeZone).offsetNameShort\n : DateTime.now().setZone(LocalTimePoint.timeZone).setLocale(LocalTimePoint.timeZoneLocale).offsetNameShort;\n\n private value: DateTime;\n\n static formatZ(): string {\n return this.timeZoneOffsetShortName;\n }\n\n static convertUtcValueToLocalValue(utcValue: string): string {\n if (!utcValue) {\n return utcValue;\n }\n return DateTime.fromISO(utcValue).toUTC().plus({ minutes: LocalTimePoint.timeZoneOffsetFromUtc }).toISO();\n }\n\n static convertLocalValueToUtcValue(localValue: string): string {\n if (!localValue) {\n return localValue;\n }\n return DateTime.fromISO(localValue).toUTC().minus({ minutes: LocalTimePoint.timeZoneOffsetFromUtc }).toISO();\n }\n\n get startOfDay(): string {\n return this.value.startOf(\"day\").toISO();\n }\n\n get endOfDay(): string {\n return this.value.endOf(\"day\").toISO();\n }\n\n get startOfPreviousDay(): string {\n return this.value.minus({ days: 1 }).startOf(\"day\").toISO();\n }\n\n get endOfPreviousDay(): string {\n return this.value.minus({ days: 1 }).endOf(\"day\").toISO();\n }\n\n get startOfWeek(): string {\n // uses 'MONDAY' as start day of week (as per ISO 8601)\n return this.value.startOf(\"week\").toISO();\n }\n\n get startOfMonth(): string {\n return this.value.startOf(\"month\").toISO();\n }\n\n get startOfPreviousMonth(): string {\n return this.value.minus({ months: 1 }).startOf(\"month\").toISO();\n }\n\n get endOfPreviousMonth(): string {\n return this.value.minus({ months: 1 }).endOf(\"month\").toISO();\n }\n\n get asNgbDate(): NgbDate {\n return new NgbDate(this.value.year, this.value.month, this.value.day );\n }\n\n startOfDayMinusDays(numberOfDays: number): string {\n return this.value.minus({ days: numberOfDays }).startOf(\"day\").toISO();\n }\n\n endOfDayPlusDays(numberOfDays: number): string {\n return this.value.plus({ days: numberOfDays }).endOf(\"day\").toISO();\n }\n\n endOfNextMonth(): string {\n return this.value.plus({ months: 1 }).endOf(\"month\").toISO();\n }\n\n constructor() {\n this.value = DateTime.utc().plus({ minutes: LocalTimePoint.timeZoneOffsetFromUtc });\n }\n\n // ONLY TEST CODE SHOULD USE THIS!\n setValueForTestingOnly(isoValue: string) {\n this.value = DateTime.fromISO(isoValue).toUTC();\n }\n\n}\n\n// Module loader should ensure this is a singleton (i.e. only loaded once if many other TS modules depend on it)\nconst localTimePoint = new LocalTimePoint();\n\nconst initialFilterDateRangeLastTwoWeeks: DateRange = {\n from: localTimePoint.startOfDayMinusDays(13),\n to: localTimePoint.endOfDay,\n label: DateLabel.CUSTOM // Need to set this as reducers use 'mergeRecursive' which will cause issues if label not set\n};\n\nexport const getInitialLocalFilterDateRangeLastTwoWeeks = (): DateRange => ({\n from: initialFilterDateRangeLastTwoWeeks.from,\n to: initialFilterDateRangeLastTwoWeeks.to,\n label: initialFilterDateRangeLastTwoWeeks.label\n});\n\nconst initialFilterDateRangeToday: DateRange = {\n from: localTimePoint.startOfDay,\n to: localTimePoint.endOfDay,\n label: DateLabel.TODAY\n};\n\nexport const getInitialLocalFilterDateRangeToday = (): DateRange => ({\n from: initialFilterDateRangeToday.from,\n to: initialFilterDateRangeToday.to,\n label: initialFilterDateRangeToday.label\n});\n\nconst initialFilterDateRangeToEndOfNextMonth: DateRange = {\n from: localTimePoint.startOfDay,\n to: localTimePoint.endOfNextMonth(),\n label: DateLabel.CUSTOM // Need to set this as reducers use 'mergeRecursive' which will cause issues if label not set\n};\n\nexport const getInitialLocalFilterDateRangeToEndOfNextMonth = (): DateRange => ({\n from: initialFilterDateRangeToEndOfNextMonth.from,\n to: initialFilterDateRangeToEndOfNextMonth.to,\n label: initialFilterDateRangeToEndOfNextMonth.label\n});\n","<div class=\"outer-container\">\n\n <ng-container *ngIf=\"dateUtcWithTimeZone; else emptyValue\">\n\n <ng-container *ngIf=\"rawDateWithNoTime; else localizedDateTime\">\n\n <div>{{ dateUtcWithTimeZone | date: 'MM/dd/yyyy' : \"UTC\" }}</div>\n\n </ng-container>\n <ng-template #localizedDateTime>\n\n <ng-container *ngIf=\"singleLine; else multiLine\">\n <div class=\"single-line\">\n <span>{{ dateUtcWithTimeZone | date: 'MM/dd/yyyy ' : LocalTimePoint.formatZ() }}</span>\n <span>{{ dateUtcWithTimeZone | date: 'h:mm:ss a' : LocalTimePoint.formatZ() }}</span>\n </div>\n </ng-container>\n <ng-template #multiLine>\n <div>\n <div>{{ dateUtcWithTimeZone | date: 'MM/dd/yyyy ' : LocalTimePoint.formatZ() }}</div>\n <div class=\"dim-time\">{{ dateUtcWithTimeZone | date: 'h:mm:ss a' : LocalTimePoint.formatZ() }}</div>\n </div>\n </ng-template>\n\n </ng-template>\n\n </ng-container>\n\n <ng-template #emptyValue>\n {{ \"—\" }}\n </ng-template>\n\n</div>\n","import { Component, Input, OnChanges } from \"@angular/core\";\nimport { LocalTimePoint } from \"../local-time-point\";\nimport { DateTimeLabelUtils } from \"./date-time-label-utils\";\n\n@Component({\n selector: \"lib-date-time-label\",\n templateUrl: \"./date-time-label.component.html\",\n styleUrls: [\"./date-time-label.component.less\"],\n})\nexport class DateTimeLabelComponent implements OnChanges {\n\n @Input() dateUtc: string;\n @Input() singleLine = false;\n @Input() rawDateWithNoTime = false;\n\n dateUtcWithTimeZone: string;\n\n LocalTimePoint = LocalTimePoint;\n\n ngOnChanges() {\n // TODO :\n // Time zone info should really be supplied by APIs always,\n // but some APIs don't currently do this (so we clean it here).\n // See ticket VPAY-2121. Can remove the following code when that\n // ticket is resolved.\n if ((typeof this.dateUtc === \"string\") && this.dateUtc.length) {\n this.dateUtcWithTimeZone = DateTimeLabelUtils.ensureTimeZone(this.dateUtc);\n }\n }\n\n}\n","\nexport class DateTimeLabelUtils {\n\n static ensureTimeZone(dateTime: string): string {\n let dateTimeWithTimeZone = dateTime;\n\n // Add a trailing zulu time zone char if there is no timezone detected.\n // eslint-disable-next-line security/detect-unsafe-regex\n const withoutTimeZone = /^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(\\.\\d+)?$/i;\n if (withoutTimeZone.test(dateTimeWithTimeZone)) {\n dateTimeWithTimeZone += \"Z\";\n }\n\n return dateTimeWithTimeZone;\n }\n\n}\n","<div class=\"datepicker\">\n\n <div class=\"datepicker-main-body\">\n\n <div [ngClass]=\"{'datepicker-two-month-container' : !singleDateMode, 'datepicker-one-month-container' : singleDateMode}\">\n\n <ngb-datepicker #dp\n (dateSelect)=\"onDateSelection($event)\"\n [displayMonths]=\"singleDateMode ? 1 : 2\"\n [dayTemplate]=\"dayTemplate\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [startDate]=\"fromDate!\"\n outsideDays=\"hidden\">\n </ngb-datepicker>\n\n <ng-template #dayTemplate let-date let-focused=\"focused\">\n <span class=\"custom-day\"\n [class.focused]=\"focused\"\n [class.today]=\"isToday(date)\"\n [class.range]=\"isRange(date)\"\n [class.faded]=\"isHovered(date) || isInside(date)\"\n (mouseenter)=\"hoveredDate = date\"\n (mouseleave)=\"hoveredDate = null\">\n {{ date.day }}\n </span>\n </ng-template>\n\n </div>\n\n <div class=\"datepicker-side-actions\" [ngClass]=\"{'hide-datepicker-side-actions': singleDateMode}\">\n <button class=\"btn btn-secondary btn-block side-action-button\"\n (click)=\"selectDateByLabel(DateLabel.TODAY)\"\n type=\"button\">\n {{ DateLabel.TODAY }}\n </button>\n\n <button class=\"btn btn-secondary btn-block side-action-button\"\n (click)=\"selectDateByLabel(DateLabel.YESTERDAY)\"\n type=\"button\">\n {{ DateLabel.YESTERDAY }}\n </button>\n\n <button class=\"btn btn-secondary btn-block side-action-button\"\n (click)=\"selectDateByLabel(DateLabel.THIS_WEEK)\"\n type=\"button\">\n {{ DateLabel.THIS_WEEK }}\n </button>\n\n <button class=\"btn btn-secondary btn-block side-action-button\"\n (click)=\"selectDateByLabel(DateLabel.LAST_7_DAYS)\"\n type=\"button\">\n {{ DateLabel.LAST_7_DAYS }}\n </button>\n\n <button class=\"btn btn-secondary btn-block side-action-button\"\n (click)=\"selectDateByLabel(DateLabel.LAST_30_DAYS)\"\n type=\"button\">\n {{ DateLabel.LAST_30_DAYS }}\n </button>\n\n <button class=\"btn btn-secondary btn-block side-action-button\"\n (click)=\"selectDateByLabel(DateLabel.THIS_MONTH)\"\n type=\"button\">\n {{ DateLabel.THIS_MONTH }}\n </button>\n\n <button class=\"btn btn-secondary btn-block side-action-button\"\n (click)=\"selectDateByLabel(DateLabel.LAST_MONTH)\"\n type=\"button\">\n {{ DateLabel.LAST_MONTH }}\n </button>\n\n </div>\n\n </div>\n\n <div mat-dialog-actions class=\"datepicker-actions\">\n\n <lib-action-button largeButton [kind]=\"ActionButtonKind.STROKED\" label=\"Cancel\" (click)=\"cancel()\">\n </lib-action-button>\n\n <lib-action-button largeButton [kind]=\"ActionButtonKind.SECONDARY\" label=\"Clear\" (click)=\"clearSelectedDateAndClose()\">\n </lib-action-button>\n\n <lib-action-button largeButton label=\"Apply\" (click)=\"chooseSelectedDateAndClose()\">\n </lib-action-button>\n\n </div>\n\n</div>\n","import { Component, Input, OnInit } from \"@angular/core\";\nimport { NgbDate, NgbCalendar, NgbDateStruct } from \"@ng-bootstrap/ng-bootstrap\";\nimport { DateLabel } from \"./date-label\";\nimport { DateRange } from \"../date-range\";\nimport { MatDialogRef } from \"@angular/material/dialog\";\nimport { LocalTimePoint } from \"../../../local-time-point\";\nimport { DateTimeFormatUtils } from \"../../../date-time-format-utils\";\nimport { ActionButtonKind } from \"../../../../../lib/action-button/action-button.component\";\n\n@Component({\n templateUrl: \"./date-range-modal-content.component.html\",\n styles: [`\n .custom-day {\n text-align: center;\n padding: 0.185rem 0.25rem;\n display: inline-block;\n height: 2rem;\n width: 2rem;\n }\n .custom-day.focused {\n background-color: #e6e6e6;\n }\n .custom-day.range, .custom-day:hover {\n background-color: rgb(2, 117, 216);\n color: white;\n }\n .custom-day.faded {\n background-color: rgba(2, 117, 216, 0.5);\n }\n .datepicker .row {\n position: relative;\n }\n `],\n})\nexport class DateRangeModalContentComponent implements OnInit {\n\n clearDate: DateRange;\n initializeDate: DateRange;\n\n constructor(\n public activeModalWindow: MatDialogRef<DateRangeModalContentComponent>,\n private calendar: NgbCalendar\n ) {}\n\n DateLabel = DateLabel;\n ActionButtonKind = ActionButtonKind;\n\n restrictPast: boolean;\n restrictFuture: boolean;\n restrictToPastMonth: boolean;\n restrictToDateOfBirth: boolean;\n singleDateMode: boolean;\n hoveredDate: NgbDate;\n today: NgbDate;\n fromDate: NgbDate;\n toDate: NgbDate;\n labelToDateMapList: DateRange[];\n\n get maxDate() { return this.restrictFuture ? this.today : null; }\n\n get minDate() {\n if (this.restrictPast) {\n return this.today;\n }\n if (this.restrictToDateOfBirth) {\n return this.calendar.getPrev(this.today, \"y\", 120);\n }\n if (this.restrictToPastMonth) {\n return this.calendar.getPrev(this.today, \"m\", 1);\n }\n return null;\n }\n\n // NOTE: This Date Range Modal works off 'local time' meaning its modal\n // of time (i.e. base localTimePoint) is 'now' in the applied time zone.\n // (see LocalTimePoint.timeZone).\n // As such, its input (eg. clearDate) and output dates are relative to this\n // applied time zone.\n private readonly localTimePoint = new LocalTimePoint();\n\n init() {\n this.today = this.localTimePoint.asNgbDate;\n this.fromDate = this.localTimePoint.asNgbDate;\n this.toDate = this.localTimePoint.asNgbDate;\n this.labelToDateMapList = this.initLabelToDateMapList();\n }\n\n ngOnInit() {\n this.setInitialDateRange(this.initializeDate);\n }\n\n setInitialDateRange(dateRange: DateRange) {\n\n if (dateRange) {\n\n this.fromDate = NgbDate.from(this.convertDateRangeDateToNgbDate(dateRange.from));\n this.toDate = NgbDate.from(this.convertDateRangeDateToNgbDate(dateRange.to));\n }\n }\n\n private initLabelToDateMapList() {\n\n return [\n {\n label: DateLabel.TODAY,\n from: this.localTimePoint.startOfDay,\n to: this.localTimePoint.endOfDay,\n },\n {\n label: DateLabel.YESTERDAY,\n from: this.localTimePoint.startOfPreviousDay,\n to: this.localTimePoint.endOfPreviousDay,\n },\n {\n label: DateLabel.THIS_WEEK,\n from: this.localTimePoint.startOfWeek,\n to: this.localTimePoint.endOfDay,\n },\n {\n label: DateLabel.LAST_7_DAYS,\n from: this.localTimePoint.startOfDayMinusDays(6),\n to: this.localTimePoint.endOfDay,\n },\n {\n label: DateLabel.LAST_30_DAYS,\n from: this.localTimePoint.startOfDayMinusDays(29),\n to: this.localTimePoint.endOfDay,\n },\n {\n label: DateLabel.THIS_MONTH,\n from: this.localTimePoint.startOfMonth,\n to: this.localTimePoint.endOfDay,\n },\n {\n label: DateLabel.LAST_MONTH,\n from: this.localTimePoint.startOfPreviousMonth,\n to: this.localTimePoint.endOfPreviousMonth,\n },\n ];\n }\n\n onDateSelection(date: NgbDate) {\n\n if (this.singleDateMode) {\n this.fromDate = date;\n this.toDate = date;\n }\n else {\n if (!this.fromDate && !this.toDate) {\n\n this.fromDate = date;\n } else if (this.fromDate && !this.toDate && date.after(this.fromDate)) {\n\n this.toDate = date;\n } else {\n\n this.toDate = null;\n this.fromDate = date;\n }\n }\n }\n\n isHovered(date: NgbDate) {\n\n return this.fromDate\n && !this.toDate\n && this.hoveredDate\n && date.after(this.fromDate)\n && date.before(this.hoveredDate);\n }\n\n isInside(date: NgbDate) {\n\n return date.after(this.fromDate)\n && date.before(this.toDate);\n }\n\n isToday(date: NgbDate) {\n\n return date.equals(this.today);\n }\n\n isRange(date: NgbDate) {\n\n return date.equals(this.fromDate)\n || date.equals(this.toDate)\n || this.isInside(date)\n || this.isHovered(date);\n }\n\n selectDateByLabel(label: DateLabel) {\n\n const labelToDateItem = this.labelToDateMapList\n .find(i => i.label == label);\n\n this.activeModalWindow.close(labelToDateItem);\n }\n\n chooseSelectedDateAndClose() {\n\n const from = DateTimeFormatUtils.startOfDayOn(this.fromDate.day, this.fromDate.month, this.fromDate.year);\n const toDate = this.toDate ?? this.fromDate;\n const to = DateTimeFormatUtils.endOfDayOn(toDate.day, toDate.month, toDate.year);\n\n const matchWithLabel = this.labelToDateMapList\n .find(i => i.from == from && i.to == to);\n\n const result = matchWithLabel ?? { from, to, label: DateLabel.CUSTOM };\n\n this.activeModalWindow.close(result);\n }\n\n clearSelectedDateAndClose() {\n\n this.activeModalWindow.close(this.clearDate);\n }\n\n cancel() {\n\n this.activeModalWindow.close(null);\n }\n\n private convertDateRangeDateToNgbDate(date: string): NgbDateStruct {\n\n return DateTimeFormatUtils.getDateObjectForDateRangeDate(date) as NgbDateStruct;\n }\n}\n","import { DateRangeModalContentComponent } from \"./date-range-modal-content.component\";\nimport { Injectable } from \"@angular/core\";\nimport { DateRange } from \"../date-range\";\nimport { MatDialog } from \"@angular/material/dialog\";\n\n@Injectable()\nexport class DateRangeModal {\n\n constructor(\n private modal: MatDialog,\n ) {}\n\n create(clearDateRange: DateRange, initialDateRange: DateRange,\n options?: {\n restrictPast: boolean;\n restrictFuture: boolean;\n restrictToPastMonth: boolean;\n restrictToDateOfBirth: boolean;\n singleDateMode: boolean;\n }) {\n\n const modalInstance = this.modal.open(DateRangeModalContentComponent, {\n width: options?.singleDateMode ? \"540px\" : \"800px\",\n });\n\n modalInstance.componentInstance.clearDate = clearDateRange;\n modalInstance.componentInstance.initializeDate = initialDateRange;\n modalInstance.componentInstance.restrictPast = options.restrictPast;\n modalInstance.componentInstance.restrictFuture = options.restrictFuture;\n modalInstance.componentInstance.restrictToPastMonth = options.restrictToPastMonth;\n modalInstance.componentInstance.restrictToDateOfBirth = options.restrictToDateOfBirth;\n modalInstance.componentInstance.singleDateMode = options.singleDateMode;\n modalInstance.componentInstance.init();\n\n return modalInstance.afterClosed();\n }\n}\n","import { Directive, Renderer2, ElementRef, HostListener, Input } from \"@angular/core\";\nimport { DateRangeModal } from \"./date-range-modal/date-range-modal.service\";\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from \"@angular/forms\";\nimport { DateRange } from \"./date-range\";\nimport { DateLabel } from \"./date-range-modal/date-label\";\nimport { DateTimeFormatUtils } from \"../../date-time-format-utils\";\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: \"[dateRangePicker]\",\n exportAs: \"appDateRangePicker\",\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: DateRangePickerDirective,\n multi: true,\n }],\n})\nexport class DateRangePickerDirective implements ControlValueAccessor {\n\n @Input() singleDateMode: boolean;\n @Input() restrictPast: boolean;\n @Input() restrictFuture: boolean;\n @Input() restrictToPastMonth: boolean;\n @Input() restrictToDateOfBirth: boolean;\n @Input() clearValue: DateRange;\n\n constructor(\n private dateRangeModalService: DateRangeModal,\n private renderer: Renderer2,\n private elementRef: ElementRef\n ) {}\n\n @HostListener(\"focus\")\n onTouched: () => void;\n onChange: (value: any) => void;\n\n private currentValue: DateRange;\n disabled: boolean;\n\n @HostListener(\"click\")\n async openModal() {\n\n this.onTouched();\n\n try {\n\n const newValue = await this.dateRangeModalService.create(\n this.clearValue,\n this.currentValue,\n {\n restrictPast: this.restrictPast,\n restrictFuture: this.restrictFuture,\n restrictToPastMonth: this.restrictToPastMonth,\n restrictToDateOfBirth: this.restrictToDateOfBirth,\n singleDateMode: this.singleDateMode\n }\n ).toPromise();\n\n const isDefaultClearData = ((this.clearValue == null) && (newValue === undefined));\n\n if (newValue || isDefaultClearData) {\n this.onChange(newValue);\n this.doWriteValue(newValue);\n }\n\n } catch {}\n }\n\n @HostListener(\"change\")\n handleInputChange() {\n\n const input = this.elementRef.nativeElement;\n\n if (input.value == \"\") {\n\n this.onChange(null);\n this.doWriteValue(null);\n }\n else {\n\n this.renderValue(this.currentValue);\n }\n }\n\n writeValue(value: DateRange) {\n\n this.doWriteValue(value);\n }\n\n renderValue(value: DateRange) {\n let formattedValue = \"\";\n\n if (value) {\n\n const hasLabel = value?.label && value?.label != DateLabel.CUSTOM;\n\n const singleDate = DateTimeFormatUtils.isSameDay(value.from, value.to);\n\n if (hasLabel && !this.singleDateMode) {\n\n formattedValue = value.label;\n }\n else if (singleDate) {\n\n formattedValue = DateTimeFormatUtils.formatDateShort(value.from);\n }\n else {\n\n formattedValue =\n `${DateTimeFormatUtils.formatDateShort(value.from)} - ${DateTimeFormatUtils.formatDateShort(value.to)}`;\n }\n }\n\n this.renderer.setProperty(this.elementRef.nativeElement, \"value\", formattedValue);\n }\n\n registerOnChange(onChange) {\n\n this.onChange = onChange;\n }\n\n registerOnTouched(onTouched) {\n\n this.onTouched = onTouched;\n }\n\n setDisabledState(disabled: boolean) {\n\n this.disabled = disabled;\n this.renderer.setProperty(this.elementRef.nativeElement, \"disabled\", disabled);\n }\n\n private doWriteValue(value: DateRange) {\n this.currentValue = value;\n this.renderValue(value);\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { NgbDatepickerModule } from \"@ng-bootstrap/ng-bootstrap\";\n\nimport { DateRangePickerDirective } from \"./date-range-picker/date-range-picker.directive\";\nimport { DateRangeModal } from \"./date-range-picker/date-range-modal/date-range-modal.service\";\nimport { DateRangeModalContentComponent } from \"./date-range-picker/date-range-modal/date-range-modal-content.component\";\nimport { MatDialogModule } from \"@angular/material/dialog\";\nimport { ActionButtonModule } from \"../../action-button/action-button.module\";\n\n@NgModule({\n imports: [\n CommonModule,\n MatDialogModule,\n NgbDatepickerModule,\n ActionButtonModule\n ],\n declarations: [\n DateRangePickerDirective,\n DateRangeModalContentComponent\n ],\n providers: [\n DateRangeModal,\n ],\n exports: [\n DateRangePickerDirective,\n ]\n})\nexport class DateInputsModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { NgbDatepickerConfig, NgbDateParserFormatter, NgbDateAdapter } from \"@ng-bootstrap/ng-bootstrap\";\nimport { NgbDateCustomParserFormatter } from \"./ngb-date-custom-parser-formatter\";\nimport { NgbCustomDateAdapter } from \"./ngb-custom-date-adapter\";\nimport { NgbCustomDatePickerConfig } from \"./ngb-custom-datepicker-config\";\nimport { DateTimeLabelComponent } from \"./date-time-label/date-time-label.component\";\nimport { DateInputsModule } from \"./date-inputs/date-inputs.module\";\n\n@NgModule({\n imports: [\n CommonModule,\n DateInputsModule\n ],\n declarations: [\n DateTimeLabelComponent\n ],\n providers: [\n {\n provide: NgbDateParserFormatter,\n useClass: NgbDateCustomParserFormatter,\n },\n {\n provide: NgbDateAdapter,\n useClass: NgbCustomDateAdapter,\n },\n {\n provide: NgbDatepickerConfig,\n useClass: NgbCustomDatePickerConfig,\n }\n ],\n exports: [\n DateTimeLabelComponent,\n DateInputsModule\n ]\n})\nexport class DateTimeModule {}\n","import { Injectable } from \"@angular/core\";\n\n@Injectable({ providedIn: \"root\" })\nexport class LoggerService {\n\n private readonly messagePrefix = \"(VituPay)\";\n\n constructor() {}\n\n error(...args: any[]) {\n // Can override (eg. different for different environments)\n console.error(...[this.messagePrefix, ...args]);\n }\n\n log(...args: any[]) {\n // Can override (eg. different for different environments)\n console.log(...[this.messagePrefix, ...args]);\n }\n\n warn(...args: any[]) {\n // Can override (eg. different for different environments)\n console.warn(...[this.messagePrefix, ...args]);\n }\n\n}\n","import { ErrorHandler, Injectable } from \"@angular/core\";\nimport { VituHttpError } from \"../misc/vitu-http-errors\";\nimport { LoggerService } from \"./logger.service\";\nimport StackdriverErrorReporter from \"stackdriver-errors-js\";\nimport { CurrentUser, Environment } from \"../misc\";\n\nenum ErrorReportingMode {\n UnhandledErrorsOnly,\n UnhandledErrorsAndHttpErrors\n}\n\n@Injectable()\nexport class GlobalErrorHandler implements ErrorHandler {\n\n public currentUser: CurrentUser = null;\n\n private errorReportingMode = ErrorReportingMode.UnhandledErrorsAndHttpErrors;\n private errorHandler: StackdriverErrorReporter;\n\n constructor(\n private loggerService: LoggerService,\n private environment: Environment) {\n\n this.errorHandler = new StackdriverErrorReporter();\n this.errorHandler.start({\n key: environment?.stackDriverErrorReporting?.key,\n projectId: environment?.stackDriverErrorReporting?.projectId,\n context: {} // Important!\n });\n\n }\n\n // Override platform callback for unhandled exceptions\n handleError(error: Error) {\n\n const httpError = error instanceof VituHttpError;\n const reportUnhandledAndHttpErrors = (this.errorReportingMode === ErrorReportingMode.UnhandledErrorsAndHttpErrors);\n // DON'T log HTTP errors here if we're in UnhandledErrorsAndHttpErrors mode. (Avoids duplicate log)\n if (!(httpError && reportUnhandledAndHttpErrors)) {\n this.logError(error);\n }\n\n }\n\n logHttpErrorIfNecessary(error: VituHttpError) {\n\n // DO log HTTP errors here if we're in UnhandledErrorsAndHttpErrors mode.\n if (this.errorReportingMode === ErrorReportingMode.UnhandledErrorsAndHttpErrors) {\n this.logError(error);\n }\n\n }\n\n private logError(error: Error) {\n\n // Log to browser console on all environments\n this.loggerService.error(error);\n\n // Don't log to cloud if dev environment\n if (this.environment && !this.environment.isDevelopment) {\n const appName = this.environment?.stackDriverErrorReporting?.appName?.toUpperCase();\n const env = this.environment?.descriptor?.toUpperCase();\n\n // Give it a message prefix which can easily be searched for to isolate all related errors\n error.message = `UI_PANEL_${appName}_${env}: ${error.message}`;\n // 'setUser' can hold an arbitrary string of 'context' info, so add id, name & permissions into it\n const userPayload =\n `ID[${this.currentUser?.id}]:` +\n `NAME[${this.currentUser?.name}]:` +\n `PERMISSIONS[${this.currentUser?.permissions?.toString()}]`;\n this.errorHandler.setUser(userPayload);\n this.errorHandler.report(error);\n }\n\n }\n\n}\n","export enum VituToastTone {\n Neutral = 1,\n Positive = 2,\n Negative = 3,\n}\n","<div class=\"outer-container\" [ngClass]=\"{'tone-positive' : tone === VituToastTone.Positive, 'tone-negative' : tone === VituToastTone.Negative, 'tone-neutral' : tone === VituToastTone.Neutral, 'has-button': !!buttonText }\">\n\n <div class=\"icon-container\" [ngClass]=\"{'tone-positive' : tone === VituToastTone.Positive, 'tone-negative' : tone === VituToastTone.Negative, 'tone-neutral' : tone === VituToastTone.Neutral}\">\n\n <ng-container [ngSwitch]=\"tone\">\n\n <ng-container *ngSwitchCase=\"VituToastTone.Positive\">\n <i class=\"fas fa-check-circle\"></i>\n </ng-container>\n \n <ng-container *ngSwitchCase=\"VituToastTone.Negative\">\n <i class=\"fas fa-exclamation-circle\"></i>\n </ng-container>\n \n <ng-container *ngSwitchDefault>\n <i class=\"far fa-comment\"></i>\n </ng-container>\n \n </ng-container>\n\n </div>\n\n <div class=\"text-container\">\n <div *ngFor=\"let textLine of text\" class=\"text-line\">\n {{ textLine }}\n </div>\n </div>\n\n <div *ngIf=\"buttonText\" class=\"button-container\">\n <lib-action-button\n [kind]=\"ActionButtonKind.ALERT\"\n [alertTone]=\"alertTone\"\n largeButton\n [label]=\"buttonText\"\n (click)=\"onButtonClick()\">\n </lib-action-button>\n </div>\n\n</div>\n","import { Component, Inject } from \"@angular/core\";\nimport { MAT_SNACK_BAR_DATA } from \"@angular/material/snack-bar\";\nimport { ActionButtonAlertTone, ActionButtonKind } from \"../../action-button/action-button.component\";\nimport { VituToastTone } from \"../vitu-toast-tone\";\n\n@Component({\n selector: \"lib-snackbar-content\",\n templateUrl: \"./snackbar-content.component.html\",\n styleUrls: [\"./snackbar-content.component.less\"],\n})\nexport class SnackBarContentComponent {\n\n VituToastTone = VituToastTone;\n ActionButtonKind = ActionButtonKind;\n\n text: Array<string> = [];\n tone: VituToastTone = VituToastTone.Neutral;\n buttonText: string;\n closeFn: () => void;\n\n constructor(@Inject(MAT_SNACK_BAR_DATA) public data: any) {\n\n if (Array.isArray(data?.text)) {\n this.text = data.text;\n }\n else if (typeof data?.text === \"string\") {\n this.text = [data.text];\n }\n if (data?.tone) {\n this.tone = data.tone;\n }\n if (data?.buttonText) {\n this.buttonText = data.buttonText;\n }\n if (data?.closeFn) {\n this.closeFn = data.closeFn;\n }\n\n }\n\n onButtonClick() {\n if (this.closeFn) {\n this.closeFn();\n }\n }\n\n get alertTone() {\n return this.tone as unknown as ActionButtonAlertTone;\n }\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { MatSnackBar, MatSnackBarConfig, MatSnackBarHorizontalPosition, MatSnackBarVerticalPosition } from \"@angular/material/snack-bar\";\nimport { Observable, Subject } from \"rxjs\";\nimport { SnackBarContentComponent } from \"./snackbar-content.component/snackbar-content.component\";\nimport { VituToastTone } from \"./vitu-toast-tone\";\n\n@Injectable({ providedIn: \"root\" })\nexport class VituToastService {\n\n private closeEmitter = new Subject<void>();\n\n open(message: string|Array<string>, tone = VituToastTone.Neutral,\n horizPosition?: MatSnackBarHorizontalPosition, vertPosition?: MatSnackBarVerticalPosition,\n buttonText?: string): Observable<void> {\n\n const horizontalPosition = horizPosition ?? \"center\";\n const verticalPosition = vertPosition ?? \"top\";\n\n // Calculate the duration to display the toast for based\n // on the number of chars, between 4 secs & 7 secs.\n let totalChars = 0;\n if (Array.isArray(message)) {\n message.forEach((messagePart) => {\n if (typeof messagePart === \"string\") {\n totalChars += messagePart.length;\n }\n });\n }\n else if (typeof message === \"string\") {\n totalChars = message.length;\n }\n\n const increment = 50; // approx chars in a line of text\n const base = 3 * increment;\n const excess = Math.max(totalChars - base, 0);\n const excessIncrements = Math.floor(excess / increment);\n const duration = Math.min(4000 + (excessIncrements * 500), 7000);\n\n const snackbarConfig: MatSnackBarConfig = {\n panelClass: \"vitu-material-snackbar-override\",\n duration: buttonText ? undefined : duration,\n horizontalPosition, // 'start' | 'center' | 'end' | 'left' | 'right'\n verticalPosition // 'top' | 'bottom'\n };\n\n this.snackBar.openFromComponent(SnackBarContentComponent, {\n data: {\n text: message,\n tone,\n buttonText,\n closeFn: () => this.close()\n },\n ...snackbarConfig\n });\n\n return this.closeEmitter.asObservable();\n }\n\n close() {\n this.snackBar.dismiss();\n this.closeEmitter.next();\n }\n\n constructor(private snackBar: MatSnackBar) {}\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { BehaviorSubject, Observable } from \"rxjs\";\nimport { tap } from \"rxjs/operators\";\n\nexport interface GlobalSpinnerData {\n show: boolean;\n}\n\n@Injectable({ providedIn: \"root\" })\nexport class GlobalSpinnerService {\n\n data$: Observable<GlobalSpinnerData>;\n\n private showCount = 0;\n private get data() {\n return { show: this.showCount > 0 };\n }\n private dataEmitter = new BehaviorSubject<GlobalSpinnerData>(this.data);\n\n apply(obs: Observable<any>): Observable<any> {\n this.start();\n return obs.pipe(\n // Ensure it calls stop on the complete and error channels (not required on 'next')\n // (Note: 'finalize' won't work as it gets called on unsubscribe which we don't want)\n tap(\n () => {},\n () => {\n this.stop();\n },\n () => {\n this.stop();\n }\n )\n );\n };\n\n constructor() {\n this.data$ = this.dataEmitter.asObservable();\n }\n\n start() {\n ++this.showCount;\n this.emitData();\n }\n\n private stop() {\n --this.showCount;\n this.emitData();\n }\n\n private emitData() {\n this.dataEmitter.next(this.data);\n }\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { MatDialog, MatDialogRef } from \"@angular/material/dialog\";\nimport { Router } from \"@angular/router\";\nimport { Observable } from \"rxjs\";\nimport { tap } from \"rxjs/operators\";\nimport { ConfirmationModalComponent, ConfirmationModalData } from \"../confirmation-modal/confirmation-modal.component\";\nimport { GlobalSpinnerService } from \"../global-spinner/global-spinner.service\";\nimport { VituToastTone } from \"../toast/vitu-toast-tone\";\nimport { VituToastService } from \"../toast/vitu-toast.service\";\n\nexport enum ErrorUi {\n None,\n Toast,\n Modal\n}\n\nexport interface ErrorUiConfig {\n clientErrorUi?: ErrorUi;\n serverErrorUi?: ErrorUi;\n}\n\nexport interface ErrorUiAppReloadConfig {\n origin: string;\n help: string;\n}\n\n@Injectable({ providedIn: \"root\" })\nexport class ErrorUiService {\n\n reloadConfig: ErrorUiAppReloadConfig;\n defaultRoute: string;\n\n readonly defaultConfig: ErrorUiConfig = {\n clientErrorUi: ErrorUi.Toast,\n serverErrorUi: ErrorUi.Modal\n };\n\n private dialogRef: MatDialogRef<ConfirmationModalComponent>;\n private config: ErrorUiConfig;\n\n handleNotification(message: string, isServerError = false): void {\n\n if (!message) {\n return;\n }\n\n const title = \"Error\";\n\n if (isServerError) {\n switch (this.config.serverErrorUi)\n {\n case ErrorUi.Modal:\n {\n this.displayMessageOnReloadPageModal(title, message);\n break;\n }\n }\n }\n else {\n switch (this.config.clientErrorUi)\n {\n case ErrorUi.Toast:\n {\n this.displayMessageOnToast(message);\n break;\n }\n case ErrorUi.Modal:\n {\n this.displayMessageOnModal(title, message);\n break;\n }\n }\n }\n\n }\n\n dismissAll(): void {\n this.toast.close();\n this.dialog.closeAll();\n }\n\n // IMPORTANT: Doesn't support concurrency.\n // i.e. If another request's response were to come back before the error UI was re-enabled,\n // then that request would not have an error UI shown.\n // => Can only be used in a 'single request' situation, where there is a single\n // thread of behavior. (eg. from a Modal)\n disable(obs: Observable<any>): Observable<any> {\n const config = {\n clientErrorUi: ErrorUi.None,\n serverErrorUi: ErrorUi.None\n };\n this.overrideStart(config);\n return obs.pipe(\n // Ensure it calls stop on all 3 tap channels\n // (Note: 'finalize' won't work as it gets called on unsubscribe which we don't want)\n tap(\n () => {\n this.overrideEnd();\n },\n () => {\n this.overrideEnd();\n },\n () => {\n this.overrideEnd();\n }\n )\n );\n };\n\n constructor(\n private toast: VituToastService,\n private dialog: MatDialog,\n private globalSpinner: GlobalSpinnerService,\n private router: Router\n ) {\n this.resetConfig();\n }\n\n private resetConfig() {\n this.config = this.defaultConfig;\n }\n\n private overrideStart(config: ErrorUiConfig) {\n this.config = config;\n }\n\n private overrideEnd() {\n this.resetConfig();\n }\n\n private displayMessageOnToast(message: string): void {\n this.toast.open(message, VituToastTone.Negative);\n }\n\n private displayMessageOnModal(\n title: string, message: string, confirmButtonText?: string, secondButtonText?: string, thirdButtonText?: string): Observable<any> {\n\n this.dialogRef = this.dialog.open(ConfirmationModalComponent, {\n width: \"600px\",\n data: {\n title,\n subtitle: message,\n confirmButtonText,\n secondButtonText,\n thirdButtonText,\n noCancel: true\n } as ConfirmationModalData\n });\n\n return this.dialogRef.afterClosed();\n }\n\n private displayMessageOnReloadPageModal(title: string, message: string): void {\n\n if (!this.reloadConfig) {\n return;\n }\n\n const firstButtonText = \"Reload\";\n let secondButtonText = \"Home\";\n let thirdButtonText = \"Help\";\n\n const onHomePage = (this.router.url === \"/\" || (this.defaultRoute && (this.router.url === this.defaultRoute)));\n if (onHomePage) {\n secondButtonText = undefined;\n }\n if (this.router.url === \"/\") {\n thirdButtonText = undefined;\n }\n\n this.displayMessageOnModal(title, message, firstButtonText, secondButtonText, thirdButtonText).subscribe((result: any) => {\n\n switch (result) {\n case 1:\n {\n // RELOAD\n this.globalSpinner.start();\n window.location.reload();\n break;\n }\n case 2:\n {\n // HOME\n this.router.navigate([`/`]);\n break;\n }\n case 3:\n {\n // HELP\n this.router.navigate([`${this.reloadConfig.help}`]);\n break;\n }\n }\n\n }); // NOTE: no need to unsubscribe from afterClosed (=> it completes itself);\n }\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { HttpInterceptor, HttpHandler, HttpRequest, HttpEvent, HttpErrorResponse } from \"@angular/common/http\";\nimport { Observable, throwError } from \"rxjs\";\nimport { catchError } from \"rxjs/operators\";\n\n@Injectable()\nexport class BlobErrorHttpInterceptor implements HttpInterceptor {\n public intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n return next.handle(req).pipe(\n catchError(err => {\n if (err instanceof HttpErrorResponse && err.error instanceof Blob /* && err.error.type === \"application/json\"*/) {\n // https://github.com/angular/angular/issues/19888\n // When request of type Blob, the error is also in Blob instead of object of the json data\n return new Promise<any>((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = (e: Event) => {\n try {\n const errmsg = JSON.parse((e.target as any).result);\n reject(new HttpErrorResponse({\n error: errmsg,\n headers: err.headers,\n status: err.status,\n statusText: err.statusText,\n url: err.url\n }));\n } catch (innerError) {\n reject(err);\n }\n };\n reader.onerror = (e) => {\n reject(err);\n };\n reader.readAsText(err.error);\n });\n }\n return throwError(err);\n })\n );\n }\n}\n","import {\n HttpRequest,\n HttpHandler,\n HttpEvent,\n HttpInterceptor,\n HttpErrorResponse,\n} from \"@angular/common/http\";\nimport { Observable, throwError } from \"rxjs\";\nimport { catchError } from \"rxjs/operators\";\nimport { ErrorHandler, Injectable } from \"@angular/core\";\nimport { ErrorUiService } from \"./error-ui.service\";\nimport {\n VituHttpError,\n VituHttpErrorUnableToConnect,\n VituHttpErrorBadRequest,\n VituHttpErrorForbidden,\n VituHttpErrorInternalServerError,\n VituHttpErrorNotFound,\n VituHttpErrorServiceUnavailable,\n VituHttpErrorUnauthorized,\n VituHttpErrorUnknown,\n VituHttpStatus\n} from \"../misc/vitu-http-errors\";\nimport { GlobalErrorHandler } from \"./global-error-handler.service\";\nimport { AuthService } from \"../misc/auth.service\";\n\n@Injectable()\nexport class ResponseInterceptor implements HttpInterceptor {\n\n private globalErrorHandler: GlobalErrorHandler;\n\n constructor(\n private authService: AuthService,\n private errorUi: ErrorUiService,\n errorHandler: ErrorHandler\n ) {\n this.globalErrorHandler = errorHandler as GlobalErrorHandler;\n }\n\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n\n return next.handle(request)\n .pipe(\n catchError((err: HttpErrorResponse) => {\n const error: VituHttpError = this.createErrorIfNecessary(err);\n\n if (error) {\n if (error.status === VituHttpStatus.Unauthorized) {\n this.authService.logout();\n }\n\n const isServerError = ((error.status === 0) || ((error.status >= 500) && (error.status < 600)));\n this.errorUi.handleNotification(error.message, isServerError);\n\n // Here we can log this out even if the error is caught in a parent handler\n this.globalErrorHandler.logHttpErrorIfNecessary(error);\n\n // We create a clone of the error object here because the globalErrorHandler\n // may mutate the error object (eg. message) during logging, and its\n // difficult to create good JavaScript Error object clones further downstream.\n const errorClone: VituHttpError = this.createErrorIfNecessary(err);\n return throwError(errorClone);\n }\n })\n );\n }\n\n private createErrorIfNecessary(err: any): VituHttpError {\n\n let error;\n\n switch (err.status) {\n case 0:\n {\n error = VituHttpErrorUnableToConnect.create(err);\n break;\n }\n case 400:\n {\n error = VituHttpErrorBadRequest.create(err);\n break;\n }\n case 401:\n {\n error = VituHttpErrorUnauthorized.create(err);\n break;\n }\n case 403:\n {\n error = VituHttpErrorForbidden.create(err);\n break;\n }\n case 404:\n {\n error = VituHttpErrorNotFound.create(err);\n break;\n }\n case 500:\n {\n error = VituHttpErrorInternalServerError.create(err);\n break;\n }\n case 503:\n {\n error = VituHttpErrorServiceUnavailable.create(err);\n break;\n }\n }\n\n if (!error && (err.status >= 0) && !((err.status >= 200) && (err.status < 400))) {\n // Safe catch all for HTTP status codes that are errors & aren't decoded above\n error = VituHttpErrorUnknown.create(err);\n }\n\n return error;\n }\n\n}\n","import { CommonModule } from \"@angular/common\";\nimport { HTTP_INTERCEPTORS } from \"@angular/common/http\";\nimport { ErrorHandler, NgModule } from \"@angular/core\";\nimport { BlobErrorHttpInterceptor } from \"./blob-error-response-interceptor\";\nimport { GlobalErrorHandler } from \"./global-error-handler.service\";\nimport { ResponseInterceptor } from \"./response-interceptor\";\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule\n ],\n providers: [\n {\n provide: HTTP_INTERCEPTORS,\n useClass: ResponseInterceptor,\n multi: true,\n },\n {\n provide: HTTP_INTERCEPTORS,\n useClass: BlobErrorHttpInterceptor,\n multi: true\n },\n {\n provide: ErrorHandler,\n useClass: GlobalErrorHandler\n }\n ]\n})\nexport class ErrorHandlerModule { }\n","import { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\n\n@Component({\n selector: \"lib-vitu-form-submit-button\",\n templateUrl: \"./vitu-form-submit-button.component.html\",\n styleUrls: [\"./vitu-form-submit-button.component.less\"]\n})\nexport class VituFormSubmitButtonComponent implements OnInit, OnDestroy {\n\n @Input() label = \"\";\n @Input() neverDisable = false;\n\n @Output() clicked = new EventEmitter<void>();\n\n set disabled(value: boolean) {\n if (!this.neverDisable) {\n this._disabled = value;\n }\n }\n get disabled() {\n return this._disabled;\n }\n private _disabled = true;\n\n private handleClick = (event: MouseEvent) => {\n if (this.disabled) {\n event.stopPropagation();\n }\n else {\n this.clicked.emit();\n }\n };\n\n constructor(private hostElementRef: ElementRef) {}\n\n ngOnInit() {\n this._disabled = !this.neverDisable;\n // use addEventListener as need to use capture mode\n this.hostElementRef.nativeElement.addEventListener(\"click\", this.handleClick, true);\n }\n\n ngOnDestroy() {\n this.hostElementRef.nativeElement.removeEventListener(\"click\", this.handleClick, true);\n }\n\n}\n","<div class=\"outer-container\">\n <lib-action-button\n largeButton\n [label]=\"label\"\n [disabled]=\"disabled\">\n </lib-action-button>\n</div>\n","import { Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { ActionButtonKind } from \"../../../action-button/action-button.component\";\n\n@Component({\n selector: \"lib-vitu-form-abort-button\",\n templateUrl: \"./vitu-form-abort-button.component.html\"\n})\nexport class VituFormAbortButtonComponent implements OnInit, OnDestroy {\n\n @Input() isModal = false;\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n @Output() onAbort = new EventEmitter<void>();\n\n ActionButtonKind = ActionButtonKind;\n\n label: string;\n\n constructor(private hostElementRef: ElementRef) {}\n\n ngOnInit() {\n this.label = this.isModal ? \"Cancel\" : \"Back\";\n\n // use addEventListener as need to use capture mode\n // also listening on 'mousedown' (rather than 'click') works better for modals\n // as it will dismiss the modal before showing any other blur invalidated fields\n // which are present on the modal.\n this.hostElementRef.nativeElement.addEventListener(\"mousedown\", this.handleAbort, true);\n }\n\n ngOnDestroy() {\n this.hostElementRef.nativeElement.removeEventListener(\"mousedown\", this.handleAbort, true);\n }\n\n private handleAbort = (event: MouseEvent) => {\n event.preventDefault(); // extra safety\n this.onAbort.emit();\n };\n\n}\n","<lib-action-button\n [kind]=\"ActionButtonKind.STROKED\"\n largeButton\n [label]=\"label\">\n</lib-action-button>\n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"lib-vitu-form-buttons\",\n templateUrl: \"./vitu-form-buttons.component.html\",\n styleUrls: [\"./vitu-form-buttons.component.less\"]\n})\nexport class VituFormButtonsComponent{\n\n}\n","<div class=\"outer-container\">\n <ng-content></ng-content>\n</div>\n","import {\n AfterContentInit, ChangeDetectorRef, ContentChildren, Directive,\n EventEmitter, Input, OnDestroy, Output, QueryList, ViewContainerRef\n} from \"@angular/core\";\nimport { UntypedFormGroup } from \"@angular/forms\";\nimport { debounceTime } from \"rxjs/operators\";\nimport { isEqualWith, cloneDeep } from \"lodash\";\nimport { Subscription } from \"rxjs\";\nimport { VituFormSubmitButtonComponent } from \"./vitu-form-submit-button/vitu-form-submit-button.component\";\n\n@Directive({\n selector: \"[libVituForm]\",\n exportAs: \"vituForm\"\n})\nexport class VituFormDirective implements AfterContentInit, OnDestroy {\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input(\"libVituForm\") formGroup: UntypedFormGroup;\n @Output() libVituFormSubmit = new EventEmitter<void>();\n @Output() libVituFormSubmitInvalidFieldNames = new EventEmitter<Array<string>>();\n\n @ContentChildren(VituFormSubmitButtonComponent, {descendants: true}) submitters: QueryList<VituFormSubmitButtonComponent>;\n\n get dirty() {\n return this.formGroup?.dirty;\n }\n\n private subscriptions = new Subscription();\n private pristineValue: any;\n\n extraChangeDetectionRun = false;\n\n ngAfterContentInit() {\n this.init();\n this.listenForFormEdits();\n this.listenForFormSubmit();\n\n if (!this.extraChangeDetectionRun) {\n // Workaround => Allows us to bypass an 'ExpressionChangedAfterInit' type error\n // which otherwise sometimes occurs inside forms (eg. when using disabled controls).\n // by allowing a single extra change detection run on init\n // (should have no adverse side effects)\n this.cd.detectChanges();\n this.extraChangeDetectionRun = true;\n }\n }\n\n ngOnDestroy() {\n this.subscriptions.unsubscribe();\n }\n\n constructor(private cd: ChangeDetectorRef, private viewContainerRef: ViewContainerRef) {}\n\n private init() {\n this.setPristineValue(this.formGroup.value);\n this.updateDisabledOnSubmitters();\n }\n\n private listenForFormEdits() {\n this.subscriptions.add(\n this.formGroup.valueChanges\n .pipe(debounceTime(200))\n .subscribe(value => {\n if (this.formGroup.pristine) {\n this.setPristineValue(value);\n }\n if (this.areValuesEqual(this.pristineValue, value)) {\n this.formGroup.markAsPristine();\n }\n this.updateDisabledOnSubmitters();\n })\n );\n }\n\n private listenForFormSubmit() {\n this.submitters?.forEach(submitter => {\n this.subscriptions.add(submitter.clicked.subscribe(() => {\n if(this.formGroup.invalid) {\n this.emitInvalidFieldNames();\n this.highlightInvalid();\n }\n else {\n this.submitForm();\n }\n }));\n });\n }\n\n private updateDisabledOnSubmitters() {\n this.submitters?.forEach(submitter => {\n submitter.disabled = this.formGroup.pristine;\n });\n }\n\n private highlightInvalid() {\n this.formGroup.markAllAsTouched();\n this.formGroup.updateValueAndValidity();\n if (this.viewContainerRef?.element?.nativeElement) {\n const firstErrorElement = this.viewContainerRef.element.nativeElement.querySelector(\"mat-form-field.ng-invalid\");\n if (firstErrorElement) {\n firstErrorElement.scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n }\n }\n }\n\n private emitInvalidFieldNames() {\n const invalidFieldNames = [];\n Object.keys(this.formGroup.controls).forEach((key: string) => {\n if (this.formGroup.controls[key].invalid) {\n invalidFieldNames.push(key);\n }\n });\n this.libVituFormSubmitInvalidFieldNames.emit(invalidFieldNames);\n }\n\n private submitForm() {\n this.libVituFormSubmit.emit();\n }\n\n private setPristineValue(value: any) {\n this.pristineValue = cloneDeep(value);\n }\n\n private areValuesEqual(value1: any, value2: any): boolean {\n // Adjust standard 'isEqual' with extra condition(s):\n // 1. Equate \"\" and null.\n // 2. Equate \"\" and undefined.\n return isEqualWith(value1, value2, (a, b) => {\n if (((a === null) || (a === \"\")) && ((b === null) || (b === \"\"))) {\n return true;\n }\n if (((a === undefined) || (a === \"\")) && ((b === undefined) || (b === \"\"))) {\n return true;\n }\n });\n }\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { VituFormDirective } from \"./vitu-form.directive\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\nimport { ActionButtonModule } from \"../../action-button/action-button.module\";\nimport { VituFormSubmitButtonComponent } from \"./vitu-form-submit-button/vitu-form-submit-button.component\";\nimport { VituFormAbortButtonComponent } from \"./vitu-form-abort-button/vitu-form-abort-button.component\";\nimport { VituFormButtonsComponent } from \"./vitu-form-buttons/vitu-form-buttons.component\";\n\n@NgModule({\n declarations: [\n VituFormDirective,\n VituFormSubmitButtonComponent,\n VituFormAbortButtonComponent,\n VituFormButtonsComponent\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n ActionButtonModule\n ],\n exports: [\n VituFormDirective,\n VituFormSubmitButtonComponent,\n VituFormAbortButtonComponent,\n VituFormButtonsComponent\n ]\n})\nexport class VituFormModule { }\n","import { UntypedFormControl } from \"@angular/forms\";\n\nexport class ValidatorsVituCustom {\n\n /*\n Verifies the integrity of the value set in a mat-select SINGLE SELECT field,\n by comparing against the allowedValues.\n Note: not applied for unset field value (=> use Validators.required for that)\n Note: not applied for empty allowedValues (as there would be no values for the user to change to)\n */\n static selectSingleIntegrity = (allowedValues: () => Array<any>) => {\n\n const selectSingleInner = (c: UntypedFormControl) => {\n const allowedVals = allowedValues();\n let valid = true;\n const fieldValue = c.value;\n if ((allowedVals?.length) && (fieldValue != null)) {\n valid = (allowedVals.indexOf(fieldValue) !== -1);\n }\n return valid ? null : {\n vituSelectSingleIntegrity: {\n valid: false\n }\n };\n };\n\n return selectSingleInner;\n };\n\n static selectMultiIntegrity = (allowedValues: () => Array<any>) => {\n\n /*\n Verifies the integrity of the value set in a mat-select MULTI SELECT field,\n by comparing against the allowedValues.\n Note: not applied for unset/empty field value (=> use Validators.required for that)\n Note: not applied for empty allowedValues (as there would be no values for the user to change to)\n */\n const selectMultiInner = (c: UntypedFormControl) => {\n const allowedVals = allowedValues();\n let valid = true;\n const fieldValues = c.value;\n if ((allowedVals?.length) && (fieldValues?.length)) {\n fieldValues.forEach((fieldItem) => {\n if (allowedVals?.indexOf(fieldItem) === -1) {\n valid = false;\n }\n });\n }\n return valid ? null : {\n vituSelectMultiIntegrity: {\n valid: false\n }\n };\n };\n\n return selectMultiInner;\n };\n\n static validHttpHttps = (control: UntypedFormControl) => {\n\n let valid = true;\n\n let url;\n\n const controlValue = control.value;\n if (controlValue?.length > 0) {\n try {\n url = new URL(controlValue);\n valid = (url.protocol === \"http:\") || ((url.protocol === \"https:\"));\n }\n catch (_) {\n valid = false;\n }\n }\n\n return valid ? null : {\n vituValidHttpHttpsUrl: {\n valid: false\n }\n };\n };\n\n static validHttpsUrl = (control: UntypedFormControl) => {\n\n let valid = true;\n\n let url;\n\n const controlValue = control.value;\n if (controlValue?.length > 0) {\n try {\n url = new URL(controlValue);\n valid = (url.protocol === \"https:\");\n }\n catch (_) {\n valid = false;\n }\n }\n\n return valid ? null : {\n vituValidHttpsUrl: {\n valid: false\n }\n };\n };\n\n}\n","// Uses RFC 5322 Email Validation standard (see emailregex.com) with CASE-INSENSITIVITY applied.\n// Disable lint security rule => Angular has template escaping & APIs should be sanitized.\n// eslint-disable-next-line no-control-regex, max-len, security/detect-unsafe-regex\nexport const EmailRegex = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nexport const EmailInvalid = \"Requires valid email address\";\n\n// Enable a subset of allowed Rapid Connect range (^([0-9]{1,10})$)\nexport const TelephoneRegex = /^([2-9]{1}[0-9]{9})$/;\nexport const TelephoneInvalid = \"Requires valid US phone number\";\n\n// TODO : Can we remove this? Only needed to perform integrity checking on telephone number fields, because now they\n// are restricted to 10 numeric digits and have a US telephone mask applied. This 'imask' would otherwise clip legacy\n// telephone numbers which were created with more than 10 digits and cause problems as user would think field was valid,\n// while marked invalid. Better solution is to remove the need for this client-side fix by instead performing a database\n// clean to reset any fields for telephone numbers which are more than 10 digits.\nexport const TelephoneMaxLength = 10;\n\n// eslint-disable-next-line security/detect-unsafe-regex\nexport const ZipRegex = /^([0-9]{5}(-[0-9]{4})?)$/;\nexport const ZipInvalid = \"Requires valid US ZIP code\";\n\n// eslint-disable-next-line security/detect-unsafe-regex\nexport const DomainNameRegex = /^([a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}$/;\nexport const DomainNameInvalid = \"Requires valid domain name\";\n","import { Directive, Input } from \"@angular/core\";\nimport { AbstractControl, ControlContainer, FormControlName, NgControl } from \"@angular/forms\";\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: \"[disableControl]\"\n})\nexport class DisableControlDirective {\n\n @Input() set disableControl( condition: boolean ) {\n\n let control: AbstractControl;\n if (this.ngControl instanceof FormControlName) {\n // Attempt to get form control (using container) when component created without [formControl] applied (and only [formControlName]).\n const formControlName = (this.ngControl as FormControlName).name;\n if (typeof formControlName === \"string\") {\n control = this.controlContainer?.control?.get(formControlName);\n }\n }\n else {\n control = this.ngControl?.control;\n }\n if (control) {\n if (condition) {\n control.disable();\n }\n else {\n control.enable();\n }\n }\n }\n\n constructor(private ngControl: NgControl, private controlContainer: ControlContainer) {}\n\n}\n","import { Directive, ElementRef, HostListener, Input, OnInit } from \"@angular/core\";\nimport { NgControl } from \"@angular/forms\";\n\n@Directive({\n selector: \"[libTwoDigitDecimalNumber]\"\n})\nexport class TwoDigitDecimalNumberDirective implements OnInit {\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input(\"libTwoDigitDecimalNumber\") enabled: boolean;\n @Input(\"libTwoDigitDecimalNumberAllowNegative\") allowNegative: boolean;\n @Input(\"libTwoDigitDecimalNumberAllowZeroNotNegative\") allowZeroNotNegative: boolean;\n @Input(\"libTwoDigitDecimalNumberEmptyIsNull\") emptyIsNull: boolean;\n\n private regex: RegExp;\n // Allow key codes for special events.\n private specialKeys: Array<string> = [\"Backspace\", \"Tab\", \"End\", \"Home\", \"ArrowLeft\", \"ArrowRight\", \"Del\", \"Delete\"];\n\n constructor(private el: ElementRef, private control: NgControl) { }\n\n ngOnInit() {\n if (this.allowNegative) {\n // eslint-disable-next-line security/detect-unsafe-regex\n this.regex = new RegExp(/^(-?)((0|[1-9]\\d*)(\\.\\d{0,2})?)?$/g);\n }\n else {\n // eslint-disable-next-line security/detect-unsafe-regex\n this.regex = new RegExp(/^(0|[1-9]\\d*)(\\.\\d{0,2})?$/g);\n }\n }\n\n @HostListener(\"keydown\", [\"$event\"])\n onKeyDown(event: KeyboardEvent) {\n if (!this.enabled) {\n // Allows the entire directive to be conditionally applied (in which case its methods just have no effect)\n return;\n }\n if (this.specialKeys.indexOf(event.key) !== -1) {\n return;\n }\n const current: string = this.el.nativeElement.value;\n const position = this.el.nativeElement.selectionStart;\n const next: string = [current.slice(0, position), event.key == \"Decimal\" ? \".\" : event.key, current.slice(position)].join(\"\");\n if ((next && !String(next).match(this.regex))) {\n event.preventDefault();\n }\n }\n\n @HostListener(\"blur\", [\"$event\"])\n onBlur() {\n if (!this.enabled) {\n // Allows the entire directive to be conditionally applied (in which case its methods just have no effect)\n return;\n }\n\n const origValue = this.el.nativeElement.value;\n let value = origValue;\n\n if (this.emptyIsNull) {\n // Editor can change an initial null value into empty string so force it back to null here\n if ((value === \"\") || (value === undefined)) {\n value = null;\n }\n }\n\n if (value?.length > 0) {\n if (value.indexOf(\".\") < 0) {\n value = `${value}.00`;\n }\n while (value.indexOf(\".\") !== value.length - 3) {\n value = `${value}0`;\n }\n if ((value === \"-0.00\")\n || (value === \"-.00\")\n || (value === \"0.00\")\n || (value === \".00\")) {\n value = (this.allowZeroNotNegative) ? \"0.00\" : \"\";\n }\n }\n\n if (origValue !== value) {\n // Required to sync the DOM value back to the Angular Form.\n this.control.control.setValue(value);\n }\n }\n\n}\n","<div [formGroup]=\"formGroup\">\n\n <mat-form-field class=\"form-field\" [ngClass]=\"{'global-form-field-highlight-non-empty': _isFilter}\">\n\n <mat-label>\n <span>\n {{ displayLabel }}\n </span>\n <lib-vitu-tooltip\n *ngIf=\"!!infoTip?.length\"\n class=\"info-tip\"\n [text]=\"infoTip\">\n <i class=\"far fa-info-circle\"></i> \n </lib-vitu-tooltip>\n </mat-label>\n\n <input\n matInput\n dateRangePicker\n [formControlName]=\"formFieldName\"\n [formControl]=\"formControl\"\n #datePicker=\"appDateRangePicker\"\n [restrictPast]=\"_restrictPast\"\n [restrictFuture]=\"_restrictFuture\"\n [restrictToPastMonth]=\"_restrictToPastMonth\"\n [restrictToDateOfBirth]=\"_restrictToDateOfBirth\"\n [clearValue]=\"clearValue\"\n [readonly]=\"_readonly\"\n [singleDateMode]=\"_singleDateMode\"\n [required]=\"hasRequiredValidator\"\n [disableControl]=\"_disabled\"\n (focus)=\"updateOutlineGap()\">\n\n <button\n mat-button matSuffix mat-icon-button\n libStopPropagation\n (click)=\"onClickIcon(datePicker)\">\n <div class=\"datepicker-suffix-image\"></div>\n </button>\n\n <mat-error *ngIf=\"errors?.required\">Field is required</mat-error>\n\n </mat-form-field>\n\n</div>\n","import { Component, EventEmitter, Input, OnChanges, Output, ViewChild } from \"@angular/core\";\nimport { AbstractControl, UntypedFormControl, UntypedFormGroup } from \"@angular/forms\";\nimport { MatFormField } from \"@angular/material/form-field\";\nimport { DateRange, LocalTimePoint } from \"../../../date-time\";\n\n@Component({\n selector: \"lib-vitu-form-field-date\",\n templateUrl: \"./vitu-form-field-date.component.html\",\n styleUrls: [\"./vitu-form-field-date.component.less\"]\n})\nexport class VituFormFieldDateComponent implements OnChanges {\n\n @Input() formGroup: UntypedFormGroup;\n @Input() formFieldName: string;\n\n @Input() clearValue: DateRange;\n\n @Input() set isFilter(value: any) {\n this._isFilter = !(value === false);\n };\n\n @Input() set disabled(value: any) {\n this._disabled = !(value === false);\n };\n\n @Input() set singleDateMode(value: any) {\n this._singleDateMode = !(value === false);\n };\n\n @Input() set readonly(value: any) {\n this._readonly = !(value === false);\n };\n\n @Input() set restrictPast(value: any) {\n this._restrictPast = !(value === false);\n };\n\n @Input() set restrictFuture(value: any) {\n this._restrictFuture = !(value === false);\n };\n\n @Input() set restrictToPastMonth(value: any) {\n this._restrictToPastMonth = !(value === false);\n };\n\n @Input() set restrictToDateOfBirth(value: any) {\n this._restrictToDateOfBirth = !(value === false);\n };\n\n @Input() label: string;\n @Input() infoTip: string;\n\n @Input() showReset = false;\n @Output() handleReset = new EventEmitter<void>();\n\n @Input() isUtc = false;\n\n formControl: UntypedFormControl;\n\n _isFilter = false;\n _disabled = false;\n _singleDateMode = false;\n _readonly = false;\n _restrictPast = false;\n _restrictFuture = false;\n _restrictToPastMonth = false;\n _restrictToDateOfBirth = false;\n\n @ViewChild(MatFormField) formField: MatFormField;\n\n LocalTimePoint = LocalTimePoint;\n\n get displayLabel() {\n let retVal = this.label;\n if (!this.isUtc) {\n retVal += ` (${LocalTimePoint.formatZ()})`;\n }\n return retVal;\n }\n\n get errors() {\n return (this.formGroup?.controls[this.formFieldName] as UntypedFormControl)?.errors;\n }\n\n get hasRequiredValidator() {\n const abstractControl = this.formGroup?.controls[this.formFieldName];\n if (abstractControl?.validator) {\n const validator = abstractControl.validator({} as AbstractControl);\n if (validator && validator.required) {\n return true;\n }\n }\n return false;\n }\n\n ngOnChanges() {\n if (this.formGroup && this.formFieldName) {\n this.formControl = this.formGroup.controls[this.formFieldName] as UntypedFormControl;\n }\n }\n\n updateOutlineGap() {\n // Workaround: Angular Bug\n // Label on outline form fields doesn't align properly\n // Fix adapted from : https://github.com/angular/components/issues/15027\n this.formField.updateOutlineGap();\n }\n\n onClickIcon(datePicker: any) {\n if (!this._disabled) {\n datePicker?.openModal();\n }\n }\n\n}\n","<div class=\"outer-container\" [formGroup]=\"formGroup\">\n\n <mat-form-field class=\"form-field\" [ngClass]=\"{'global-form-field-highlight-non-empty': _isFilter}\">\n\n <mat-label>\n <span>\n {{ label }}\n </span>\n <lib-vitu-tooltip\n *ngIf=\"!!infoTip?.length\"\n class=\"info-tip\"\n [text]=\"infoTip\">\n <i class=\"far fa-info-circle\"></i> \n </lib-vitu-tooltip>\n </mat-label>\n\n <input\n [ngClass]=\"{'obscured': type === 'obscured'}\"\n #inputElement\n [type]=\"inputType\"\n matInput\n [formControlName]=\"formFieldName\"\n [formControl]=\"formControl\"\n [readonly]=\"_readonly\"\n [required]=\"hasRequiredValidator\"\n [disableControl]=\"_disabled\"\n [autocomplete]=\"autocomplete\"\n [maxlength]=\"maxlength\"\n [imask]=\"mask\"\n [unmask]=\"unmaskInputType\"\n [libTwoDigitDecimalNumber]=\"(type === 'twoDigitDecimal') || (type === 'twoDigitDecimalAllowNegative') || (type === 'twoDigitDecimalAllowZeroNotNegative')\"\n [libTwoDigitDecimalNumberAllowNegative]=\"type === 'twoDigitDecimalAllowNegative'\"\n [libTwoDigitDecimalNumberAllowZeroNotNegative]=\"type === 'twoDigitDecimalAllowZeroNotNegative'\"\n (focus)=\"updateOutlineGap()\"\n (blur)=\"onBlur($event)\"\n (change)=\"onChange($event)\">\n\n <span *ngIf=\"prefix\" matPrefix>{{ prefix + ' ' }}</span>\n\n <button *ngIf=\"showReset\"\n mat-button matSuffix mat-icon-button\n libStopPropagation\n aria-label=\"Clear\" (click)=\"handleReset.emit()\">\n <mat-icon>close</mat-icon>\n </button>\n\n <button *ngIf=\"showButton\"\n mat-button matSuffix mat-icon-button\n libStopPropagation\n (click)=\"handleButton.emit()\">\n <mat-icon>{{ showButton }}</mat-icon>\n </button>\n\n <mat-error *ngFor=\"let item of errors | keyvalue\">{{ resolveError(errors, item.key) }}</mat-error>\n\n </mat-form-field>\n\n <div *ngIf=\"(type === 'obscured') && inputElement.value\" class=\"toggle-show-obscured\" (click)=\"onClickToggleShowObscured()\">\n <i [class]=\"'far ' + (showObscured ? 'fa-eye-slash' : 'fa-eye')\"></i>\n </div>\n\n</div>\n","import { Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, Output, ViewChild } from \"@angular/core\";\nimport { AbstractControl, UntypedFormControl, UntypedFormGroup } from \"@angular/forms\";\nimport { MatFormField } from \"@angular/material/form-field\";\nimport { Subscription } from \"rxjs\";\nimport { DomainNameInvalid, EmailInvalid, TelephoneInvalid, TelephoneMaxLength, ZipInvalid } from \"../../vitu-form/validators-config\";\n\n@Component({\n selector: \"lib-vitu-form-field-input\",\n templateUrl: \"./vitu-form-field-input.component.html\",\n styleUrls: [\"./vitu-form-field-input.component.less\"]\n})\nexport class VituFormFieldInputComponent implements OnChanges, OnDestroy {\n\n @Input() formGroup: UntypedFormGroup;\n @Input() formFieldName: string;\n\n @Input() errorOverrides = [];\n\n @Input() set isFilter(value: any) {\n this._isFilter = !(value === false);\n };\n\n @Input() set disabled(value: any) {\n this._disabled = !(value === false);\n };\n\n @Input() set readonly(value: any) {\n this._readonly = !(value === false);\n };\n\n @Input() label: string;\n\n @Input() set type(value: string) {\n this._type = value;\n this.inputType = value;\n if (value === \"obscured\") {\n this.inputType = this.showObscured ? \"text\" : \"password\";\n }\n if ((value === \"twoDigitDecimal\") || (value === \"twoDigitDecimalAllowNegative\")\n || (value === \"twoDigitDecimalAllowZeroNotNegative\")) {\n this.inputType = \"text\";\n }\n if (value === \"telephone\") {\n this.inputType = \"text\";\n this.mask = {\n mask: \"(#00) 000-0000\",\n definitions: {\"#\": /[2-9]/}\n };\n }\n if (value === \"zip\") {\n this.inputType = \"text\";\n this.mask = {\n mask: \"00000[-0000]\"\n };\n }\n if (value === \"domainName\") {\n this.inputType = \"text\";\n }\n };\n get type() {\n return this._type;\n }\n _type = \"text\";\n inputType = \"text\";\n\n @Input() showReset = false;\n @Output() handleReset = new EventEmitter<void>();\n\n @Input() showButton;\n @Output() handleButton = new EventEmitter<void>();\n\n @Input() autocomplete = \"on\"; // html input default\n @Input() maxlength = 524288; // html input default\n @Input() mask = null;\n\n @Input() infoTip: string;\n\n @Output() changedBlurred = new EventEmitter<void>();\n @Output() blurred = new EventEmitter<void>();\n\n private subscription: Subscription;\n\n formControl: UntypedFormControl;\n\n optionLabels: Array<string>;\n optionValues: Array<any>;\n\n @ViewChild(\"inputElement\", { static: false }) inputElement: ElementRef;\n @ViewChild(MatFormField) formField: MatFormField;\n\n focus() {\n if (this.inputElement?.nativeElement) {\n this.inputElement?.nativeElement.focus();\n }\n }\n\n set value(value: any) {\n if (this.inputElement?.nativeElement) {\n this.inputElement.nativeElement.value = value;\n }\n }\n get value() {\n return this.inputElement?.nativeElement?.value;\n }\n\n @Input() set showObscured(value: boolean) {\n this._showObscured = value;\n this.inputType = this._showObscured ? \"text\" : \"password\";\n }\n get showObscured() {\n return this._showObscured;\n }\n @Output() showObscuredChange = new EventEmitter<boolean>();\n _showObscured = false;\n\n @Input() prefix: string;\n\n _isFilter = false;\n _disabled = false;\n _readonly = false;\n\n get errors() {\n return (this.formGroup?.controls[this.formFieldName] as UntypedFormControl)?.errors;\n }\n\n get hasRequiredValidator() {\n const abstractControl = this.formGroup?.controls[this.formFieldName];\n if (abstractControl?.validator) {\n const validator = abstractControl.validator({} as AbstractControl);\n if (validator && validator.required) {\n return true;\n }\n }\n return false;\n }\n\n ngOnChanges() {\n if (this.formGroup && this.formFieldName) {\n const oldFormControl = this.formControl;\n this.formControl = this.formGroup.controls[this.formFieldName] as UntypedFormControl;\n\n if (this.formControl !== oldFormControl) {\n this.subscription?.unsubscribe();\n this.subscription = this.formControl.valueChanges.subscribe(value => {\n if ((this._type === \"telephone\") && (value?.length > TelephoneMaxLength)) {\n // Perform integrity checking on telephone number fields, because now they are restricted to\n // 10 numeric digits and have a US telephone mask applied. This 'imask' would otherwise clip legacy\n // telephone numbers which were created with more than 10 digits and cause problems as user would\n // think field was valid, while marked invalid. Better solution is to remove the need for this\n // client-side fix by instead performing a database clean to reset any fields for telephone numbers\n // which are more than 10 digits.\n this.formControl.setValue(\"\");\n }\n else if ((this._type === \"text\") && (value?.length > 0)) {\n // Enforce that no input field begins with whitespace\n // This corrects an annoying issue when pasting table cell contents into filter fields\n // that the paste from the table sometimes includes leading space chars, which means\n // that the filter doesn't match.\n // This solution seems effective at removing that, and there should be no need to have leading\n // whitespace in any of our text fields.\n const oldValue = this.value;\n const newValue = this.value?.trimLeft();\n if (oldValue && newValue && (newValue !== oldValue)) {\n this.formControl.setValue(newValue);\n }\n }\n });\n }\n }\n }\n\n ngOnDestroy() {\n this.subscription?.unsubscribe();\n }\n\n updateOutlineGap() {\n // Workaround: Angular Bug\n // Label on outline form fields doesn't align properly\n // Fix adapted from : https://github.com/angular/components/issues/15027\n this.formField.updateOutlineGap();\n }\n\n onClickToggleShowObscured() {\n this.showObscured = !this.showObscured;\n }\n\n onChange(event: any) {\n this.changedBlurred.emit();\n }\n\n onBlur(event: any) {\n this.blurred.emit();\n }\n\n resolveError(errors: any, key: string) {\n\n // (1) First apply error override (if exists)\n\n if (this.errorOverrides?.length) {\n const foundOverrides = this.errorOverrides.filter(errorOverride => !!errorOverride[key]);\n if (foundOverrides?.length) {\n return foundOverrides[0][key];\n }\n }\n\n // (2) If no error override then apply fallback message\n\n if ((this.type === \"email\") && (key === \"pattern\")) {\n return EmailInvalid;\n }\n\n if ((this.type === \"telephone\") && (key === \"pattern\")) {\n return TelephoneInvalid;\n }\n\n if ((this.type === \"zip\") && (key === \"pattern\")) {\n return ZipInvalid;\n }\n\n if ((this.type === \"domainName\") && (key === \"pattern\")) {\n return DomainNameInvalid;\n }\n\n if (key === \"required\") {\n return \"Field is required\";\n }\n\n if (key === \"min\") {\n return `Min value is ${errors[key].min}`;\n }\n\n if (key === \"max\") {\n return `Max value is ${errors[key].max}`;\n }\n\n if (key === \"minlength\") {\n return `Min length is ${errors[key].requiredLength} chars`;\n }\n\n if (key === \"maxlength\") {\n return `Max length is ${errors[key].requiredLength} chars`;\n }\n\n if (key === \"pattern\") {\n return \"Invalid value\";\n }\n\n if (key === \"vituValidHttpsUrl\") {\n return \"Must be a valid https:// URL\";\n }\n\n if (key === \"vituValidHttpHttpsUrl\") {\n return \"Must be a valid http:// or https:// URL\";\n }\n\n return null;\n }\n\n get unmaskInputType(): boolean {\n // 'unmasking' an input is where it uses a 'mask':\n // - return 'true' : if we want to propagate the unmasked value as value. (i.e. raw value)\n // - return 'false' : if we want to propagate the masked value as value.\n // 'zip' returns the masked value (eg. \"98765-4321\"), whereas 'telephone' returns the unmasked value (eg. \"9876543210\")\n return (this.type === \"telephone\");\n }\n\n}\n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\n\n@Component({\n selector: \"lib-vitu-input\",\n templateUrl: \"./vitu-input.component.html\",\n styleUrls: [\"./vitu-input.component.less\"]\n})\nexport class VituInputComponent implements OnInit {\n\n @Input() label: string;\n @Input() readonly: boolean;\n\n @Input() value: string;\n @Output() valueChange = new EventEmitter<string>();\n\n @Input() inputType = \"text\";\n\n @Input() min: number;\n @Input() max: number;\n\n animateLabel = false;\n\n onChange(event: any) {\n this.value = event;\n this.valueChange.emit(this.value);\n }\n\n ngOnInit() {\n setTimeout(() => { this.animateLabel = true;}, 1000);\n }\n\n}\n","<div class=\"outer-container\" [ngClass]=\"{'readonly': readonly}\">\n\n <div class=\"inner-container\">\n\n <input\n [type]=\"inputType\"\n class=\"control\"\n [ngModel]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n [readonly]=\"readonly\"\n placeholder=\" \"\n [min]=\"min\"\n [max]=\"max\" />\n\n <div class=\"input-label\" [ngClass]=\"{'animate-label': animateLabel}\">\n <div class=\"white-border-line\"></div>\n <div class=\"input-label-text\">{{ label }}</div>\n </div>\n\n </div>\n\n</div>\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\n@Pipe({\n name: \"spaceBetweenCaps\"\n})\nexport class SpaceBetweenCapsPipe implements PipeTransform {\n\n transform(value: any, capitalizeFirstLetter = false): string {\n\n if (typeof value === \"string\") {\n let outString = \"\";\n for (let ii = 0; ii < value.length; ii++) {\n let charToTest = value[ii];\n if ((ii > 0) && (charToTest === charToTest.toUpperCase())) {\n outString += \" \";\n }\n if ((ii === 0) && capitalizeFirstLetter) {\n charToTest = charToTest.toUpperCase();\n }\n outString += charToTest;\n }\n return outString;\n }\n\n return value;\n }\n\n}\n\n","<div class=\"outer-container\">\n\n <div [formGroup]=\"formGroup\">\n <mat-form-field class=\"form-field\" [ngClass]=\"{'global-form-field-highlight-non-empty': _isFilter}\">\n\n <mat-label>\n <span>\n {{ labelEmptyCondition ? labelEmpty : label }}\n </span>\n <lib-vitu-tooltip\n *ngIf=\"!!infoTip?.length\"\n class=\"info-tip\"\n [text]=\"infoTip\">\n <i class=\"far fa-info-circle\"></i> \n </lib-vitu-tooltip>\n </mat-label>\n\n <mat-select [formControlName]=\"formFieldName\" [formControl]=\"formControl\"\n [multiple]=\"_multiple\" [required]=\"hasRequiredValidator\" [disableControl]=\"_disabled\"\n [panelClass]=\"panelClass\"\n disableOptionCentering ngDefaultControl\n (selectionChange)=\"onSelectionChanged($event)\"\n (focus)=\"updateOutlineGap()\"\n [sortComparator]=\"sortComparator\">\n\n <ng-container *ngIf=\"_groups?.length > 0; else noGroups\">\n\n <ng-container *ngFor=\"let group of _groups; let groupIdx = index\">\n\n <mat-optgroup *ngIf=\"group.name?.length > 0; else groupNoLabel\" [label]=\"group.name\">\n\n <mat-option *ngFor=\"let option of optionsForGroup(group); let idx = index\" [value]=\"optionValue(option, idx, groupIdx)\">\n {{ spaceBetweenCapsOnLabels ? (optionLabel(option, idx, groupIdx) | spaceBetweenCaps) : optionLabel(option, idx, groupIdx) }}\n </mat-option>\n\n </mat-optgroup>\n\n <ng-template #groupNoLabel>\n\n <mat-option *ngFor=\"let option of optionsForGroup(group); let idx = index\" [value]=\"optionValue(option, idx, groupIdx)\">\n {{ spaceBetweenCapsOnLabels ? (optionLabel(option, idx, groupIdx) | spaceBetweenCaps) : optionLabel(option, idx, groupIdx) }}\n </mat-option>\n\n </ng-template>\n\n </ng-container>\n\n </ng-container>\n\n <ng-template #noGroups>\n\n <mat-option *ngFor=\"let option of options; let idx = index\" [value]=\"optionValue(option, idx)\">\n {{ spaceBetweenCapsOnLabels ? (optionLabel(option, idx) | spaceBetweenCaps) : optionLabel(option, idx) }}\n </mat-option>\n\n </ng-template>\n\n </mat-select>\n\n <button *ngIf=\"showReset\"\n mat-button matSuffix mat-icon-button\n libStopPropagation\n aria-label=\"Clear\" (click)=\"handleReset.emit()\">\n <mat-icon>close</mat-icon>\n </button>\n\n <mat-error *ngFor=\"let item of errors | keyvalue\">{{ resolveError(errors, item.key) }}</mat-error>\n\n </mat-form-field>\n\n </div>\n\n <div *ngIf=\"labelEmptyCondition\" class=\"empty-field-overlay\">\n <lib-vitu-input\n [label]=\"labelOverlay\"\n [value]=\"labelEmpty\"\n [readonly]=\"true\">\n </lib-vitu-input> \n </div>\n\n</div>\n","import { Component, EventEmitter, Input, OnChanges, Output, ViewChild } from \"@angular/core\";\nimport { AbstractControl, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from \"@angular/forms\";\nimport { MatFormField } from \"@angular/material/form-field\";\nimport { MatSelect } from \"@angular/material/select\";\nimport { isEqual } from \"lodash\";\n\n@Component({\n selector: \"lib-vitu-form-field-select\",\n templateUrl: \"./vitu-form-field-select.component.html\",\n styleUrls: [\"./vitu-form-field-select.component.less\"]\n})\nexport class VituFormFieldSelectComponent implements OnChanges {\n\n @Input() formGroup: UntypedFormGroup;\n @Input() formFieldName: string;\n\n @Input() errorOverrides = [];\n\n @Input() set isFilter(value: any) {\n this._isFilter = !(value === false);\n };\n\n @Input() set multiple(value: any) {\n this._multiple = !(value === false);\n };\n\n @Input() set disabled(value: any) {\n this._disabled = !(value === false);\n };\n\n @Input() label: string;\n\n @Input() labelEmpty: string;\n @Input() labelEmptyCondition = false;\n\n @Input() limitedVerticalSpace = false;\n\n get labelOverlay() {\n let retVal = this.label;\n if (this.hasRequiredValidator) {\n retVal += \" *\";\n }\n return retVal;\n }\n\n get value() {\n return this.select?.value;\n }\n\n @Input() set options(value: Array<any>) {\n // Workaround : Change detection seems to get stuck in a loop if options is set from a 'new' value each time\n // even if the actual value is the same (this only updates the _options if its actually changed)\n // (see: https://github.com/angular/components/issues/10039#issuecomment-367018196)\n if (!isEqual(this._options, value)) {\n this._options = value;\n }\n };\n get options() {\n return this._options;\n }\n _options: Array<any>;\n\n @Input() optionLabelKey: string;\n @Input() optionLabelFn: (option: any) => string;\n\n @Input() optionValueKey: string;\n @Input() optionValueFn: (option: any) => any;\n\n @Input() showReset = false;\n @Output() handleReset = new EventEmitter<void>();\n\n @Output() selectionChanged = new EventEmitter<void>();\n\n @Input() spaceBetweenCapsOnLabels = false;\n\n // Angular workaround :\n // Hangs if complex object is applied as property on custom component?\n // (so we serialize into a string instead)\n @Input() set groups(value: any) {\n this._groups = JSON.parse(value);\n }\n _groups = [];\n\n @Input() infoTip: string;\n\n @ViewChild(MatFormField) formField: MatFormField;\n @ViewChild(MatSelect) select: MatSelect;\n\n formControl: UntypedFormControl;\n\n optionLabels: Array<string>;\n optionValues: Array<any>;\n\n _isFilter = false;\n _multiple = false;\n _disabled = false;\n\n get errors() {\n return (this.formGroup?.controls[this.formFieldName] as UntypedFormControl)?.errors;\n }\n\n constructor(private fb: UntypedFormBuilder) {\n this.formFieldName = \"DUMMY_ONE\";\n const formConfig = {};\n formConfig[this.formFieldName] = [null];\n this.formGroup = fb.group(formConfig);\n }\n\n ngOnChanges() {\n if (this.formGroup && this.formFieldName) {\n this.formControl = this.formGroup.controls[this.formFieldName] as UntypedFormControl;\n }\n\n if (this.optionLabelKey) {\n this.optionLabels = this.options?.map(option => option[this.optionLabelKey]);\n }\n\n if (this.optionValueKey) {\n this.optionValues = this.options?.map(option => option[this.optionValueKey]);\n }\n }\n\n onSelectionChanged(event: any) {\n this.selectionChanged.emit();\n }\n\n sortComparator(a: any, b: any) {\n if (a.value > b.value) {\n return 1;\n }\n if (a.value < b.value) {\n return -1;\n }\n return 0;\n }\n\n updateOutlineGap() {\n // Workaround: Angular Bug\n // Label on outline form fields doesn't align properly\n // Fix adapted from : https://github.com/angular/components/issues/15027\n this.formField.updateOutlineGap();\n }\n\n optionLabel(option, idx, groupIdx = null) {\n if (this.optionLabelFn !== undefined) {\n return this.optionLabelFn(option);\n }\n else if (this.optionLabelKey !== undefined) {\n\n let overallIndex;\n if (groupIdx !== null) {\n overallIndex = this.startIndexForGroupIndex(groupIdx) + idx;\n }\n else {\n overallIndex = idx;\n }\n\n return this.optionLabels[overallIndex];\n }\n else {\n return option;\n }\n }\n\n optionValue(option, idx, groupIdx = null) {\n if (this.optionValueFn !== undefined) {\n return this.optionValueFn(option);\n }\n else if (this.optionValueKey !== undefined) {\n\n let overallIndex;\n if (groupIdx !== null) {\n overallIndex = this.startIndexForGroupIndex(groupIdx) + idx;\n }\n else {\n overallIndex = idx;\n }\n\n return this.optionValues[overallIndex];\n }\n else {\n return option;\n }\n }\n\n get hasRequiredValidator() {\n const abstractControl = this.formGroup?.controls[this.formFieldName];\n if (abstractControl?.validator) {\n const validator = abstractControl.validator({} as AbstractControl);\n if (validator && validator.required) {\n return true;\n }\n }\n return false;\n }\n\n get panelClass() {\n let retVal = this._multiple ? \"select-panel-base-multi-select\" : \"select-panel-base-single-select\";\n if (this.limitedVerticalSpace) {\n retVal += \" limited-vertical-space\";\n }\n return retVal;\n }\n\n optionsForGroup(group) {\n return this.options.slice(group.minIdx, group.maxIdx + 1);\n }\n\n resolveError(errors: any, key: string) {\n\n // (1) First apply error override (if exists)\n\n if (this.errorOverrides?.length) {\n const foundOverrides = this.errorOverrides.filter(errorOverride => !!errorOverride[key]);\n if (foundOverrides?.length) {\n return foundOverrides[0][key];\n }\n }\n\n // (2) If no error override then apply fallback message\n\n if (key === \"required\") {\n return \"Field is required\";\n }\n\n if (key === \"vituSelectSingleIntegrity\") {\n return `Please reapply value`;\n }\n\n if (key === \"vituSelectMultiIntegrity\") {\n return `Please reapply value(s)`;\n }\n\n return null;\n }\n\n private startIndexForGroupIndex(groupIndex: number) {\n return this._groups[groupIndex].minIdx;\n }\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { SpaceBetweenCapsPipe } from \"./space-between-caps.pipe\";\n\n@NgModule({\n declarations: [\n SpaceBetweenCapsPipe\n ],\n imports: [\n CommonModule\n ],\n exports: [\n SpaceBetweenCapsPipe\n ]\n})\nexport class SpaceBetweenCapsModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { VituInputComponent } from \"./vitu-input.component\";\nimport { FormsModule } from \"@angular/forms\";\n\n@NgModule({\n declarations: [\n VituInputComponent\n ],\n imports: [\n CommonModule,\n FormsModule\n ],\n exports: [\n VituInputComponent\n ]\n})\nexport class VituInputModule { }\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\n@Component({\n selector: \"lib-vitu-slide-toggle\",\n templateUrl: \"./vitu-slide-toggle.component.html\",\n styleUrls: [\"./vitu-slide-toggle.component.less\"],\n})\nexport class VituSlideToggleComponent {\n\n @Input() checked: boolean;\n @Output() checkedChange = new EventEmitter<boolean>();\n\n @Input() disabled: boolean;\n\n onCheckedChange(slider) {\n this.checked = slider.checked;\n this.checkedChange.emit(this.checked);\n }\n\n}\n","<mat-slide-toggle\n [@.disabled]=\"true\"\n #slider\n [checked]=\"checked\"\n (change)=\"onCheckedChange(slider)\"\n [disabled]=\"disabled\">\n</mat-slide-toggle>","<div class=\"outer-container\">\n\n <div class=\"label-container\" *ngIf=\"labelBefore\">\n <lib-text-common class=\"label left\">{{ label }}</lib-text-common>\n </div>\n\n <lib-vitu-slide-toggle\n *ngIf=\"useSlider\"\n class=\"slider\"\n [checked]=\"checked\"\n (checkedChange)=\"onToggled($event)\"\n [disabled]=\"disabled\">\n </lib-vitu-slide-toggle>\n\n <mat-checkbox\n *ngIf=\"!useSlider\"\n #checkbox\n class=\"checkbox\"\n [checked]=\"checked\"\n (change)=\"onToggled(checkbox.checked)\"\n [disabled]=\"disabled\">\n </mat-checkbox>\n\n <div class=\"label-container\" *ngIf=\"!labelBefore\">\n <lib-text-common class=\"label right\">{{ label }}</lib-text-common>\n </div>\n\n</div>\n","import { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\n@Component({\n selector: \"lib-vitu-form-field-switch\",\n templateUrl: \"./vitu-form-field-switch.component.html\",\n styleUrls: [\"./vitu-form-field-switch.component.less\"],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n multi:true,\n useExisting: VituFormFieldSwitchComponent\n }\n ]\n})\nexport class VituFormFieldSwitchComponent implements ControlValueAccessor, OnInit {\n\n @Input() label = \"\";\n @Input() useSlider = true;\n\n @Output() changed = new EventEmitter<boolean>();\n\n onChange = (value: any) => {};\n\n onTouched = () => {};\n\n touched = false;\n checked = false;\n disabled = false;\n\n formControlName: any;\n\n labelBefore: boolean;\n\n ngOnInit(): void {\n this.labelBefore = !this.useSlider;\n }\n\n onToggled(checked: boolean) {\n this.checked = checked;\n this.markAsTouched();\n this.onChange(this.checked);\n this.changed.emit(this.checked);\n }\n\n // from ControlValueAccessor\n writeValue(value: any) {\n this.checked = value;\n }\n\n // from ControlValueAccessor\n registerOnChange(onChange: any) {\n this.onChange = onChange;\n }\n\n // from ControlValueAccessor\n registerOnTouched(onTouched: any) {\n this.onTouched = onTouched;\n }\n\n // from ControlValueAccessor\n setDisabledState(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n private markAsTouched() {\n if (!this.touched) {\n this.onTouched();\n this.touched = true;\n }\n }\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { MatSlideToggleModule } from \"@angular/material/slide-toggle\";\nimport { VituSlideToggleComponent } from \"./vitu-slide-toggle.component\";\n\n@NgModule({\n declarations: [\n VituSlideToggleComponent\n ],\n imports: [\n CommonModule,\n MatSlideToggleModule\n ],\n exports: [\n VituSlideToggleComponent\n ]\n})\nexport class VituSlideToggleModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { MatFormFieldModule } from \"@angular/material/form-field\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { VituFormFieldSwitchComponent } from \"./vitu-form-field-switch.component\";\nimport { MatCheckboxModule } from \"@angular/material/checkbox\";\nimport { TextCommonModule } from \"../../../text\";\nimport { VituSlideToggleModule } from \"../../../vitu-slide-toggle\";\n\n@NgModule({\n declarations: [\n VituFormFieldSwitchComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n MatFormFieldModule,\n VituSlideToggleModule,\n MatCheckboxModule,\n TextCommonModule\n ],\n exports: [\n VituFormFieldSwitchComponent\n ]\n})\nexport class VituFormFieldSwitchModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\nimport { TwoDigitDecimalNumberDirective } from \"./two-digit-decimal-number-directive\";\nimport { VituFormFieldDateComponent } from \"./vitu-form-field-date/vitu-form-field-date.component\";\nimport { VituFormFieldInputComponent } from \"./vitu-form-field-input/vitu-form-field-input.component\";\nimport { VituFormFieldSelectComponent } from \"./vitu-form-field-select/vitu-form-field-select.component\";\nimport { MatFormFieldModule } from \"@angular/material/form-field\";\nimport { SpaceBetweenCapsModule } from \"../../space-between-caps\";\nimport { MatIconModule } from \"@angular/material/icon\";\nimport { DateInputsModule } from \"../../date-time\";\nimport { DisableControlDirective } from \"./disable-control.directive\";\nimport { MatOptionModule, MatRippleModule } from \"@angular/material/core\";\nimport { IMaskModule } from \"angular-imask\";\nimport { MatSelectModule } from \"@angular/material/select\";\nimport { MatInputModule } from \"@angular/material/input\";\nimport { MatButtonModule } from \"@angular/material/button\";\nimport { MatButtonToggleModule } from \"@angular/material/button-toggle\";\nimport { VituInputModule } from \"../../vitu-input\";\nimport { VituFormFieldSwitchModule } from \"./vitu-form-field-switch\";\nimport { VituTooltipModule } from \"../../tooltip\";\nimport { DecimalNumberDirective } from \"./decimal-number-directive\";\n\n@NgModule({\n declarations: [\n DecimalNumberDirective,\n TwoDigitDecimalNumberDirective,\n DisableControlDirective,\n VituFormFieldDateComponent,\n VituFormFieldInputComponent,\n VituFormFieldSelectComponent\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatFormFieldModule,\n SpaceBetweenCapsModule,\n MatIconModule,\n DateInputsModule,\n MatOptionModule,\n MatSelectModule,\n MatInputModule,\n IMaskModule,\n MatButtonToggleModule,\n MatButtonModule,\n MatRippleModule,\n VituInputModule,\n VituFormFieldSwitchModule,\n VituTooltipModule\n ],\n exports: [\n DecimalNumberDirective,\n TwoDigitDecimalNumberDirective,\n DisableControlDirective,\n VituFormFieldDateComponent,\n VituFormFieldInputComponent,\n VituFormFieldSelectComponent,\n VituFormFieldSwitchModule\n ]\n})\nexport class VituFormFieldModule { }\n","<lib-busy-indicator *ngIf=\"data?.show\" [alwaysInFront]=\"true\">\n</lib-busy-indicator>\n","import { Component, HostListener, OnDestroy } from \"@angular/core\";\nimport { Subscription } from \"rxjs\";\nimport { GlobalSpinnerData, GlobalSpinnerService } from \"./global-spinner.service\";\n\n@Component({\n selector: \"lib-global-spinner\",\n templateUrl: \"./global-spinner.component.html\"\n})\nexport class GlobalSpinnerComponent implements OnDestroy {\n\n private subscription = new Subscription();\n data: GlobalSpinnerData;\n\n constructor(private globalSpinner: GlobalSpinnerService) {\n this.subscription.add(globalSpinner.data$.subscribe(data => {\n this.data = data;\n }));\n }\n\n ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n\n @HostListener(\"document:keydown\", [\"$event\"])\n handleKeyboardEvent(event: KeyboardEvent) {\n /* DISABLE ALL KEY EVENTS BEHIND MODAL IF IT IS SHOWN */\n /* (NOTE THAT MOUSE EVENTS WILL BE BLOCKED IF NECESSARY TEMPLATE UNDER LAYER) */\n if (this.data.show) {\n event.returnValue = false;\n event.preventDefault();\n event.stopPropagation();\n }\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { GlobalSpinnerComponent } from \"./global-spinner.component\";\nimport { BusyIndicatorModule } from \"../busy-indicator/busy-indicator.module\";\n\n@NgModule({\n declarations: [\n GlobalSpinnerComponent,\n ],\n imports: [\n CommonModule,\n BusyIndicatorModule\n ],\n exports: [\n GlobalSpinnerComponent\n ]\n})\nexport class GlobalSpinnerModule { }\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"lib-modal-error-message\",\n templateUrl: \"./modal-error-message.component.html\",\n styleUrls: [\"./modal-error-message.component.less\"],\n})\nexport class ModalErrorMessageComponent {\n\n @Input() message: string;\n\n}\n","<div class=\"outerContainer\">\n <i class=\"far fa-exclamation-triangle errorIcon\"></i>\n <span class=\"errorMessage\">{{message}}</span>\n</div>\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { ModalErrorMessageComponent } from \"./modal-error-message.component\";\n\n@NgModule({\n declarations: [\n ModalErrorMessageComponent\n ],\n imports: [\n CommonModule\n ],\n exports: [\n ModalErrorMessageComponent\n ]\n})\nexport class ModalErrorMessageModule { }\n","<div class=\"outer-container\" [ngClass]=\"{'disabled': disabled}\">\n\n <button mat-stroked-button\n class=\"switch-to-page-button\"\n (click)=\"onClickPrevPage()\"\n [ngClass]=\"{'disabled': disabled || (prevPage === null)}\">\n <span><i class=\"far fa-arrow-left\"></i></span>\n </button>\n\n <button mat-stroked-button\n *ngIf=\"firstPageButtonVisible()\"\n class=\"switch-to-page-button\"\n (click)=\"onClickChangeToPage(1)\"\n [ngClass]=\"{'disabled': disabled}\">\n <span>1</span>\n </button>\n\n <span *ngIf=\"firstPageButtonSeparatorVisible()\">...</span>\n\n <ng-container *ngFor=\"let pg of pages\">\n <button mat-stroked-button\n class=\"current-page-button\"\n [disabled]=\"true\"\n *ngIf=\"pg === page; else showClickableBtn\"\n color=\"primary\">\n <span>{{ pg }}</span>\n </button>\n <ng-template #showClickableBtn>\n <button mat-stroked-button\n class=\"switch-to-page-button\"\n (click)=\"onClickChangeToPage(pg)\"\n [ngClass]=\"{'disabled': disabled}\">\n <span>{{ pg }}</span>\n </button>\n </ng-template>\n </ng-container>\n\n <button mat-stroked-button\n class=\"switch-to-page-button\"\n (click)=\"onClickNextPage()\"\n [ngClass]=\"{'disabled': disabled || (nextPage === null)}\">\n <span><i class=\"far fa-arrow-right\"></i></span>\n </button>\n\n</div>\n","import * as E from \"linq\";\nimport { Component, Input, OnChanges, Output, EventEmitter } from \"@angular/core\";\n\n@Component({\n selector: \"lib-pager\",\n templateUrl: \"./pager.component.html\",\n styleUrls: [\"./pager.component.less\"],\n})\nexport class PagerComponent implements OnChanges {\n\n @Input() page: number;\n @Input() pageCount: number;\n @Input() morePagesMode: boolean;\n @Input() disabled: boolean;\n\n @Output() pageChanged = new EventEmitter<number>();\n\n pages: number[];\n\n ngOnChanges() {\n\n if (this.morePagesMode) {\n this.calculatePagesInMoreMode();\n }\n else {\n this.calculatePagesInTotalMode();\n }\n }\n\n firstPageButtonVisible() {\n\n return this.pages.length > 0\n && this.pages[0] > 1;\n }\n\n firstPageButtonSeparatorVisible() {\n\n return this.pages.length > 0\n && this.pages[0] > 2;\n }\n\n onClickChangeToPage(page: number) {\n if (!this.disabled) {\n this.pageChanged.emit(page);\n }\n }\n\n onClickPrevPage() {\n if (!this.disabled) {\n const prev = this.prevPage;\n if (prev !== null) {\n this.pageChanged.emit(prev);\n }\n }\n }\n\n onClickNextPage() {\n if (!this.disabled && this.pages.length) {\n const next = this.nextPage;\n if (next !== null) {\n this.pageChanged.emit(next);\n }\n }\n }\n\n get prevPage(): number | null {\n let retVal = null;\n const prevPage = Math.max(1, this.page - 1);\n if (prevPage !== this.page) {\n retVal = prevPage;\n }\n return retVal;\n }\n\n get nextPage(): number | null {\n let retVal = null;\n if (this.pages.length) {\n const lastPageShown = this.pages[this.pages.length - 1];\n const nextPage = Math.min(this.page + 1, lastPageShown);\n if (nextPage !== this.page) {\n retVal = nextPage;\n }\n }\n return retVal;\n }\n\n private calculatePagesInMoreMode() {\n\n const currentPage = this.page;\n const numberOfPages = this.pageCount;\n\n const delta = 1;\n const maxDelta = delta * 2;\n\n const leftDelta = Math.min(\n numberOfPages <= delta ? maxDelta - numberOfPages + 1 : delta,\n currentPage - 1\n );\n\n const rightDelta = Math.min(\n currentPage <= delta ? maxDelta - currentPage + 1 : delta,\n numberOfPages - 1\n );\n\n this.pages = E.range(currentPage - leftDelta, rightDelta + leftDelta + 1, 1).toArray();\n }\n\n private calculatePagesInTotalMode(): void {\n\n const currentPage = this.page;\n const numberOfPages = this.pageCount;\n\n const delta = 1;\n const maxDelta = delta * 2;\n\n let pages = [];\n if (numberOfPages > 0) {\n const maxPage = Math.min(Math.max(currentPage + delta, maxDelta + 1), numberOfPages);\n const minPage = Math.max(1, maxPage - maxDelta);\n pages = E.range(minPage, maxPage - minPage + 1, 1).toArray();\n }\n\n this.pages = pages;\n }\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { PagerComponent } from \"./pager.component\";\n\n@NgModule({\n declarations: [\n PagerComponent,\n ],\n imports: [\n CommonModule\n ],\n exports: [\n PagerComponent\n ]\n})\nexport class PagerModule { }\n","<div *ngIf=\"status\" class=\"outer-container\">\n {{ status | spaceBetweenCaps }}\n</div>\n","import { Component, HostBinding, Input } from \"@angular/core\";\n\n@Component({\n selector: \"lib-status-chip\",\n templateUrl: \"./status-chip.component.html\",\n styleUrls: [\"./status-chip.component.less\"],\n})\nexport class StatusChipComponent {\n\n /*\n * Notes on use:\n * Need to set the 'class' on the host (lib-status-chip) element to get the desired background color for chip in various statuses.\n * The status will be folded to lowercase in order to do this, and spaces will be replaced with dash chars.\n * eg. A status of 'No Funding' will require a class of 'no-funding' to be applied.\n * If it can't match the background to the status the chip background color will fallback to black.\n */\n\n @HostBinding(\"class\") hostClass;\n\n @Input() set status(value: string) {\n this._status = value;\n if (typeof this.status === \"string\") {\n this.hostClass = this.status?.toLowerCase().split(\" \").join(\"-\");\n }\n };\n get status(): string {\n return this._status;\n }\n\n _status: string;\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { StatusChipComponent } from \"./status-chip.component\";\nimport { SpaceBetweenCapsModule } from \"../space-between-caps\";\n\n@NgModule({\n declarations: [\n StatusChipComponent\n ],\n imports: [\n CommonModule,\n SpaceBetweenCapsModule\n ],\n exports: [\n StatusChipComponent\n ]\n})\nexport class StatusChipModule { }\n","import { Directive, ElementRef, Input, OnInit } from \"@angular/core\";\n\n@Directive({\n selector: \"[libColumnFlexDirective]\"\n})\nexport class ColumnFlexDirective implements OnInit {\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input(\"libColumnFlexDirective\") flex: string;\n\n constructor(private el: ElementRef) {}\n\n ngOnInit() {\n this.el.nativeElement.style.flex = this.flex;\n }\n\n}\n","<div #outerContainer class=\"outer-container\">\n\n <div class=\"inner-container\">\n <ng-container *ngIf=\"!rowsDataLoading && emptyRowsData && !rowsDataError then emptyRows\"></ng-container>\n <ng-container *ngIf=\"!rowsDataLoading && rowsDataError then errorRows\"></ng-container>\n <ng-container *ngIf=\"(rowsDataShowWhileLoading || !rowsDataLoading) && !rowsDataError && rowsData?.length then table\"></ng-container>\n <ng-container *ngIf=\"rowsDataLoading then spinner\"></ng-container>\n </div>\n\n <div #pagerContainer *ngIf=\"pager && rowsData?.length && moreThanOnePage && !rowsDataError\" class=\"pager-container\">\n <lib-pager\n [disabled]=\"rowsDataLoading\"\n [page]=\"pager.page\"\n [pageCount]=\"pager.pageCount\"\n [morePagesMode]=\"pager.morePagesMode\"\n (pageChanged)=\"onPageChanged($event)\">\n </lib-pager>\n </div>\n\n</div>\n\n<ng-template #table>\n <div class=\"table-container\">\n\n <div #tableVerticalScrollContainer class=\"table-inner-container\" [ngClass]=\"{ 'apply-vert-scrollbar-to-table': usesVertScrollbar }\">\n <mat-table #materialTable [dataSource]=\"rowsDataForDisplay\" class=\"table\"\n matSort [matSortActive]=\"sortOrderBy\" [matSortDirection]=\"sortDirection\" (matSortChange)=\"onSortChanged($event)\">\n\n <ng-container *ngFor=\"let columnId of columnIds; let idx = index\" [matColumnDef]=\"columnId\">\n <mat-cell class=\"vitu-table-cell\" #tableCell *matCellDef=\"let element; let pageRowIndex = index\" [libColumnFlexDirective]=\"getFlexForColumn(columnId)\">\n <div class=\"cell-container\">\n <!-- DYNAMIC PROJECTION OF CELL CONTENT TEMPLATE -->\n <ng-template *ngTemplateOutlet=\"templateRef; context : {columnId : columnId, element : element, pageRowIndex: pageRowIndex}\">\n </ng-template>\n </div>\n </mat-cell>\n\n <mat-header-cell *matHeaderCellDef mat-sort-header [disabled]=\"!canSortColumn(columnId, idx)\" [libColumnFlexDirective]=\"getFlexForColumn(columnId)\">\n <div>\n <span>\n {{ getTitleForColumn(columnId) }}\n </span>\n <lib-vitu-tooltip\n *ngIf=\"!!getInfoTipForColumn(columnId)\"\n [text]=\"getInfoTipForColumn(columnId)\">\n <i class=\"far fa-info-circle\"></i> \n </lib-vitu-tooltip>\n </div>\n </mat-header-cell>\n </ng-container>\n\n <mat-row class=\"vitu-table-row\" #tableRow *matRowDef=\"let row; columns: columnIds; let pageRowIndex = index\"\n (mousedown)=\"onRowMouseDown($event)\" (mouseup)=\"onRowMouseUp($event, row, pageRowIndex)\"\n [ngClass]=\"{'highlight-row': isRowSelected(row)}\"\n [ngStyle]=\"{'min-width': minimumTotalColumnWidthInPixels + 'px' }\">\n </mat-row>\n\n <mat-header-row #headerRow *matHeaderRowDef=\"columnIds; sticky: true\"\n [ngStyle]=\"{'min-width': minimumTotalColumnWidthInPixels + 'px' }\">\n </mat-header-row>\n\n </mat-table>\n </div>\n </div>\n</ng-template>\n\n<ng-template #spinner>\n <lib-busy-indicator>\n </lib-busy-indicator>\n</ng-template>\n\n<ng-template #emptyRows>\n <div class=\"centered-message\">\n {{rowsDataEmptyMessage}}\n </div>\n</ng-template>\n\n<ng-template #errorRows>\n <div class=\"centered-message\">\n <div class=\"error-mesage-container\">\n <div>{{rowsDataErrorMessage}}</div>\n <!-- <div class=\"error-message-details\">{{ \"( \" + rowsDataError?.message + \" )\"}}</div> -->\n </div>\n </div>\n</ng-template>\n","import { Component, Input, Output, EventEmitter, OnInit, ContentChild,\n TemplateRef, ViewChildren, QueryList, ViewContainerRef, ViewChild,\n ChangeDetectorRef, AfterViewChecked, OnChanges, SimpleChanges, ElementRef } from \"@angular/core\";\nimport { Sort, SortDirection } from \"@angular/material/sort\";\nimport { Pager } from \"../misc/pager\";\n\nexport interface ColumnDef {\n id: string;\n title: string;\n flexWidthBasisInPixels: number;\n flexWidthGrow: number;\n canSort?: boolean;\n infoTip?: string;\n}\n\nexport interface TableSorting {\n orderBy: null | string;\n // Workaround : Angular library can't reference files outside its root so can't use OrderDirectionEnum type\n // (NOTE: Could resolve this issue by moving required model into further shared library)\n orderDirection: null | any;\n}\n\nexport enum TableScrollIntoViewMode {\n CenterWithinView,\n BringWithinViewAtNearestSide\n}\n\n@Component({\n selector: \"lib-table-base\",\n templateUrl: \"./table-base.component.html\",\n styleUrls: [\"./table-base.component.less\"],\n})\nexport class TableBaseComponent implements OnInit, OnChanges, AfterViewChecked {\n\n @Input() columnDefs: ColumnDef[] = null;\n\n @Input() set rowsData(value: any[]) {\n this._rowsData = value;\n this.resetInternalSorting();\n }\n get rowsData() {\n return this._rowsData;\n }\n\n @Input() rowsDataLoading = false;\n @Input() rowsDataError: Error;\n @Input() rowsDataEmptyMessage = \"No Results Found\";\n @Input() rowsDataErrorMessage = \"Error Loading Results\";\n @Input() rowsDataShowWhileLoading = false;\n\n @Input() selectedRowProperty: string = null;\n @Input() selectedRowValue = null;\n\n @Input() sorting: TableSorting;\n @Input() pager: Pager;\n\n @Output() pageChanged = new EventEmitter<number>();\n @Output() sortingChanged = new EventEmitter<TableSorting>();\n @Output() rowSelected = new EventEmitter<any>();\n\n @ContentChild(TemplateRef) templateRef: TemplateRef<any>;\n\n @ViewChild(\"outerContainer\", {read: ViewContainerRef}) outerContainer: ViewContainerRef;\n @ViewChild(\"tableVerticalScrollContainer\", {read: ViewContainerRef}) tableVerticalScrollContainer: ViewContainerRef;\n @ViewChild(\"materialTable\", {read: ViewContainerRef}) materialTable: ViewContainerRef;\n @ViewChild(\"pagerContainer\", {read: ViewContainerRef}) pagerContainer: ViewContainerRef;\n @ViewChild(\"headerRow\", {read: ViewContainerRef}) headerRow: ViewContainerRef;\n @ViewChildren(\"tableCell\", {read: ViewContainerRef}) tableCells: QueryList<ViewContainerRef>;\n @ViewChildren(\"tableRow\", {read: ViewContainerRef}) tableRows: QueryList<ViewContainerRef>;\n\n minRequiredHeightInPixels: number;\n _rowsData: any[];\n\n internalSortingDirection: SortDirection;\n internalSortingOrderBy: string;\n internalSortingModel: object;\n\n get internalSorting(): boolean {\n return (!this.sorting && !this.pager);\n }\n\n get moreThanOnePage(): boolean {\n return this.pager && ((this.pager.page > 1) || (this.pager.pageCount > 1));\n }\n\n scrollRowIntoViewIfNecessary = (rowIndex: number, mode = TableScrollIntoViewMode.CenterWithinView): boolean => {\n\n let didScroll = false;\n\n // NOTE: Can't use tableRows ViewContainerRef here as it can't guarantee proper order after sorting!\n const materialTableElement = this.materialTable?.element?.nativeElement;\n const rows = materialTableElement?.getElementsByClassName(\"vitu-table-row\");\n\n if (!rows?.length || !((rowIndex >= 0) && (rowIndex < rows.length))) {\n return didScroll;\n }\n\n const rowElement = rows[rowIndex];\n\n const containerElement = this.tableVerticalScrollContainer.element.nativeElement;\n const rowElementRect = rowElement.getBoundingClientRect();\n const containerElementRect = containerElement.getBoundingClientRect();\n\n const headerElement = this.headerRow?.element?.nativeElement;\n const headerElementHeight = headerElement ? headerElement.offsetHeight : 0;\n\n switch (mode) {\n case TableScrollIntoViewMode.CenterWithinView:\n {\n const rowElementMidY = rowElementRect.top + (rowElementRect.height / 2);\n const containerElementMidY = containerElementRect.top + (containerElementRect.height / 2) + (headerElementHeight / 2);\n const rowElementScrollTopDelta = rowElementMidY - containerElementMidY;\n containerElement.scrollTop = containerElement.scrollTop + rowElementScrollTopDelta;\n didScroll = (rowElementScrollTopDelta !== 0);\n break;\n }\n case TableScrollIntoViewMode.BringWithinViewAtNearestSide:\n {\n let yDelta = rowElementRect.bottom - containerElementRect.bottom;\n\n // Target is outside the viewport from the bottom\n if (yDelta >= 1) {\n // The bottom of the target will be aligned to the bottom of the visible area of the scrollable ancestor.\n containerElement.scroll({\n top: containerElement.scrollTop + yDelta,\n behavior: \"smooth\"\n });\n didScroll = true;\n }\n // Target is outside the view from the top\n if (!didScroll) {\n yDelta = (containerElementRect.top + headerElementHeight) - rowElementRect.top;\n if (yDelta >= 1) {\n // The top of the target will be aligned to the top of the visible area of the scrollable ancestor\n containerElement.scroll({\n top: containerElement.scrollTop - yDelta,\n behavior: \"smooth\"\n });\n didScroll = true;\n }\n }\n break;\n }\n }\n\n return didScroll;\n };\n\n usesVertScrollbar = false;\n\n ngOnChanges(changes: SimpleChanges) {\n for (const propName in changes) {\n if (changes.hasOwnProperty(propName)) {\n switch (propName) {\n case \"rowsData\": {\n this.scrollTableToTop();\n }\n }\n }\n }\n }\n\n ngAfterViewChecked() {\n this.calculateIfScrollbarRequired();\n this.calculateMinRequiredHeight();\n this.cd.detectChanges();\n }\n\n constructor(private cd: ChangeDetectorRef, private elementRef: ElementRef) {\n this.resetInternalSorting();\n }\n\n private mouseDownX: number;\n private mouseDownY: number;\n\n columnIds: string[];\n minimumTotalColumnWidthInPixels: number;\n filterVisible: boolean;\n\n get rowsDataForDisplay(): any[] {\n\n if (!this.internalSorting || !this.internalSortingOrderBy ||\n ((this.internalSortingDirection !== \"asc\") && (this.internalSortingDirection !== \"desc\"))) {\n return this.rowsData;\n }\n\n const sortedColumnCells = this.internalSortingModel[this.internalSortingOrderBy][this.internalSortingDirection];\n const sortedRowsData = [];\n sortedColumnCells.forEach(sortedColumnCell => sortedRowsData.push(this.rowsData[sortedColumnCell.index]));\n return sortedRowsData;\n }\n\n get sortOrderBy() {\n\n if (this.internalSorting) {\n return this.internalSortingOrderBy;\n }\n\n return this.sorting?.orderBy;\n }\n\n get sortDirection() {\n\n if (this.internalSorting) {\n return this.internalSortingDirection;\n }\n\n return this.sorting?.orderDirection?.toLowerCase() as SortDirection;\n }\n\n onSortChanged(sort: Sort) {\n\n if (this.internalSorting) {\n if (!this.rowsData || !this.tableCells) {\n return;\n }\n if (!this.internalSortingModel) {\n this.createInternalSortingModel();\n }\n this.internalSortingOrderBy = sort.active;\n this.internalSortingDirection = sort.direction;\n return;\n }\n\n // Workaround : Angular library can't reference files outside its root so can't use OrderDirectionEnum type\n // (NOTE: Could resolve this issue by moving required model into further shared library)\n const direction = ((sort.direction.length > 0) ? sort.direction.charAt(0).toUpperCase() +\n sort.direction.slice(1) : \"\");\n const newSorting: TableSorting = {\n orderBy: sort.active,\n orderDirection: direction\n };\n this.sortingChanged.emit(newSorting);\n }\n\n ngOnInit() {\n this.columnIds = this.columnDefs.map(columnDef => columnDef.id);\n this.calcMinimumTotalColumnWidthInPixels();\n }\n\n getTitleForColumn(columnId: string): string {\n const matchedColumnDef = this.columnDefs.find(columnDef => (columnDef.id === columnId));\n return matchedColumnDef.title;\n }\n\n getInfoTipForColumn(columnId: string): string {\n const matchedColumnDef = this.columnDefs.find(columnDef => (columnDef.id === columnId));\n return matchedColumnDef.infoTip;\n }\n\n getFlexForColumn(columnId: string): string {\n const matchedColumnDef = this.columnDefs.find(columnDef => (columnDef.id === columnId));\n return `${matchedColumnDef.flexWidthGrow} 0 ${matchedColumnDef.flexWidthBasisInPixels}px`;\n }\n\n canSortColumn(columnId: string, index: number) {\n const matchedColumnDef = this.columnDefs.find(columnDef => (columnDef.id === columnId));\n return (matchedColumnDef.title?.length) && !!matchedColumnDef.canSort;\n }\n\n isRowSelected(row: any) {\n return (this.selectedRowValue === (this.selectedRowProperty ? row[this.selectedRowProperty] : row));\n }\n\n onPageChanged(page: number) {\n this.pageChanged.emit(page);\n }\n\n onRowMouseDown(event: MouseEvent) {\n this.mouseDownX = event.x;\n this.mouseDownY = event.y;\n }\n\n onRowMouseUp(event: MouseEvent, row: any, rowIndex: number) {\n const didScroll = this.scrollRowIntoViewIfNecessary(rowIndex, TableScrollIntoViewMode.BringWithinViewAtNearestSide);\n if (!didScroll) {\n const mousePositionTolerance = 3;\n if ((event.button === 0) &&\n (Math.abs(event.x - this.mouseDownX) < mousePositionTolerance) &&\n (Math.abs(event.y - this.mouseDownY) < mousePositionTolerance)) {\n this.rowSelected.emit(this.selectedRowProperty ? row[this.selectedRowProperty] : row);\n }\n }\n }\n\n get emptyRowsData(): boolean {\n return !this.rowsData || (Array.isArray(this.rowsData) && !this.rowsData.length);\n }\n\n private calcMinimumTotalColumnWidthInPixels(): void {\n let value = 0;\n this.columnDefs.forEach(columnDef => value += columnDef.flexWidthBasisInPixels);\n this.minimumTotalColumnWidthInPixels = value;\n }\n\n private scrollTableToTop(): void {\n const tableContainer = this.tableVerticalScrollContainer?.element?.nativeElement;\n if (tableContainer) {\n tableContainer.scrollTop = 0;\n }\n }\n\n private calculateIfScrollbarRequired() {\n this.usesVertScrollbar = false;\n const containerElement = this.tableVerticalScrollContainer?.element?.nativeElement;\n if (containerElement) {\n const scrollDeltaY = containerElement.scrollHeight - containerElement.offsetHeight;\n if (scrollDeltaY > 0) {\n this.usesVertScrollbar = true;\n }\n }\n }\n\n private calculateMinRequiredHeight() {\n // NOTE: not currently sensistive to a client of table-base which would apply padding\n // to host element (as that could give extra height)\n const containerElement = this.tableVerticalScrollContainer?.element?.nativeElement;\n const materialTableElement = this.materialTable?.element?.nativeElement;\n const pagerContainerElement = this.pagerContainer?.element?.nativeElement;\n if (containerElement && materialTableElement) {\n this.minRequiredHeightInPixels = materialTableElement.offsetHeight;\n if (pagerContainerElement) {\n this.minRequiredHeightInPixels += pagerContainerElement.offsetHeight;\n }\n }\n }\n\n private resetInternalSorting(): void {\n if (this.internalSorting) {\n this.internalSortingDirection = \"\";\n this.internalSortingOrderBy = null;\n this.internalSortingModel = null;\n }\n }\n\n private createInternalSortingModel(): void {\n this.internalSortingModel = {};\n this.columnDefs?.forEach((columnDef) => {\n this.internalSortingModel[columnDef.id] = {};\n this.attachInternalSortingModel(this.internalSortingModel[columnDef.id], columnDef.id, \"asc\");\n this.attachInternalSortingModel(this.internalSortingModel[columnDef.id], columnDef.id, \"desc\");\n });\n }\n\n private attachInternalSortingModel(model: any, orderBy: string, direction: string) {\n\n const columnIndex = this.columnDefs.findIndex(columnDef => columnDef.id === orderBy);\n const columnCount = this.columnDefs.length;\n\n // NOTE: Can't use tableCells ViewContainerRef here as it can't guarantee proper order after sorting!\n const materialTableElement = this.materialTable?.element?.nativeElement;\n const cells = materialTableElement?.getElementsByClassName(\"vitu-table-cell\");\n\n const columnCells = [];\n Array.from(cells).forEach((cell, index) => {\n if (index % columnCount === columnIndex) {\n columnCells.push(cell);\n }\n });\n\n const unsortedColumnCells = columnCells.map((columnCell: any, index) => {\n let cellKey = columnCell.textContent?.trim(); // useful to trim\n const cellHtml = columnCell.innerHTML;\n const columnSortingKey = cellHtml.match(/START_TABLE_COLUMN_SORTING_KEY_(.*?)_END_TABLE_COLUMN_SORTING_KEY/);\n if (Array.isArray(columnSortingKey) && (columnSortingKey.length > 0)) {\n cellKey = parseFloat(columnSortingKey[1]);\n }\n return ({index, cellKey});\n });\n\n const sortedColumnCells = unsortedColumnCells.sort((a: any, b: any) => this.compareItems(a, b, direction === \"asc\"));\n model[direction] = sortedColumnCells;\n }\n\n private compareItems(a: any, b: any, isAsc: boolean): number {\n\n let valueA = a.cellKey;\n let valueB = b.cellKey;\n\n // Ensure case insensitive comparison (for string values)\n if (typeof valueA === \"string\") {\n valueA = valueA.toLowerCase();\n }\n if (typeof valueB === \"string\") {\n valueB = valueB.toLowerCase();\n }\n\n if (valueA > valueB) {\n return isAsc ? 1 : -1;\n }\n else if (valueA < valueB) {\n return isAsc ? -1 : 1;\n }\n else {\n return 0;\n }\n }\n\n}\n","<div *ngIf=\"keyValid\" style=\"display: none;\">\n {{ \"START_TABLE_COLUMN_SORTING_KEY_\" + key + \"_END_TABLE_COLUMN_SORTING_KEY\" }}\n</div>\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"lib-table-column-sort\",\n templateUrl: \"./table-column-sort.component.html\",\n styleUrls: [\"./table-column-sort.component.less\"],\n})\nexport class TableColumnSortComponent {\n\n @Input() key: number;\n\n get keyValid(): boolean {\n return (this.key != null) && (typeof this.key === \"number\");\n }\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { MatTableModule } from \"@angular/material/table\";\nimport { MatSortModule } from \"@angular/material/sort\";\n\nimport { TableBaseComponent } from \"./table-base.component\";\nimport { ColumnFlexDirective } from \"./column-flex-directive\";\nimport { BusyIndicatorModule } from \"../busy-indicator/busy-indicator.module\";\nimport { PagerModule } from \"../pager/pager.module\";\nimport { TableColumnSortComponent } from \"./table-column-sort/table-column-sort.component\";\nimport { VituTooltipModule } from \"../tooltip\";\n\n@NgModule({\n declarations: [\n ColumnFlexDirective,\n TableColumnSortComponent,\n TableBaseComponent\n ],\n imports: [\n CommonModule,\n MatTableModule,\n MatSortModule,\n BusyIndicatorModule,\n PagerModule,\n VituTooltipModule\n ],\n exports: [\n TableBaseComponent,\n TableColumnSortComponent\n ]\n})\nexport class TableBaseModule { }\n","<div class=\"outer-container\">\n\n <div *ngIf=\"firstCrumb as crumb\" class=\"first-crumb-container\">\n\n <ng-container *ngIf=\"crumb.link; else activeCrumb\">\n <span class=\"breadcrumb-link\" [routerLink]=\"crumb.link\">{{ crumb.label }}</span>\n </ng-container>\n <ng-template #activeCrumb>\n <span class=\"breadcrumb-regular\">{{ crumb.label }}</span>\n </ng-template>\n <span *ngIf=\"crumbs?.length > 1\" class=\"breadcrumb-regular\">    >    </span>\n\n </div>\n\n <div *ngIf=\"crumbs?.length > 1\" class=\"other-crumbs-container\">\n\n <div class=\"other-crumbs-inner-container\">\n\n <ng-container *ngFor=\"let otherCrumb of otherCrumbs; let idx = index; let len = count\">\n\n <ng-container *ngIf=\"otherCrumb.link; else activeCrumbOther\">\n <span class=\"breadcrumb-link\" [routerLink]=\"otherCrumb.link\">{{ otherCrumb.label }}</span>\n </ng-container>\n <ng-template #activeCrumbOther>\n <span class=\"breadcrumb-regular\">{{ otherCrumb.label }}</span>\n </ng-template>\n <span *ngIf=\"idx < (len - 1)\" class=\"breadcrumb-regular\">    >    </span>\n\n </ng-container>\n\n </div>\n\n </div>\n\n</div>\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"lib-breadcrumbs\",\n templateUrl: \"./breadcrumbs.component.html\",\n styleUrls: [\"./breadcrumbs.component.less\"]\n})\nexport class BreadcrumbsComponent {\n\n // Workaround for Angular bug:\n // Need to pass crumbs as a string (not a plain object)\n // as otherwise the click events out of routerLink don't\n // fire inside ngFor when it has to access an object.\n // eg. see https://github.com/angular/angular/issues/44720.\n\n @Input() set crumbsStr(value: string) {\n this.crumbs = JSON.parse(value);\n }\n\n crumbs = [];\n\n get firstCrumb() {\n return (this.crumbs?.length > 0) ? this.crumbs[0] : null;\n }\n\n get otherCrumbs() {\n return (this.crumbs?.length > 1) ? this.crumbs.slice(1) : [];\n }\n\n}\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"lib-title-bar\",\n templateUrl: \"./title-bar.component.html\",\n styleUrls: [\"./title-bar.component.less\"]\n})\nexport class TitleBarComponent {\n\n @Input() crumbs = [];\n\n get crumbsStr() {\n return JSON.stringify(this.crumbs);\n }\n\n}\n","<div class=\"outer-container\">\n\n <lib-breadcrumbs class=\"breadcrumbs\" [crumbsStr]=\"crumbsStr\">\n </lib-breadcrumbs>\n\n <div class=\"buttons-container\">\n <ng-content></ng-content>\n </div>\n</div>\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { BreadcrumbsComponent } from \"./breadcrumbs.component\";\nimport { RouterModule } from \"@angular/router\";\n\n@NgModule({\n declarations: [\n BreadcrumbsComponent\n ],\n imports: [\n CommonModule,\n RouterModule\n ],\n exports: [\n BreadcrumbsComponent\n ]\n})\nexport class BreadcrumbsModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { TitleBarComponent } from \"./title-bar.component\";\nimport { RouterModule } from \"@angular/router\";\nimport { BreadcrumbsModule } from \"../breadcrumbs\";\n\n@NgModule({\n declarations: [\n TitleBarComponent\n ],\n imports: [\n CommonModule,\n RouterModule,\n BreadcrumbsModule\n ],\n exports: [\n TitleBarComponent\n ]\n})\nexport class TitleBarModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { MatSnackBarModule } from \"@angular/material/snack-bar\";\nimport { SnackBarContentComponent } from \"./snackbar-content.component/snackbar-content.component\";\nimport { ActionButtonModule } from \"../action-button\";\n\n@NgModule({\n declarations: [\n SnackBarContentComponent\n ],\n imports: [\n CommonModule,\n MatSnackBarModule,\n ActionButtonModule\n ]\n})\nexport class VituToastModule { }\n","\nexport enum FiltersMode {\n NONE = 0,\n BASIC = 1,\n ALL = 2\n}\n","<lib-multi-stage-expansion-panel [midStageSizesInPixels]=\"midStageSizesInPixels\" [stage]=\"filterMode\">\n\n <div class=\"expansion-panel-contents\">\n\n <div class=\"filters-title-line\" [ngClass]=\"{'filters-title-line-short': shortLayout}\">\n\n <div class=\"filters-title\">\n <div class=\"filters-title-image-container\"><i class=\"fas fa-sliders-h\"></i></div>\n <div>FILTERS</div>\n </div>\n\n <div [ngClass]=\"{'filters-short-container': shortLayout}\">\n <ng-container *ngIf=\"shortLayout then filtersBlock\">\n </ng-container>\n </div>\n\n <div class=\"filter-panel-buttons\"> \n <span *ngIf=\"moreFields?.length\">\n <lib-action-button *ngIf=\"filterMode !== FiltersMode.ALL; else showFewerFilters\"\n [kind]=\"ActionButtonKind.FILTER\"\n label=\"Show More Filters\"\n fontImage=\"far fa-chevron-down\"\n (click)=\"setFilterMode(FiltersMode.ALL)\">\n </lib-action-button>\n <ng-template #showFewerFilters>\n <lib-action-button\n [kind]=\"ActionButtonKind.FILTER\"\n label=\"Show Fewer Filters\"\n fontImage=\"far fa-chevron-up\"\n (click)=\"setFilterMode(FiltersMode.BASIC)\">\n </lib-action-button>\n </ng-template>\n </span>\n\n <lib-action-button\n [kind]=\"ActionButtonKind.FILTER\"\n [disabled]=\"!filtersDirty()\"\n label=\"Clear Filters\"\n fontImage=\"far fa-redo\"\n (click)=\"resetAllFields()\">\n </lib-action-button>\n </div>\n\n </div>\n\n <ng-container *ngIf=\"!shortLayout then filtersBlock\">\n </ng-container>\n\n <ng-template #filtersBlock>\n <form [formGroup]=\"filterForm\" class=\"form-container\" (keydown.enter)=\"$event.preventDefault()\">\n\n <div class=\"form-lines\">\n\n <ng-container *ngTemplateOutlet=\"basicFilters\"></ng-container>\n\n <div class=\"more-filters\" [ngClass]=\"{ 'more-filters-show': filterMode === FiltersMode.ALL }\">\n <ng-container *ngTemplateOutlet=\"moreFilters\"></ng-container>\n </div>\n\n </div>\n\n </form>\n </ng-template>\n\n </div>\n\n</lib-multi-stage-expansion-panel>\n\n<!--\n WORKAROUND:\n\n Material Icons have an issue where they display the text (eg. 'close')\n until the icon has been loaded the first time in the brower.\n Simple workaround for this graphical glitch is to load the required\n icon into an offscreen mat-icon.\n-->\n<div style=\"position: fixed; top: -100px; left: -100px;\">\n <mat-icon>close</mat-icon>\n</div>\n","import { AfterContentChecked, Component, ContentChild, ContentChildren,\n EventEmitter, Input, OnDestroy, OnInit, Output, QueryList } from \"@angular/core\";\nimport { FormControlName, UntypedFormGroup } from \"@angular/forms\";\nimport { Subscription } from \"rxjs\";\nimport { debounceTime, filter, distinctUntilChanged, skip } from \"rxjs/operators\";\nimport { ActionButtonKind } from \"../action-button\";\nimport { FiltersMode } from \"./filters-mode\";\nimport { isEqualWith } from \"lodash\";\n\nexport class FilterBase<Type> {\n _initialFilter: Type;\n}\n\nexport const createFilter = <Type>(c: new () => Type): Type => {\n const retVal = new c();\n (retVal as any)._initialFilter = new c();\n return retVal;\n};\n\n@Component({\n selector: \"lib-filters-base\",\n templateUrl: \"./filters-base.component.html\",\n styleUrls: [\"./filters-base.component.less\"],\n})\nexport class FiltersBaseComponent implements OnInit, AfterContentChecked, OnDestroy {\n\n @Input() filterForm: UntypedFormGroup;\n @Input() basicFiltersModeHeightInPixels = 118;\n\n @Input() set shortLayout(value: any) {\n this._shortLayout = !(value === false);\n };\n\n get shortLayout() {\n return this._shortLayout;\n }\n _shortLayout = false;\n\n set filterMode(value: FiltersMode) {\n this.setFilterMode(value);\n }\n get filterMode() {\n return this._filterMode;\n }\n _filterMode: FiltersMode;\n\n @Output() filterChanged = new EventEmitter<any>();\n\n @Input() filter: any;\n\n @Input() moreFields = [];\n\n // Typically use this attribute when the filters are on a page which sends out\n // a request for the data BEFORE the filters are set up (eg. within the page init\n // effect, for performance reasons) and we don't desire the same request to be\n // duplicated when the filters are subsequently initialized.\n @Input() set suppressInitialRequest(value: any) {\n this._suppressInitialRequest = !(value === false);\n };\n _suppressInitialRequest = false;\n\n @ContentChild(\"basicFilters\") basicFilters;\n @ContentChild(\"moreFilters\") moreFilters;\n @ContentChildren(FormControlName, {descendants: true}) formControlNames!: QueryList<FormControlName>;\n\n midStageSizesInPixels: number[];\n\n FiltersMode = FiltersMode;\n ActionButtonKind = ActionButtonKind;\n\n subscription: Subscription = new Subscription();\n\n resetFieldVisible(controlName: string) {\n\n const controlValue = this.filterForm.get(controlName).value;\n if (Array.isArray(controlValue) && !controlValue.length) {\n return false;\n }\n return controlValue;\n }\n\n resetField(controlName: string) {\n\n this.filterForm.get(controlName).reset();\n if (this.filter) {\n this.filterForm.get(controlName).patchValue(this.filter._initialFilter[controlName]);\n }\n }\n\n resetMoreFields() {\n\n if (this.filtersDirty(true)) {\n this.moreFields.forEach(moreField => {\n this.resetField(moreField);\n });\n }\n }\n\n resetAllFields() {\n\n if (this.filtersDirty()) {\n this.filterForm.reset();\n if (this.filter) {\n this.filterForm.patchValue(this.filter._initialFilter);\n }\n }\n }\n\n ngOnInit() {\n\n this.midStageSizesInPixels = [ this.basicFiltersModeHeightInPixels ];\n\n this.filterForm.patchValue(this.filter);\n\n const _initialFilter = this.filter?._initialFilter || {};\n\n this.subscription.add(this.filterForm.valueChanges\n .pipe(\n debounceTime(800),\n distinctUntilChanged(),\n filter(() => this.filterForm.valid),\n skip(this._suppressInitialRequest ? 1 : 0)\n )\n .subscribe((i) => {\n this.filterChanged.emit({ ...i, _initialFilter });\n }));\n\n this.setFilterMode(this.getRequiredFilterMode());\n }\n\n ngAfterContentChecked(): void {\n/*\n // AC_todo :\n // Be good to figure out how to filter the 'moreFields' automatically\n // instead of having to pass them as a parameter, but can't currently\n // figure out how to get ContentChildren UNDER a div (instead we only\n // have the entire set of basicFields + moreFields).\n\n this.formControlNames.forEach(formControlName => {\n console.log(`${formControlName.name}`);\n });\n*/\n }\n\n ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n\n getRequiredFilterMode(): FiltersMode {\n if (this.filtersDirty(true)) {\n return FiltersMode.ALL;\n }\n else {\n return FiltersMode.BASIC;\n }\n }\n\n setFilterMode(filterMode: FiltersMode) {\n\n if (filterMode === this.filterMode) {\n return;\n }\n\n switch (filterMode) {\n case FiltersMode.NONE: {\n this.resetAllFields();\n break;\n }\n case FiltersMode.BASIC: {\n if (this.filterMode === FiltersMode.ALL) {\n this.resetMoreFields();\n }\n break;\n }\n case FiltersMode.ALL: {\n break;\n }\n }\n\n this._filterMode = filterMode;\n }\n\n filtersDirty(onlyMoreFields = false): boolean {\n let count = 0;\n if (this.filter?._initialFilter) {\n Object.keys(this.filter._initialFilter).forEach(key => {\n if (!onlyMoreFields || (this.moreFields.indexOf(key) !== -1)) {\n if (!this.isEqual(this.filter[key], this.filter._initialFilter[key])) {\n ++count;\n }\n }\n });\n }\n return (count > 0);\n }\n\n private isEqual(value: any, other: any) {\n // Adjust standard 'isEqual' with extra condition(s) useful to filters:\n\n // For Multi-selection lists\n // 1. Equate [] and null.\n // 2. Equate [] and undefined.\n return isEqualWith(value, other, (a, b) => {\n if ((Array.isArray(a) && (a.length === 0)) && ((b === undefined) || (b === null))) {\n return ((b === undefined) || (b === null));\n }\n if ((Array.isArray(b) && (b.length === 0)) && ((a === undefined) || (a === null))) {\n return ((a === undefined) || (a === null));\n }\n });\n }\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { FiltersBaseComponent } from \"./filters-base.component\";\nimport { MatIconModule } from \"@angular/material/icon\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { ActionButtonModule } from \"../action-button\";\nimport { MultiStageExpansionPanelModule } from \"../multi-stage-expansion-panel\";\n\n@NgModule({\n declarations: [\n FiltersBaseComponent\n ],\n imports: [\n CommonModule,\n MatIconModule,\n FormsModule,\n ReactiveFormsModule,\n ActionButtonModule,\n MultiStageExpansionPanelModule\n ],\n exports: [\n FiltersBaseComponent\n ]\n})\nexport class FiltersBaseModule { }\n","<lib-vitu-tooltip *ngIf=\"isLocked\" text=\"Locked\">\n <i class=\"fas fa-lock global-table-cell-image-only user-status-locked\"></i>\n</lib-vitu-tooltip>\n<lib-vitu-tooltip *ngIf=\"!isLocked\" text=\"Unlocked\">\n <i class=\"far fa-lock-open global-table-cell-image-only user-status-unlocked\"></i>\n</lib-vitu-tooltip>\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"lib-user-status-icon\",\n templateUrl: \"./user-status-icon.component.html\",\n styleUrls: [\"./user-status-icon.component.less\"],\n})\nexport class UserStatusIconComponent {\n\n @Input() isLocked: boolean;\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { VituTooltipModule } from \"../tooltip\";\nimport { UserStatusIconComponent } from \"./user-status-icon.component\";\n\n@NgModule({\n declarations: [\n UserStatusIconComponent\n ],\n imports: [\n CommonModule,\n VituTooltipModule\n ],\n exports: [\n UserStatusIconComponent\n ]\n})\nexport class UserStatusIconModule { }\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"lib-transaction-status-chip\",\n templateUrl: \"./transaction-status-chip.component.html\",\n styleUrls: [\"./transaction-status-chip.component.less\"],\n})\nexport class TransactionStatusChipComponent {\n\n @Input() status: string;\n\n}\n","<lib-status-chip\n class=\"statuses\"\n [status]=\"status\">\n</lib-status-chip>\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { StatusChipModule } from \"../status-chip\";\nimport { TransactionStatusChipComponent } from \"./transaction-status-chip.component\";\n\n@NgModule({\n declarations: [\n TransactionStatusChipComponent\n ],\n imports: [\n CommonModule,\n StatusChipModule\n ],\n exports: [\n TransactionStatusChipComponent\n ]\n})\nexport class TransactionStatusChipModule { }\n","<i *ngIf=\"!value\" class=\"far fa-times-circle global-table-cell-image-only statuses status-no\"\n [ngClass]=\"{'statuses-reverse-colors': reverseColors, 'statuses-show-negative-only': showNegativeOnly, 'statuses-show-positive-only': showPositiveOnly}\"></i>\n<i *ngIf=\"value\" class=\"far fa-check-circle global-table-cell-image-only statuses status-yes\"\n [ngClass]=\"{'statuses-reverse-colors': reverseColors, 'statuses-show-negative-only': showNegativeOnly, 'statuses-show-positive-only': showPositiveOnly}\"></i>\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"lib-binary-status-icon\",\n templateUrl: \"./binary-status-icon.component.html\",\n styleUrls: [\"./binary-status-icon.component.less\"],\n})\nexport class BinaryStatusIconComponent {\n\n @Input() value: boolean;\n @Input() reverseColors: boolean;\n @Input() showNegativeOnly: boolean;\n @Input() showPositiveOnly: boolean;\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { BinaryStatusIconComponent } from \"./binary-status-icon.component\";\n\n@NgModule({\n declarations: [\n BinaryStatusIconComponent\n ],\n imports: [\n CommonModule\n ],\n exports: [\n BinaryStatusIconComponent\n ]\n})\nexport class BinaryStatusIconModule { }\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"lib-funding-item-status-chip\",\n templateUrl: \"./funding-item-status-chip.component.html\",\n styleUrls: [\"./funding-item-status-chip.component.less\"],\n})\nexport class FundingItemStatusChipComponent {\n\n @Input() status: string;\n\n}\n","<lib-status-chip\n class=\"statuses\"\n [status]=\"status\">\n</lib-status-chip>\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { StatusChipModule } from \"../status-chip\";\nimport { FundingItemStatusChipComponent } from \"./funding-item-status-chip.component\";\n\n@NgModule({\n declarations: [\n FundingItemStatusChipComponent\n ],\n imports: [\n CommonModule,\n StatusChipModule\n ],\n exports: [\n FundingItemStatusChipComponent\n ]\n})\nexport class FundingItemStatusChipModule { }\n","export class VituNumberFormatCommon {\n\n // arg1 : (optional) => pass \"showZero\" if you want to show zero values (i.e. \"0.00\")\n static transform(value: any, clipTrailingZeros = false, arg1?: string): string {\n let retVal = \"—\";\n if ((value === undefined) || (value === null)) {\n value = 0;\n }\n if (typeof value === \"number\") {\n let truncated = `${this.bankersRounding(value)}`;\n\n // Use toLocalString to add commas between thousands, etc.\n // (but only use it after this.bankersRounding(...), as we want rounding to be done by this.bankersRounding(...))\n truncated = parseFloat(truncated).toLocaleString(\"en-US\", { minimumFractionDigits: 2, maximumFractionDigits: 2 });\n\n if ((arg1 === \"showZero\") || (truncated !== \"0.00\")) {\n retVal = truncated;\n if (clipTrailingZeros && (retVal.length > 3)) {\n if (retVal.charAt(retVal.length - 1) === \"0\") {\n retVal = retVal.slice(0, retVal.length - 1); // get rid of trailing \"0\"\n }\n if (retVal.charAt(retVal.length - 1) === \"0\") {\n retVal = retVal.slice(0, retVal.length - 2); // get rid of trailing \".0\"\n }\n }\n }\n }\n else {\n throw new Error();\n }\n return retVal;\n }\n\n // Use accepted solution from http://stackoverflow.com/a/3109234\n // which is exact same implementation as within the 'bankers-rounding'\n // NPM module (see https://www.npmjs.com/package/bankers-rounding)\n private static bankersRounding(num, decimalPlaces = 2) {\n const d = decimalPlaces || 0;\n const m = Math.pow(10, d);\n const n = +(d ? num * m : num).toFixed(8);\n const i = Math.floor(n);\n const f = n - i;\n const e = 1e-8;\n const r = (f > 0.5 - e && f < 0.5 + e)\n ? ((i % 2 == 0) ? i : i + 1)\n : Math.round(n);\n return d ? r / m : r;\n }\n\n}\n\n","import { Pipe, PipeTransform } from \"@angular/core\";\nimport { VituNumberFormatCommon } from \"./vitu-number-format-common\";\n\n@Pipe({\n name: \"vituCurrency\"\n})\nexport class VituNumberFormatCurrencyPipe implements PipeTransform {\n\n // arg1 : (optional) => pass \"showZero\" if you want to show zero values (i.e. \"$ 0.00\")\n transform(value: any, arg1?: string): string {\n\n let retVal;\n\n try {\n retVal = `${VituNumberFormatCommon.transform(value, false, arg1)}`;\n }\n catch (error) {\n retVal = \"ERROR!\";\n }\n\n return retVal;\n }\n\n}\n\n","import { Pipe, PipeTransform } from \"@angular/core\";\nimport { VituNumberFormatCommon } from \"./vitu-number-format-common\";\n\n@Pipe({\n name: \"vituCurrencyUsd\"\n})\nexport class VituNumberFormatCurrencyUsdPipe implements PipeTransform {\n\n // arg1 : (optional) => pass \"showZero\" if you want to show zero values (i.e. \"$ 0.00\")\n transform(value: any, arg1?: string): string {\n\n let retVal;\n\n try {\n retVal = `$ ${VituNumberFormatCommon.transform(value, false, arg1)}`;\n }\n catch (error) {\n retVal = \"ERROR!\";\n }\n\n return retVal;\n }\n\n}\n\n","import { Pipe, PipeTransform } from \"@angular/core\";\nimport { VituNumberFormatCommon } from \"./vitu-number-format-common\";\n\n@Pipe({\n name: \"vituPercentage\"\n})\nexport class VituNumberFormatPercentagePipe implements PipeTransform {\n\n // arg1 : (optional) => pass \"showZero\" if you want to show zero values (i.e. \"0.00 %\")\n transform(value: any, arg1?: string): string {\n\n let retVal;\n\n try {\n retVal = VituNumberFormatCommon.transform(value, true, arg1);\n if (retVal !== \"—\") {\n retVal = `${retVal} %`;\n }\n }\n catch (error) {\n retVal = \"ERROR!\";\n }\n\n return retVal;\n }\n\n}\n\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { VituNumberFormatCurrencyPipe } from \"./vitu-number-format-currency.pipe\";\nimport { VituNumberFormatCurrencyUsdPipe } from \"./vitu-number-format-currency-usd.pipe\";\nimport { VituNumberFormatPercentagePipe } from \"./vitu-number-format-percentage.pipe\";\n\n@NgModule({\n declarations: [\n VituNumberFormatCurrencyPipe,\n VituNumberFormatCurrencyUsdPipe,\n VituNumberFormatPercentagePipe\n ],\n imports: [\n CommonModule\n ],\n exports: [\n VituNumberFormatCurrencyPipe,\n VituNumberFormatCurrencyUsdPipe,\n VituNumberFormatPercentagePipe\n ]\n})\nexport class VituNumberFormatModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { SwitchArrayComponent } from \"./switch-array.component\";\nimport { ActionButtonModule } from \"../action-button\";\nimport { MatCheckboxModule } from \"@angular/material/checkbox\";\nimport { MatFormFieldModule } from \"@angular/material/form-field\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\n@NgModule({\n declarations: [\n SwitchArrayComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n MatFormFieldModule,\n MatCheckboxModule,\n ActionButtonModule\n ],\n exports: [\n SwitchArrayComponent\n ]\n})\nexport class SwitchArrayModule { }\n","<div class=\"outer-container\">\n\n <div class=\"permissions-title\">\n {{ heading }}\n </div>\n\n <div class=\"switches-header\">\n <div></div>\n <div class=\"checkbox-container read-write-header\">\n {{ 'READ' }}\n </div>\n <div class=\"checkbox-container read-write-header\">\n {{ 'WRITE' }}\n </div>\n </div>\n\n <div class=\"switches-container\" #scrollContainer\n [ngClass]=\"{'invalid': touched && requireAtLeastOneChecked}\">\n\n <div #sg class=\"switch-group-container\" *ngFor=\"let switchGroup of switchGroups\" (mousedown)=\"onSwitchGroupMouseUp(sg, scrollContainer)\">\n\n <lib-multi-stage-expansion-panel [midStageSizesInPixels]=\"[50]\" [stage]=\"switchGroup.open ? 2 : 1\">\n <div class=\"switch-group-container-inner\">\n\n <div class=\"switch-group-line-one\">\n <div class=\"switch-group-title\">\n {{ switchGroup.name }}\n </div>\n <div class=\"checkbox-container\">\n <mat-checkbox #cbRead\n *ngIf=\"switchGroupHasPermissionsWhichRead(switchGroup)\"\n class=\"custom-checkbox\"\n [checked]=\"switchGroupReadCheckboxChecked(switchGroup)\"\n [indeterminate]=\"switchGroupReadCheckboxIndeterminate(switchGroup)\"\n (change)=\"onReadCheckboxChanged(switchGroup, cbRead.checked)\"\n [disabled]=\"_readonly\">\n </mat-checkbox>\n </div>\n <div class=\"checkbox-container\">\n <mat-checkbox #cbWrite\n *ngIf=\"switchGroupHasPermissionsWhichWrite(switchGroup)\"\n class=\"custom-checkbox\"\n [checked]=\"switchGroupWriteCheckboxChecked(switchGroup)\"\n [indeterminate]=\"switchGroupWriteCheckboxIndeterminate(switchGroup)\"\n (change)=\"onWriteCheckboxChanged(switchGroup, cbWrite.checked)\"\n [disabled]=\"_readonly\">\n </mat-checkbox>\n </div>\n <div>\n <lib-action-button *ngIf=\"!switchGroup.open; else showFewer\"\n [kind]=\"ActionButtonKind.FILTER\"\n fontImage=\"far fa-chevron-down\"\n (click)=\"setSwitchGroupOpen(switchGroup, true)\">\n </lib-action-button>\n <ng-template #showFewer>\n <lib-action-button\n [kind]=\"ActionButtonKind.FILTER\"\n fontImage=\"far fa-chevron-up\"\n (click)=\"setSwitchGroupOpen(switchGroup, false)\">\n </lib-action-button>\n </ng-template>\n </div>\n </div>\n\n <div *ngFor=\"let switch of orderedSwitchesForGroup(switchGroup)\" class=\"switch-group-line-two\">\n\n <div class=\"switch-title\">\n {{ switch.name }}\n </div>\n <div class=\"checkbox-container\">\n <mat-checkbox #cbR class=\"custom-checkbox\" *ngIf=\"!switch.writable\" [checked]=\"switch.checked\"\n (change)=\"onCheckboxChanged(switch, cbR.checked)\" [disabled]=\"_readonly\">\n </mat-checkbox>\n </div>\n <div class=\"checkbox-container\">\n <mat-checkbox #cbW class=\"custom-checkbox\" *ngIf=\"switch.writable\" [checked]=\"switch.checked\"\n (change)=\"onCheckboxChanged(switch, cbW.checked)\" [disabled]=\"_readonly\">\n </mat-checkbox>\n </div>\n <div></div>\n\n </div>\n\n </div>\n </lib-multi-stage-expansion-panel>\n\n </div>\n\n </div>\n\n <div class=\"switches-error\">\n <mat-error *ngIf=\"touched && requireAtLeastOneChecked\">\n {{ errorMessageAtLeastOneRequired }}\n </mat-error>\n </div>\n\n</div>\n","import { Component, Injector, Input, OnInit } from \"@angular/core\";\nimport { AbstractControl, ControlValueAccessor, NgControl, NG_VALIDATORS,\n NG_VALUE_ACCESSOR, ValidationErrors, Validator } from \"@angular/forms\";\nimport { ActionButtonKind } from \"../action-button\";\n\n@Component({\n selector: \"lib-permissions-switch-array\",\n templateUrl: \"./permissions-switch-array.component.html\",\n styleUrls: [\"./permissions-switch-array.component.less\"],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n multi:true,\n useExisting: PermissionsSwitchArrayComponent\n },\n {\n provide: NG_VALIDATORS,\n multi:true,\n useExisting: PermissionsSwitchArrayComponent\n }\n ]\n})\nexport class PermissionsSwitchArrayComponent implements ControlValueAccessor, Validator, OnInit {\n\n @Input() heading = \"\";\n @Input() atLeastOneRequired = true;\n @Input() errorMessageAtLeastOneRequired = \"At least one is required\";\n\n // Using 'readonly' attribute as disabled is confusing for form control\n // (& we can bind easier to readonly & get behaviour we need from it)\n @Input() set readonly(value: any) {\n this._readonly = !(value === false);\n };\n _readonly = false;\n\n switchGroups: Array<{name: string; switches: Array<any>; open: boolean}>;\n get switches(): any[] {\n let retVal = [];\n this.switchGroups?.forEach(sg => {\n retVal = retVal.concat(sg.switches);\n });\n return retVal;\n };\n\n onChange = (value: any) => {};\n\n onTouched = () => {};\n\n disabled = false;\n\n ActionButtonKind = ActionButtonKind;\n\n formControl: any;\n\n formControlName: any;\n\n constructor(private injector: Injector) {}\n\n ngOnInit(): void {\n this.formControlName = this.injector.get(NgControl);\n }\n\n get areAllSelected(): boolean {\n const selected = this.switches?.filter(i => i.checked);\n return (selected?.length === this.switches?.length);\n }\n\n get areNoneSelected(): boolean {\n const selected = this.switches?.filter(i => i.checked);\n return (selected?.length === 0);\n }\n\n get requireAtLeastOneChecked(): boolean {\n if (this.atLeastOneRequired && this.switches?.length) {\n const selected = this.switches?.filter(i => i.checked);\n if (selected?.length === 0) {\n return true;\n }\n }\n return false;\n }\n\n get touched(): boolean {\n return this.formControlName?.touched;\n }\n\n onSwitchGroupMouseUp(element: any, container: any): void {\n setTimeout(() => {\n const rowElementRect = element.getBoundingClientRect();\n const containerElementRect = container.getBoundingClientRect();\n if (rowElementRect.top < containerElementRect.top) {\n element.scrollIntoView(true);\n } else if (rowElementRect.bottom > containerElementRect.bottom) {\n element.scrollIntoView(false);\n }\n }, 350);\n }\n\n onClickSelectAll(): void {\n this.switches.forEach(sw => sw.checked = true);\n this.onChange(this.switches);\n }\n\n onClickSelectNone(): void {\n this.switches.forEach(sw => sw.checked = false);\n this.onChange(this.switches);\n }\n\n onReadCheckboxChanged(switchGroup: any, checked: boolean): void {\n switchGroup.switches?.forEach(sw => {\n if (!sw.writable) {\n sw.checked = checked;\n }\n });\n this.markAsTouched();\n this.onChange(this.switches);\n }\n\n onWriteCheckboxChanged(switchGroup: any, checked: boolean): void {\n switchGroup.switches?.forEach(sw => {\n if (sw.writable) {\n sw.checked = checked;\n }\n });\n this.markAsTouched();\n this.onChange(this.switches);\n }\n\n onCheckboxChanged(sw: any, checked: boolean): void {\n sw.checked = checked;\n this.markAsTouched();\n this.onChange(this.switches);\n }\n\n orderedSwitchesForGroup(switchGroup): Array<any> {\n let retVal = [];\n retVal = retVal.concat(switchGroup.switches.filter(sw => !sw.writable));\n retVal = retVal.concat(switchGroup.switches.filter(sw => sw.writable));\n return retVal;\n }\n\n switchGroupHasPermissionsWhichRead(switchGroup): boolean {\n const readables = switchGroup.switches?.filter(sw => !sw.writable);\n return (readables?.length > 0);\n }\n\n switchGroupHasPermissionsWhichWrite(switchGroup): boolean {\n const writables = switchGroup.switches?.filter(sw => sw.writable);\n return (writables?.length > 0);\n }\n\n switchGroupReadCheckboxChecked(switchGroup: any): boolean {\n const readOn = switchGroup.switches?.filter(sw => (!sw.writable && sw.checked));\n return (readOn?.length > 0);\n }\n\n switchGroupWriteCheckboxChecked(switchGroup: any): boolean {\n const writeOn = switchGroup.switches?.filter(sw => (sw.writable && sw.checked));\n return (writeOn?.length > 0);\n }\n\n switchGroupReadCheckboxIndeterminate(switchGroup: any): boolean {\n let numOff = 0;\n let numOn = 0;\n switchGroup.switches?.forEach(sw => {\n if (!sw.writable) {\n if (sw.checked) {\n ++numOn;\n }\n else {\n ++numOff;\n }\n }\n });\n return (numOff > 0) && (numOn > 0);\n }\n\n switchGroupWriteCheckboxIndeterminate(switchGroup: any): boolean {\n let numOff = 0;\n let numOn = 0;\n switchGroup.switches?.forEach(sw => {\n if (sw.writable) {\n if (sw.checked) {\n ++numOn;\n }\n else {\n ++numOff;\n }\n }\n });\n return (numOff > 0) && (numOn > 0);\n }\n\n // from ControlValueAccessor\n writeValue(value: any) {\n const switches = value;\n\n const groups = {};\n switches?.forEach(sw => {\n groups[sw.group] = 1;\n });\n\n this.switchGroups = [];\n Object.keys(groups).sort().forEach(group => {\n const filtered = switches.filter(sw => sw.group === group);\n this.switchGroups.push({ name: group, switches: filtered, open: false });\n });\n }\n\n // from ControlValueAccessor\n registerOnChange(onChange: any) {\n this.onChange = onChange;\n }\n\n // from ControlValueAccessor\n registerOnTouched(onTouched: any) {\n this.onTouched = onTouched;\n }\n\n // from ControlValueAccessor\n setDisabledState(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n // from Validator\n validate(control: AbstractControl): ValidationErrors | null {\n if (this.requireAtLeastOneChecked) {\n return {\n atLeastOneChecked: { valid: false }\n };\n }\n return null;\n }\n\n setSwitchGroupOpen(switchGroup: any, isOpen: boolean) {\n switchGroup.open = isOpen;\n }\n\n private markAsTouched() {\n if (!this.touched) {\n this.onTouched();\n }\n }\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { PermissionsSwitchArrayComponent } from \"./permissions-switch-array.component\";\nimport { ActionButtonModule } from \"../action-button\";\nimport { MatCheckboxModule } from \"@angular/material/checkbox\";\nimport { MatFormFieldModule } from \"@angular/material/form-field\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { MultiStageExpansionPanelModule } from \"../multi-stage-expansion-panel\";\n\n@NgModule({\n declarations: [\n PermissionsSwitchArrayComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n MatFormFieldModule,\n MatCheckboxModule,\n ActionButtonModule,\n MultiStageExpansionPanelModule\n ],\n exports: [\n PermissionsSwitchArrayComponent\n ]\n})\nexport class PermissionsSwitchArrayModule { }\n","<div class=\"outer-container\">\n\n <div class=\"heading-container\">\n {{ heading }}\n </div>\n\n <div class=\"switches-container\" #scrollContainer\n [ngClass]=\"{'invalid': touched && requireAtLeastOneChecked}\">\n\n <div #sg class=\"switch-group-container\" *ngFor=\"let switchGroup of switchGroups\" (mousedown)=\"onSwitchGroupMouseUp(sg, scrollContainer)\">\n\n <lib-multi-stage-expansion-panel [midStageSizesInPixels]=\"[50]\" [stage]=\"switchGroup.open ? 2 : 1\">\n <div class=\"switch-group-container-inner\">\n\n <div class=\"switch-group-line-one\">\n <div class=\"switch-group-title\">\n {{ switchGroup.name }}\n </div>\n <div class=\"checkbox-container\">\n <mat-checkbox #groupCheckbox\n class=\"custom-checkbox\"\n [checked]=\"switchGroupCheckboxChecked(switchGroup)\"\n [indeterminate]=\"switchGroupCheckboxIndeterminate(switchGroup)\"\n (change)=\"onGroupCheckboxChanged(switchGroup, groupCheckbox.checked)\"\n [disabled]=\"_readonly\">\n </mat-checkbox>\n </div>\n <div>\n <lib-action-button *ngIf=\"!switchGroup.open; else showFewer\"\n [kind]=\"ActionButtonKind.FILTER\"\n fontImage=\"far fa-chevron-down\"\n (click)=\"setSwitchGroupOpen(switchGroup, true)\">\n </lib-action-button>\n <ng-template #showFewer>\n <lib-action-button\n [kind]=\"ActionButtonKind.FILTER\"\n fontImage=\"far fa-chevron-up\"\n (click)=\"setSwitchGroupOpen(switchGroup, false)\">\n </lib-action-button>\n </ng-template>\n </div>\n </div>\n\n <div *ngFor=\"let switch of orderedSwitchesForGroup(switchGroup)\" class=\"switch-group-line-two\">\n\n <div class=\"switch-title\">\n {{ switch.name }}\n </div>\n <div class=\"checkbox-container\">\n <mat-checkbox #cb\n class=\"custom-checkbox\"\n [checked]=\"switch.checked\"\n (change)=\"onCheckboxChanged(switch, cb.checked)\"\n [disabled]=\"_readonly\">\n </mat-checkbox>\n </div>\n <div></div>\n\n </div>\n\n </div>\n </lib-multi-stage-expansion-panel>\n\n </div>\n\n </div>\n\n <div class=\"switches-error\">\n <mat-error *ngIf=\"touched && requireAtLeastOneChecked\">\n {{ errorMessageAtLeastOneRequired }}\n </mat-error>\n </div>\n\n</div>\n","import { Component, Injector, Input, OnInit } from \"@angular/core\";\nimport { AbstractControl, ControlValueAccessor, NgControl, NG_VALIDATORS,\n NG_VALUE_ACCESSOR, ValidationErrors, Validator } from \"@angular/forms\";\nimport { ActionButtonKind } from \"../action-button\";\n\n@Component({\n selector: \"lib-grouped-switch-array\",\n templateUrl: \"./grouped-switch-array.component.html\",\n styleUrls: [\"./grouped-switch-array.component.less\"],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n multi:true,\n useExisting: GroupedSwitchArrayComponent\n },\n {\n provide: NG_VALIDATORS,\n multi:true,\n useExisting: GroupedSwitchArrayComponent\n }\n ]\n})\nexport class GroupedSwitchArrayComponent implements ControlValueAccessor, Validator, OnInit {\n\n @Input() heading = \"\";\n @Input() atLeastOneRequired = true;\n @Input() errorMessageAtLeastOneRequired = \"At least one is required\";\n\n // Using 'readonly' attribute as disabled is confusing for form control\n // (& we can bind easier to readonly & get behaviour we need from it)\n @Input() set readonly(value: any) {\n this._readonly = !(value === false);\n };\n _readonly = false;\n\n switchGroups: Array<{name: string; switches: Array<any>; open: boolean}>;\n get switches(): any[] {\n let retVal = [];\n this.switchGroups?.forEach(sg => {\n retVal = retVal.concat(sg.switches);\n });\n return retVal;\n };\n\n onChange = (value: any) => {};\n\n onTouched = () => {};\n\n disabled = false;\n\n ActionButtonKind = ActionButtonKind;\n\n formControl: any;\n\n formControlName: any;\n\n constructor(private injector: Injector) {}\n\n ngOnInit(): void {\n this.formControlName = this.injector.get(NgControl);\n }\n\n get areAllSelected(): boolean {\n const selected = this.switches?.filter(i => i.checked);\n return (selected?.length === this.switches?.length);\n }\n\n get areNoneSelected(): boolean {\n const selected = this.switches?.filter(i => i.checked);\n return (selected?.length === 0);\n }\n\n get requireAtLeastOneChecked(): boolean {\n if (this.atLeastOneRequired && this.switches?.length) {\n const selected = this.switches?.filter(i => i.checked);\n if (selected?.length === 0) {\n return true;\n }\n }\n return false;\n }\n\n get touched(): boolean {\n return this.formControlName?.touched;\n }\n\n onSwitchGroupMouseUp(element: any, container: any): void {\n setTimeout(() => {\n const rowElementRect = element.getBoundingClientRect();\n const containerElementRect = container.getBoundingClientRect();\n if (rowElementRect.top < containerElementRect.top) {\n element.scrollIntoView(true);\n } else if (rowElementRect.bottom > containerElementRect.bottom) {\n const alignToTop = (rowElementRect.height > containerElementRect.height);\n element.scrollIntoView(alignToTop);\n }\n }, 350);\n }\n\n onClickSelectAll(): void {\n this.switches.forEach(sw => sw.checked = true);\n this.onChange(this.switches);\n }\n\n onClickSelectNone(): void {\n this.switches.forEach(sw => sw.checked = false);\n this.onChange(this.switches);\n }\n\n onGroupCheckboxChanged(switchGroup: any, checked: boolean): void {\n switchGroup.switches?.forEach(sw => {\n sw.checked = checked;\n });\n this.markAsTouched();\n this.onChange(this.switches);\n }\n\n onCheckboxChanged(sw: any, checked: boolean): void {\n sw.checked = checked;\n this.markAsTouched();\n this.onChange(this.switches);\n }\n\n orderedSwitchesForGroup(switchGroup): Array<any> {\n return switchGroup.switches;\n }\n\n switchGroupCheckboxChecked(switchGroup: any): boolean {\n const groupOn = switchGroup.switches?.filter(sw => sw.checked);\n return (groupOn?.length > 0);\n }\n\n switchGroupCheckboxIndeterminate(switchGroup: any): boolean {\n let numOff = 0;\n let numOn = 0;\n switchGroup.switches?.forEach(sw => {\n if (sw.checked) {\n ++numOn;\n }\n else {\n ++numOff;\n }\n });\n return (numOff > 0) && (numOn > 0);\n }\n\n // from ControlValueAccessor\n writeValue(value: any) {\n const switches = value;\n\n const groups = {};\n switches?.forEach(sw => {\n\n const matches = sw.name.match(/^(.+?)\\./);\n if (Array.isArray(matches) && (matches.length > 0)) {\n sw.group = matches[1];\n }\n\n groups[sw.group] = 1;\n });\n\n this.switchGroups = [];\n Object.keys(groups).sort().forEach(group => {\n const filtered = switches.filter(sw => sw.group === group);\n this.switchGroups.push({ name: group, switches: filtered, open: false });\n });\n }\n\n // from ControlValueAccessor\n registerOnChange(onChange: any) {\n this.onChange = onChange;\n }\n\n // from ControlValueAccessor\n registerOnTouched(onTouched: any) {\n this.onTouched = onTouched;\n }\n\n // from ControlValueAccessor\n setDisabledState(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n // from Validator\n validate(control: AbstractControl): ValidationErrors | null {\n if (this.requireAtLeastOneChecked) {\n return {\n atLeastOneChecked: { valid: false }\n };\n }\n return null;\n }\n\n setSwitchGroupOpen(switchGroup: any, isOpen: boolean) {\n switchGroup.open = isOpen;\n }\n\n private markAsTouched() {\n if (!this.touched) {\n this.onTouched();\n }\n }\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { GroupedSwitchArrayComponent } from \"./grouped-switch-array.component\";\nimport { ActionButtonModule } from \"../action-button\";\nimport { MatCheckboxModule } from \"@angular/material/checkbox\";\nimport { MatFormFieldModule } from \"@angular/material/form-field\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { MultiStageExpansionPanelModule } from \"../multi-stage-expansion-panel\";\n\n@NgModule({\n declarations: [\n GroupedSwitchArrayComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n MatFormFieldModule,\n MatCheckboxModule,\n ActionButtonModule,\n MultiStageExpansionPanelModule\n ],\n exports: [\n GroupedSwitchArrayComponent\n ]\n})\nexport class GroupedSwitchArrayModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { VituSelectComponent } from \"./vitu-select.component\";\nimport { FormsModule } from \"@angular/forms\";\nimport { MatOptionModule } from \"@angular/material/core\";\nimport { MatSelectModule } from \"@angular/material/select\";\n\n@NgModule({\n declarations: [\n VituSelectComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n MatOptionModule,\n MatSelectModule\n ],\n exports: [\n VituSelectComponent\n ]\n})\nexport class VituSelectModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { VituDateComponent } from \"./vitu-date.component\";\nimport { FormsModule } from \"@angular/forms\";\nimport { MatButtonModule } from \"@angular/material/button\";\nimport { MatRippleModule } from \"@angular/material/core\";\nimport { MatIconModule } from \"@angular/material/icon\";\nimport { MatInputModule } from \"@angular/material/input\";\nimport { DateInputsModule } from \"../date-time\";\nimport { VituInputModule } from \"../vitu-input\";\n\n@NgModule({\n declarations: [\n VituDateComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n MatIconModule,\n DateInputsModule,\n MatInputModule,\n MatButtonModule,\n MatRippleModule,\n VituInputModule,\n ],\n exports: [\n VituDateComponent\n ]\n})\nexport class VituDateModule { }\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { VituTimeComponent } from \"./vitu-time.component\";\nimport { FormsModule } from \"@angular/forms\";\nimport { MatButtonModule } from \"@angular/material/button\";\nimport { MatRippleModule } from \"@angular/material/core\";\nimport { MatIconModule } from \"@angular/material/icon\";\nimport { MatInputModule } from \"@angular/material/input\";\nimport { DateInputsModule } from \"../date-time\";\nimport { VituInputModule } from \"../vitu-input\";\n\n@NgModule({\n declarations: [\n VituTimeComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n MatIconModule,\n DateInputsModule,\n MatInputModule,\n MatButtonModule,\n MatRippleModule,\n VituInputModule,\n ],\n exports: [\n VituTimeComponent\n ]\n})\nexport class VituTimeModule { }\n","import { Injectable } from \"@angular/core\";\nimport { CanActivate } from \"@angular/router\";\nimport { AuthService } from \"shared-lib\";\n\n@Injectable({ providedIn: \"root\" })\nexport class AuthGuard implements CanActivate {\n\n constructor(\n private authService: AuthService\n ) {}\n\n canActivate() {\n\n return this.authService.validateToken();\n }\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getCurrentUserState = createSelector(\n (store: IStore) => store.currentUser,\n store => store,\n);\n\nexport const getCurrentUser = createSelector(\n getCurrentUserState,\n currentUserState => currentUserState.record,\n);\n\nexport const getCurrentUserLoading = createSelector(\n getCurrentUserState,\n currentUserState => currentUserState.loading,\n);\n\nexport const getCurrentUserPermissions = createSelector(\n getCurrentUser,\n currentUser => currentUser ? currentUser.permissions : []\n);\n","import { UserDetailsDto } from \"@merchant_api/models/user-details-dto\";\nimport { Action } from \"@ngrx/store\";\nimport { CurrentUserDto } from \"./current-user.state\";\n\nexport enum ActionTypes {\n GetCurrentUser = \"[CurrentUser] GetCurrentUser\",\n GetCurrentUserSucceed = \"[CurrentUser] GetCurrentUserSucceed\",\n GetCurrentUserFail = \"[CurrentUser] GetCurrentUserFail\",\n AddDetailsToCurrentUser = \"[CurrentUser] AddDetailsToCurrentUser\"\n}\n\nexport class GetCurrentUserAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.GetCurrentUser;\n}\n\nexport class GetCurrentUserSucceedAction implements Action {\n\n constructor(public record: CurrentUserDto) {}\n\n readonly type = ActionTypes.GetCurrentUserSucceed;\n}\n\nexport class GetCurrentUserFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetCurrentUserFail;\n}\n\nexport class AddDetailsToCurrentUserAction implements Action {\n\n constructor(public userDetailsDto: UserDetailsDto) {}\n\n readonly type = ActionTypes.AddDetailsToCurrentUser;\n\n}\n","import { OrganizationDto } from \"@merchant_api/models/organization-dto\";\nimport { Action } from \"@ngrx/store\";\n\nexport enum ActionTypes {\n GetMerchant = \"[Merchant] GetMerchant\",\n GetMerchantSucceed = \"[Merchant] GetMerchantSucceed\",\n GetMerchantFail = \"[Merchant] GetMerchantFail\"\n}\n\nexport class GetMerchantAction implements Action {\n constructor() {}\n\n readonly type = ActionTypes.GetMerchant;\n}\n\nexport class GetMerchantSucceedAction implements Action {\n constructor(public merchant: OrganizationDto) {}\n\n readonly type = ActionTypes.GetMerchantSucceed;\n}\n\nexport class GetMerchantFailAction implements Action {\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetMerchantFail;\n}\n","import { Injectable } from \"@angular/core\";\nimport { ActivatedRouteSnapshot, CanActivateChild, Router } from \"@angular/router\";\nimport { select, Store } from \"@ngrx/store\";\nimport { Actions, ofType } from \"@ngrx/effects\";\nimport { map, take } from \"rxjs/operators\";\nimport {\n getCurrentUser,\n getCurrentUserLoading,\n getCurrentUserPermissions\n} from \"@merchant_app/storage/current-user/current-user.selectors\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { ActionTypes, GetCurrentUserAction, GetCurrentUserSucceedAction } from \"@merchant_app/storage/current-user/current-user.actions\";\nimport { CurrentUserDto } from \"@merchant_app/storage/current-user/current-user.state\";\nimport { GetMerchantAction } from \"@merchant_app/storage/merchant/merchant.actions\";\nimport { PermissionUtils } from \"shared-lib\";\n\n@Injectable({ providedIn: \"root\" })\nexport class PermissionsGuard implements CanActivateChild {\n\n currentUserLoading$ = this.store.pipe(\n select(getCurrentUserLoading)\n );\n\n currentUser$ = this.store.pipe(\n select(getCurrentUser)\n );\n\n currentUserPermissions$ = this.store.pipe(\n select(getCurrentUserPermissions)\n );\n\n private currentUserPermissions = [];\n private currentUser: CurrentUserDto = null;\n private currentUserLoading = false;\n\n constructor(private store: Store<IStore>, private actions: Actions, private router: Router) {\n this.currentUserPermissions$.subscribe(currentUserPermissions => {\n this.currentUserPermissions = currentUserPermissions;\n });\n this.currentUser$.subscribe(currentUser => {\n this.currentUser = currentUser;\n });\n this.currentUserLoading$.subscribe(currentUserLoading => {\n this.currentUserLoading = currentUserLoading;\n });\n }\n\n canActivateChild(route: ActivatedRouteSnapshot) {\n if (!this.currentUserLoading && this.currentUser) {\n const requiredPermissions = route.data?.requiredPermissions ? route.data.requiredPermissions : [];\n return this.resolveCanActivate(this.currentUserPermissions, requiredPermissions);\n }\n else {\n this.store.dispatch(new GetCurrentUserAction());\n return this.actions\n .pipe(ofType<GetCurrentUserSucceedAction>(ActionTypes.GetCurrentUserSucceed),\n take(1),\n map(action => {\n this.store.dispatch(new GetMerchantAction());\n const currentUserPermissions = action.record.permissions;\n const requiredPermissions = route.data?.requiredPermissions ? route.data.requiredPermissions : [];\n return this.resolveCanActivate(currentUserPermissions, requiredPermissions);\n })\n ).toPromise();\n }\n }\n\n private resolveCanActivate(currentUserPermissions: string[], requiredPermissions: string[]): boolean {\n const canActivate = PermissionUtils.hasPermissions(currentUserPermissions, requiredPermissions);\n if (!canActivate) {\n // Workaround : Angular won't do this by default\n if (location.pathname != \"/\") {\n\n this.router.navigateByUrl(\"/\");\n }\n }\n return canActivate;\n }\n\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getMerchantState = createSelector(\n (store: IStore) => store.merchant,\n store => store,\n);\n","import { Component } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { select, Store } from \"@ngrx/store\";\nimport { map } from \"rxjs/operators\";\nimport { getCurrentUserPermissions, getCurrentUserState } from \"@merchant_app/storage/current-user/current-user.selectors\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { AuthService, SidebarItem } from \"shared-lib\";\nimport { getMerchantState } from \"@merchant_app/storage/merchant/merchant.selectors\";\n\n@Component({\n selector: \"app-dashboard\",\n templateUrl: \"./dashboard.component.html\",\n styleUrls: [\"./dashboard.component.less\"],\n})\nexport class DashboardComponent {\n\n sidebarOpen = (window.innerWidth > 1440);\n\n sidebarItems: SidebarItem[] = [\n {\n name: \"Payments\",\n primaryRouteToActivate: \"/dashboard/payments\",\n permissions: [\"core.payments.search\"],\n faIcon: \"far fa-money-check-edit-alt\"\n },\n {\n name: \"Transactions\",\n primaryRouteToActivate: \"/dashboard/transactions\",\n permissions: [\"core.transactions.search\"],\n faIcon: \"far fa-file-invoice-dollar\"\n },\n {\n name: \"Disputes\",\n primaryRouteToActivate: \"/dashboard/disputes\",\n faIcon: \"far fa-boxing-glove\",\n permissions: [\"core.disputes.get\"]\n },\n {\n name: \"Users\",\n primaryRouteToActivate: \"/dashboard/users\",\n permissions: [\"core.users.search\"],\n faIcon: \"far fa-user-friends\"\n },\n {\n name: \"Roles\",\n primaryRouteToActivate: \"/dashboard/roles\",\n permissions: [\"core.roles.search\"],\n faIcon: \"far fa-user-tag\"\n },\n {\n name: \"Reports\",\n primaryRouteToActivate: \"/dashboard/reports\",\n permissions: [\"core.reports.billing\"],\n faIcon: \"far fa-file-chart-pie\"\n },\n {\n name: \"Configurations\",\n primaryRouteToActivate: \"/dashboard/configurations\",\n permissions: [\"core.merchants.get-tids\"],\n faIcon: \"far fa-cogs\"\n },\n {\n name: \"Funding\",\n primaryRouteToActivate: \"/dashboard/funding\",\n permissions: [\"core.funding.search\"],\n faIcon: \"far fa-coins\"\n },\n {\n name: \"Developer Tools\",\n faIcon: \"far fa-tools\",\n secondaryRouteToCapture: \"/dashboard/developer\",\n subItems: [\n {\n name: \"Clients\",\n primaryRouteToActivate: \"/dashboard/developer/clients\",\n permissions: [\"core.clients.search\"],\n faIcon: \"far fa-server\"\n },\n {\n name: \"Webhooks\",\n faIcon: \"far fa-arrow-from-left\",\n secondaryRouteToCapture: \"/dashboard/developer/webhooks\",\n subItems: [\n {\n name: \"Configure\",\n primaryRouteToActivate: \"/dashboard/developer/webhooks/configure\",\n permissions: [\"core.webhooks.search\"],\n faIcon: \"far fa-cog\"\n },\n {\n name: \"Event History\",\n primaryRouteToActivate: \"/dashboard/developer/webhooks/event-history\",\n permissions: [\"core.webhooks.lookups\"],\n faIcon: \"fas fa-history\"\n }\n ]\n }\n ]\n }\n ];\n\n merchantName$ = this.store.pipe(\n select(getMerchantState),\n map(i => i.merchant?.name)\n );\n\n currentUserName$ = this.store.pipe(\n select(getCurrentUserState),\n map(i => i.record?.name)\n );\n\n currentEmail$ = this.store.pipe(\n select(getCurrentUserState),\n map(i => i.record?.email)\n );\n\n currentUserPermissions$ = this.store.pipe(\n select(getCurrentUserPermissions)\n );\n\n constructor(private store: Store<IStore>, private authService: AuthService, public router: Router) {}\n\n onLogout() {\n this.authService.logout();\n }\n\n}\n","<lib-dashboard-common\n brandIconPath=\"assets/img/title-icon.svg\"\n [merchantName]=\"merchantName$ | async\"\n [userName]=\"currentUserName$ | async\"\n [email]=\"currentEmail$ | async\"\n [currentUserPermissions]=\"currentUserPermissions$ | async\"\n [sidebarOpen]=\"sidebarOpen\"\n [sidebarItems]=\"sidebarItems\"\n (logout)=\"onLogout()\">\n <router-outlet></router-outlet>\n</lib-dashboard-common>\n","import { Action } from \"@ngrx/store\";\nimport { Sorting, Filter } from \"./transactions.state\";\nimport { GcpStorageResource } from \"@merchant_api/models/gcp-storage-resource\";\nimport { PagedDataDtoOfTransaction } from \"@merchant_api/models/paged-data-dto-of-transaction\";\n\nexport enum ActionTypes {\n FilterTransactions = \"[Transactions] FilterTransactions\",\n SortTransactions = \"[Transactions] SortTransactions\",\n PageChangedTransactions = \"[Transactions] PageChangedTransactions\",\n GetTransactions = \"[Transactions] GetTransactions\",\n GetTransactionsSucceed = \"[Transactions] GetTransactionsSucceed\",\n GetTransactionsFail = \"[Transactions] GetTransactionsFail\",\n ExportTransactionsToCsv = \"[Transactions] ExportTransactionsToCSV\",\n ExportTransactionsToCsvSucceed = \"[Transactions] ExportTransactionsToCSVSucceed\",\n ExportTransactionsToCsvFail = \"[Transactions] ExportTransactionsToCSVFail\"\n}\n\nexport class FilterTransactionsAction implements Action {\n\n constructor(public filter: Filter) {}\n\n readonly type = ActionTypes.FilterTransactions;\n}\n\nexport class SortTransactionsAction implements Action {\n\n constructor(public sorting: Sorting) {}\n\n readonly type = ActionTypes.SortTransactions;\n}\n\nexport class PageChangedTransactionsAction implements Action {\n\n constructor(public page: number) {}\n\n readonly type = ActionTypes.PageChangedTransactions;\n}\n\nexport class GetTransactionsAction implements Action {\n\n constructor(public page: number, public filter?: Filter, public sorting?: Sorting) {}\n\n readonly type = ActionTypes.GetTransactions;\n}\n\nexport class GetTransactionsSucceedAction implements Action {\n\n constructor(public response: PagedDataDtoOfTransaction, public pageSize: number,\n public page: number, public stateExtensions?: any) {}\n\n readonly type = ActionTypes.GetTransactionsSucceed;\n}\n\nexport class GetTransactionsFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetTransactionsFail;\n}\n\nexport class ExportTransactionsToCsvAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.ExportTransactionsToCsv;\n}\n\nexport class ExportTransactionsToCsvSucceedAction implements Action {\n\n constructor(public resource: GcpStorageResource) {}\n\n readonly type = ActionTypes.ExportTransactionsToCsvSucceed;\n}\n\nexport class ExportTransactionsToCsvFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.ExportTransactionsToCsvFail;\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getTransactionsState = createSelector(\n (store: IStore) => store.transactions,\n store => store,\n);\n","import { Injectable } from \"@angular/core\";\nimport { select, Store } from \"@ngrx/store\";\nimport {\n getCurrentUserPermissions\n} from \"@merchant_app/storage/current-user/current-user.selectors\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { PermissionUtils } from \"shared-lib\";\n\n@Injectable({ providedIn: \"root\" })\nexport class CurrentUserPermissions {\n\n private currentUserPermissions$ = this.store.pipe(\n select(getCurrentUserPermissions)\n );\n\n private currentUserPermissions = [];\n\n constructor(private store: Store<IStore>) {\n this.currentUserPermissions$.subscribe(currentUserPermissions => {\n this.currentUserPermissions = currentUserPermissions;\n });\n }\n\n has(requiredPermissions: string[]): boolean {\n return PermissionUtils.hasPermissions(this.currentUserPermissions, requiredPermissions);\n }\n}\n","/* tslint:disable */\n/* eslint-disable */\nexport enum TransactionOrderBy {\n Amount = 'Amount',\n DateAndTime = 'DateAndTime',\n PayerName = 'PayerName',\n CardNumber = 'CardNumber',\n TransactionId = 'TransactionId',\n TransactionType = 'TransactionType'\n}\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"TransactionOrderBy.Amount\">\n <lib-text-table-column>\n {{ element.amount | vituCurrencyUsd }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"TransactionOrderBy.TransactionId\">\n <lib-text-table-column>\n {{ element.transactionId }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"TransactionOrderBy.TransactionType\">\n <lib-text-table-column>\n {{ displayTextForTransactionType }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'TransactionStatus'\">\n <lib-transaction-status-chip\n [status]=\"element?.status\">\n </lib-transaction-status-chip>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"TransactionOrderBy.PayerName\">\n <lib-text-table-column>\n {{ getDisplayTextForPayerName() }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'CardBrand'\">\n <span *ngIf=\"element.card?.cardBrand\" class=\"card-image\">\n <i [class]=\"'fab fa-cc-' + element.card.cardBrand.toLowerCase() + ' fa-2x'\"></i>\n </span>\n <lib-text-table-column *ngIf=\"!element.card?.cardBrand\">\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"TransactionOrderBy.CardNumber\">\n <lib-text-table-column>\n {{ getDisplayTextForCardNumber() }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"TransactionOrderBy.DateAndTime\">\n <lib-date-time-label [dateUtc]=\"element.dateUtc\"></lib-date-time-label>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'AuthCode'\">\n <lib-text-table-column>\n {{ element.authCode }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Fees'\">\n <lib-text-table-column>\n {{ element.fees | vituCurrencyUsd }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'DigitalWallet'\">\n <lib-digital-wallet-image-table-column\n [kind]=\"element.digitalWallet\">\n </lib-digital-wallet-image-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'TransactionToken'\">\n <lib-text-table-column>\n {{ element.token }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n\n\n\n\n\n","import { Component, Input } from \"@angular/core\";\nimport { TransactionOrderBy } from \"@merchant_api/models/transaction-order-by\";\nimport { DateTimeFormatUtils } from \"shared-lib\";\n\n@Component({\n selector: \"app-transactions-table-cell-content\",\n templateUrl: \"./transactions-table-cell-content.component.html\",\n styleUrls: [\"./transactions-table-cell-content.component.less\"],\n})\nexport class TransactionsTableCellContentComponent {\n @Input() columnId: string;\n @Input() element: any;\n\n TransactionOrderBy = TransactionOrderBy;\n DateTimeFormatUtils = DateTimeFormatUtils;\n\n getDisplayTextForPayerName() {\n let displayText;\n if (this.element.payer?.fullName) {\n displayText = `${this.element.payer.fullName}`.toUpperCase();\n }\n return displayText;\n }\n\n getDisplayTextForCardNumber() {\n let displayText;\n if ((this.element.card?.first6) && (this.element.card?.last4)) {\n displayText = `${this.element.card.first6}XXX${this.element.card?.last4}`;\n }\n return displayText;\n }\n\n get displayTextForTransactionType() {\n let suffix = \"\";\n if (this.element.isServiceFee) {\n suffix = \" (SF)\";\n }\n return `${this.element.type}${suffix}`;\n }\n\n}\n","<lib-table-base\n [columnDefs]=\"columnDefs\"\n [rowsData]=\"rowsData\"\n [rowsDataLoading]=\"rowsDataLoading\"\n [rowsDataError]=\"rowsDataError\"\n [rowsDataErrorMessage]=\"rowsDataErrorMessage\"\n [rowsDataEmptyMessage]=\"rowsDataEmptyMessage\"\n [rowsDataShowWhileLoading]=\"rowsDataShowWhileLoading\"\n [selectedRowProperty]=\"selectedRowProperty\"\n [selectedRowValue]=\"selectedRowValue\"\n [sorting]=\"sorting\"\n (sortingChanged)=\"onSortingChanged($event)\"\n [pager]=\"pager\"\n (pageChanged)=\"onPageChanged($event)\"\n (rowSelected)=\"onRowSelected($event)\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-transactions-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\">\n </app-transactions-table-cell-content>\n </ng-template>\n\n</lib-table-base>\n","import { Component, Input, Output, EventEmitter, OnInit } from \"@angular/core\";\nimport { TransactionOrderBy } from \"@merchant_api/models/transaction-order-by\";\nimport { Sorting } from \"@merchant_app/storage/transactions/transactions.state\";\nimport { ColumnDef, TableSorting, LocalTimePoint, Pager } from \"shared-lib\";\n\n@Component({\n selector: \"app-transactions-table\",\n templateUrl: \"./transactions-table.component.html\",\n styleUrls: [\"./transactions-table.component.less\"],\n})\nexport class TransactionsTableComponent implements OnInit {\n\n @Input() rowsData: any[];\n @Input() rowsDataLoading = false;\n @Input() rowsDataError: Error;\n @Input() rowsDataErrorMessage: string;\n @Input() rowsDataEmptyMessage: string;\n @Input() rowsDataShowWhileLoading = false;\n\n @Input() selectedRowProperty: string = null;\n @Input() selectedRowValue = null;\n @Input() sorting: Sorting = {\n orderBy: null,\n orderDirection: null\n };\n @Input() pager: Pager;\n\n @Output() pageChanged = new EventEmitter<number>();\n @Output() sortingChanged = new EventEmitter<Sorting>();\n @Output() rowSelected = new EventEmitter<string>();\n\n columnDefs: ColumnDef[];\n\n onSortingChanged(sorting: TableSorting) {\n this.sortingChanged.emit({\n orderBy: sorting.orderBy as (null | TransactionOrderBy),\n orderDirection: sorting.orderDirection\n });\n }\n\n onPageChanged(page: number) {\n this.pageChanged.emit(page);\n }\n\n onRowSelected(row: string) {\n this.rowSelected.emit(row);\n }\n\n ngOnInit() {\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n this.columnDefs = [\n { id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n { id: TransactionOrderBy.DateAndTime, title: `Date (${LocalTimePoint.formatZ()})`, flexWidthBasisInPixels: 100,\n flexWidthGrow: 2, canSort: true},\n { id: TransactionOrderBy.TransactionType, title: \"Type\", flexWidthBasisInPixels: 80, flexWidthGrow: 0},\n { id: \"TransactionToken\", title: \"Token\", flexWidthBasisInPixels: 180, flexWidthGrow: 0},\n { id: \"TransactionStatus\", title: \"Status\", flexWidthBasisInPixels: 80, flexWidthGrow: 2},\n { id: TransactionOrderBy.Amount, title: \"Amount\", flexWidthBasisInPixels: 96, flexWidthGrow: 4, canSort: true},\n { id: \"CardBrand\", title: \"Card\", flexWidthBasisInPixels: 50, flexWidthGrow: 4},\n { id: TransactionOrderBy.CardNumber, title: \"Card Number\", flexWidthBasisInPixels: 150, flexWidthGrow: 4, canSort: true},\n { id: \"DigitalWallet\", title: \"Digital Wallet\", flexWidthBasisInPixels: 75, flexWidthGrow: 4},\n { id: TransactionOrderBy.PayerName, title: \"Payer Name\", flexWidthBasisInPixels: 100, flexWidthGrow: 8, canSort: true},\n { id: \"Fees\", title: \"Fees\", flexWidthBasisInPixels: 85, flexWidthGrow: 4},\n { id: \"AuthCode\", title: \"Auth Code\", flexWidthBasisInPixels: 60, flexWidthGrow: 4},\n { id: TransactionOrderBy.TransactionId, title: \"Transaction ID\", flexWidthBasisInPixels: 120, flexWidthGrow: 4, canSort: true},\n { id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n ];\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nexport enum CardBrandEnum {\n Visa = 'Visa',\n MasterCard = 'MasterCard',\n Amex = 'Amex',\n Discover = 'Discover',\n JCB = 'JCB',\n Diners = 'Diners',\n Maestro = 'Maestro',\n Solo = 'Solo',\n CUP = 'CUP',\n Laser = 'Laser',\n CarteBlanche = 'CarteBlanche',\n GiftCard = 'GiftCard',\n EBT = 'EBT',\n GiroCard = 'GiroCard',\n Interac = 'Interac',\n Other = 'Other',\n Unknown = 'Unknown'\n}\n","/* tslint:disable */\n/* eslint-disable */\nexport enum TransactionStatus {\n Failed = 'Failed',\n Success = 'Success',\n Rejected = 'Rejected',\n Funded = 'Funded'\n}\n","/* tslint:disable */\n/* eslint-disable */\nexport enum GatewayEnum {\n RC = 'RC',\n CloverPos = 'CloverPos',\n CloverEcomm = 'CloverEcomm',\n PayPal = 'PayPal'\n}\n","/* tslint:disable */\n/* eslint-disable */\nexport enum DigitalWalletEnum {\n GooglePay = 'GooglePay',\n ApplePay = 'ApplePay',\n PayPal = 'PayPal',\n Venmo = 'Venmo'\n}\n","/* tslint:disable */\n/* eslint-disable */\nexport enum TransactionType {\n Authorize = 'Authorize',\n Capture = 'Capture',\n PreAuthorize = 'PreAuthorize',\n Refund = 'Refund',\n Sale = 'Sale',\n Void = 'Void'\n}\n","<lib-filters-base\n #filtersBase\n [filterForm]=\"filterForm\"\n (filterChanged)=\"onFilterChanged($event)\"\n [filter]=\"filter\"\n [moreFields]=\"moreFields\"\n suppressInitialRequest>\n\n <div [formGroup]=\"filterForm\"> <!-- required -->\n\n <ng-template #basicFilters>\n\n <div class=\"global-form-line-regular-layout\">\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-date\n [formGroup]=\"filterForm\"\n formFieldName=\"localDateInterval\"\n label=\"Date\"\n restrictFuture\n isFilter\n readonly>\n </lib-vitu-form-field-date>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"types\"\n isFilter\n multiple\n label=\"Type\"\n [options]=\"typeList\"\n [showReset]=\"filtersBase.resetFieldVisible('types')\"\n (handleReset)=\"filtersBase.resetField('types')\">\n </lib-vitu-form-field-select>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"statuses\"\n isFilter\n multiple\n label=\"Status\"\n [options]=\"statusList\"\n [showReset]=\"filtersBase.resetFieldVisible('statuses')\"\n (handleReset)=\"filtersBase.resetField('statuses')\">\n </lib-vitu-form-field-select>\n </div>\n\n <div class=\"form-field-container\">\n <div class=\"global-form-line-combo-field\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"first6\"\n isFilter\n label=\"First6\"\n autocomplete=\"off\"\n [mask]=\"{ mask: '000000' }\"\n [showReset]=\"filtersBase.resetFieldVisible('first6')\"\n (handleReset)=\"filtersBase.resetField('first6')\">\n </lib-vitu-form-field-input>\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"last4\"\n isFilter\n label=\"Last4\"\n autocomplete=\"off\"\n [mask]=\"{ mask: '0000' }\"\n [showReset]=\"filtersBase.resetFieldVisible('last4')\"\n (handleReset)=\"filtersBase.resetField('last4')\">\n </lib-vitu-form-field-input>\n </div>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"amount\"\n isFilter\n label=\"Amount\"\n autocomplete=\"off\"\n [mask]=\"amountMask\"\n [showReset]=\"filtersBase.resetFieldVisible('amount')\"\n (handleReset)=\"filtersBase.resetField('amount')\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"payerName\"\n isFilter\n label=\"Payer Name\"\n [maxlength]=\"71\"\n [showReset]=\"filtersBase.resetFieldVisible('payerName')\"\n (handleReset)=\"filtersBase.resetField('payerName')\"\n [errorOverrides]=\"[{'pattern': 'Only alphanumeric and space chars'}]\">\n </lib-vitu-form-field-input>\n </div>\n\n </div>\n\n </ng-template>\n\n <ng-template #moreFilters>\n\n <div class=\"global-form-line-regular-layout\">\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"cardBrands\"\n isFilter\n multiple\n label=\"Card Brand\"\n [options]=\"cardList\"\n [showReset]=\"filtersBase.resetFieldVisible('cardBrands')\"\n (handleReset)=\"filtersBase.resetField('cardBrands')\">\n </lib-vitu-form-field-select>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"transactionId\"\n isFilter\n label=\"Transaction ID\"\n [maxlength]=\"20\"\n [showReset]=\"filtersBase.resetFieldVisible('transactionId')\"\n (handleReset)=\"filtersBase.resetField('transactionId')\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"authCode\"\n isFilter\n label=\"Auth Code\"\n [maxlength]=\"20\"\n [showReset]=\"filtersBase.resetFieldVisible('authCode')\"\n (handleReset)=\"filtersBase.resetField('authCode')\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"gateways\"\n isFilter\n multiple\n label=\"Gateway\"\n [options]=\"gatewayList\"\n [showReset]=\"filtersBase.resetFieldVisible('gateways')\"\n (handleReset)=\"filtersBase.resetField('gateways')\">\n </lib-vitu-form-field-select>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"tid\"\n isFilter\n label=\"TID\"\n autocomplete=\"off\"\n [maxlength]=\"14\"\n [showReset]=\"filtersBase.resetFieldVisible('tid')\"\n (handleReset)=\"filtersBase.resetField('tid')\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-date\n [formGroup]=\"filterForm\"\n formFieldName=\"localDateSettledInterval\"\n label=\"Date Settled\"\n restrictFuture\n isFilter\n readonly>\n </lib-vitu-form-field-date>\n </div>\n\n </div>\n\n <div class=\"global-form-line-regular-layout\">\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"mid\"\n label=\"MID\"\n isFilter\n autocomplete=\"off\"\n [maxlength]=\"100\"\n [showReset]=\"filtersBase.resetFieldVisible('mid')\"\n (handleReset)=\"filtersBase.resetField('mid')\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"digitalWallets\"\n isFilter\n multiple\n label=\"Digital Wallet\"\n [options]=\"digitalWalletList\"\n [showReset]=\"filtersBase.resetFieldVisible('digitalWallets')\"\n (handleReset)=\"filtersBase.resetField('digitalWallets')\">\n </lib-vitu-form-field-select>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"isServiceFee\"\n isFilter\n label=\"Service Fee\"\n [options]=\"serviceFeeList\"\n [showReset]=\"filtersBase.resetFieldVisible('isServiceFee')\"\n (handleReset)=\"filtersBase.resetField('isServiceFee')\">\n </lib-vitu-form-field-select>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"token\"\n label=\"Token\"\n isFilter\n autocomplete=\"off\"\n [maxlength]=\"100\"\n [showReset]=\"filtersBase.resetFieldVisible('token')\"\n (handleReset)=\"filtersBase.resetField('token')\">\n </lib-vitu-form-field-input>\n </div>\n\n </div>\n\n </ng-template>\n\n </div>\n\n</lib-filters-base>\n","import { Component, Input, Output, EventEmitter } from \"@angular/core\";\nimport { UntypedFormBuilder, Validators } from \"@angular/forms\";\nimport { Filter } from \"@merchant_app/storage/transactions/transactions.state\";\nimport { CardBrandEnum } from \"@merchant_api/models/card-brand-enum\";\nimport { TransactionStatus } from \"@merchant_api/models/transaction-status\";\nimport { LocalTimePoint } from \"shared-lib\";\nimport { GatewayEnum } from \"@merchant_api/models/gateway-enum\";\nimport { DigitalWalletEnum } from \"@merchant_api/models/digital-wallet-enum\";\nimport { TransactionType } from \"@merchant_api/models/transaction-type\";\n\n@Component({\n selector: \"app-transaction-log-filters\",\n templateUrl: \"./transaction-log-filters.component.html\",\n styleUrls: [\"./transaction-log-filters.component.less\"],\n})\nexport class TransactionLogFiltersComponent {\n\n @Output() filterChanged = new EventEmitter<Filter>();\n\n @Input() filter: Filter;\n\n gatewayList: Array<GatewayEnum>;\n typeList: Array<TransactionType>;\n digitalWalletList: Array<DigitalWalletEnum>;\n serviceFeeList: Array<string>;\n\n // eslint-disable-next-line max-len\n readonly moreFields = [\"cardBrands\", \"transactionId\", \"authCode\", \"gateways\", \"tid\", \"localDateSettledInterval\", \"mid\", \"digitalWallets\", \"isServiceFee\", \"token\"];\n\n LocalTimePoint = LocalTimePoint;\n\n constructor(\n private fb: UntypedFormBuilder\n ) {\n this.gatewayList = Object.values(GatewayEnum);\n this.typeList = Object.values(TransactionType).sort();\n this.digitalWalletList = Object.values(DigitalWalletEnum);\n this.serviceFeeList = [\n \"No\",\n \"Yes\"\n ];\n }\n\n amountMask = {\n mask: Number,\n scale: 2,\n thousandsSeparator: \",\",\n padFractionalZeros: true,\n radix: \".\",\n mapToRadix: [\",\"]\n };\n\n filterForm = this.fb.group({\n localDateInterval: [null],\n localDateSettledInterval: [null],\n transactionId: [null],\n amount: [null],\n authCode: [null],\n first6: [null, [Validators.pattern(/^\\d{6}$/)]],\n last4: [null, [Validators.pattern(/^\\d{4}$/)]],\n payerName: [null, [Validators.pattern(/^[a-zA-Z0-9\\s]+$/)]],\n cardBrands: [null],\n types: [null],\n statuses: [null],\n gateways: [null],\n tid: [null],\n mid: [null],\n digitalWallets: [null],\n isServiceFee: [null],\n token: [null]\n });\n\n cardList = [\n CardBrandEnum.Amex,\n CardBrandEnum.Discover,\n CardBrandEnum.MasterCard,\n CardBrandEnum.Visa,\n ];\n\n statusList = Object.values(TransactionStatus);\n\n onFilterChanged(filter: any) {\n\n this.filterChanged.emit(filter);\n }\n\n}\n","<div class=\"outer-container\">\n\n <lib-title-bar [crumbs]=\"[{ 'label': 'Transactions' }]\">\n </lib-title-bar>\n\n <app-transaction-log-filters\n [filter]=\"filter\"\n (filterChanged)=\"filterChanged.emit($event)\">\n </app-transaction-log-filters>\n\n <div class=\"table-actions-bar\">\n <lib-action-button label=\"Export\" (click)=\"this.exportToCsv.emit()\" [disabled]=\"exportButtonDisabled()\"\n fontImage=\"far fa-file-export fa-lg\" [kind]=\"ActionButtonKind.SECONDARY\">\n </lib-action-button>\n </div>\n\n <div class=\"table-container\">\n <ng-container *ngIf=\"true then table\"></ng-container>\n <ng-container *ngIf=\"exportLoading then spinner\"></ng-container>\n </div>\n\n</div>\n\n<ng-template #spinner>\n <lib-busy-indicator>\n </lib-busy-indicator>\n</ng-template>\n\n<ng-template #table>\n\n <app-transactions-table\n [rowsData]=\"rowsData\"\n [rowsDataLoading]=\"loading\"\n [rowsDataError]=\"error\"\n rowsDataErrorMessage=\"Error Loading Transactions\"\n rowsDataEmptyMessage=\"No Transactions Found\"\n [rowsDataShowWhileLoading]=\"true\"\n selectedRowProperty=\"token\"\n [sorting]=\"sorting\"\n (sortingChanged)=\"onSortingChanged($event)\"\n [pager]=\"pager\"\n (pageChanged)=\"pageChanged.emit($event)\"\n (rowSelected)=\"onRowSelected($event)\">\n </app-transactions-table>\n\n</ng-template>\n","import { Component, Input, Output, EventEmitter } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { TableSorting, Pager, ActionButtonKind } from \"shared-lib\";\n\nimport { Sorting, Filter } from \"@merchant_app/storage/transactions/transactions.state\";\nimport { Transaction } from \"@merchant_api/models/transaction\";\nimport { Payment } from \"@merchant_api/models/payment\";\nimport { CurrentUserDto } from \"@merchant_app/storage/current-user/current-user.state\";\nimport { CurrentUserPermissions } from \"@merchant_app/shared/current-user-permissions\";\n\ntype RowsData = Transaction[];\n\n@Component({\n selector: \"app-transaction-log\",\n templateUrl: \"./transaction-log.component.html\",\n styleUrls: [\"./transaction-log.component.less\"],\n})\nexport class TransactionLogComponent {\n\n @Input() currentUser: CurrentUserDto;\n @Input() loading = false;\n @Input() error: Error;\n @Input() exportLoading = false;\n @Input() rowsData: RowsData;\n @Input() sorting: Sorting = {\n orderBy: null,\n orderDirection: null\n };\n @Input() pager: Pager;\n @Input() filter: Filter;\n\n @Output() filterChanged = new EventEmitter<Filter>();\n @Output() sortingChanged = new EventEmitter<Sorting>();\n @Output() pageChanged = new EventEmitter<number>();\n @Output() exportToCsv = new EventEmitter<void>();\n\n ActionButtonKind = ActionButtonKind;\n\n constructor(private router: Router, private currPerms: CurrentUserPermissions) {}\n\n onSortingChanged(sort: Sorting|TableSorting) {\n const sorting = sort as Sorting;\n this.sortingChanged.emit(sorting);\n }\n\n onRowSelected(rowData: string|Payment): void {\n if (!this.hasTransactionsGetAndPaymentsGetPermissions) {\n return;\n }\n const token = rowData as string;\n this.router.navigate([`/dashboard/transactions/${token}`]);\n }\n\n exportButtonDisabled() {\n return this.exportLoading\n || !this.filter?.localDateInterval?.from\n || !this.filter?.localDateInterval?.to;\n }\n\n get hasTransactionsGetAndPaymentsGetPermissions(): boolean {\n return this.currPerms.has([\"core.payments.get\", \"core.transactions.get\"]);\n }\n\n}\n","import { Component } from \"@angular/core\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { Store, select } from \"@ngrx/store\";\nimport { Observable } from \"rxjs\";\nimport { map } from \"rxjs/operators\";\nimport { Pager } from \"shared-lib\";\n\nimport {\n FilterTransactionsAction,\n SortTransactionsAction,\n PageChangedTransactionsAction,\n ExportTransactionsToCsvAction\n} from \"@merchant_app/storage/transactions/transactions.actions\";\nimport { Sorting, Filter } from \"@merchant_app/storage/transactions/transactions.state\";\n\nimport { getTransactionsState } from \"@merchant_app/storage/transactions/transactions.selectors\";\nimport { Transaction } from \"@merchant_api/models/transaction\";\nimport * as CurrentUserSelectors from \"@merchant_app/storage/current-user/current-user.selectors\";\n\ntype RowsData = Transaction[];\n\n@Component({\n selector: \"app-transactions\",\n templateUrl: \"./transactions.component.html\",\n styleUrls: [\"./transactions.component.less\"],\n})\nexport class TransactionsComponent {\n\n currentUser$ = this.store.select(CurrentUserSelectors.getCurrentUser);\n\n get rowsData$(): Observable<RowsData> {\n return this.store.pipe(select(getTransactionsState), map((i) => i.rows));\n }\n\n get sorting$(): Observable<Sorting> {\n return this.store.pipe(select(getTransactionsState), map((i) => i.sorting));\n }\n\n get pager$(): Observable<Pager> {\n return this.store.pipe(select(getTransactionsState), map((i) => i.pager));\n }\n\n get loading$(): Observable<boolean> {\n return this.store.pipe(select(getTransactionsState), map((i) => i.loading));\n }\n\n get error$(): Observable<Error> {\n return this.store.pipe(select(getTransactionsState), map((i) => i.error));\n }\n\n get filter$(): Observable<Filter> {\n return this.store.pipe(select(getTransactionsState), map((i) => i.filter));\n }\n\n get exportLoading$(): Observable<boolean> {\n return this.store.pipe(select(getTransactionsState), map((i) => i.exportLoading));\n }\n\n constructor(private store: Store<IStore>) {}\n\n onFilterChanged(filter: Filter) {\n this.store.dispatch(new FilterTransactionsAction(filter));\n }\n\n onSortingChanged(sorting: Sorting) {\n this.store.dispatch(new SortTransactionsAction(sorting));\n }\n\n onPageChanged(page: number) {\n this.store.dispatch(new PageChangedTransactionsAction(page));\n }\n\n exportToCsv() {\n this.store.dispatch(new ExportTransactionsToCsvAction());\n }\n\n}\n","<app-transaction-log\n [rowsData]=\"rowsData$ | async\"\n [sorting]=\"sorting$ | async\"\n [pager]=\"pager$ | async\"\n [filter]=\"filter$ | async\"\n (filterChanged)=\"onFilterChanged($event)\"\n (sortingChanged)=\"onSortingChanged($event)\"\n [exportLoading]=\"exportLoading$ | async\"\n [loading]=\"loading$ | async\"\n [error]=\"error$ | async\"\n (pageChanged)=\"onPageChanged($event)\"\n (exportToCsv)=\"exportToCsv()\"\n [currentUser]=\"currentUser$ | async\">\n</app-transaction-log>\n","import { createAction, props } from \"@ngrx/store\";\nimport { Capture } from \"@merchant_api/models/capture\";\nimport { TransactionDetails } from \"@merchant_api/models/transaction-details\";\n\nexport const GetTransactionDetailAction = createAction(\n \"[Transaction] Get Transaction Detail\",\n props<{\n token: string;\n getRelations: boolean;\n }>(),\n);\n\nexport const GetTransactionDetailSucceedAction = createAction(\n \"[Transaction] Get Transaction Detail Succeed\",\n props<{\n record: TransactionDetails;\n getRelations: boolean;\n }>(),\n);\n\nexport const GetTransactionDetailFailAction = createAction(\n \"[Transaction] Get Transaction Detail Fail\",\n props<{\n error: any;\n }>(),\n);\n\nexport const CaptureTransactionAction = createAction(\n \"[Transaction] Capture Transaction\",\n props<{ transaction: Capture }>(),\n);\n\nexport const UpdateTransactionDetailAction = createAction(\n \"[Transaction] Update Transaction Detail\",\n props<{ record: TransactionDetails }>(),\n);\n\nexport const DownloadReceiptAction = createAction(\n \"[Transaction] Download Receipt\",\n props<{ transaction: TransactionDetails }>(),\n);\n","import { Action } from \"@ngrx/store\";\nimport { Refund } from \"@merchant_api/models/refund\";\nimport { Capture } from \"@merchant_api/models/capture\";\nimport { Void } from \"@merchant_api/models/void\";\nimport { TransactionFeesResult } from \"@merchant_api/models/transaction-fees-result\";\nimport { PaymentDetails } from \"@merchant_api/models/payment-details\";\n\nexport enum ActionTypes {\n GetPaymentDetail = \"[PAYMENT] GetPaymentDetail\",\n GetPaymentDetailSucceed = \"[PAYMENT] GetPaymentDetailSucceed\",\n GetPaymentDetailFail = \"[PAYMENT] GetPaymentDetailFail\",\n RefundPaymentTransaction = \"[PAYMENT] RefundPaymentTransaction\",\n CapturePaymentTransaction = \"[PAYMENT] CapturePaymentTransaction\",\n VoidPaymentTransaction = \"[PAYMENT] VoidPaymentTransaction\",\n GetPaymentFees = \"[PAYMENT] GetPaymentFees\",\n GetPaymentFeesSucceed = \"[PAYMENT] GetPaymentFeesSucceed\",\n GetPaymentFeesFail = \"[PAYMENT] GetPaymentFeesFail\"\n}\n\nexport class GetPaymentDetailAction implements Action {\n\n constructor(\n public token: string,\n public getRelations = false\n ) {}\n\n readonly type = ActionTypes.GetPaymentDetail;\n}\n\nexport class GetPaymentDetailSucceedAction implements Action {\n\n constructor(\n public record: PaymentDetails,\n public getRelations = false\n ) {}\n\n readonly type = ActionTypes.GetPaymentDetailSucceed;\n}\n\nexport class GetPaymentDetailFailAction implements Action {\n\n constructor(\n public error: any\n ) {}\n\n readonly type = ActionTypes.GetPaymentDetailFail;\n}\n\nexport class RefundPaymentTransactionAction implements Action {\n\n constructor(\n public refund: {payment: PaymentDetails; amount: number; serviceFeeAmount: number|null}\n ) {}\n\n readonly type = ActionTypes.RefundPaymentTransaction;\n}\n\nexport class CapturePaymentTransactionAction implements Action {\n\n constructor(\n public paymentTransaction: Capture,\n public token: string,\n ) { }\n\n readonly type = ActionTypes.CapturePaymentTransaction;\n}\n\nexport class VoidPaymentTransactionAction implements Action {\n\n constructor(\n public paymentTransaction: Void,\n public token: string,\n ) { }\n\n readonly type = ActionTypes.VoidPaymentTransaction;\n}\n\nexport class GetPaymentFeesAction implements Action {\n\n constructor(\n public token: string\n ) {}\n\n readonly type = ActionTypes.GetPaymentFees;\n}\n\nexport class GetPaymentFeesSucceedAction implements Action {\n\n constructor(\n public fees: TransactionFeesResult\n ) {}\n\n readonly type = ActionTypes.GetPaymentFeesSucceed;\n}\n\nexport class GetPaymentFeesFailAction implements Action {\n\n constructor(\n public error: any\n ) {}\n\n readonly type = ActionTypes.GetPaymentFeesFail;\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getNextPaymentActionsState = createSelector(\n (store: IStore) => store.nextPaymentActions,\n store => store,\n);\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getPaymentState = createSelector(\n (store: IStore) => store.payment,\n store => store,\n);\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getTransactionState = createSelector(\n (store: IStore) => store.transaction,\n store => store,\n);\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getTransactionSiblingsState = createSelector(\n (store: IStore) => store.transactionSiblings,\n store => store,\n);\n","/* tslint:disable */\n/* eslint-disable */\nexport enum AdditionalAmountType {\n Surcharge = 'Surcharge',\n ServiceFee = 'ServiceFee'\n}\n","/* tslint:disable */\n/* eslint-disable */\nexport enum DisputeTypeEnum {\n Chargeback = 'Chargeback',\n Retrieval = 'Retrieval'\n}\n","/* tslint:disable */\n/* eslint-disable */\nexport enum DisputeOrderBy {\n Id = 'Id',\n CaseNumber = 'CaseNumber',\n CaseReason = 'CaseReason',\n RaiseDateUtc = 'RaiseDateUtc',\n CaseStatus = 'CaseStatus'\n}\n","import * as i7 from '@angular/cdk/a11y';\nimport { FocusKeyManager, A11yModule } from '@angular/cdk/a11y';\nimport * as i5 from '@angular/cdk/observers';\nimport { ObserversModule } from '@angular/cdk/observers';\nimport * as i2 from '@angular/cdk/portal';\nimport { CdkPortal, TemplatePortal, CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';\nimport * as i1$2 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Directive, Inject, Optional, TemplateRef, Component, ChangeDetectionStrategy, ViewEncapsulation, ContentChild, ViewChild, Input, forwardRef, EventEmitter, Output, ContentChildren, QueryList, Attribute, NgModule } from '@angular/core';\nimport * as i4 from '@angular/material/core';\nimport { mixinDisabled, mixinColor, mixinDisableRipple, mixinTabIndex, MAT_RIPPLE_GLOBAL_OPTIONS, RippleRenderer, MatCommonModule, MatRippleModule } from '@angular/material/core';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\nimport { take, startWith, distinctUntilChanged, takeUntil, switchMap, skip } from 'rxjs/operators';\nimport { Subject, Subscription, fromEvent, of, merge, EMPTY, Observable, timer } from 'rxjs';\nimport * as i1 from '@angular/cdk/bidi';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport * as i1$1 from '@angular/cdk/scrolling';\nimport * as i3 from '@angular/cdk/platform';\nimport { normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { hasModifierKey, SPACE, ENTER } from '@angular/cdk/keycodes';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token for the MatInkBar's Positioner. */\nconst _MAT_INK_BAR_POSITIONER = new InjectionToken('MatInkBarPositioner', {\n providedIn: 'root',\n factory: _MAT_INK_BAR_POSITIONER_FACTORY,\n});\n/**\n * The default positioner function for the MatInkBar.\n * @docs-private\n */\nfunction _MAT_INK_BAR_POSITIONER_FACTORY() {\n const method = (element) => ({\n left: element ? (element.offsetLeft || 0) + 'px' : '0',\n width: element ? (element.offsetWidth || 0) + 'px' : '0',\n });\n return method;\n}\n/**\n * The ink-bar is used to display and animate the line underneath the current active tab label.\n * @docs-private\n */\nclass MatInkBar {\n constructor(_elementRef, _ngZone, _inkBarPositioner, _animationMode) {\n this._elementRef = _elementRef;\n this._ngZone = _ngZone;\n this._inkBarPositioner = _inkBarPositioner;\n this._animationMode = _animationMode;\n }\n /**\n * Calculates the styles from the provided element in order to align the ink-bar to that element.\n * Shows the ink bar if previously set as hidden.\n * @param element\n */\n alignToElement(element) {\n this.show();\n // `onStable` might not run for a while if the zone has already stabilized.\n // Wrap the call in `NgZone.run` to ensure that it runs relatively soon.\n this._ngZone.run(() => {\n this._ngZone.onStable.pipe(take(1)).subscribe(() => {\n const positions = this._inkBarPositioner(element);\n const inkBar = this._elementRef.nativeElement;\n inkBar.style.left = positions.left;\n inkBar.style.width = positions.width;\n });\n });\n }\n /** Shows the ink bar. */\n show() {\n this._elementRef.nativeElement.style.visibility = 'visible';\n }\n /** Hides the ink bar. */\n hide() {\n this._elementRef.nativeElement.style.visibility = 'hidden';\n }\n}\nMatInkBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatInkBar, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: _MAT_INK_BAR_POSITIONER }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatInkBar.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatInkBar, selector: \"mat-ink-bar\", host: { properties: { \"class._mat-animation-noopable\": \"_animationMode === 'NoopAnimations'\" }, classAttribute: \"mat-ink-bar\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatInkBar, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-ink-bar',\n host: {\n 'class': 'mat-ink-bar',\n '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,\n },\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Inject,\n args: [_MAT_INK_BAR_POSITIONER]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_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 * Injection token that can be used to reference instances of `MatTabContent`. It serves as\n * alternative token to the actual `MatTabContent` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_TAB_CONTENT = new InjectionToken('MatTabContent');\n/** Decorates the `ng-template` tags and reads out the template from it. */\nclass MatTabContent {\n constructor(/** Content for the tab. */ template) {\n this.template = template;\n }\n}\nMatTabContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabContent, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nMatTabContent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTabContent, selector: \"[matTabContent]\", providers: [{ provide: MAT_TAB_CONTENT, useExisting: MatTabContent }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabContent, decorators: [{\n type: Directive,\n args: [{\n selector: '[matTabContent]',\n providers: [{ provide: MAT_TAB_CONTENT, useExisting: MatTabContent }],\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 token that can be used to reference instances of `MatTabLabel`. It serves as\n * alternative token to the actual `MatTabLabel` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_TAB_LABEL = new InjectionToken('MatTabLabel');\n/**\n * Used to provide a tab label to a tab without causing a circular dependency.\n * @docs-private\n */\nconst MAT_TAB = new InjectionToken('MAT_TAB');\n/** Used to flag tab labels for use with the portal directive */\nclass MatTabLabel extends CdkPortal {\n constructor(templateRef, viewContainerRef, _closestTab) {\n super(templateRef, viewContainerRef);\n this._closestTab = _closestTab;\n }\n}\nMatTabLabel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabLabel, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: MAT_TAB, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatTabLabel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTabLabel, selector: \"[mat-tab-label], [matTabLabel]\", providers: [{ provide: MAT_TAB_LABEL, useExisting: MatTabLabel }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabLabel, decorators: [{\n type: Directive,\n args: [{\n selector: '[mat-tab-label], [matTabLabel]',\n providers: [{ provide: MAT_TAB_LABEL, useExisting: MatTabLabel }],\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_TAB]\n }, {\n type: Optional\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Boilerplate for applying mixins to MatTab.\n/** @docs-private */\nconst _MatTabBase = mixinDisabled(class {\n});\n/**\n * Used to provide a tab group to a tab without causing a circular dependency.\n * @docs-private\n */\nconst MAT_TAB_GROUP = new InjectionToken('MAT_TAB_GROUP');\nclass MatTab extends _MatTabBase {\n constructor(_viewContainerRef, _closestTabGroup) {\n super();\n this._viewContainerRef = _viewContainerRef;\n this._closestTabGroup = _closestTabGroup;\n /** Plain text label for the tab, used when there is no template label. */\n this.textLabel = '';\n /** Portal that will be the hosted content of the tab */\n this._contentPortal = null;\n /** Emits whenever the internal state of the tab changes. */\n this._stateChanges = new Subject();\n /**\n * The relatively indexed position where 0 represents the center, negative is left, and positive\n * represents the right.\n */\n this.position = null;\n /**\n * The initial relatively index origin of the tab if it was created and selected after there\n * was already a selected tab. Provides context of what position the tab should originate from.\n */\n this.origin = null;\n /**\n * Whether the tab is currently active.\n */\n this.isActive = false;\n }\n /** Content for the tab label given by `<ng-template mat-tab-label>`. */\n get templateLabel() {\n return this._templateLabel;\n }\n set templateLabel(value) {\n this._setTemplateLabelInput(value);\n }\n /** @docs-private */\n get content() {\n return this._contentPortal;\n }\n ngOnChanges(changes) {\n if (changes.hasOwnProperty('textLabel') || changes.hasOwnProperty('disabled')) {\n this._stateChanges.next();\n }\n }\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n ngOnInit() {\n this._contentPortal = new TemplatePortal(this._explicitContent || this._implicitContent, this._viewContainerRef);\n }\n /**\n * This has been extracted to a util because of TS 4 and VE.\n * View Engine doesn't support property rename inheritance.\n * TS 4.0 doesn't allow properties to override accessors or vice-versa.\n * @docs-private\n */\n _setTemplateLabelInput(value) {\n // Only update the label if the query managed to find one. This works around an issue where a\n // user may have manually set `templateLabel` during creation mode, which would then get\n // clobbered by `undefined` when the query resolves. Also note that we check that the closest\n // tab matches the current one so that we don't pick up labels from nested tabs.\n if (value && value._closestTab === this) {\n this._templateLabel = value;\n }\n }\n}\nMatTab.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTab, deps: [{ token: i0.ViewContainerRef }, { token: MAT_TAB_GROUP, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatTab.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTab, selector: \"mat-tab\", inputs: { disabled: \"disabled\", textLabel: [\"label\", \"textLabel\"], ariaLabel: [\"aria-label\", \"ariaLabel\"], ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"], labelClass: \"labelClass\", bodyClass: \"bodyClass\" }, providers: [{ provide: MAT_TAB, useExisting: MatTab }], queries: [{ propertyName: \"templateLabel\", first: true, predicate: MAT_TAB_LABEL, descendants: true }, { propertyName: \"_explicitContent\", first: true, predicate: MAT_TAB_CONTENT, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: \"_implicitContent\", first: true, predicate: TemplateRef, descendants: true, static: true }], exportAs: [\"matTab\"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: \"<!-- Create a template for the content of the <mat-tab> so that we can grab a reference to this\\n TemplateRef and use it in a Portal to render the tab content in the appropriate place in the\\n tab-group. -->\\n<ng-template><ng-content></ng-content></ng-template>\\n\", changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTab, decorators: [{\n type: Component,\n args: [{ selector: 'mat-tab', inputs: ['disabled'], changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, exportAs: 'matTab', providers: [{ provide: MAT_TAB, useExisting: MatTab }], template: \"<!-- Create a template for the content of the <mat-tab> so that we can grab a reference to this\\n TemplateRef and use it in a Portal to render the tab content in the appropriate place in the\\n tab-group. -->\\n<ng-template><ng-content></ng-content></ng-template>\\n\" }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_TAB_GROUP]\n }, {\n type: Optional\n }] }]; }, propDecorators: { templateLabel: [{\n type: ContentChild,\n args: [MAT_TAB_LABEL]\n }], _explicitContent: [{\n type: ContentChild,\n args: [MAT_TAB_CONTENT, { read: TemplateRef, static: true }]\n }], _implicitContent: [{\n type: ViewChild,\n args: [TemplateRef, { static: true }]\n }], textLabel: [{\n type: Input,\n args: ['label']\n }], ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], ariaLabelledby: [{\n type: Input,\n args: ['aria-labelledby']\n }], labelClass: [{\n type: Input\n }], bodyClass: [{\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 * Animations used by the Material tabs.\n * @docs-private\n */\nconst matTabsAnimations = {\n /** Animation translates a tab along the X axis. */\n translateTab: trigger('translateTab', [\n // Transitions to `none` instead of 0, because some browsers might blur the content.\n state('center, void, left-origin-center, right-origin-center', style({ transform: 'none' })),\n // If the tab is either on the left or right, we additionally add a `min-height` of 1px\n // in order to ensure that the element has a height before its state changes. This is\n // necessary because Chrome does seem to skip the transition in RTL mode if the element does\n // not have a static height and is not rendered. See related issue: #9465\n state('left', style({\n transform: 'translate3d(-100%, 0, 0)',\n minHeight: '1px',\n // Normally this is redundant since we detach the content from the DOM, but if the user\n // opted into keeping the content in the DOM, we have to hide it so it isn't focusable.\n visibility: 'hidden',\n })),\n state('right', style({\n transform: 'translate3d(100%, 0, 0)',\n minHeight: '1px',\n visibility: 'hidden',\n })),\n transition('* => left, * => right, left => center, right => center', animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')),\n transition('void => left-origin-center', [\n style({ transform: 'translate3d(-100%, 0, 0)', visibility: 'hidden' }),\n animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)'),\n ]),\n transition('void => right-origin-center', [\n style({ transform: 'translate3d(100%, 0, 0)', visibility: 'hidden' }),\n animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)'),\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 * The portal host directive for the contents of the tab.\n * @docs-private\n */\nclass MatTabBodyPortal extends CdkPortalOutlet {\n constructor(componentFactoryResolver, viewContainerRef, _host, _document) {\n super(componentFactoryResolver, viewContainerRef, _document);\n this._host = _host;\n /** Subscription to events for when the tab body begins centering. */\n this._centeringSub = Subscription.EMPTY;\n /** Subscription to events for when the tab body finishes leaving from center position. */\n this._leavingSub = Subscription.EMPTY;\n }\n /** Set initial visibility or set up subscription for changing visibility. */\n ngOnInit() {\n super.ngOnInit();\n this._centeringSub = this._host._beforeCentering\n .pipe(startWith(this._host._isCenterPosition(this._host._position)))\n .subscribe((isCentering) => {\n if (isCentering && !this.hasAttached()) {\n this.attach(this._host._content);\n }\n });\n this._leavingSub = this._host._afterLeavingCenter.subscribe(() => {\n if (!this._host.preserveContent) {\n this.detach();\n }\n });\n }\n /** Clean up centering subscription. */\n ngOnDestroy() {\n super.ngOnDestroy();\n this._centeringSub.unsubscribe();\n this._leavingSub.unsubscribe();\n }\n}\nMatTabBodyPortal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabBodyPortal, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ViewContainerRef }, { token: forwardRef(() => MatTabBody) }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });\nMatTabBodyPortal.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTabBodyPortal, selector: \"[matTabBodyHost]\", usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabBodyPortal, decorators: [{\n type: Directive,\n args: [{\n selector: '[matTabBodyHost]',\n }]\n }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ViewContainerRef }, { type: MatTabBody, decorators: [{\n type: Inject,\n args: [forwardRef(() => MatTabBody)]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\n/**\n * Base class with all of the `MatTabBody` functionality.\n * @docs-private\n */\nclass _MatTabBodyBase {\n constructor(_elementRef, _dir, changeDetectorRef) {\n this._elementRef = _elementRef;\n this._dir = _dir;\n /** Subscription to the directionality change observable. */\n this._dirChangeSubscription = Subscription.EMPTY;\n /** Emits when an animation on the tab is complete. */\n this._translateTabComplete = new Subject();\n /** Event emitted when the tab begins to animate towards the center as the active tab. */\n this._onCentering = new EventEmitter();\n /** Event emitted before the centering of the tab begins. */\n this._beforeCentering = new EventEmitter();\n /** Event emitted before the centering of the tab begins. */\n this._afterLeavingCenter = new EventEmitter();\n /** Event emitted when the tab completes its animation towards the center. */\n this._onCentered = new EventEmitter(true);\n // Note that the default value will always be overwritten by `MatTabBody`, but we need one\n // anyway to prevent the animations module from throwing an error if the body is used on its own.\n /** Duration for the tab's animation. */\n this.animationDuration = '500ms';\n /** Whether the tab's content should be kept in the DOM while it's off-screen. */\n this.preserveContent = false;\n if (_dir) {\n this._dirChangeSubscription = _dir.change.subscribe((dir) => {\n this._computePositionAnimationState(dir);\n changeDetectorRef.markForCheck();\n });\n }\n // Ensure that we get unique animation events, because the `.done` callback can get\n // invoked twice in some browsers. See https://github.com/angular/angular/issues/24084.\n this._translateTabComplete\n .pipe(distinctUntilChanged((x, y) => {\n return x.fromState === y.fromState && x.toState === y.toState;\n }))\n .subscribe(event => {\n // If the transition to the center is complete, emit an event.\n if (this._isCenterPosition(event.toState) && this._isCenterPosition(this._position)) {\n this._onCentered.emit();\n }\n if (this._isCenterPosition(event.fromState) && !this._isCenterPosition(this._position)) {\n this._afterLeavingCenter.emit();\n }\n });\n }\n /** The shifted index position of the tab body, where zero represents the active center tab. */\n set position(position) {\n this._positionIndex = position;\n this._computePositionAnimationState();\n }\n /**\n * After initialized, check if the content is centered and has an origin. If so, set the\n * special position states that transition the tab from the left or right before centering.\n */\n ngOnInit() {\n if (this._position == 'center' && this.origin != null) {\n this._position = this._computePositionFromOrigin(this.origin);\n }\n }\n ngOnDestroy() {\n this._dirChangeSubscription.unsubscribe();\n this._translateTabComplete.complete();\n }\n _onTranslateTabStarted(event) {\n const isCentering = this._isCenterPosition(event.toState);\n this._beforeCentering.emit(isCentering);\n if (isCentering) {\n this._onCentering.emit(this._elementRef.nativeElement.clientHeight);\n }\n }\n /** The text direction of the containing app. */\n _getLayoutDirection() {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n /** Whether the provided position state is considered center, regardless of origin. */\n _isCenterPosition(position) {\n return (position == 'center' || position == 'left-origin-center' || position == 'right-origin-center');\n }\n /** Computes the position state that will be used for the tab-body animation trigger. */\n _computePositionAnimationState(dir = this._getLayoutDirection()) {\n if (this._positionIndex < 0) {\n this._position = dir == 'ltr' ? 'left' : 'right';\n }\n else if (this._positionIndex > 0) {\n this._position = dir == 'ltr' ? 'right' : 'left';\n }\n else {\n this._position = 'center';\n }\n }\n /**\n * Computes the position state based on the specified origin position. This is used if the\n * tab is becoming visible immediately after creation.\n */\n _computePositionFromOrigin(origin) {\n const dir = this._getLayoutDirection();\n if ((dir == 'ltr' && origin <= 0) || (dir == 'rtl' && origin > 0)) {\n return 'left-origin-center';\n }\n return 'right-origin-center';\n }\n}\n_MatTabBodyBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatTabBodyBase, deps: [{ token: i0.ElementRef }, { token: i1.Directionality, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });\n_MatTabBodyBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _MatTabBodyBase, inputs: { _content: [\"content\", \"_content\"], origin: \"origin\", animationDuration: \"animationDuration\", preserveContent: \"preserveContent\", position: \"position\" }, outputs: { _onCentering: \"_onCentering\", _beforeCentering: \"_beforeCentering\", _afterLeavingCenter: \"_afterLeavingCenter\", _onCentered: \"_onCentered\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatTabBodyBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.Directionality, decorators: [{\n type: Optional\n }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { _onCentering: [{\n type: Output\n }], _beforeCentering: [{\n type: Output\n }], _afterLeavingCenter: [{\n type: Output\n }], _onCentered: [{\n type: Output\n }], _content: [{\n type: Input,\n args: ['content']\n }], origin: [{\n type: Input\n }], animationDuration: [{\n type: Input\n }], preserveContent: [{\n type: Input\n }], position: [{\n type: Input\n }] } });\n/**\n * Wrapper for the contents of a tab.\n * @docs-private\n */\nclass MatTabBody extends _MatTabBodyBase {\n constructor(elementRef, dir, changeDetectorRef) {\n super(elementRef, dir, changeDetectorRef);\n }\n}\nMatTabBody.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabBody, deps: [{ token: i0.ElementRef }, { token: i1.Directionality, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nMatTabBody.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTabBody, selector: \"mat-tab-body\", host: { classAttribute: \"mat-tab-body\" }, viewQueries: [{ propertyName: \"_portalHost\", first: true, predicate: CdkPortalOutlet, descendants: true }], usesInheritance: true, ngImport: i0, template: \"<div class=\\\"mat-tab-body-content\\\" #content\\n [@translateTab]=\\\"{\\n value: _position,\\n params: {animationDuration: animationDuration}\\n }\\\"\\n (@translateTab.start)=\\\"_onTranslateTabStarted($event)\\\"\\n (@translateTab.done)=\\\"_translateTabComplete.next($event)\\\"\\n cdkScrollable>\\n <ng-template matTabBodyHost></ng-template>\\n</div>\\n\", styles: [\".mat-tab-body-content{height:100%;overflow:auto}.mat-tab-group-dynamic-height .mat-tab-body-content{overflow:hidden}.mat-tab-body-content[style*=\\\"visibility: hidden\\\"]{display:none}\"], dependencies: [{ kind: \"directive\", type: MatTabBodyPortal, selector: \"[matTabBodyHost]\" }], animations: [matTabsAnimations.translateTab], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabBody, decorators: [{\n type: Component,\n args: [{ selector: 'mat-tab-body', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, animations: [matTabsAnimations.translateTab], host: {\n 'class': 'mat-tab-body',\n }, template: \"<div class=\\\"mat-tab-body-content\\\" #content\\n [@translateTab]=\\\"{\\n value: _position,\\n params: {animationDuration: animationDuration}\\n }\\\"\\n (@translateTab.start)=\\\"_onTranslateTabStarted($event)\\\"\\n (@translateTab.done)=\\\"_translateTabComplete.next($event)\\\"\\n cdkScrollable>\\n <ng-template matTabBodyHost></ng-template>\\n</div>\\n\", styles: [\".mat-tab-body-content{height:100%;overflow:auto}.mat-tab-group-dynamic-height .mat-tab-body-content{overflow:hidden}.mat-tab-body-content[style*=\\\"visibility: hidden\\\"]{display:none}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.Directionality, decorators: [{\n type: Optional\n }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { _portalHost: [{\n type: ViewChild,\n args: [CdkPortalOutlet]\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Injection token that can be used to provide the default options the tabs module. */\nconst MAT_TABS_CONFIG = new InjectionToken('MAT_TABS_CONFIG');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Boilerplate for applying mixins to MatTabLabelWrapper.\n/** @docs-private */\nconst _MatTabLabelWrapperBase = mixinDisabled(class {\n});\n/**\n * Used in the `mat-tab-group` view to display tab labels.\n * @docs-private\n */\nclass MatTabLabelWrapper extends _MatTabLabelWrapperBase {\n constructor(elementRef) {\n super();\n this.elementRef = elementRef;\n }\n /** Sets focus on the wrapper element */\n focus() {\n this.elementRef.nativeElement.focus();\n }\n getOffsetLeft() {\n return this.elementRef.nativeElement.offsetLeft;\n }\n getOffsetWidth() {\n return this.elementRef.nativeElement.offsetWidth;\n }\n}\nMatTabLabelWrapper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabLabelWrapper, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nMatTabLabelWrapper.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTabLabelWrapper, selector: \"[matTabLabelWrapper]\", inputs: { disabled: \"disabled\" }, host: { properties: { \"class.mat-tab-disabled\": \"disabled\", \"attr.aria-disabled\": \"!!disabled\" } }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabLabelWrapper, decorators: [{\n type: Directive,\n args: [{\n selector: '[matTabLabelWrapper]',\n inputs: ['disabled'],\n host: {\n '[class.mat-tab-disabled]': 'disabled',\n '[attr.aria-disabled]': '!!disabled',\n },\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Config used to bind passive event listeners */\nconst passiveEventListenerOptions = normalizePassiveListenerOptions({\n passive: true,\n});\n/**\n * The distance in pixels that will be overshot when scrolling a tab label into view. This helps\n * provide a small affordance to the label next to it.\n */\nconst EXAGGERATED_OVERSCROLL = 60;\n/**\n * Amount of milliseconds to wait before starting to scroll the header automatically.\n * Set a little conservatively in order to handle fake events dispatched on touch devices.\n */\nconst HEADER_SCROLL_DELAY = 650;\n/**\n * Interval in milliseconds at which to scroll the header\n * while the user is holding their pointer.\n */\nconst HEADER_SCROLL_INTERVAL = 100;\n/**\n * Base class for a tab header that supported pagination.\n * @docs-private\n */\nclass MatPaginatedTabHeader {\n constructor(_elementRef, _changeDetectorRef, _viewportRuler, _dir, _ngZone, _platform, _animationMode) {\n this._elementRef = _elementRef;\n this._changeDetectorRef = _changeDetectorRef;\n this._viewportRuler = _viewportRuler;\n this._dir = _dir;\n this._ngZone = _ngZone;\n this._platform = _platform;\n this._animationMode = _animationMode;\n /** The distance in pixels that the tab labels should be translated to the left. */\n this._scrollDistance = 0;\n /** Whether the header should scroll to the selected index after the view has been checked. */\n this._selectedIndexChanged = false;\n /** Emits when the component is destroyed. */\n this._destroyed = new Subject();\n /** Whether the controls for pagination should be displayed */\n this._showPaginationControls = false;\n /** Whether the tab list can be scrolled more towards the end of the tab label list. */\n this._disableScrollAfter = true;\n /** Whether the tab list can be scrolled more towards the beginning of the tab label list. */\n this._disableScrollBefore = true;\n /** Stream that will stop the automated scrolling. */\n this._stopScrolling = new Subject();\n this._disablePagination = false;\n this._selectedIndex = 0;\n /** Event emitted when the option is selected. */\n this.selectFocusedIndex = new EventEmitter();\n /** Event emitted when a label is focused. */\n this.indexFocused = new EventEmitter();\n // Bind the `mouseleave` event on the outside since it doesn't change anything in the view.\n _ngZone.runOutsideAngular(() => {\n fromEvent(_elementRef.nativeElement, 'mouseleave')\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => {\n this._stopInterval();\n });\n });\n }\n /**\n * Whether pagination should be disabled. This can be used to avoid unnecessary\n * layout recalculations if it's known that pagination won't be required.\n */\n get disablePagination() {\n return this._disablePagination;\n }\n set disablePagination(value) {\n this._disablePagination = coerceBooleanProperty(value);\n }\n /** The index of the active tab. */\n get selectedIndex() {\n return this._selectedIndex;\n }\n set selectedIndex(value) {\n value = coerceNumberProperty(value);\n if (this._selectedIndex != value) {\n this._selectedIndexChanged = true;\n this._selectedIndex = value;\n if (this._keyManager) {\n this._keyManager.updateActiveItem(value);\n }\n }\n }\n ngAfterViewInit() {\n // We need to handle these events manually, because we want to bind passive event listeners.\n fromEvent(this._previousPaginator.nativeElement, 'touchstart', passiveEventListenerOptions)\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => {\n this._handlePaginatorPress('before');\n });\n fromEvent(this._nextPaginator.nativeElement, 'touchstart', passiveEventListenerOptions)\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => {\n this._handlePaginatorPress('after');\n });\n }\n ngAfterContentInit() {\n const dirChange = this._dir ? this._dir.change : of('ltr');\n const resize = this._viewportRuler.change(150);\n const realign = () => {\n this.updatePagination();\n this._alignInkBarToSelectedTab();\n };\n this._keyManager = new FocusKeyManager(this._items)\n .withHorizontalOrientation(this._getLayoutDirection())\n .withHomeAndEnd()\n .withWrap();\n this._keyManager.updateActiveItem(this._selectedIndex);\n // Defer the first call in order to allow for slower browsers to lay out the elements.\n // This helps in cases where the user lands directly on a page with paginated tabs.\n // Note that we use `onStable` instead of `requestAnimationFrame`, because the latter\n // can hold up tests that are in a background tab.\n this._ngZone.onStable.pipe(take(1)).subscribe(realign);\n // On dir change or window resize, realign the ink bar and update the orientation of\n // the key manager if the direction has changed.\n merge(dirChange, resize, this._items.changes, this._itemsResized())\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => {\n // We need to defer this to give the browser some time to recalculate\n // the element dimensions. The call has to be wrapped in `NgZone.run`,\n // because the viewport change handler runs outside of Angular.\n this._ngZone.run(() => {\n Promise.resolve().then(() => {\n // Clamp the scroll distance, because it can change with the number of tabs.\n this._scrollDistance = Math.max(0, Math.min(this._getMaxScrollDistance(), this._scrollDistance));\n realign();\n });\n });\n this._keyManager.withHorizontalOrientation(this._getLayoutDirection());\n });\n // If there is a change in the focus key manager we need to emit the `indexFocused`\n // event in order to provide a public event that notifies about focus changes. Also we realign\n // the tabs container by scrolling the new focused tab into the visible section.\n this._keyManager.change.pipe(takeUntil(this._destroyed)).subscribe(newFocusIndex => {\n this.indexFocused.emit(newFocusIndex);\n this._setTabFocus(newFocusIndex);\n });\n }\n /** Sends any changes that could affect the layout of the items. */\n _itemsResized() {\n if (typeof ResizeObserver !== 'function') {\n return EMPTY;\n }\n return this._items.changes.pipe(startWith(this._items), switchMap((tabItems) => new Observable((observer) => this._ngZone.runOutsideAngular(() => {\n const resizeObserver = new ResizeObserver(() => {\n observer.next();\n });\n tabItems.forEach(item => {\n resizeObserver.observe(item.elementRef.nativeElement);\n });\n return () => {\n resizeObserver.disconnect();\n };\n }))), \n // Skip the first emit since the resize observer emits when an item\n // is observed for new items when the tab is already inserted\n skip(1));\n }\n ngAfterContentChecked() {\n // If the number of tab labels have changed, check if scrolling should be enabled\n if (this._tabLabelCount != this._items.length) {\n this.updatePagination();\n this._tabLabelCount = this._items.length;\n this._changeDetectorRef.markForCheck();\n }\n // If the selected index has changed, scroll to the label and check if the scrolling controls\n // should be disabled.\n if (this._selectedIndexChanged) {\n this._scrollToLabel(this._selectedIndex);\n this._checkScrollingControls();\n this._alignInkBarToSelectedTab();\n this._selectedIndexChanged = false;\n this._changeDetectorRef.markForCheck();\n }\n // If the scroll distance has been changed (tab selected, focused, scroll controls activated),\n // then translate the header to reflect this.\n if (this._scrollDistanceChanged) {\n this._updateTabScrollPosition();\n this._scrollDistanceChanged = false;\n this._changeDetectorRef.markForCheck();\n }\n }\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n this._stopScrolling.complete();\n }\n /** Handles keyboard events on the header. */\n _handleKeydown(event) {\n // We don't handle any key bindings with a modifier key.\n if (hasModifierKey(event)) {\n return;\n }\n switch (event.keyCode) {\n case ENTER:\n case SPACE:\n if (this.focusIndex !== this.selectedIndex) {\n this.selectFocusedIndex.emit(this.focusIndex);\n this._itemSelected(event);\n }\n break;\n default:\n this._keyManager.onKeydown(event);\n }\n }\n /**\n * Callback for when the MutationObserver detects that the content has changed.\n */\n _onContentChanges() {\n const textContent = this._elementRef.nativeElement.textContent;\n // We need to diff the text content of the header, because the MutationObserver callback\n // will fire even if the text content didn't change which is inefficient and is prone\n // to infinite loops if a poorly constructed expression is passed in (see #14249).\n if (textContent !== this._currentTextContent) {\n this._currentTextContent = textContent || '';\n // The content observer runs outside the `NgZone` by default, which\n // means that we need to bring the callback back in ourselves.\n this._ngZone.run(() => {\n this.updatePagination();\n this._alignInkBarToSelectedTab();\n this._changeDetectorRef.markForCheck();\n });\n }\n }\n /**\n * Updates the view whether pagination should be enabled or not.\n *\n * WARNING: Calling this method can be very costly in terms of performance. It should be called\n * as infrequently as possible from outside of the Tabs component as it causes a reflow of the\n * page.\n */\n updatePagination() {\n this._checkPaginationEnabled();\n this._checkScrollingControls();\n this._updateTabScrollPosition();\n }\n /** Tracks which element has focus; used for keyboard navigation */\n get focusIndex() {\n return this._keyManager ? this._keyManager.activeItemIndex : 0;\n }\n /** When the focus index is set, we must manually send focus to the correct label */\n set focusIndex(value) {\n if (!this._isValidIndex(value) || this.focusIndex === value || !this._keyManager) {\n return;\n }\n this._keyManager.setActiveItem(value);\n }\n /**\n * Determines if an index is valid. If the tabs are not ready yet, we assume that the user is\n * providing a valid index and return true.\n */\n _isValidIndex(index) {\n if (!this._items) {\n return true;\n }\n const tab = this._items ? this._items.toArray()[index] : null;\n return !!tab && !tab.disabled;\n }\n /**\n * Sets focus on the HTML element for the label wrapper and scrolls it into the view if\n * scrolling is enabled.\n */\n _setTabFocus(tabIndex) {\n if (this._showPaginationControls) {\n this._scrollToLabel(tabIndex);\n }\n if (this._items && this._items.length) {\n this._items.toArray()[tabIndex].focus();\n // Do not let the browser manage scrolling to focus the element, this will be handled\n // by using translation. In LTR, the scroll left should be 0. In RTL, the scroll width\n // should be the full width minus the offset width.\n const containerEl = this._tabListContainer.nativeElement;\n const dir = this._getLayoutDirection();\n if (dir == 'ltr') {\n containerEl.scrollLeft = 0;\n }\n else {\n containerEl.scrollLeft = containerEl.scrollWidth - containerEl.offsetWidth;\n }\n }\n }\n /** The layout direction of the containing app. */\n _getLayoutDirection() {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n /** Performs the CSS transformation on the tab list that will cause the list to scroll. */\n _updateTabScrollPosition() {\n if (this.disablePagination) {\n return;\n }\n const scrollDistance = this.scrollDistance;\n const translateX = this._getLayoutDirection() === 'ltr' ? -scrollDistance : scrollDistance;\n // Don't use `translate3d` here because we don't want to create a new layer. A new layer\n // seems to cause flickering and overflow in Internet Explorer. For example, the ink bar\n // and ripples will exceed the boundaries of the visible tab bar.\n // See: https://github.com/angular/components/issues/10276\n // We round the `transform` here, because transforms with sub-pixel precision cause some\n // browsers to blur the content of the element.\n this._tabList.nativeElement.style.transform = `translateX(${Math.round(translateX)}px)`;\n // Setting the `transform` on IE will change the scroll offset of the parent, causing the\n // position to be thrown off in some cases. We have to reset it ourselves to ensure that\n // it doesn't get thrown off. Note that we scope it only to IE and Edge, because messing\n // with the scroll position throws off Chrome 71+ in RTL mode (see #14689).\n if (this._platform.TRIDENT || this._platform.EDGE) {\n this._tabListContainer.nativeElement.scrollLeft = 0;\n }\n }\n /** Sets the distance in pixels that the tab header should be transformed in the X-axis. */\n get scrollDistance() {\n return this._scrollDistance;\n }\n set scrollDistance(value) {\n this._scrollTo(value);\n }\n /**\n * Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or\n * the end of the list, respectively). The distance to scroll is computed to be a third of the\n * length of the tab list view window.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _scrollHeader(direction) {\n const viewLength = this._tabListContainer.nativeElement.offsetWidth;\n // Move the scroll distance one-third the length of the tab list's viewport.\n const scrollAmount = ((direction == 'before' ? -1 : 1) * viewLength) / 3;\n return this._scrollTo(this._scrollDistance + scrollAmount);\n }\n /** Handles click events on the pagination arrows. */\n _handlePaginatorClick(direction) {\n this._stopInterval();\n this._scrollHeader(direction);\n }\n /**\n * Moves the tab list such that the desired tab label (marked by index) is moved into view.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _scrollToLabel(labelIndex) {\n if (this.disablePagination) {\n return;\n }\n const selectedLabel = this._items ? this._items.toArray()[labelIndex] : null;\n if (!selectedLabel) {\n return;\n }\n // The view length is the visible width of the tab labels.\n const viewLength = this._tabListContainer.nativeElement.offsetWidth;\n const { offsetLeft, offsetWidth } = selectedLabel.elementRef.nativeElement;\n let labelBeforePos, labelAfterPos;\n if (this._getLayoutDirection() == 'ltr') {\n labelBeforePos = offsetLeft;\n labelAfterPos = labelBeforePos + offsetWidth;\n }\n else {\n labelAfterPos = this._tabListInner.nativeElement.offsetWidth - offsetLeft;\n labelBeforePos = labelAfterPos - offsetWidth;\n }\n const beforeVisiblePos = this.scrollDistance;\n const afterVisiblePos = this.scrollDistance + viewLength;\n if (labelBeforePos < beforeVisiblePos) {\n // Scroll header to move label to the before direction\n this.scrollDistance -= beforeVisiblePos - labelBeforePos + EXAGGERATED_OVERSCROLL;\n }\n else if (labelAfterPos > afterVisiblePos) {\n // Scroll header to move label to the after direction\n this.scrollDistance += labelAfterPos - afterVisiblePos + EXAGGERATED_OVERSCROLL;\n }\n }\n /**\n * Evaluate whether the pagination controls should be displayed. If the scroll width of the\n * tab list is wider than the size of the header container, then the pagination controls should\n * be shown.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _checkPaginationEnabled() {\n if (this.disablePagination) {\n this._showPaginationControls = false;\n }\n else {\n const isEnabled = this._tabListInner.nativeElement.scrollWidth > this._elementRef.nativeElement.offsetWidth;\n if (!isEnabled) {\n this.scrollDistance = 0;\n }\n if (isEnabled !== this._showPaginationControls) {\n this._changeDetectorRef.markForCheck();\n }\n this._showPaginationControls = isEnabled;\n }\n }\n /**\n * Evaluate whether the before and after controls should be enabled or disabled.\n * If the header is at the beginning of the list (scroll distance is equal to 0) then disable the\n * before button. If the header is at the end of the list (scroll distance is equal to the\n * maximum distance we can scroll), then disable the after button.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _checkScrollingControls() {\n if (this.disablePagination) {\n this._disableScrollAfter = this._disableScrollBefore = true;\n }\n else {\n // Check if the pagination arrows should be activated.\n this._disableScrollBefore = this.scrollDistance == 0;\n this._disableScrollAfter = this.scrollDistance == this._getMaxScrollDistance();\n this._changeDetectorRef.markForCheck();\n }\n }\n /**\n * Determines what is the maximum length in pixels that can be set for the scroll distance. This\n * is equal to the difference in width between the tab list container and tab header container.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _getMaxScrollDistance() {\n const lengthOfTabList = this._tabListInner.nativeElement.scrollWidth;\n const viewLength = this._tabListContainer.nativeElement.offsetWidth;\n return lengthOfTabList - viewLength || 0;\n }\n /** Tells the ink-bar to align itself to the current label wrapper */\n _alignInkBarToSelectedTab() {\n const selectedItem = this._items && this._items.length ? this._items.toArray()[this.selectedIndex] : null;\n const selectedLabelWrapper = selectedItem ? selectedItem.elementRef.nativeElement : null;\n if (selectedLabelWrapper) {\n this._inkBar.alignToElement(selectedLabelWrapper);\n }\n else {\n this._inkBar.hide();\n }\n }\n /** Stops the currently-running paginator interval. */\n _stopInterval() {\n this._stopScrolling.next();\n }\n /**\n * Handles the user pressing down on one of the paginators.\n * Starts scrolling the header after a certain amount of time.\n * @param direction In which direction the paginator should be scrolled.\n */\n _handlePaginatorPress(direction, mouseEvent) {\n // Don't start auto scrolling for right mouse button clicks. Note that we shouldn't have to\n // null check the `button`, but we do it so we don't break tests that use fake events.\n if (mouseEvent && mouseEvent.button != null && mouseEvent.button !== 0) {\n return;\n }\n // Avoid overlapping timers.\n this._stopInterval();\n // Start a timer after the delay and keep firing based on the interval.\n timer(HEADER_SCROLL_DELAY, HEADER_SCROLL_INTERVAL)\n // Keep the timer going until something tells it to stop or the component is destroyed.\n .pipe(takeUntil(merge(this._stopScrolling, this._destroyed)))\n .subscribe(() => {\n const { maxScrollDistance, distance } = this._scrollHeader(direction);\n // Stop the timer if we've reached the start or the end.\n if (distance === 0 || distance >= maxScrollDistance) {\n this._stopInterval();\n }\n });\n }\n /**\n * Scrolls the header to a given position.\n * @param position Position to which to scroll.\n * @returns Information on the current scroll distance and the maximum.\n */\n _scrollTo(position) {\n if (this.disablePagination) {\n return { maxScrollDistance: 0, distance: 0 };\n }\n const maxScrollDistance = this._getMaxScrollDistance();\n this._scrollDistance = Math.max(0, Math.min(maxScrollDistance, position));\n // Mark that the scroll distance has changed so that after the view is checked, the CSS\n // transformation can move the header.\n this._scrollDistanceChanged = true;\n this._checkScrollingControls();\n return { maxScrollDistance, distance: this._scrollDistance };\n }\n}\nMatPaginatedTabHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatPaginatedTabHeader, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$1.ViewportRuler }, { token: i1.Directionality, optional: true }, { token: i0.NgZone }, { token: i3.Platform }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatPaginatedTabHeader.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatPaginatedTabHeader, inputs: { disablePagination: \"disablePagination\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatPaginatedTabHeader, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$1.ViewportRuler }, { type: i1.Directionality, decorators: [{\n type: Optional\n }] }, { type: i0.NgZone }, { type: i3.Platform }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { disablePagination: [{\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 * Base class with all of the `MatTabHeader` functionality.\n * @docs-private\n */\nclass _MatTabHeaderBase extends MatPaginatedTabHeader {\n constructor(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode) {\n super(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode);\n this._disableRipple = false;\n }\n /** Whether the ripple effect is disabled or not. */\n get disableRipple() {\n return this._disableRipple;\n }\n set disableRipple(value) {\n this._disableRipple = coerceBooleanProperty(value);\n }\n _itemSelected(event) {\n event.preventDefault();\n }\n}\n_MatTabHeaderBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatTabHeaderBase, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$1.ViewportRuler }, { token: i1.Directionality, optional: true }, { token: i0.NgZone }, { token: i3.Platform }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n_MatTabHeaderBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _MatTabHeaderBase, inputs: { disableRipple: \"disableRipple\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatTabHeaderBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$1.ViewportRuler }, { type: i1.Directionality, decorators: [{\n type: Optional\n }] }, { type: i0.NgZone }, { type: i3.Platform }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { disableRipple: [{\n type: Input\n }] } });\n/**\n * The header of the tab group which displays a list of all the tabs in the tab group. Includes\n * an ink bar that follows the currently selected tab. When the tabs list's width exceeds the\n * width of the header container, then arrows will be displayed to allow the user to scroll\n * left and right across the header.\n * @docs-private\n */\nclass MatTabHeader extends _MatTabHeaderBase {\n constructor(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode) {\n super(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode);\n }\n}\nMatTabHeader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabHeader, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$1.ViewportRuler }, { token: i1.Directionality, optional: true }, { token: i0.NgZone }, { token: i3.Platform }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatTabHeader.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTabHeader, selector: \"mat-tab-header\", inputs: { selectedIndex: \"selectedIndex\" }, outputs: { selectFocusedIndex: \"selectFocusedIndex\", indexFocused: \"indexFocused\" }, host: { properties: { \"class.mat-tab-header-pagination-controls-enabled\": \"_showPaginationControls\", \"class.mat-tab-header-rtl\": \"_getLayoutDirection() == 'rtl'\" }, classAttribute: \"mat-tab-header\" }, queries: [{ propertyName: \"_items\", predicate: MatTabLabelWrapper }], viewQueries: [{ propertyName: \"_inkBar\", first: true, predicate: MatInkBar, descendants: true, static: true }, { propertyName: \"_tabListContainer\", first: true, predicate: [\"tabListContainer\"], descendants: true, static: true }, { propertyName: \"_tabList\", first: true, predicate: [\"tabList\"], descendants: true, static: true }, { propertyName: \"_tabListInner\", first: true, predicate: [\"tabListInner\"], descendants: true, static: true }, { propertyName: \"_nextPaginator\", first: true, predicate: [\"nextPaginator\"], descendants: true }, { propertyName: \"_previousPaginator\", first: true, predicate: [\"previousPaginator\"], descendants: true }], usesInheritance: true, ngImport: i0, template: \"<button class=\\\"mat-tab-header-pagination mat-tab-header-pagination-before mat-elevation-z4\\\"\\n #previousPaginator\\n aria-hidden=\\\"true\\\"\\n type=\\\"button\\\"\\n mat-ripple\\n tabindex=\\\"-1\\\"\\n [matRippleDisabled]=\\\"_disableScrollBefore || disableRipple\\\"\\n [class.mat-tab-header-pagination-disabled]=\\\"_disableScrollBefore\\\"\\n [disabled]=\\\"_disableScrollBefore || null\\\"\\n (click)=\\\"_handlePaginatorClick('before')\\\"\\n (mousedown)=\\\"_handlePaginatorPress('before', $event)\\\"\\n (touchend)=\\\"_stopInterval()\\\">\\n <div class=\\\"mat-tab-header-pagination-chevron\\\"></div>\\n</button>\\n\\n<div class=\\\"mat-tab-label-container\\\" #tabListContainer (keydown)=\\\"_handleKeydown($event)\\\">\\n <div\\n #tabList\\n class=\\\"mat-tab-list\\\"\\n [class._mat-animation-noopable]=\\\"_animationMode === 'NoopAnimations'\\\"\\n role=\\\"tablist\\\"\\n (cdkObserveContent)=\\\"_onContentChanges()\\\">\\n <div class=\\\"mat-tab-labels\\\" #tabListInner>\\n <ng-content></ng-content>\\n </div>\\n <mat-ink-bar></mat-ink-bar>\\n </div>\\n</div>\\n\\n<button class=\\\"mat-tab-header-pagination mat-tab-header-pagination-after mat-elevation-z4\\\"\\n #nextPaginator\\n aria-hidden=\\\"true\\\"\\n type=\\\"button\\\"\\n mat-ripple\\n [matRippleDisabled]=\\\"_disableScrollAfter || disableRipple\\\"\\n [class.mat-tab-header-pagination-disabled]=\\\"_disableScrollAfter\\\"\\n [disabled]=\\\"_disableScrollAfter || null\\\"\\n tabindex=\\\"-1\\\"\\n (mousedown)=\\\"_handlePaginatorPress('after', $event)\\\"\\n (click)=\\\"_handlePaginatorClick('after')\\\"\\n (touchend)=\\\"_stopInterval()\\\">\\n <div class=\\\"mat-tab-header-pagination-chevron\\\"></div>\\n</button>\\n\", styles: [\".mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;background:none;border:none;outline:0;padding:0}.mat-tab-header-pagination::-moz-focus-inner{border:0}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-ink-bar._mat-animation-noopable{transition:none !important;animation:none !important}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-labels{display:flex}[mat-align-tabs=center]>.mat-tab-header .mat-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-tab-header .mat-tab-labels{justify-content:flex-end}.mat-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-list._mat-animation-noopable{transition:none !important;animation:none !important}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:none}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}.mat-tab-label.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-label.mat-tab-disabled{opacity:.5}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-label{opacity:1}.mat-tab-label::before{margin:5px}@media(max-width: 599px){.mat-tab-label{min-width:72px}}\"], dependencies: [{ kind: \"directive\", type: i4.MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }, { kind: \"directive\", type: i5.CdkObserveContent, selector: \"[cdkObserveContent]\", inputs: [\"cdkObserveContentDisabled\", \"debounce\"], outputs: [\"cdkObserveContent\"], exportAs: [\"cdkObserveContent\"] }, { kind: \"directive\", type: MatInkBar, selector: \"mat-ink-bar\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabHeader, decorators: [{\n type: Component,\n args: [{ selector: 'mat-tab-header', inputs: ['selectedIndex'], outputs: ['selectFocusedIndex', 'indexFocused'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, host: {\n 'class': 'mat-tab-header',\n '[class.mat-tab-header-pagination-controls-enabled]': '_showPaginationControls',\n '[class.mat-tab-header-rtl]': \"_getLayoutDirection() == 'rtl'\",\n }, template: \"<button class=\\\"mat-tab-header-pagination mat-tab-header-pagination-before mat-elevation-z4\\\"\\n #previousPaginator\\n aria-hidden=\\\"true\\\"\\n type=\\\"button\\\"\\n mat-ripple\\n tabindex=\\\"-1\\\"\\n [matRippleDisabled]=\\\"_disableScrollBefore || disableRipple\\\"\\n [class.mat-tab-header-pagination-disabled]=\\\"_disableScrollBefore\\\"\\n [disabled]=\\\"_disableScrollBefore || null\\\"\\n (click)=\\\"_handlePaginatorClick('before')\\\"\\n (mousedown)=\\\"_handlePaginatorPress('before', $event)\\\"\\n (touchend)=\\\"_stopInterval()\\\">\\n <div class=\\\"mat-tab-header-pagination-chevron\\\"></div>\\n</button>\\n\\n<div class=\\\"mat-tab-label-container\\\" #tabListContainer (keydown)=\\\"_handleKeydown($event)\\\">\\n <div\\n #tabList\\n class=\\\"mat-tab-list\\\"\\n [class._mat-animation-noopable]=\\\"_animationMode === 'NoopAnimations'\\\"\\n role=\\\"tablist\\\"\\n (cdkObserveContent)=\\\"_onContentChanges()\\\">\\n <div class=\\\"mat-tab-labels\\\" #tabListInner>\\n <ng-content></ng-content>\\n </div>\\n <mat-ink-bar></mat-ink-bar>\\n </div>\\n</div>\\n\\n<button class=\\\"mat-tab-header-pagination mat-tab-header-pagination-after mat-elevation-z4\\\"\\n #nextPaginator\\n aria-hidden=\\\"true\\\"\\n type=\\\"button\\\"\\n mat-ripple\\n [matRippleDisabled]=\\\"_disableScrollAfter || disableRipple\\\"\\n [class.mat-tab-header-pagination-disabled]=\\\"_disableScrollAfter\\\"\\n [disabled]=\\\"_disableScrollAfter || null\\\"\\n tabindex=\\\"-1\\\"\\n (mousedown)=\\\"_handlePaginatorPress('after', $event)\\\"\\n (click)=\\\"_handlePaginatorClick('after')\\\"\\n (touchend)=\\\"_stopInterval()\\\">\\n <div class=\\\"mat-tab-header-pagination-chevron\\\"></div>\\n</button>\\n\", styles: [\".mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;background:none;border:none;outline:0;padding:0}.mat-tab-header-pagination::-moz-focus-inner{border:0}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-ink-bar._mat-animation-noopable{transition:none !important;animation:none !important}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-labels{display:flex}[mat-align-tabs=center]>.mat-tab-header .mat-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-tab-header .mat-tab-labels{justify-content:flex-end}.mat-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-list._mat-animation-noopable{transition:none !important;animation:none !important}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:none}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}.mat-tab-label.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-label.mat-tab-disabled{opacity:.5}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-label{opacity:1}.mat-tab-label::before{margin:5px}@media(max-width: 599px){.mat-tab-label{min-width:72px}}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$1.ViewportRuler }, { type: i1.Directionality, decorators: [{\n type: Optional\n }] }, { type: i0.NgZone }, { type: i3.Platform }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { _items: [{\n type: ContentChildren,\n args: [MatTabLabelWrapper, { descendants: false }]\n }], _inkBar: [{\n type: ViewChild,\n args: [MatInkBar, { static: true }]\n }], _tabListContainer: [{\n type: ViewChild,\n args: ['tabListContainer', { static: true }]\n }], _tabList: [{\n type: ViewChild,\n args: ['tabList', { static: true }]\n }], _tabListInner: [{\n type: ViewChild,\n args: ['tabListInner', { static: true }]\n }], _nextPaginator: [{\n type: ViewChild,\n args: ['nextPaginator']\n }], _previousPaginator: [{\n type: ViewChild,\n args: ['previousPaginator']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Used to generate unique ID's for each tab component */\nlet nextId = 0;\n/** A simple change event emitted on focus or selection changes. */\nclass MatTabChangeEvent {\n}\n// Boilerplate for applying mixins to MatTabGroup.\n/** @docs-private */\nconst _MatTabGroupMixinBase = mixinColor(mixinDisableRipple(class {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n}), 'primary');\n/**\n * Base class with all of the `MatTabGroupBase` functionality.\n * @docs-private\n */\nclass _MatTabGroupBase extends _MatTabGroupMixinBase {\n constructor(elementRef, _changeDetectorRef, defaultConfig, _animationMode) {\n super(elementRef);\n this._changeDetectorRef = _changeDetectorRef;\n this._animationMode = _animationMode;\n /** All of the tabs that belong to the group. */\n this._tabs = new QueryList();\n /** The tab index that should be selected after the content has been checked. */\n this._indexToSelect = 0;\n /** Index of the tab that was focused last. */\n this._lastFocusedTabIndex = null;\n /** Snapshot of the height of the tab body wrapper before another tab is activated. */\n this._tabBodyWrapperHeight = 0;\n /** Subscription to tabs being added/removed. */\n this._tabsSubscription = Subscription.EMPTY;\n /** Subscription to changes in the tab labels. */\n this._tabLabelSubscription = Subscription.EMPTY;\n this._dynamicHeight = false;\n this._selectedIndex = null;\n /** Position of the tab header. */\n this.headerPosition = 'above';\n this._disablePagination = false;\n this._preserveContent = false;\n /** Output to enable support for two-way binding on `[(selectedIndex)]` */\n this.selectedIndexChange = new EventEmitter();\n /** Event emitted when focus has changed within a tab group. */\n this.focusChange = new EventEmitter();\n /** Event emitted when the body animation has completed */\n this.animationDone = new EventEmitter();\n /** Event emitted when the tab selection has changed. */\n this.selectedTabChange = new EventEmitter(true);\n this._groupId = nextId++;\n this.animationDuration =\n defaultConfig && defaultConfig.animationDuration ? defaultConfig.animationDuration : '500ms';\n this.disablePagination =\n defaultConfig && defaultConfig.disablePagination != null\n ? defaultConfig.disablePagination\n : false;\n this.dynamicHeight =\n defaultConfig && defaultConfig.dynamicHeight != null ? defaultConfig.dynamicHeight : false;\n this.contentTabIndex = defaultConfig?.contentTabIndex ?? null;\n this.preserveContent = !!defaultConfig?.preserveContent;\n }\n /** Whether the tab group should grow to the size of the active tab. */\n get dynamicHeight() {\n return this._dynamicHeight;\n }\n set dynamicHeight(value) {\n this._dynamicHeight = coerceBooleanProperty(value);\n }\n /** The index of the active tab. */\n get selectedIndex() {\n return this._selectedIndex;\n }\n set selectedIndex(value) {\n this._indexToSelect = coerceNumberProperty(value, null);\n }\n /** Duration for the tab animation. Will be normalized to milliseconds if no units are set. */\n get animationDuration() {\n return this._animationDuration;\n }\n set animationDuration(value) {\n this._animationDuration = /^\\d+$/.test(value + '') ? value + 'ms' : value;\n }\n /**\n * `tabindex` to be set on the inner element that wraps the tab content. Can be used for improved\n * accessibility when the tab does not have focusable elements or if it has scrollable content.\n * The `tabindex` will be removed automatically for inactive tabs.\n * Read more at https://www.w3.org/TR/wai-aria-practices/examples/tabs/tabs-2/tabs.html\n */\n get contentTabIndex() {\n return this._contentTabIndex;\n }\n set contentTabIndex(value) {\n this._contentTabIndex = coerceNumberProperty(value, null);\n }\n /**\n * Whether pagination should be disabled. This can be used to avoid unnecessary\n * layout recalculations if it's known that pagination won't be required.\n */\n get disablePagination() {\n return this._disablePagination;\n }\n set disablePagination(value) {\n this._disablePagination = coerceBooleanProperty(value);\n }\n /**\n * By default tabs remove their content from the DOM while it's off-screen.\n * Setting this to `true` will keep it in the DOM which will prevent elements\n * like iframes and videos from reloading next time it comes back into the view.\n */\n get preserveContent() {\n return this._preserveContent;\n }\n set preserveContent(value) {\n this._preserveContent = coerceBooleanProperty(value);\n }\n /** Background color of the tab group. */\n get backgroundColor() {\n return this._backgroundColor;\n }\n set backgroundColor(value) {\n const nativeElement = this._elementRef.nativeElement;\n nativeElement.classList.remove(`mat-background-${this.backgroundColor}`);\n if (value) {\n nativeElement.classList.add(`mat-background-${value}`);\n }\n this._backgroundColor = value;\n }\n /**\n * After the content is checked, this component knows what tabs have been defined\n * and what the selected index should be. This is where we can know exactly what position\n * each tab should be in according to the new selected index, and additionally we know how\n * a new selected tab should transition in (from the left or right).\n */\n ngAfterContentChecked() {\n // Don't clamp the `indexToSelect` immediately in the setter because it can happen that\n // the amount of tabs changes before the actual change detection runs.\n const indexToSelect = (this._indexToSelect = this._clampTabIndex(this._indexToSelect));\n // If there is a change in selected index, emit a change event. Should not trigger if\n // the selected index has not yet been initialized.\n if (this._selectedIndex != indexToSelect) {\n const isFirstRun = this._selectedIndex == null;\n if (!isFirstRun) {\n this.selectedTabChange.emit(this._createChangeEvent(indexToSelect));\n // Preserve the height so page doesn't scroll up during tab change.\n // Fixes https://stackblitz.com/edit/mat-tabs-scroll-page-top-on-tab-change\n const wrapper = this._tabBodyWrapper.nativeElement;\n wrapper.style.minHeight = wrapper.clientHeight + 'px';\n }\n // Changing these values after change detection has run\n // since the checked content may contain references to them.\n Promise.resolve().then(() => {\n this._tabs.forEach((tab, index) => (tab.isActive = index === indexToSelect));\n if (!isFirstRun) {\n this.selectedIndexChange.emit(indexToSelect);\n // Clear the min-height, this was needed during tab change to avoid\n // unnecessary scrolling.\n this._tabBodyWrapper.nativeElement.style.minHeight = '';\n }\n });\n }\n // Setup the position for each tab and optionally setup an origin on the next selected tab.\n this._tabs.forEach((tab, index) => {\n tab.position = index - indexToSelect;\n // If there is already a selected tab, then set up an origin for the next selected tab\n // if it doesn't have one already.\n if (this._selectedIndex != null && tab.position == 0 && !tab.origin) {\n tab.origin = indexToSelect - this._selectedIndex;\n }\n });\n if (this._selectedIndex !== indexToSelect) {\n this._selectedIndex = indexToSelect;\n this._lastFocusedTabIndex = null;\n this._changeDetectorRef.markForCheck();\n }\n }\n ngAfterContentInit() {\n this._subscribeToAllTabChanges();\n this._subscribeToTabLabels();\n // Subscribe to changes in the amount of tabs, in order to be\n // able to re-render the content as new tabs are added or removed.\n this._tabsSubscription = this._tabs.changes.subscribe(() => {\n const indexToSelect = this._clampTabIndex(this._indexToSelect);\n // Maintain the previously-selected tab if a new tab is added or removed and there is no\n // explicit change that selects a different tab.\n if (indexToSelect === this._selectedIndex) {\n const tabs = this._tabs.toArray();\n let selectedTab;\n for (let i = 0; i < tabs.length; i++) {\n if (tabs[i].isActive) {\n // Assign both to the `_indexToSelect` and `_selectedIndex` so we don't fire a changed\n // event, otherwise the consumer may end up in an infinite loop in some edge cases like\n // adding a tab within the `selectedIndexChange` event.\n this._indexToSelect = this._selectedIndex = i;\n this._lastFocusedTabIndex = null;\n selectedTab = tabs[i];\n break;\n }\n }\n // If we haven't found an active tab and a tab exists at the selected index, it means\n // that the active tab was swapped out. Since this won't be picked up by the rendering\n // loop in `ngAfterContentChecked`, we need to sync it up manually.\n if (!selectedTab && tabs[indexToSelect]) {\n Promise.resolve().then(() => {\n tabs[indexToSelect].isActive = true;\n this.selectedTabChange.emit(this._createChangeEvent(indexToSelect));\n });\n }\n }\n this._changeDetectorRef.markForCheck();\n });\n }\n /** Listens to changes in all of the tabs. */\n _subscribeToAllTabChanges() {\n // Since we use a query with `descendants: true` to pick up the tabs, we may end up catching\n // some that are inside of nested tab groups. We filter them out manually by checking that\n // the closest group to the tab is the current one.\n this._allTabs.changes.pipe(startWith(this._allTabs)).subscribe((tabs) => {\n this._tabs.reset(tabs.filter(tab => {\n return tab._closestTabGroup === this || !tab._closestTabGroup;\n }));\n this._tabs.notifyOnChanges();\n });\n }\n ngOnDestroy() {\n this._tabs.destroy();\n this._tabsSubscription.unsubscribe();\n this._tabLabelSubscription.unsubscribe();\n }\n /** Re-aligns the ink bar to the selected tab element. */\n realignInkBar() {\n if (this._tabHeader) {\n this._tabHeader._alignInkBarToSelectedTab();\n }\n }\n /**\n * Recalculates the tab group's pagination dimensions.\n *\n * WARNING: Calling this method can be very costly in terms of performance. It should be called\n * as infrequently as possible from outside of the Tabs component as it causes a reflow of the\n * page.\n */\n updatePagination() {\n if (this._tabHeader) {\n this._tabHeader.updatePagination();\n }\n }\n /**\n * Sets focus to a particular tab.\n * @param index Index of the tab to be focused.\n */\n focusTab(index) {\n const header = this._tabHeader;\n if (header) {\n header.focusIndex = index;\n }\n }\n _focusChanged(index) {\n this._lastFocusedTabIndex = index;\n this.focusChange.emit(this._createChangeEvent(index));\n }\n _createChangeEvent(index) {\n const event = new MatTabChangeEvent();\n event.index = index;\n if (this._tabs && this._tabs.length) {\n event.tab = this._tabs.toArray()[index];\n }\n return event;\n }\n /**\n * Subscribes to changes in the tab labels. This is needed, because the @Input for the label is\n * on the MatTab component, whereas the data binding is inside the MatTabGroup. In order for the\n * binding to be updated, we need to subscribe to changes in it and trigger change detection\n * manually.\n */\n _subscribeToTabLabels() {\n if (this._tabLabelSubscription) {\n this._tabLabelSubscription.unsubscribe();\n }\n this._tabLabelSubscription = merge(...this._tabs.map(tab => tab._stateChanges)).subscribe(() => this._changeDetectorRef.markForCheck());\n }\n /** Clamps the given index to the bounds of 0 and the tabs length. */\n _clampTabIndex(index) {\n // Note the `|| 0`, which ensures that values like NaN can't get through\n // and which would otherwise throw the component into an infinite loop\n // (since Math.max(NaN, 0) === NaN).\n return Math.min(this._tabs.length - 1, Math.max(index || 0, 0));\n }\n /** Returns a unique id for each tab label element */\n _getTabLabelId(i) {\n return `mat-tab-label-${this._groupId}-${i}`;\n }\n /** Returns a unique id for each tab content element */\n _getTabContentId(i) {\n return `mat-tab-content-${this._groupId}-${i}`;\n }\n /**\n * Sets the height of the body wrapper to the height of the activating tab if dynamic\n * height property is true.\n */\n _setTabBodyWrapperHeight(tabHeight) {\n if (!this._dynamicHeight || !this._tabBodyWrapperHeight) {\n return;\n }\n const wrapper = this._tabBodyWrapper.nativeElement;\n wrapper.style.height = this._tabBodyWrapperHeight + 'px';\n // This conditional forces the browser to paint the height so that\n // the animation to the new height can have an origin.\n if (this._tabBodyWrapper.nativeElement.offsetHeight) {\n wrapper.style.height = tabHeight + 'px';\n }\n }\n /** Removes the height of the tab body wrapper. */\n _removeTabBodyWrapperHeight() {\n const wrapper = this._tabBodyWrapper.nativeElement;\n this._tabBodyWrapperHeight = wrapper.clientHeight;\n wrapper.style.height = '';\n this.animationDone.emit();\n }\n /** Handle click events, setting new selected index if appropriate. */\n _handleClick(tab, tabHeader, index) {\n if (!tab.disabled) {\n this.selectedIndex = tabHeader.focusIndex = index;\n }\n }\n /** Retrieves the tabindex for the tab. */\n _getTabIndex(tab, index) {\n if (tab.disabled) {\n return null;\n }\n const targetIndex = this._lastFocusedTabIndex ?? this.selectedIndex;\n return index === targetIndex ? 0 : -1;\n }\n /** Callback for when the focused state of a tab has changed. */\n _tabFocusChanged(focusOrigin, index) {\n // Mouse/touch focus happens during the `mousedown`/`touchstart` phase which\n // can cause the tab to be moved out from under the pointer, interrupting the\n // click sequence (see #21898). We don't need to scroll the tab into view for\n // such cases anyway, because it will be done when the tab becomes selected.\n if (focusOrigin && focusOrigin !== 'mouse' && focusOrigin !== 'touch') {\n this._tabHeader.focusIndex = index;\n }\n }\n}\n_MatTabGroupBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatTabGroupBase, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: MAT_TABS_CONFIG, optional: true }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n_MatTabGroupBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _MatTabGroupBase, inputs: { dynamicHeight: \"dynamicHeight\", selectedIndex: \"selectedIndex\", headerPosition: \"headerPosition\", animationDuration: \"animationDuration\", contentTabIndex: \"contentTabIndex\", disablePagination: \"disablePagination\", preserveContent: \"preserveContent\", backgroundColor: \"backgroundColor\" }, outputs: { selectedIndexChange: \"selectedIndexChange\", focusChange: \"focusChange\", animationDone: \"animationDone\", selectedTabChange: \"selectedTabChange\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatTabGroupBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_TABS_CONFIG]\n }, {\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { dynamicHeight: [{\n type: Input\n }], selectedIndex: [{\n type: Input\n }], headerPosition: [{\n type: Input\n }], animationDuration: [{\n type: Input\n }], contentTabIndex: [{\n type: Input\n }], disablePagination: [{\n type: Input\n }], preserveContent: [{\n type: Input\n }], backgroundColor: [{\n type: Input\n }], selectedIndexChange: [{\n type: Output\n }], focusChange: [{\n type: Output\n }], animationDone: [{\n type: Output\n }], selectedTabChange: [{\n type: Output\n }] } });\n/**\n * Material design tab-group component. Supports basic tab pairs (label + content) and includes\n * animated ink-bar, keyboard navigation, and screen reader.\n * See: https://material.io/design/components/tabs.html\n */\nclass MatTabGroup extends _MatTabGroupBase {\n constructor(elementRef, changeDetectorRef, defaultConfig, animationMode) {\n super(elementRef, changeDetectorRef, defaultConfig, animationMode);\n }\n}\nMatTabGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabGroup, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: MAT_TABS_CONFIG, optional: true }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatTabGroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTabGroup, selector: \"mat-tab-group\", inputs: { color: \"color\", disableRipple: \"disableRipple\" }, host: { properties: { \"class.mat-tab-group-dynamic-height\": \"dynamicHeight\", \"class.mat-tab-group-inverted-header\": \"headerPosition === \\\"below\\\"\" }, classAttribute: \"mat-tab-group\" }, providers: [\n {\n provide: MAT_TAB_GROUP,\n useExisting: MatTabGroup,\n },\n ], queries: [{ propertyName: \"_allTabs\", predicate: MatTab, descendants: true }], viewQueries: [{ propertyName: \"_tabBodyWrapper\", first: true, predicate: [\"tabBodyWrapper\"], descendants: true }, { propertyName: \"_tabHeader\", first: true, predicate: [\"tabHeader\"], descendants: true }], exportAs: [\"matTabGroup\"], usesInheritance: true, ngImport: i0, template: \"<mat-tab-header #tabHeader\\n [selectedIndex]=\\\"selectedIndex || 0\\\"\\n [disableRipple]=\\\"disableRipple\\\"\\n [disablePagination]=\\\"disablePagination\\\"\\n (indexFocused)=\\\"_focusChanged($event)\\\"\\n (selectFocusedIndex)=\\\"selectedIndex = $event\\\">\\n <div class=\\\"mat-tab-label mat-focus-indicator\\\" role=\\\"tab\\\" matTabLabelWrapper mat-ripple\\n cdkMonitorElementFocus\\n *ngFor=\\\"let tab of _tabs; let i = index\\\"\\n [id]=\\\"_getTabLabelId(i)\\\"\\n [attr.tabIndex]=\\\"_getTabIndex(tab, i)\\\"\\n [attr.aria-posinset]=\\\"i + 1\\\"\\n [attr.aria-setsize]=\\\"_tabs.length\\\"\\n [attr.aria-controls]=\\\"_getTabContentId(i)\\\"\\n [attr.aria-selected]=\\\"selectedIndex === i\\\"\\n [attr.aria-label]=\\\"tab.ariaLabel || null\\\"\\n [attr.aria-labelledby]=\\\"(!tab.ariaLabel && tab.ariaLabelledby) ? tab.ariaLabelledby : null\\\"\\n [class.mat-tab-label-active]=\\\"selectedIndex === i\\\"\\n [ngClass]=\\\"tab.labelClass\\\"\\n [disabled]=\\\"tab.disabled\\\"\\n [matRippleDisabled]=\\\"tab.disabled || disableRipple\\\"\\n (click)=\\\"_handleClick(tab, tabHeader, i)\\\"\\n (cdkFocusChange)=\\\"_tabFocusChanged($event, i)\\\">\\n\\n\\n <div class=\\\"mat-tab-label-content\\\">\\n <!-- If there is a label template, use it. -->\\n <ng-template [ngIf]=\\\"tab.templateLabel\\\" [ngIfElse]=\\\"tabTextLabel\\\">\\n <ng-template [cdkPortalOutlet]=\\\"tab.templateLabel\\\"></ng-template>\\n </ng-template>\\n\\n <!-- If there is not a label template, fall back to the text label. -->\\n <ng-template #tabTextLabel>{{tab.textLabel}}</ng-template>\\n </div>\\n </div>\\n</mat-tab-header>\\n\\n<div\\n class=\\\"mat-tab-body-wrapper\\\"\\n [class._mat-animation-noopable]=\\\"_animationMode === 'NoopAnimations'\\\"\\n #tabBodyWrapper>\\n <mat-tab-body role=\\\"tabpanel\\\"\\n *ngFor=\\\"let tab of _tabs; let i = index\\\"\\n [id]=\\\"_getTabContentId(i)\\\"\\n [attr.tabindex]=\\\"(contentTabIndex != null && selectedIndex === i) ? contentTabIndex : null\\\"\\n [attr.aria-labelledby]=\\\"_getTabLabelId(i)\\\"\\n [class.mat-tab-body-active]=\\\"selectedIndex === i\\\"\\n [ngClass]=\\\"tab.bodyClass\\\"\\n [content]=\\\"tab.content!\\\"\\n [position]=\\\"tab.position!\\\"\\n [origin]=\\\"tab.origin\\\"\\n [animationDuration]=\\\"animationDuration\\\"\\n [preserveContent]=\\\"preserveContent\\\"\\n (_onCentered)=\\\"_removeTabBodyWrapperHeight()\\\"\\n (_onCentering)=\\\"_setTabBodyWrapperHeight($event)\\\">\\n </mat-tab-body>\\n</div>\\n\", styles: [\".mat-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-tab-group.mat-tab-group-inverted-header{flex-direction:column-reverse}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:none}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}.mat-tab-label.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-label.mat-tab-disabled{opacity:.5}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-label{opacity:1}@media(max-width: 599px){.mat-tab-label{padding:0 12px}}@media(max-width: 959px){.mat-tab-label{padding:0 12px}}.mat-tab-group[mat-stretch-tabs]>.mat-tab-header .mat-tab-label{flex-basis:0;flex-grow:1}.mat-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}.mat-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-tab-body.mat-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-tab-group.mat-tab-group-dynamic-height .mat-tab-body.mat-tab-body-active{overflow-y:hidden}\"], dependencies: [{ kind: \"directive\", type: i1$2.NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }, { kind: \"directive\", type: i1$2.NgForOf, selector: \"[ngFor][ngForOf]\", inputs: [\"ngForOf\", \"ngForTrackBy\", \"ngForTemplate\"] }, { kind: \"directive\", type: i1$2.NgIf, selector: \"[ngIf]\", inputs: [\"ngIf\", \"ngIfThen\", \"ngIfElse\"] }, { kind: \"directive\", type: i2.CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: [\"cdkPortalOutlet\"], outputs: [\"attached\"], exportAs: [\"cdkPortalOutlet\"] }, { kind: \"directive\", type: i4.MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }, { kind: \"directive\", type: i7.CdkMonitorFocus, selector: \"[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]\", outputs: [\"cdkFocusChange\"] }, { kind: \"directive\", type: MatTabLabelWrapper, selector: \"[matTabLabelWrapper]\", inputs: [\"disabled\"] }, { kind: \"component\", type: MatTabBody, selector: \"mat-tab-body\" }, { kind: \"component\", type: MatTabHeader, selector: \"mat-tab-header\", inputs: [\"selectedIndex\"], outputs: [\"selectFocusedIndex\", \"indexFocused\"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabGroup, decorators: [{\n type: Component,\n args: [{ selector: 'mat-tab-group', exportAs: 'matTabGroup', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, inputs: ['color', 'disableRipple'], providers: [\n {\n provide: MAT_TAB_GROUP,\n useExisting: MatTabGroup,\n },\n ], host: {\n 'class': 'mat-tab-group',\n '[class.mat-tab-group-dynamic-height]': 'dynamicHeight',\n '[class.mat-tab-group-inverted-header]': 'headerPosition === \"below\"',\n }, template: \"<mat-tab-header #tabHeader\\n [selectedIndex]=\\\"selectedIndex || 0\\\"\\n [disableRipple]=\\\"disableRipple\\\"\\n [disablePagination]=\\\"disablePagination\\\"\\n (indexFocused)=\\\"_focusChanged($event)\\\"\\n (selectFocusedIndex)=\\\"selectedIndex = $event\\\">\\n <div class=\\\"mat-tab-label mat-focus-indicator\\\" role=\\\"tab\\\" matTabLabelWrapper mat-ripple\\n cdkMonitorElementFocus\\n *ngFor=\\\"let tab of _tabs; let i = index\\\"\\n [id]=\\\"_getTabLabelId(i)\\\"\\n [attr.tabIndex]=\\\"_getTabIndex(tab, i)\\\"\\n [attr.aria-posinset]=\\\"i + 1\\\"\\n [attr.aria-setsize]=\\\"_tabs.length\\\"\\n [attr.aria-controls]=\\\"_getTabContentId(i)\\\"\\n [attr.aria-selected]=\\\"selectedIndex === i\\\"\\n [attr.aria-label]=\\\"tab.ariaLabel || null\\\"\\n [attr.aria-labelledby]=\\\"(!tab.ariaLabel && tab.ariaLabelledby) ? tab.ariaLabelledby : null\\\"\\n [class.mat-tab-label-active]=\\\"selectedIndex === i\\\"\\n [ngClass]=\\\"tab.labelClass\\\"\\n [disabled]=\\\"tab.disabled\\\"\\n [matRippleDisabled]=\\\"tab.disabled || disableRipple\\\"\\n (click)=\\\"_handleClick(tab, tabHeader, i)\\\"\\n (cdkFocusChange)=\\\"_tabFocusChanged($event, i)\\\">\\n\\n\\n <div class=\\\"mat-tab-label-content\\\">\\n <!-- If there is a label template, use it. -->\\n <ng-template [ngIf]=\\\"tab.templateLabel\\\" [ngIfElse]=\\\"tabTextLabel\\\">\\n <ng-template [cdkPortalOutlet]=\\\"tab.templateLabel\\\"></ng-template>\\n </ng-template>\\n\\n <!-- If there is not a label template, fall back to the text label. -->\\n <ng-template #tabTextLabel>{{tab.textLabel}}</ng-template>\\n </div>\\n </div>\\n</mat-tab-header>\\n\\n<div\\n class=\\\"mat-tab-body-wrapper\\\"\\n [class._mat-animation-noopable]=\\\"_animationMode === 'NoopAnimations'\\\"\\n #tabBodyWrapper>\\n <mat-tab-body role=\\\"tabpanel\\\"\\n *ngFor=\\\"let tab of _tabs; let i = index\\\"\\n [id]=\\\"_getTabContentId(i)\\\"\\n [attr.tabindex]=\\\"(contentTabIndex != null && selectedIndex === i) ? contentTabIndex : null\\\"\\n [attr.aria-labelledby]=\\\"_getTabLabelId(i)\\\"\\n [class.mat-tab-body-active]=\\\"selectedIndex === i\\\"\\n [ngClass]=\\\"tab.bodyClass\\\"\\n [content]=\\\"tab.content!\\\"\\n [position]=\\\"tab.position!\\\"\\n [origin]=\\\"tab.origin\\\"\\n [animationDuration]=\\\"animationDuration\\\"\\n [preserveContent]=\\\"preserveContent\\\"\\n (_onCentered)=\\\"_removeTabBodyWrapperHeight()\\\"\\n (_onCentering)=\\\"_setTabBodyWrapperHeight($event)\\\">\\n </mat-tab-body>\\n</div>\\n\", styles: [\".mat-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-tab-group.mat-tab-group-inverted-header{flex-direction:column-reverse}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:none}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}.mat-tab-label.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-label.mat-tab-disabled{opacity:.5}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-label{opacity:1}@media(max-width: 599px){.mat-tab-label{padding:0 12px}}@media(max-width: 959px){.mat-tab-label{padding:0 12px}}.mat-tab-group[mat-stretch-tabs]>.mat-tab-header .mat-tab-label{flex-basis:0;flex-grow:1}.mat-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}.mat-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-tab-body.mat-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-tab-group.mat-tab-group-dynamic-height .mat-tab-body.mat-tab-body-active{overflow-y:hidden}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [MAT_TABS_CONFIG]\n }, {\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { _allTabs: [{\n type: ContentChildren,\n args: [MatTab, { descendants: true }]\n }], _tabBodyWrapper: [{\n type: ViewChild,\n args: ['tabBodyWrapper']\n }], _tabHeader: [{\n type: ViewChild,\n args: ['tabHeader']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Increasing integer for generating unique ids for tab nav components.\nlet nextUniqueId = 0;\n/**\n * Base class with all of the `MatTabNav` functionality.\n * @docs-private\n */\nclass _MatTabNavBase extends MatPaginatedTabHeader {\n constructor(elementRef, dir, ngZone, changeDetectorRef, viewportRuler, platform, animationMode) {\n super(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode);\n this._disableRipple = false;\n /** Theme color of the nav bar. */\n this.color = 'primary';\n }\n /** Background color of the tab nav. */\n get backgroundColor() {\n return this._backgroundColor;\n }\n set backgroundColor(value) {\n const classList = this._elementRef.nativeElement.classList;\n classList.remove(`mat-background-${this.backgroundColor}`);\n if (value) {\n classList.add(`mat-background-${value}`);\n }\n this._backgroundColor = value;\n }\n /** Whether the ripple effect is disabled or not. */\n get disableRipple() {\n return this._disableRipple;\n }\n set disableRipple(value) {\n this._disableRipple = coerceBooleanProperty(value);\n }\n _itemSelected() {\n // noop\n }\n ngAfterContentInit() {\n // We need this to run before the `changes` subscription in parent to ensure that the\n // selectedIndex is up-to-date by the time the super class starts looking for it.\n this._items.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => {\n this.updateActiveLink();\n });\n super.ngAfterContentInit();\n }\n /** Notifies the component that the active link has been changed. */\n updateActiveLink() {\n if (!this._items) {\n return;\n }\n const items = this._items.toArray();\n for (let i = 0; i < items.length; i++) {\n if (items[i].active) {\n this.selectedIndex = i;\n this._changeDetectorRef.markForCheck();\n if (this.tabPanel) {\n this.tabPanel._activeTabId = items[i].id;\n }\n return;\n }\n }\n // The ink bar should hide itself if no items are active.\n this.selectedIndex = -1;\n this._inkBar.hide();\n }\n _getRole() {\n return this.tabPanel ? 'tablist' : this._elementRef.nativeElement.getAttribute('role');\n }\n}\n_MatTabNavBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatTabNavBase, deps: [{ token: i0.ElementRef }, { token: i1.Directionality, optional: true }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i1$1.ViewportRuler }, { token: i3.Platform }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n_MatTabNavBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _MatTabNavBase, inputs: { backgroundColor: \"backgroundColor\", disableRipple: \"disableRipple\", color: \"color\", tabPanel: \"tabPanel\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatTabNavBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.Directionality, decorators: [{\n type: Optional\n }] }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i1$1.ViewportRuler }, { type: i3.Platform }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { backgroundColor: [{\n type: Input\n }], disableRipple: [{\n type: Input\n }], color: [{\n type: Input\n }], tabPanel: [{\n type: Input\n }] } });\n/**\n * Navigation component matching the styles of the tab group header.\n * Provides anchored navigation with animated ink bar.\n */\nclass MatTabNav extends _MatTabNavBase {\n constructor(elementRef, dir, ngZone, changeDetectorRef, viewportRuler, platform, animationMode) {\n super(elementRef, dir, ngZone, changeDetectorRef, viewportRuler, platform, animationMode);\n }\n}\nMatTabNav.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabNav, deps: [{ token: i0.ElementRef }, { token: i1.Directionality, optional: true }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i1$1.ViewportRuler }, { token: i3.Platform }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nMatTabNav.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTabNav, selector: \"[mat-tab-nav-bar]\", inputs: { color: \"color\" }, host: { properties: { \"attr.role\": \"_getRole()\", \"class.mat-tab-header-pagination-controls-enabled\": \"_showPaginationControls\", \"class.mat-tab-header-rtl\": \"_getLayoutDirection() == 'rtl'\", \"class.mat-primary\": \"color !== \\\"warn\\\" && color !== \\\"accent\\\"\", \"class.mat-accent\": \"color === \\\"accent\\\"\", \"class.mat-warn\": \"color === \\\"warn\\\"\" }, classAttribute: \"mat-tab-nav-bar mat-tab-header\" }, queries: [{ propertyName: \"_items\", predicate: i0.forwardRef(function () { return MatTabLink; }), descendants: true }], viewQueries: [{ propertyName: \"_inkBar\", first: true, predicate: MatInkBar, descendants: true, static: true }, { propertyName: \"_tabListContainer\", first: true, predicate: [\"tabListContainer\"], descendants: true, static: true }, { propertyName: \"_tabList\", first: true, predicate: [\"tabList\"], descendants: true, static: true }, { propertyName: \"_tabListInner\", first: true, predicate: [\"tabListInner\"], descendants: true, static: true }, { propertyName: \"_nextPaginator\", first: true, predicate: [\"nextPaginator\"], descendants: true }, { propertyName: \"_previousPaginator\", first: true, predicate: [\"previousPaginator\"], descendants: true }], exportAs: [\"matTabNavBar\", \"matTabNav\"], usesInheritance: true, ngImport: i0, template: \"<button class=\\\"mat-tab-header-pagination mat-tab-header-pagination-before mat-elevation-z4\\\"\\n #previousPaginator\\n aria-hidden=\\\"true\\\"\\n type=\\\"button\\\"\\n mat-ripple\\n tabindex=\\\"-1\\\"\\n [matRippleDisabled]=\\\"_disableScrollBefore || disableRipple\\\"\\n [class.mat-tab-header-pagination-disabled]=\\\"_disableScrollBefore\\\"\\n [disabled]=\\\"_disableScrollBefore || null\\\"\\n (click)=\\\"_handlePaginatorClick('before')\\\"\\n (mousedown)=\\\"_handlePaginatorPress('before', $event)\\\"\\n (touchend)=\\\"_stopInterval()\\\">\\n <div class=\\\"mat-tab-header-pagination-chevron\\\"></div>\\n</button>\\n\\n<div class=\\\"mat-tab-link-container\\\" #tabListContainer (keydown)=\\\"_handleKeydown($event)\\\">\\n <div\\n class=\\\"mat-tab-list\\\"\\n [class._mat-animation-noopable]=\\\"_animationMode === 'NoopAnimations'\\\"\\n #tabList\\n (cdkObserveContent)=\\\"_onContentChanges()\\\">\\n <div class=\\\"mat-tab-links\\\" #tabListInner>\\n <ng-content></ng-content>\\n </div>\\n <mat-ink-bar></mat-ink-bar>\\n </div>\\n</div>\\n\\n<button class=\\\"mat-tab-header-pagination mat-tab-header-pagination-after mat-elevation-z4\\\"\\n #nextPaginator\\n aria-hidden=\\\"true\\\"\\n type=\\\"button\\\"\\n mat-ripple\\n [matRippleDisabled]=\\\"_disableScrollAfter || disableRipple\\\"\\n [class.mat-tab-header-pagination-disabled]=\\\"_disableScrollAfter\\\"\\n [disabled]=\\\"_disableScrollAfter || null\\\"\\n tabindex=\\\"-1\\\"\\n (mousedown)=\\\"_handlePaginatorPress('after', $event)\\\"\\n (click)=\\\"_handlePaginatorClick('after')\\\"\\n (touchend)=\\\"_stopInterval()\\\">\\n <div class=\\\"mat-tab-header-pagination-chevron\\\"></div>\\n</button>\\n\", styles: [\".mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;background:none;border:none;outline:0;padding:0}.mat-tab-header-pagination::-moz-focus-inner{border:0}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-tab-links{display:flex}[mat-align-tabs=center]>.mat-tab-link-container .mat-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-tab-link-container .mat-tab-links{justify-content:flex-end}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-ink-bar._mat-animation-noopable{transition:none !important;animation:none !important}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-link{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;vertical-align:top;text-decoration:none;position:relative;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-tab-link:focus{outline:none}.mat-tab-link:focus:not(.mat-tab-disabled){opacity:1}.mat-tab-link.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-link.mat-tab-disabled{opacity:.5}.mat-tab-link .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-link{opacity:1}[mat-stretch-tabs] .mat-tab-link{flex-basis:0;flex-grow:1}.mat-tab-link.mat-tab-disabled{pointer-events:none}.mat-tab-link::before{margin:5px}@media(max-width: 599px){.mat-tab-link{min-width:72px}}\"], dependencies: [{ kind: \"directive\", type: i4.MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }, { kind: \"directive\", type: i5.CdkObserveContent, selector: \"[cdkObserveContent]\", inputs: [\"cdkObserveContentDisabled\", \"debounce\"], outputs: [\"cdkObserveContent\"], exportAs: [\"cdkObserveContent\"] }, { kind: \"directive\", type: MatInkBar, selector: \"mat-ink-bar\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabNav, decorators: [{\n type: Component,\n args: [{ selector: '[mat-tab-nav-bar]', exportAs: 'matTabNavBar, matTabNav', inputs: ['color'], host: {\n '[attr.role]': '_getRole()',\n 'class': 'mat-tab-nav-bar mat-tab-header',\n '[class.mat-tab-header-pagination-controls-enabled]': '_showPaginationControls',\n '[class.mat-tab-header-rtl]': \"_getLayoutDirection() == 'rtl'\",\n '[class.mat-primary]': 'color !== \"warn\" && color !== \"accent\"',\n '[class.mat-accent]': 'color === \"accent\"',\n '[class.mat-warn]': 'color === \"warn\"',\n }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, template: \"<button class=\\\"mat-tab-header-pagination mat-tab-header-pagination-before mat-elevation-z4\\\"\\n #previousPaginator\\n aria-hidden=\\\"true\\\"\\n type=\\\"button\\\"\\n mat-ripple\\n tabindex=\\\"-1\\\"\\n [matRippleDisabled]=\\\"_disableScrollBefore || disableRipple\\\"\\n [class.mat-tab-header-pagination-disabled]=\\\"_disableScrollBefore\\\"\\n [disabled]=\\\"_disableScrollBefore || null\\\"\\n (click)=\\\"_handlePaginatorClick('before')\\\"\\n (mousedown)=\\\"_handlePaginatorPress('before', $event)\\\"\\n (touchend)=\\\"_stopInterval()\\\">\\n <div class=\\\"mat-tab-header-pagination-chevron\\\"></div>\\n</button>\\n\\n<div class=\\\"mat-tab-link-container\\\" #tabListContainer (keydown)=\\\"_handleKeydown($event)\\\">\\n <div\\n class=\\\"mat-tab-list\\\"\\n [class._mat-animation-noopable]=\\\"_animationMode === 'NoopAnimations'\\\"\\n #tabList\\n (cdkObserveContent)=\\\"_onContentChanges()\\\">\\n <div class=\\\"mat-tab-links\\\" #tabListInner>\\n <ng-content></ng-content>\\n </div>\\n <mat-ink-bar></mat-ink-bar>\\n </div>\\n</div>\\n\\n<button class=\\\"mat-tab-header-pagination mat-tab-header-pagination-after mat-elevation-z4\\\"\\n #nextPaginator\\n aria-hidden=\\\"true\\\"\\n type=\\\"button\\\"\\n mat-ripple\\n [matRippleDisabled]=\\\"_disableScrollAfter || disableRipple\\\"\\n [class.mat-tab-header-pagination-disabled]=\\\"_disableScrollAfter\\\"\\n [disabled]=\\\"_disableScrollAfter || null\\\"\\n tabindex=\\\"-1\\\"\\n (mousedown)=\\\"_handlePaginatorPress('after', $event)\\\"\\n (click)=\\\"_handlePaginatorClick('after')\\\"\\n (touchend)=\\\"_stopInterval()\\\">\\n <div class=\\\"mat-tab-header-pagination-chevron\\\"></div>\\n</button>\\n\", styles: [\".mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;background:none;border:none;outline:0;padding:0}.mat-tab-header-pagination::-moz-focus-inner{border:0}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-tab-links{display:flex}[mat-align-tabs=center]>.mat-tab-link-container .mat-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-tab-link-container .mat-tab-links{justify-content:flex-end}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-ink-bar._mat-animation-noopable{transition:none !important;animation:none !important}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-link{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;vertical-align:top;text-decoration:none;position:relative;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-tab-link:focus{outline:none}.mat-tab-link:focus:not(.mat-tab-disabled){opacity:1}.mat-tab-link.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-link.mat-tab-disabled{opacity:.5}.mat-tab-link .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-link{opacity:1}[mat-stretch-tabs] .mat-tab-link{flex-basis:0;flex-grow:1}.mat-tab-link.mat-tab-disabled{pointer-events:none}.mat-tab-link::before{margin:5px}@media(max-width: 599px){.mat-tab-link{min-width:72px}}\"] }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.Directionality, decorators: [{\n type: Optional\n }] }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i1$1.ViewportRuler }, { type: i3.Platform }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { _items: [{\n type: ContentChildren,\n args: [forwardRef(() => MatTabLink), { descendants: true }]\n }], _inkBar: [{\n type: ViewChild,\n args: [MatInkBar, { static: true }]\n }], _tabListContainer: [{\n type: ViewChild,\n args: ['tabListContainer', { static: true }]\n }], _tabList: [{\n type: ViewChild,\n args: ['tabList', { static: true }]\n }], _tabListInner: [{\n type: ViewChild,\n args: ['tabListInner', { static: true }]\n }], _nextPaginator: [{\n type: ViewChild,\n args: ['nextPaginator']\n }], _previousPaginator: [{\n type: ViewChild,\n args: ['previousPaginator']\n }] } });\n// Boilerplate for applying mixins to MatTabLink.\nconst _MatTabLinkMixinBase = mixinTabIndex(mixinDisableRipple(mixinDisabled(class {\n})));\n/** Base class with all of the `MatTabLink` functionality. */\nclass _MatTabLinkBase extends _MatTabLinkMixinBase {\n constructor(_tabNavBar, \n /** @docs-private */ elementRef, globalRippleOptions, tabIndex, _focusMonitor, animationMode) {\n super();\n this._tabNavBar = _tabNavBar;\n this.elementRef = elementRef;\n this._focusMonitor = _focusMonitor;\n /** Whether the tab link is active or not. */\n this._isActive = false;\n /** Unique id for the tab. */\n this.id = `mat-tab-link-${nextUniqueId++}`;\n this.rippleConfig = globalRippleOptions || {};\n this.tabIndex = parseInt(tabIndex) || 0;\n if (animationMode === 'NoopAnimations') {\n this.rippleConfig.animation = { enterDuration: 0, exitDuration: 0 };\n }\n }\n /** Whether the link is active. */\n get active() {\n return this._isActive;\n }\n set active(value) {\n const newValue = coerceBooleanProperty(value);\n if (newValue !== this._isActive) {\n this._isActive = newValue;\n this._tabNavBar.updateActiveLink();\n }\n }\n /**\n * Whether ripples are disabled on interaction.\n * @docs-private\n */\n get rippleDisabled() {\n return (this.disabled ||\n this.disableRipple ||\n this._tabNavBar.disableRipple ||\n !!this.rippleConfig.disabled);\n }\n /** Focuses the tab link. */\n focus() {\n this.elementRef.nativeElement.focus();\n }\n ngAfterViewInit() {\n this._focusMonitor.monitor(this.elementRef);\n }\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this.elementRef);\n }\n _handleFocus() {\n // Since we allow navigation through tabbing in the nav bar, we\n // have to update the focused index whenever the link receives focus.\n this._tabNavBar.focusIndex = this._tabNavBar._items.toArray().indexOf(this);\n }\n _handleKeydown(event) {\n if (this._tabNavBar.tabPanel && event.keyCode === SPACE) {\n this.elementRef.nativeElement.click();\n }\n }\n _getAriaControls() {\n return this._tabNavBar.tabPanel\n ? this._tabNavBar.tabPanel?.id\n : this.elementRef.nativeElement.getAttribute('aria-controls');\n }\n _getAriaSelected() {\n if (this._tabNavBar.tabPanel) {\n return this.active ? 'true' : 'false';\n }\n else {\n return this.elementRef.nativeElement.getAttribute('aria-selected');\n }\n }\n _getAriaCurrent() {\n return this.active && !this._tabNavBar.tabPanel ? 'page' : null;\n }\n _getRole() {\n return this._tabNavBar.tabPanel ? 'tab' : this.elementRef.nativeElement.getAttribute('role');\n }\n _getTabIndex() {\n if (this._tabNavBar.tabPanel) {\n return this._isActive && !this.disabled ? 0 : -1;\n }\n else {\n return this.tabIndex;\n }\n }\n}\n_MatTabLinkBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatTabLinkBase, deps: [{ token: _MatTabNavBase }, { token: i0.ElementRef }, { token: MAT_RIPPLE_GLOBAL_OPTIONS, optional: true }, { token: 'tabindex', attribute: true }, { token: i7.FocusMonitor }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n_MatTabLinkBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: _MatTabLinkBase, inputs: { active: \"active\", id: \"id\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: _MatTabLinkBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: _MatTabNavBase }, { type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_RIPPLE_GLOBAL_OPTIONS]\n }] }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }, { type: i7.FocusMonitor }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; }, propDecorators: { active: [{\n type: Input\n }], id: [{\n type: Input\n }] } });\n/**\n * Link inside of a `mat-tab-nav-bar`.\n */\nclass MatTabLink extends _MatTabLinkBase {\n constructor(tabNavBar, elementRef, ngZone, platform, globalRippleOptions, tabIndex, focusMonitor, animationMode) {\n super(tabNavBar, elementRef, globalRippleOptions, tabIndex, focusMonitor, animationMode);\n this._tabLinkRipple = new RippleRenderer(this, ngZone, elementRef, platform);\n this._tabLinkRipple.setupTriggerEvents(elementRef.nativeElement);\n }\n ngOnDestroy() {\n super.ngOnDestroy();\n this._tabLinkRipple._removeTriggerEvents();\n }\n}\nMatTabLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabLink, deps: [{ token: MatTabNav }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i3.Platform }, { token: MAT_RIPPLE_GLOBAL_OPTIONS, optional: true }, { token: 'tabindex', attribute: true }, { token: i7.FocusMonitor }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatTabLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTabLink, selector: \"[mat-tab-link], [matTabLink]\", inputs: { disabled: \"disabled\", disableRipple: \"disableRipple\", tabIndex: \"tabIndex\" }, host: { listeners: { \"focus\": \"_handleFocus()\", \"keydown\": \"_handleKeydown($event)\" }, properties: { \"attr.aria-controls\": \"_getAriaControls()\", \"attr.aria-current\": \"_getAriaCurrent()\", \"attr.aria-disabled\": \"disabled\", \"attr.aria-selected\": \"_getAriaSelected()\", \"attr.id\": \"id\", \"attr.tabIndex\": \"_getTabIndex()\", \"attr.role\": \"_getRole()\", \"class.mat-tab-disabled\": \"disabled\", \"class.mat-tab-label-active\": \"active\" }, classAttribute: \"mat-tab-link mat-focus-indicator\" }, exportAs: [\"matTabLink\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabLink, decorators: [{\n type: Directive,\n args: [{\n selector: '[mat-tab-link], [matTabLink]',\n exportAs: 'matTabLink',\n inputs: ['disabled', 'disableRipple', 'tabIndex'],\n host: {\n 'class': 'mat-tab-link mat-focus-indicator',\n '[attr.aria-controls]': '_getAriaControls()',\n '[attr.aria-current]': '_getAriaCurrent()',\n '[attr.aria-disabled]': 'disabled',\n '[attr.aria-selected]': '_getAriaSelected()',\n '[attr.id]': 'id',\n '[attr.tabIndex]': '_getTabIndex()',\n '[attr.role]': '_getRole()',\n '[class.mat-tab-disabled]': 'disabled',\n '[class.mat-tab-label-active]': 'active',\n '(focus)': '_handleFocus()',\n '(keydown)': '_handleKeydown($event)',\n },\n }]\n }], ctorParameters: function () { return [{ type: MatTabNav }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i3.Platform }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_RIPPLE_GLOBAL_OPTIONS]\n }] }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }, { type: i7.FocusMonitor }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }]; } });\n/**\n * Tab panel component associated with MatTabNav.\n */\nclass MatTabNavPanel {\n constructor() {\n /** Unique id for the tab panel. */\n this.id = `mat-tab-nav-panel-${nextUniqueId++}`;\n }\n}\nMatTabNavPanel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabNavPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });\nMatTabNavPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTabNavPanel, selector: \"mat-tab-nav-panel\", inputs: { id: \"id\" }, host: { attributes: { \"role\": \"tabpanel\" }, properties: { \"attr.aria-labelledby\": \"_activeTabId\", \"attr.id\": \"id\" }, classAttribute: \"mat-tab-nav-panel\" }, exportAs: [\"matTabNavPanel\"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabNavPanel, decorators: [{\n type: Component,\n args: [{\n selector: 'mat-tab-nav-panel',\n exportAs: 'matTabNavPanel',\n template: '<ng-content></ng-content>',\n host: {\n '[attr.aria-labelledby]': '_activeTabId',\n '[attr.id]': 'id',\n 'class': 'mat-tab-nav-panel',\n 'role': 'tabpanel',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n }]\n }], propDecorators: { id: [{\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 */\nclass MatTabsModule {\n}\nMatTabsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatTabsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabsModule, declarations: [MatTabGroup,\n MatTabLabel,\n MatTab,\n MatInkBar,\n MatTabLabelWrapper,\n MatTabNav,\n MatTabNavPanel,\n MatTabLink,\n MatTabBody,\n MatTabBodyPortal,\n MatTabHeader,\n MatTabContent], imports: [CommonModule,\n MatCommonModule,\n PortalModule,\n MatRippleModule,\n ObserversModule,\n A11yModule], exports: [MatCommonModule,\n MatTabGroup,\n MatTabLabel,\n MatTab,\n MatTabNav,\n MatTabNavPanel,\n MatTabLink,\n MatTabContent] });\nMatTabsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabsModule, imports: [CommonModule,\n MatCommonModule,\n PortalModule,\n MatRippleModule,\n ObserversModule,\n A11yModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTabsModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [\n CommonModule,\n MatCommonModule,\n PortalModule,\n MatRippleModule,\n ObserversModule,\n A11yModule,\n ],\n // Don't export all components because some are only to be used internally.\n exports: [\n MatCommonModule,\n MatTabGroup,\n MatTabLabel,\n MatTab,\n MatTabNav,\n MatTabNavPanel,\n MatTabLink,\n MatTabContent,\n ],\n declarations: [\n MatTabGroup,\n MatTabLabel,\n MatTab,\n MatInkBar,\n MatTabLabelWrapper,\n MatTabNav,\n MatTabNavPanel,\n MatTabLink,\n MatTabBody,\n MatTabBodyPortal,\n MatTabHeader,\n MatTabContent,\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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Generated bundle index. Do not edit.\n */\n\nexport { MAT_TAB, MAT_TABS_CONFIG, MAT_TAB_GROUP, MatInkBar, MatTab, MatTabBody, MatTabBodyPortal, MatTabChangeEvent, MatTabContent, MatTabGroup, MatTabHeader, MatTabLabel, MatTabLabelWrapper, MatTabLink, MatTabNav, MatTabNavPanel, MatTabsModule, _MAT_INK_BAR_POSITIONER, _MatTabBodyBase, _MatTabGroupBase, _MatTabHeaderBase, _MatTabLinkBase, _MatTabNavBase, matTabsAnimations };\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"DisputeOrderBy.CaseNumber\">\n <lib-text-table-column>\n {{ element.caseNumber }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"DisputeOrderBy.Id\">\n <lib-text-table-column>\n {{ element.token }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"DisputeOrderBy.RaiseDateUtc\">\n <lib-date-time-label [dateUtc]=\"element.raiseDateUtc\"></lib-date-time-label>\n <lib-table-column-sort [key]=\"sortingKeyForRaiseDate\"></lib-table-column-sort>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'dueDateUtc'\">\n <lib-date-time-label [dateUtc]=\"element.dueDateUtc\"></lib-date-time-label>\n <lib-table-column-sort [key]=\"sortingKeyForDueDate\"></lib-table-column-sort>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"DisputeOrderBy.CaseReason\">\n <lib-text-table-column>\n {{ element.reasonCodeDescription }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'amount'\">\n <lib-text-table-column>\n {{ element.disputeAmount | vituCurrencyUsd }}\n </lib-text-table-column>\n <lib-table-column-sort [key]=\"element.disputeAmount ?? 0\"></lib-table-column-sort>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'statusDescription'\">\n <lib-text-table-column>\n {{ element.statusDescription }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'statusDateUtc'\">\n <lib-date-time-label [dateUtc]=\"element.statusDateUtc\"></lib-date-time-label>\n <lib-table-column-sort [key]=\"sortingKeyForStatusDate\"></lib-table-column-sort>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'disputeOutcome'\">\n <lib-text-table-column>\n {{ element.disputeOutcome }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'mid'\">\n <lib-text-table-column>\n {{ element.mid }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'processor'\">\n <lib-text-table-column>\n {{ element.processor }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'disputeType'\">\n <lib-text-table-column>\n {{ element.disputeType }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'paymentToken'\">\n <lib-text-table-column>\n {{ element.paymentToken }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'publicTransactionId'\">\n <lib-text-table-column>\n {{ element.publicTransactionId }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n","import { Component, Input } from \"@angular/core\";\nimport { DateTimeFormatUtils } from \"shared-lib\";\nimport { DisputeOrderBy } from \"@merchant_api/models/dispute-order-by\";\n\n@Component({\n selector: \"app-disputes-table-cell-content\",\n templateUrl: \"./disputes-table-cell-content.component.html\",\n styleUrls: [\"./disputes-table-cell-content.component.less\"],\n})\nexport class DisputesTableCellContentComponent {\n @Input() columnId: string;\n @Input() element: any;\n\n DateTimeFormatUtils = DateTimeFormatUtils;\n DisputeOrderBy = DisputeOrderBy;\n\n get sortingKeyForRaiseDate(): number {\n // Timezone independent (as just for comparision with like values)\n return new Date(this.element.raiseDateUtc).getTime();\n }\n\n get sortingKeyForDueDate(): number {\n // Timezone independent (as just for comparision with like values)\n return new Date(this.element.dueDateUtc).getTime();\n }\n\n get sortingKeyForStatusDate(): number {\n // Timezone independent (as just for comparision with like values)\n return new Date(this.element.statusDateUtc).getTime();\n }\n\n}\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"'feeCategory'\">\n <lib-text-table-column>\n {{ element.feeCategory }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'feeType'\">\n <lib-text-table-column>\n {{ element.feeType }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'feeValue'\">\n <lib-text-table-column>\n {{ element.feeValue | vituCurrencyUsd }}\n </lib-text-table-column>\n <lib-table-column-sort [key]=\"element.feeValue ?? 0\"></lib-table-column-sort>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'perc'\">\n <lib-text-table-column>\n {{ feePerc | vituPercentage }}\n </lib-text-table-column>\n <lib-table-column-sort [key]=\"feePerc\"></lib-table-column-sort>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n\n\n\n\n\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"app-fees-table-cell-content\",\n templateUrl: \"./fees-table-cell-content.component.html\",\n styleUrls: [\"./fees-table-cell-content.component.less\"],\n})\nexport class FeesTableCellContentComponent {\n\n @Input() columnId: string;\n @Input() element: any;\n @Input() paymentAmount: number;\n\n get feePerc(): number {\n return (this.paymentAmount ? ((100 * this.element.feeValue) / this.paymentAmount) : 0);\n }\n\n}\n","<div class=\"outer-container\">\n\n <div class=\"top-bar\">\n\n <lib-title-bar\n [crumbs]=\"[{ 'label': 'Transactions' , 'link': '/dashboard/transactions' }, { 'label': transaction?.token }]\">\n\n<!--\n\n AC_todo : Determine VOID & CAPTURE conditions & advance the below early prototype implementation. (eg. likely need refund style modals)\n\n <lib-action-button\n *ngIf=\"payment?.status == 'Captured' || payment?.status == 'Authorized'\"\n class=\"void-button\"\n label=\"Void\"\n [kind]=\"ActionButtonKind.PRIMARY\"\n (click)=\"voidPayment.emit(payment)\">\n </lib-action-button>\n\n <lib-action-button\n *ngIf=\"payment?.status == 'Authorized'\"\n class=\"capture-button\"\n label=\"Capture\"\n [kind]=\"ActionButtonKind.PRIMARY\"\n (click)=\"capturePayment.emit(payment)\">\n </lib-action-button>\n\n-->\n\n <lib-action-button\n *ngIf=\"hasRefundActionAvailable()\"\n class=\"refund-button\"\n label=\"Refund\"\n (click)=\"onClickRefund()\"\n fontImage=\"far fa-dollar-sign fa-bg\"\n fontImageExtra=\"fas fa-arrow-left\"\n [minWidthInPixels]=\"90\">\n </lib-action-button>\n\n </lib-title-bar>\n\n </div>\n\n <div class=\"transaction-container\">\n\n <div class=\"transaction-details-outer-container\">\n\n <div class=\"transaction-details-middle-container\">\n\n <div class=\"transaction-details-title\">\n\n <div class=\"title-container\">\n <div class=\"title\">\n <lib-text-common>\n <span class=\"title-prefix\">Transaction Token: </span>{{ transaction?.token }}\n </lib-text-common>\n </div>\n <div class=\"title-status-chip-container\">\n <lib-transaction-status-chip\n [status]=\"transaction?.status\">\n </lib-transaction-status-chip>\n </div>\n </div>\n\n <div class=\"transaction-buttons-container\">\n <lib-action-button\n *ngIf=\"transaction\"\n class=\"receipt-button\"\n label=\"Receipt\"\n [kind]=\"ActionButtonKind.SECONDARY\"\n (click)=\"downloadReceipt.emit(transaction)\"\n fontImage=\"fas fa-receipt fa-bg\"\n [minWidthInPixels]=\"90\">\n </lib-action-button>\n </div>\n\n </div>\n\n <div class=\"transaction-details-inner-container\">\n\n <ng-container *ngIf=\"!transactionLoading; else spinner\">\n\n <lib-text-field [label]=\"'Date (' + LocalTimePoint.formatZ() + ')'\">\n <lib-date-time-label *ngIf=\"transaction.dateUtc\" [singleLine]=\"true\" [dateUtc]=\"transaction.dateUtc\"></lib-date-time-label>\n </lib-text-field>\n\n <lib-text-field label=\"Amount\">\n {{ transaction.amount | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field label=\"Payer Name\">\n {{ transaction.paymentMethod?.payer?.fullName | uppercase }}\n </lib-text-field>\n\n <lib-text-field label=\"Card\">\n {{ transaction.card ? (transaction.card.cardBrand + ' (' + transaction.card.cardType + ')' | uppercase) : \"\" }}\n </lib-text-field>\n\n <lib-text-field label=\"Card Number\">\n {{ getCardNumber() }}\n </lib-text-field>\n\n <lib-text-field label=\"Card Expiration\">\n {{ transaction.card?.expirationDate }}\n </lib-text-field>\n\n <lib-text-field label=\"Type\">\n {{ displayTextForTransactionType }}\n </lib-text-field>\n\n <lib-text-field label=\"Auth Code\">\n {{ transaction.authCode }}\n </lib-text-field>\n\n <lib-digital-wallet-image-field [kind]=\"transaction?.digitalWalletIndicator\">\n </lib-digital-wallet-image-field>\n\n <lib-text-field id=\"avsTextField\" label=\"AVS\">\n {{ getAvsDetailFieldValue(transaction.avsResult, transaction.avsResultDescription) }}\n </lib-text-field>\n\n <lib-text-field label=\"CVV\">\n {{ getCvvDetailFieldValue(transaction.cvvResult, transaction.cvvResultDescription) }}\n </lib-text-field>\n\n <lib-text-field [label]=\"'Date Settled (' + LocalTimePoint.formatZ() + ')'\">\n <lib-date-time-label *ngIf=\"transaction.settlementDateUtc\" [singleLine]=\"true\" [dateUtc]=\"transaction.settlementDateUtc\"></lib-date-time-label>\n </lib-text-field>\n\n <lib-text-field label=\"MID\">\n {{ transaction.mid }}\n </lib-text-field>\n\n <lib-text-field label=\"TID\">\n {{ transaction.tid }}\n </lib-text-field>\n\n <lib-text-field label=\"Gateway\">\n {{ transaction.gateway }}\n </lib-text-field>\n\n <lib-text-field label=\"Funding ID\">\n {{ transaction.fundingRef }}\n </lib-text-field>\n\n <lib-text-field label=\"Date Funded\">\n <lib-date-time-label *ngIf=\"transaction.fundingDateUtc\"\n [rawDateWithNoTime]=\"true\"\n [singleLine]=\"true\"\n [dateUtc]=\"transaction.fundingDateUtc\">\n </lib-date-time-label>\n </lib-text-field>\n\n <lib-text-field id=\"processingInfoTextField\" label=\"Processing Info\">\n {{ transaction.processingInfo }}\n </lib-text-field>\n\n <lib-text-field label=\"Description\">\n {{ transaction.description }}\n </lib-text-field>\n\n <lib-text-field label=\"Payment Token\">\n {{ transaction.paymentToken }}\n </lib-text-field>\n\n </ng-container>\n\n </div>\n\n </div>\n\n <div class=\"transaction-details-fees-container\">\n <div class=\"transaction-details-fees-title\">\n Transaction Fees\n </div>\n <div class=\"transaction-details-fees-inner-container\">\n <ng-container *ngIf=\"(!relatedPaymentLoading && !paymentFeesLoading); else spinner\">\n\n <lib-text-field *ngFor=\"let feePart of feeParts\" [label]=\"feePart.category\">\n {{ feePart.value | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field label=\"Total Fees\">\n {{ feeTotal | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field label=\"% of Amount\">\n {{ (payment?.amount ? ((100 * feeTotal) / payment?.amount) : 0) | vituPercentage }}\n </lib-text-field>\n\n <lib-text-field *ngIf=\"transaction?.surcharge?.amount\" label=\"Surcharge\">\n {{ transaction.surcharge.amount | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field *ngIf=\"serviceFeeAmount > 0\" label=\"Service Fee\">\n {{ serviceFeeAmount | vituCurrencyUsd }}   {{ '(' + (serviceFeePercent | vituPercentage) + ')' }}\n </lib-text-field>\n\n <lib-text-field *ngIf=\"serviceFeeRefundAmount > 0\" label=\"Service Fee Refund\">\n {{ serviceFeeRefundAmount | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field *ngIf=\"serviceFeeRefundAmount > 0 && serviceFeeRefundAmount > 0\" label=\"Total Service Fee\">\n {{ (serviceFeeAmount - serviceFeeRefundAmount) | vituCurrencyUsd }}\n </lib-text-field>\n\n </ng-container>\n </div>\n </div>\n\n </div>\n\n </div>\n\n <div class=\"divider\"></div>\n\n <div class=\"payment-container\">\n\n <mat-tab-group class=\"payment-tab-group\" [selectedIndex]=\"loadContext\">\n\n <mat-tab [label]=\"getHistoryTabLabel()\">\n\n <app-transactions-table\n class=\"tab-container\"\n [rowsData]=\"payment.transactions\"\n [rowsDataLoading]=\"relatedPaymentLoading\"\n selectedRowProperty=\"token\"\n [selectedRowValue]=\"transaction.token\"\n (rowSelected)=\"onTransactionSelected($event)\">\n </app-transactions-table>\n\n </mat-tab>\n\n <mat-tab [label]=\"getChargebacksTabLabel()\">\n\n <lib-table-base\n class=\"tab-container\"\n [columnDefs]=\"disputeColumnDefs\"\n [rowsData]=\"chargebacks\"\n [rowsDataLoading]=\"!paymentError && relatedPaymentLoading\"\n [rowsDataError]=\"paymentError\"\n rowsDataErrorMessage=\"Error Loading Chargebacks\"\n rowsDataEmptyMessage=\"No Chargebacks\"\n selectedRowProperty=\"token\"\n (rowSelected)=\"onChargebackRowSelected($event)\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-disputes-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\">\n </app-disputes-table-cell-content>\n </ng-template>\n </lib-table-base>\n\n </mat-tab>\n\n <mat-tab [label]=\"getRetrievalsTabLabel()\">\n\n <lib-table-base\n class=\"tab-container\"\n [columnDefs]=\"disputeColumnDefs\"\n [rowsData]=\"retrievals\"\n [rowsDataLoading]=\"!paymentError && relatedPaymentLoading\"\n [rowsDataError]=\"paymentError\"\n rowsDataErrorMessage=\"Error Loading Retrievals\"\n rowsDataEmptyMessage=\"No Retrievals\"\n selectedRowProperty=\"token\"\n (rowSelected)=\"onRetrievalRowSelected($event)\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-disputes-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\">\n </app-disputes-table-cell-content>\n </ng-template>\n\n </lib-table-base>\n\n </mat-tab>\n\n <mat-tab [label]=\"getFeesTabLabel()\">\n\n <lib-table-base\n class=\"tab-container\"\n [columnDefs]=\"feeColumnDefs\"\n [rowsData]=\"paymentFees\"\n [rowsDataLoading]=\"relatedPaymentLoading\"\n [rowsDataError]=\"paymentFeesError\"\n rowsDataErrorMessage=\"Error Loading Fees\"\n rowsDataEmptyMessage=\"No Fees\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-fees-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\"\n [paymentAmount]=\"payment?.amount\">\n </app-fees-table-cell-content>\n </ng-template>\n\n </lib-table-base>\n\n </mat-tab>\n\n <mat-tab [label]=\"getAdditionalInformationTabLabel()\">\n <ng-container *ngIf=\"(getCountOfAdditionalInformation() === 0) then noAdditionalInformation\"></ng-container>\n <ng-container *ngIf=\"(getCountOfAdditionalInformation() > 0) then additionalInformation\"></ng-container>\n </mat-tab>\n\n </mat-tab-group>\n\n </div>\n\n</div>\n\n<ng-template #spinner>\n <lib-busy-indicator>\n </lib-busy-indicator>\n</ng-template>\n\n<ng-template #noAdditionalInformation>\n <div class=\"centered-message\">\n No Additional Information\n </div>\n</ng-template>\n\n<ng-template #additionalInformation>\n <div class=\"additional-information-container\">\n <table>\n <tr *ngFor=\"let item of transaction.meta | keyvalue\">\n <td class=\"additional-information-item additional-information-key\">{{ item.key }} :</td>\n <td class=\"additional-information-item additional-information-value\">{{ item.value }}</td>\n </tr>\n </table>\n </div>\n</ng-template>\n","import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges } from \"@angular/core\";\nimport { Location } from \"@angular/common\";\nimport { Store } from \"@ngrx/store\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { UpdateTransactionDetailAction } from \"@merchant_app/storage/transaction/transaction.actions\";\nimport { TransactionStatus } from \"@merchant_api/models/transaction-status\";\nimport { ColumnDef } from \"shared-lib\";\nimport { NextPaymentAction } from \"@merchant_api/models/next-payment-action\";\nimport { TransactionType } from \"@merchant_api/models/transaction-type\";\nimport { ActionButtonKind, LocalTimePoint } from \"shared-lib\";\nimport { TransactionFeeModel } from \"@merchant_api/models/transaction-fee-model\";\nimport { ActivatedRoute, ActivatedRouteSnapshot, Router, UrlSegment } from \"@angular/router\";\nimport { DigitalWalletEnum } from \"@merchant_api/models/digital-wallet-enum\";\nimport { PaymentDetails } from \"@merchant_api/models/payment-details\";\nimport { TransactionDetails } from \"@merchant_api/models/transaction-details\";\nimport { CurrentUserPermissions } from \"@merchant_app/shared/current-user-permissions\";\nimport { AdditionalAmountType } from \"@merchant_api/models/additional-amount-type\";\nimport { DisputeTypeEnum } from \"@merchant_api/models/dispute-type-enum\";\nimport { DisputeOrderBy } from \"@merchant_api/models/dispute-order-by\";\n\nenum LoadContext {\n History,\n Chargebacks,\n Retrievals,\n Fees,\n AdditionalInformation\n}\n\ninterface FeePart {\n category: string;\n value: number;\n}\n\n@Component({\n selector: \"app-transaction-detail\",\n templateUrl: \"./transaction-detail.component.html\",\n styleUrls: [\"./transaction-detail.component.less\"]\n})\nexport class TransactionDetailComponent implements OnChanges {\n\n @Input() transactionLoading = false;\n @Input() transaction: TransactionDetails = {};\n\n @Input() paymentLoading = false;\n @Input() paymentError: Error;\n\n @Input() set payment(value: PaymentDetails) {\n this._payment = value;\n this.calculateServiceFeeInfo();\n this.calculateServiceFeeRefundInfo();\n }\n get payment() {\n return this._payment;\n }\n _payment: PaymentDetails = {};\n\n @Input() paymentFeesLoading = false;\n @Input() paymentFeesError: Error;\n\n @Input() set paymentFees(value: Array<TransactionFeeModel>) {\n this._paymentFees = value || [];\n\n this.feeParts = [];\n this.feeTotal = 0;\n\n const feePartsMap = {};\n\n this._paymentFees.forEach(fee => {\n\n if (isNaN(feePartsMap[fee.feeCategory])) {\n feePartsMap[fee.feeCategory] = 0;\n }\n\n feePartsMap[fee.feeCategory] += fee.feeValue;\n this.feeTotal += fee.feeValue;\n });\n\n const feePartCategories = Object.keys(feePartsMap);\n feePartCategories.forEach(feePartCategory => {\n this.feeParts.push({\n category: feePartCategory,\n value: feePartsMap[feePartCategory]\n });\n });\n }\n get paymentFees() {\n return this._paymentFees;\n }\n private _paymentFees: Array<TransactionFeeModel> = [];\n\n serviceFeeAmount = 0;\n serviceFeePercent = 0;\n\n serviceFeeRefundAmount = 0;\n\n feeParts: Array<FeePart> = [];\n feeTotal = 0;\n initComplete = false;\n\n @Input() nextPaymentActionsLoading = false;\n @Input() nextPaymentActions: Array<NextPaymentAction> = [];\n\n @Input() transactionSiblingsLoading = false;\n @Input() transactionSiblings: Array<TransactionDetails> = [];\n\n get relatedPaymentLoading() {\n return this.transactionLoading || this.paymentLoading || (this.payment.token !== this.transaction.paymentToken);\n }\n\n @Output() refundPayment = new EventEmitter<{payment: PaymentDetails; amount: number; serviceFeeAmount: number|null}>();\n @Output() voidPayment = new EventEmitter<PaymentDetails>();\n @Output() capturePayment = new EventEmitter<PaymentDetails>();\n @Output() downloadReceipt = new EventEmitter<TransactionDetails>();\n\n loadContext = LoadContext.History;\n\n LocalTimePoint = LocalTimePoint;\n ActionButtonKind = ActionButtonKind;\n DigitalWalletEnum = DigitalWalletEnum;\n\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n disputeColumnDefs: ColumnDef[] = [\n { id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n { id: DisputeOrderBy.RaiseDateUtc, title: `Date Created (${LocalTimePoint.formatZ()})`,\n flexWidthBasisInPixels: 130, flexWidthGrow: 0, canSort: false},\n { id: DisputeOrderBy.CaseNumber, title: \"Case\", flexWidthBasisInPixels: 210, flexWidthGrow: 0, canSort: false},\n { id: DisputeOrderBy.CaseReason, title: \"Reason Type\", flexWidthBasisInPixels: 90, flexWidthGrow: 6, canSort: false},\n { id: \"amount\", title: \"Amount\", flexWidthBasisInPixels: 100, flexWidthGrow: 1},\n { id: \"statusDescription\", title: \"Status\", flexWidthBasisInPixels: 60, flexWidthGrow: 3, canSort: false},\n { id: \"statusDateUtc\", title: `Date Updated (${LocalTimePoint.formatZ()})`,\n flexWidthBasisInPixels: 130, flexWidthGrow: 0},\n { id: \"disputeOutcome\", title: \"Outcome\", flexWidthBasisInPixels: 60, flexWidthGrow: 1},\n { id: \"dueDateUtc\", title: `Date Due (${LocalTimePoint.formatZ()})`,\n flexWidthBasisInPixels: 110, flexWidthGrow: 0},\n { id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0}\n ];\n\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n feeColumnDefs: ColumnDef[] = [\n { id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n { id: \"feeCategory\", title: \"Fee Category\", flexWidthBasisInPixels: 250, flexWidthGrow: 0, canSort: true},\n { id: \"feeType\", title: \"Fee Type\", flexWidthBasisInPixels: 420, flexWidthGrow: 0, canSort: true},\n { id: \"feeValue\", title: \"Fee Amount\", flexWidthBasisInPixels: 180, flexWidthGrow: 0, canSort: true},\n { id: \"perc\", title: \"% of Transaction\", flexWidthBasisInPixels: 180, flexWidthGrow: 1, canSort: true},\n { id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n ];\n\n constructor(\n private store: Store<IStore>,\n private location: Location,\n private route: ActivatedRoute,\n private currPerms: CurrentUserPermissions,\n private router: Router) {}\n\n ngOnChanges(changes: SimpleChanges) {\n if (!this.initComplete) {\n this.seedTab();\n this.initComplete = true;\n }\n if (changes.hasOwnProperty(\"transaction\") && !this.transactionLoading) {\n this.location.replaceState(`/dashboard/transactions/${changes.transaction.currentValue.token}`);\n }\n }\n\n onTransactionSelected(token: string): void {\n const found = this.transactionSiblings.find(element => element.token === token);\n if (found) {\n this.store.dispatch(UpdateTransactionDetailAction({ record: found }));\n }\n }\n\n transactionSuccessful(): boolean {\n return (this.transaction?.status === TransactionStatus.Success);\n }\n\n getHistoryTabLabel(): string {\n let count = 0;\n if (!this.relatedPaymentLoading && this.payment.transactions?.length) {\n count = this.payment.transactions?.length;\n }\n return this.appendCountIfNecessary(\"History\", count);\n }\n\n get chargebacks() {\n return this.payment?.disputes?.filter(dispute => dispute.disputeType === DisputeTypeEnum.Chargeback);\n }\n\n getChargebacksTabLabel(): string {\n let count = 0;\n if (!this.relatedPaymentLoading && this.payment.disputes?.length) {\n count = this.payment.disputes.filter(dispute => dispute.disputeType === DisputeTypeEnum.Chargeback).length;\n }\n return this.appendCountIfNecessary(\"Chargebacks\", count);\n }\n\n get retrievals() {\n return this.payment?.disputes?.filter(dispute => dispute.disputeType === DisputeTypeEnum.Retrieval);\n }\n\n getRetrievalsTabLabel(): string {\n let count = 0;\n if (!this.relatedPaymentLoading && this.payment.disputes?.length) {\n count = this.payment.disputes.filter(dispute => dispute.disputeType === DisputeTypeEnum.Retrieval).length;\n }\n return this.appendCountIfNecessary(\"Retrievals\", count);\n }\n\n getFeesTabLabel(): string {\n let count = 0;\n if (this.paymentFees?.length) {\n count = this.paymentFees?.length;\n }\n return this.appendCountIfNecessary(\"Fees\", count);\n }\n\n getCardNumber(): string {\n\n if (this.transaction.card?.first6 && this.transaction.card?.last4) {\n\n return `${this.transaction.card?.first6}XXX${this.transaction.card?.last4}`;\n }\n\n return \"—\";\n }\n\n getAdditionalInformationTabLabel(): string {\n return this.appendCountIfNecessary(\"Additional Information\", this.getCountOfAdditionalInformation());\n }\n\n getCountOfAdditionalInformation(): number {\n let count = 0;\n if (this.transaction?.meta) {\n count = Object.keys(this.transaction.meta).length;\n }\n return count;\n }\n\n getAvsDetailFieldValue(result: null|string, resultDescription: null|string) {\n let retVal = \"\";\n\n if (result) {\n retVal += result;\n }\n if (result && resultDescription) {\n retVal += \" - \";\n }\n if (resultDescription) {\n retVal += resultDescription;\n }\n\n return retVal;\n }\n\n getCvvDetailFieldValue(result: null|string, resultDescription: null|string) {\n let retVal = \"\";\n\n if (resultDescription) {\n retVal = resultDescription;\n }\n else if (result) {\n retVal = result;\n }\n\n return retVal;\n }\n\n get displayTextForTransactionType() {\n let suffix = \"\";\n if (this.transaction.isServiceFee) {\n suffix = \" (SF)\";\n }\n return `${this.transaction.type}${suffix}`;\n }\n\n hasRefundActionAvailable() {\n return this.hasPaymentsRefundPermissions && !this.relatedPaymentLoading && !this.nextPaymentActionsLoading &&\n (this.nextPaymentActions.filter(nextPaymentAction => nextPaymentAction.transactionType === TransactionType.Refund).length > 0);\n }\n\n onClickRefund() {\n if (this.hasRefundActionAvailable()) {\n const refund: NextPaymentAction =\n this.nextPaymentActions.filter(nextPaymentAction => nextPaymentAction.transactionType === TransactionType.Refund)[0];\n this.refundPayment.emit({payment: this.payment, amount: refund.amount, serviceFeeAmount: refund.serviceFeeAmount});\n }\n }\n\n onChargebackRowSelected(token: string) {\n if (this.transaction?.token) {\n this.location.replaceState(`/dashboard/transactions/${this.transaction.token}/chargebacks`); // set up BACK url\n this.router.navigate([`/dashboard/disputes/${token}`]);\n }\n }\n\n onRetrievalRowSelected(token: string) {\n if (this.transaction?.token) {\n this.location.replaceState(`/dashboard/transactions/${this.transaction.token}/retrievals`); // set up BACK url\n this.router.navigate([`/dashboard/disputes/${token}`]);\n }\n }\n\n get hasPaymentsRefundPermissions(): boolean {\n return this.currPerms.has([\"core.payments.refund\"]);\n }\n\n private appendCountIfNecessary(title: string, count: number): string {\n return title + ((count > 0) ? ` (${count})` : \"\");\n }\n\n private seedTab(): void {\n\n const routeSnapshot: ActivatedRouteSnapshot = this.route.snapshot;\n const url: Array<UrlSegment> = routeSnapshot.url;\n const lastPartOfUrl: UrlSegment = url[url.length - 1];\n\n switch (lastPartOfUrl.path) {\n case \"history\": {\n this.loadContext = LoadContext.History;\n break;\n }\n case \"chargebacks\": {\n this.loadContext = LoadContext.Chargebacks;\n break;\n }\n case \"retrievals\": {\n this.loadContext = LoadContext.Retrievals;\n break;\n }\n case \"fees\": {\n this.loadContext = LoadContext.Fees;\n break;\n }\n case \"additional-information\": {\n this.loadContext = LoadContext.AdditionalInformation;\n break;\n }\n default: {\n break;\n }\n }\n }\n\n private calculateServiceFeeInfo() {\n const serviceFeeItems = this.payment?.transactions?.filter(transaction => transaction.type !== TransactionType.Refund)\n .flatMap(transaction => transaction.additionalAmounts?.items)\n .filter(transactionItem => transactionItem?.type === AdditionalAmountType.ServiceFee);\n\n this.serviceFeeAmount = serviceFeeItems?.reduce((sum, t) => sum + t.amount, 0) ?? 0;\n this.serviceFeePercent = serviceFeeItems?.find(platformFeeItem => platformFeeItem.percent > 0)?.percent ?? 0;\n }\n\n private calculateServiceFeeRefundInfo() {\n const serviceFeeItems = this.payment?.transactions?.filter(transaction => transaction.type === TransactionType.Refund\n && transaction.status === TransactionStatus.Success)\n .flatMap(transaction => transaction.additionalAmounts?.items)\n .filter(transactionItem => transactionItem?.type === AdditionalAmountType.ServiceFee);\n\n this.serviceFeeRefundAmount = serviceFeeItems?.reduce((sum, t) => sum + t.amount, 0) ?? 0;\n }\n\n}\n","import { Component } from \"@angular/core\";\nimport { Store, select } from \"@ngrx/store\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { map } from \"rxjs/operators\";\nimport { DownloadReceiptAction } from \"@merchant_app/storage/transaction/transaction.actions\";\nimport {\n VoidPaymentTransactionAction, CapturePaymentTransactionAction, RefundPaymentTransactionAction\n} from \"@merchant_app/storage/payment/payment.actions\";\nimport { getNextPaymentActionsState } from \"@merchant_app/storage/next-payment-actions/next-payment-actions.selectors\";\nimport { getPaymentState } from \"@merchant_app/storage/payment/payment.selectors\";\nimport { getTransactionState } from \"@merchant_app/storage/transaction/transaction.selectors\";\nimport { getTransactionSiblingsState } from \"@merchant_app/storage/transaction-siblings/transaction-siblings.selectors\";\nimport { PaymentDetails } from \"@merchant_api/models/payment-details\";\nimport { TransactionDetails } from \"@merchant_api/models/transaction-details\";\nimport { getCurrentUserPermissions } from \"@merchant_app/storage/current-user/current-user.selectors\";\n\n@Component({\n selector: \"app-transaction\",\n templateUrl: \"./transaction.component.html\",\n styleUrls: [\"./transaction.component.less\"]\n})\nexport class TransactionComponent {\n\n transaction$ = this.store.pipe(\n select(getTransactionState),\n map(i => i.record),\n );\n\n transactionLoading$ = this.store.pipe(\n select(getTransactionState),\n map(i => i.loading),\n );\n\n payment$ = this.store.pipe(\n select(getPaymentState),\n map(i => i.record),\n );\n\n paymentLoading$ = this.store.pipe(\n select(getPaymentState),\n map(i => i.loading),\n );\n\n paymentError$ = this.store.pipe(\n select(getPaymentState),\n map(i => i.error),\n );\n\n paymentFees$ = this.store.pipe(\n select(getPaymentState),\n map(i => i.fees),\n );\n\n paymentFeesLoading$ = this.store.pipe(\n select(getPaymentState),\n map(i => i.feesLoading),\n );\n\n paymentFeesError$ = this.store.pipe(\n select(getPaymentState),\n map(i => i.feesError),\n );\n\n nextPaymentActions$ = this.store.pipe(\n select(getNextPaymentActionsState),\n map(i => i.record),\n );\n\n nextPaymentActionsLoading$ = this.store.pipe(\n select(getNextPaymentActionsState),\n map(i => i.loading),\n );\n\n transactionSiblings$ = this.store.pipe(\n select(getTransactionSiblingsState),\n map(i => i.record),\n );\n\n transactionSiblingsLoading$ = this.store.pipe(\n select(getTransactionSiblingsState),\n map(i => i.loading),\n );\n\n constructor(\n private store: Store<IStore>,\n ) { }\n\n refundPayment(refund: {payment: PaymentDetails; amount: number; serviceFeeAmount: number|null}) {\n this.store.dispatch(new RefundPaymentTransactionAction(refund));\n }\n\n voidPayment(payment: PaymentDetails) {\n\n // const voidObj = {\n // amount: payment.amount,\n // transactionToken: payment.transactionToken,\n // description: \"Void Payment demo\",\n // };\n\n // this.store.dispatch(new VoidPaymentTransactionAction(voidObj, payment.transactionToken));\n }\n\n capturePayment(payment: PaymentDetails) {\n\n // const capture = {\n\n // amount: payment.amount,\n // transactionToken: payment.transactionToken,\n // description: \"Capture Payment demo\",\n // };\n\n // this.store.dispatch(new CapturePaymentTransactionAction(capture, payment.transactionToken));\n }\n\n downloadReceipt(transaction: TransactionDetails) {\n\n this.store.dispatch(DownloadReceiptAction({ transaction }));\n }\n}\n","<div class=\"outer-container\">\n <app-transaction-detail\n [transaction]=\"transaction$ | async\"\n [transactionLoading]=\"transactionLoading$ | async\"\n [payment]=\"payment$ | async\"\n [paymentLoading]=\"paymentLoading$ | async\"\n [paymentError]=\"paymentError$ | async\"\n [paymentFees]=\"(paymentFees$ | async)?.fees\"\n [paymentFeesLoading]=\"paymentFeesLoading$ | async\"\n [paymentFeesError]=\"paymentFeesError$ | async\"\n [nextPaymentActions]=\"nextPaymentActions$ | async\"\n [nextPaymentActionsLoading]=\"nextPaymentActionsLoading$ | async\"\n [transactionSiblings]=\"transactionSiblings$ | async\"\n [transactionSiblingsLoading]=\"transactionSiblingsLoading$ | async\"\n (refundPayment)=\"refundPayment($event)\"\n (voidPayment)=\"voidPayment($event)\"\n (capturePayment)=\"capturePayment($event)\"\n (downloadReceipt)=\"downloadReceipt($event)\">\n </app-transaction-detail>\n</div>\n","import { Action } from \"@ngrx/store\";\nimport { CreateUserDto } from \"@merchant_api/models/create-user-dto\";\nimport { RoleDto } from \"@merchant_api/models/role-dto\";\nimport { UserDetailsDto } from \"@merchant_api/models/user-details-dto\";\n\n\nexport enum ActionTypes {\n GetUser = \"[User] GetUser\",\n GetNewUser = \"[User] GetNewUser\",\n GetUserSucceed = \"[User] GetUserSucceed\",\n GetUserFail = \"[User] GetUserFail\",\n UpdateUser = \"[User] UpdateUser\",\n DeleteUser = \"[User] DeleteUser\",\n CreateUser = \"[User] CreateUser\",\n ResetUserPassword = \"[User] ResetUserPassword\",\n}\n\nexport class GetUserAction implements Action {\n\n constructor(\n public id: string\n ) {}\n\n readonly type = ActionTypes.GetUser;\n}\n\nexport class GetNewUserAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.GetNewUser;\n}\n\nexport class GetUserSucceedAction implements Action {\n\n constructor(\n public user: UserDetailsDto,\n public roleList: RoleDto[]\n ) {}\n\n readonly type = ActionTypes.GetUserSucceed;\n}\n\nexport class GetUserFailAction implements Action {\n\n constructor(\n public error: any\n ) {}\n\n readonly type = ActionTypes.GetUserFail;\n}\n\nexport class UpdateUserAction implements Action {\n\n constructor(public user: UserDetailsDto) {}\n\n readonly type = ActionTypes.UpdateUser;\n}\n\nexport class DeleteUserAction implements Action {\n\n constructor(public userId: string) {}\n\n readonly type = ActionTypes.DeleteUser;\n}\n\nexport class CreateUserAction implements Action {\n\n constructor(public user: CreateUserDto) {}\n\n readonly type = ActionTypes.CreateUser;\n}\n\nexport class ResetUserPasswordAction implements Action {\n\n constructor(public userId: string) {}\n\n readonly type = ActionTypes.ResetUserPassword;\n\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getUserState = (store: IStore) => store.user;\n\nexport const getUserInfo = createSelector(\n getUserState,\n userState => userState.user,\n);\n\nexport const getUserRoleList = createSelector(\n getUserState,\n userState => userState.roleList,\n);\n\nexport const getUserLoading = createSelector(\n getUserState,\n userState => userState.loading,\n);\n","import { createAction, props } from \"@ngrx/store\";\nimport { NavigationExtras } from \"@angular/router\";\n\nexport const NavigateAction = createAction(\n \"[Router] Navigate\",\n props<{\n payload: {\n path: any[];\n query?: Record<string, unknown>;\n extras?: NavigationExtras;\n };\n }>()\n);\n\nexport const GoBackAction = createAction(\n \"[Router] Go back\",\n);\n\nexport const GoForwardAction = createAction(\n \"[Router] Go forward\",\n);\n\nexport const PageLoadFailAction = createAction(\n \"[Router] Page load fail\",\n);\n","<div class=\"outer-container\">\n\n <lib-title-bar\n [crumbs]=\"[{ 'label': 'Users' , 'link': '/dashboard/users' }, { 'label': pageTitle }]\">\n </lib-title-bar>\n\n <div class=\"details-container\">\n <ng-container *ngIf=\"!user then spinner\"></ng-container>\n <ng-container *ngIf=\"user then details\"></ng-container>\n </div>\n\n</div>\n\n\n<ng-template #spinner>\n <lib-busy-indicator>\n </lib-busy-indicator>\n</ng-template>\n\n<ng-template #details>\n\n <form [formGroup]=\"userForm\" [libVituForm]=\"userForm\" (libVituFormSubmit)=\"onSubmit()\">\n\n <div class=\"form-inner-container\">\n\n <lib-vitu-form-field-input\n class=\"field\"\n [formGroup]=\"userForm\"\n formFieldName=\"firstName\"\n label=\"First Name\"\n [disabled]=\"viewOnly\">\n </lib-vitu-form-field-input>\n\n <lib-vitu-form-field-input\n class=\"field\"\n [formGroup]=\"userForm\"\n formFieldName=\"lastName\"\n label=\"Last Name\"\n [disabled]=\"viewOnly\">\n </lib-vitu-form-field-input>\n\n <lib-vitu-form-field-input\n class=\"field\"\n id=\"emailAddress\"\n [formGroup]=\"userForm\"\n formFieldName=\"email\"\n type=\"email\"\n label=\"Email Address\"\n [disabled]=\"viewOnly\">\n </lib-vitu-form-field-input>\n\n <lib-vitu-form-field-select\n class=\"field\"\n [formGroup]=\"userForm\"\n formFieldName=\"roleIds\"\n multiple\n label=\"Role(s)\"\n [options]=\"groupedRoleList\"\n optionLabelKey=\"name\"\n optionValueKey=\"id\"\n [groups]=\"roleGroups\"\n [disabled]=\"viewOnly\">\n </lib-vitu-form-field-select>\n\n <div class=\"actions-line\" *ngIf=\"!isCreate\">\n\n <lib-vitu-form-field-switch\n formControlName=\"isLockedOut\"\n label=\"Locked\"\n [disableControl]=\"viewOnly\">\n </lib-vitu-form-field-switch>\n\n <div class=\"action-buttons\">\n\n <lib-action-button\n *ngIf=\"hasDeleteUserPermission\"\n id=\"deleteUserButton\"\n class=\"action-button\"\n label=\"Delete User\"\n fontImage=\"far fa-trash fa-bg\"\n [kind]=\"ActionButtonKind.ALERT\"\n [disabled]=\"loading || !user || !currentUser || (user.id === currentUser.id)\"\n (click)=\"onClickDelete()\">\n </lib-action-button>\n \n <lib-action-button\n *ngIf=\"hasResetPasswordPermission\"\n id=\"resetPasswordButton\"\n class=\"action-button\"\n label=\"Reset Password\"\n [kind]=\"ActionButtonKind.SECONDARY\"\n [disabled]=\"loading\"\n (click)=\"onClickResetPassword()\">\n </lib-action-button>\n \n </div>\n\n </div>\n\n </div>\n\n <lib-vitu-form-buttons>\n\n <lib-vitu-form-abort-button\n (onAbort)=\"onClickBack()\">\n </lib-vitu-form-abort-button>\n\n <lib-vitu-form-submit-button\n *ngIf=\"isCreate || hasUpdateUserPermission\"\n [label]=\"submitButtonText\"\n [neverDisable]=\"isCreate\">\n </lib-vitu-form-submit-button>\n\n </lib-vitu-form-buttons>\n\n </form>\n\n</ng-template>\n","import { Component, EventEmitter, Input, OnInit, OnChanges, Output, SimpleChanges } from \"@angular/core\";\nimport { AbstractControl, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from \"@angular/forms\";\nimport { CreateUserDto } from \"@merchant_api/models/create-user-dto\";\nimport { RoleDto } from \"@merchant_api/models/role-dto\";\nimport { UserDetailsDto } from \"@merchant_api/models/user-details-dto\";\nimport { ActionButtonKind, ValidatorsVituCustom, EmailRegex } from \"shared-lib\";\nimport { CurrentUserDto } from \"@merchant_app/storage/current-user/current-user.state\";\nimport { CurrentUserPermissions } from \"@merchant_app/shared/current-user-permissions\";\n\ntype FormConfig<T> = { [P in keyof T]: any[] };\ntype FormControls<T> = { [P in keyof T]: AbstractControl };\n\n@Component({\n selector: \"app-user-details\",\n templateUrl: \"./user-details.component.html\",\n styleUrls: [\"./user-details.component.less\"],\n})\nexport class UserDetailsComponent implements OnInit, OnChanges {\n\n @Input() isCreate: boolean;\n @Input() user: UserDetailsDto;\n @Input() currentUser: CurrentUserDto;\n @Input() roleList: RoleDto[];\n @Input() loading: boolean;\n\n @Output() deleteUser = new EventEmitter<string>();\n @Output() updateUser = new EventEmitter<UserDetailsDto>();\n @Output() createUser = new EventEmitter<CreateUserDto>();\n @Output() resetUserPassword = new EventEmitter<string>();\n @Output() back = new EventEmitter<void>();\n\n submitButtonText: string;\n\n ActionButtonKind = ActionButtonKind;\n\n constructor(\n private fb: UntypedFormBuilder,\n private currPerms: CurrentUserPermissions\n ) {}\n\n private userFormConfig: FormConfig<UserDetailsDto> = {\n firstName: [null, [Validators.required]],\n lastName: [null, [Validators.required]],\n email: [null, [Validators.required, Validators.pattern(EmailRegex)]],\n roleIds: [null, [Validators.required, ValidatorsVituCustom.selectMultiIntegrity(() => this.roleList?.map((role) => role.id))]],\n isLockedOut: [false],\n };\n\n userForm = this.fb.group(this.userFormConfig);\n get formControls(): FormControls<UserDetailsDto> { return this.userForm.controls; }\n\n formControl(controlName: string) { return this.userForm.controls[controlName] as UntypedFormControl; }\n\n private static compareRole(a: RoleDto, b: RoleDto): number {\n const aVal = a.name?.toLowerCase();\n const bVal = b.name?.toLowerCase();\n if (aVal > bVal) {\n return 1;\n }\n else if (aVal < bVal) {\n return -1;\n }\n return 0;\n }\n\n ngOnInit() {\n\n this.submitButtonText = (this.isCreate ? \"Submit\" : \"Update\");\n }\n\n get pageTitle(): string {\n let firstPart: string;\n if (this.isCreate) {\n firstPart = \"New\";\n }\n else if(this.hasUpdateUserPermission) {\n firstPart = \"Edit\";\n }\n else {\n firstPart = \"View\";\n }\n return firstPart + \" User\";\n }\n\n get viewOnly(): boolean {\n return !this.isCreate && !this.hasUpdateUserPermission;\n }\n\n ngOnChanges(changes: SimpleChanges) {\n\n if (\"user\" in changes && this.user) {\n\n this.userForm.patchValue(this.user);\n\n if (!this.isCreate) {\n this.userForm.markAllAsTouched();\n }\n\n }\n\n // Workaround needed for form using ValidatorsVituCustom:\n // ValidatorsVituCustom need to be run by forcing validation if anything they depend on changes,\n // for example as a result of the allowed values being retrieved asynchronously from server (& arriving late).\n // (TODO : Consolidate use of Angular Forms in shareable form base class which implements our common form\n // behaviour like this as default for all of our forms (instead of having to apply it in multiple places))\n this.validateFormControls(this.userForm);\n }\n\n onClickDelete() {\n\n this.deleteUser.emit(this.user.id);\n }\n\n onClickResetPassword() {\n\n this.resetUserPassword.emit(this.user.id);\n }\n\n onClickBack() {\n\n this.back.emit();\n }\n\n onSubmit() {\n if (this.isCreate) {\n this.createUser.emit({\n ...this.user,\n ...this.userForm.value,\n resetPasswordReturnUrl: window.location.origin\n });\n }\n else {\n this.updateUser.emit({\n ...this.user,\n ...this.userForm.value,\n });\n }\n }\n\n get globalRoleList() {\n let retVal = [];\n if (this.roleList?.length) {\n retVal = retVal.concat(this.roleList.filter(role => !role.isCustom));\n }\n return retVal.sort(UserDetailsComponent.compareRole);\n }\n\n get customRoleList() {\n let retVal = [];\n if (this.roleList?.length) {\n retVal = retVal.concat(this.roleList.filter(role => role.isCustom));\n }\n return retVal.sort(UserDetailsComponent.compareRole);\n }\n\n get groupedRoleList() {\n return this.globalRoleList.concat(this.customRoleList);\n }\n\n get roleGroups() {\n\n const groups = [];\n let currentMinIdx = 0;\n\n if (this.globalRoleList?.length) {\n groups.push({name: \"\", minIdx: 0, maxIdx: this.globalRoleList.length - 1});\n currentMinIdx = this.globalRoleList.length;\n }\n if (this.customRoleList?.length) {\n groups.push({name: \"CUSTOM\", minIdx: currentMinIdx, maxIdx: currentMinIdx + this.customRoleList.length - 1});\n }\n\n return JSON.stringify(groups);\n }\n\n get hasDeleteUserPermission(): boolean {\n return this.currPerms.has([\"core.users.delete\"]);\n }\n\n get hasUpdateUserPermission(): boolean {\n return this.currPerms.has([\"core.users.update\"]);\n }\n\n get hasResetPasswordPermission(): boolean {\n return this.currPerms.has([\"core.users.reset-password\"]);\n }\n\n private validateFormControls(formGroup: UntypedFormGroup): void {\n Object.keys(formGroup?.controls).forEach(field => {\n formGroup?.get(field)?.updateValueAndValidity();\n });\n }\n\n}\n","import { Component, OnInit } from \"@angular/core\";\nimport { Store } from \"@ngrx/store\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport * as UserActions from \"@merchant_app/storage/user/user.actions\";\nimport * as UserSelectors from \"@merchant_app/storage/user/user.selectors\";\nimport * as CurrentUserSelectors from \"@merchant_app/storage/current-user/current-user.selectors\";\nimport { UserDetailsDto } from \"@merchant_api/models/user-details-dto\";\nimport { CreateUserDto } from \"@merchant_api/models/create-user-dto\";\nimport { GoBackAction } from \"@merchant_app/storage/router/router.actions\";\n\n@Component({\n selector: \"app-user\",\n templateUrl: \"./user.component.html\",\n styleUrls: [\"./user.component.less\"]\n})\nexport class UserComponent implements OnInit {\n\n constructor(\n private store: Store<IStore>,\n private route: ActivatedRoute,\n ) {}\n\n user$ = this.store.select(UserSelectors.getUserInfo);\n roleList$ = this.store.select(UserSelectors.getUserRoleList);\n loading$ = this.store.select(UserSelectors.getUserLoading);\n currentUser$ = this.store.select(CurrentUserSelectors.getCurrentUser);\n\n isCreate: boolean;\n\n ngOnInit() {\n\n this.isCreate = !this.route.snapshot.params.id;\n\n if (this.isCreate) {\n this.store.dispatch(new UserActions.GetNewUserAction());\n }\n else {\n this.store.dispatch(new UserActions.GetUserAction(this.route.snapshot.params.id));\n }\n }\n\n updateUser(user: UserDetailsDto) {\n\n this.store.dispatch(new UserActions.UpdateUserAction(user));\n }\n\n createUser(user: CreateUserDto) {\n\n this.store.dispatch(new UserActions.CreateUserAction(user));\n }\n\n deleteUser(userId: string) {\n\n this.store.dispatch(new UserActions.DeleteUserAction(userId));\n }\n\n resetUserPassword(userId: string) {\n\n this.store.dispatch(new UserActions.ResetUserPasswordAction(userId));\n }\n\n onBack(): void {\n\n this.store.dispatch(GoBackAction());\n }\n\n}\n","<app-user-details\n [isCreate]=\"isCreate\"\n [user]=\"user$ | async\"\n [currentUser]=\"currentUser$ | async\"\n [roleList]=\"roleList$ | async\"\n [loading]=\"loading$ | async\"\n (deleteUser)=\"deleteUser($event)\"\n (updateUser)=\"updateUser($event)\"\n (createUser)=\"createUser($event)\"\n (resetUserPassword)=\"resetUserPassword($event)\"\n (back)=\"onBack()\">\n</app-user-details>\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getUsersState = (store: IStore) => store.users;\n\nexport const getUsers = createSelector(\n getUsersState,\n usersState => usersState.record,\n);\n\nexport const getUsersLoading = createSelector(\n getUsersState,\n usersState => usersState.loading,\n);\n\nexport const getUsersError = createSelector(\n getUsersState,\n usersState => usersState.error,\n);\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"'email'\">\n <lib-text-table-column>\n {{ element.email }}\n </lib-text-table-column>\n </ng-container>\n \n <ng-container *ngSwitchCase=\"'firstName'\">\n <lib-text-table-column>\n {{ element.firstName }}\n </lib-text-table-column>\n </ng-container>\n \n <ng-container *ngSwitchCase=\"'lastName'\">\n <lib-text-table-column>\n {{ element.lastName }}\n </lib-text-table-column>\n </ng-container>\n \n <ng-container *ngSwitchCase=\"'lockedStatus'\">\n <lib-user-status-icon\n [isLocked]=\"element.isLockedOut\">\n </lib-user-status-icon>\n <lib-table-column-sort [key]=\"sortingKeyForLockedStatus\"></lib-table-column-sort>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n\n\n\n\n\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"app-users-table-cell-content\",\n templateUrl: \"./users-table-cell-content.component.html\",\n styleUrls: [\"./users-table-cell-content.component.less\"],\n})\nexport class UsersTableCellContentComponent {\n @Input() columnId: string;\n @Input() element: any;\n\n get sortingKeyForLockedStatus(): number {\n return this.element.isLockedOut ? 0 : 1;\n }\n\n}\n","<div class=\"outer-container\">\n\n <lib-title-bar [crumbs]=\"[{ 'label': 'Users' }]\">\n <lib-action-button *ngIf=\"hasCreatePermission\"\n label=\"New User\" fontImage=\"far fa-plus-circle fa-bg\" (click)=\"onClickCreateUser()\">\n </lib-action-button>\n </lib-title-bar>\n \n <lib-table-base\n class=\"users-table\"\n [columnDefs]=\"userColumnDefs\"\n [rowsData]=\"users\"\n [rowsDataLoading]=\"loading\"\n [rowsDataError]=\"error\"\n rowsDataErrorMessage=\"Error Loading Users\"\n selectedRowProperty=\"id\"\n (rowSelected)=\"onRowSelected($event)\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-users-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\">\n </app-users-table-cell-content>\n </ng-template>\n </lib-table-base>\n\n</div>\n","import { Component, Input } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { UserDto } from \"@merchant_api/models/user-dto\";\nimport { CurrentUserPermissions } from \"@merchant_app/shared/current-user-permissions\";\nimport { ColumnDef } from \"shared-lib\";\n\n@Component({\n selector: \"app-user-log\",\n templateUrl: \"./user-log.component.html\",\n styleUrls: [ \"./user-log.component.less\" ]\n})\nexport class UserLogComponent {\n\n @Input() users: UserDto[];\n @Input() loading = false;\n @Input() error: Error;\n\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n userColumnDefs: ColumnDef[] = [\n { id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n { id: \"firstName\", title: \"First Name\", flexWidthBasisInPixels: 200, flexWidthGrow: 0, canSort: true},\n { id: \"lastName\", title: \"Last Name\", flexWidthBasisInPixels: 200, flexWidthGrow: 0, canSort: true},\n { id: \"email\", title: \"Email\", flexWidthBasisInPixels: 430, flexWidthGrow: 0, canSort: true},\n { id: \"lockedStatus\", title: \"Locked Status\", flexWidthBasisInPixels: 150, flexWidthGrow: 1, canSort: true},\n { id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n ];\n\n onClickCreateUser() {\n if (this.hasCreatePermission) {\n this.router.navigate([`/dashboard/users/create`]);\n }\n }\n\n onRowSelected(id: string) {\n if (this.hasGetPermission) {\n this.router.navigate([`/dashboard/users/${id}`]);\n }\n }\n\n constructor(private router: Router, private currPerms: CurrentUserPermissions) {}\n\n get hasCreatePermission(): boolean {\n return this.currPerms.has([\"core.users.create\"]);\n }\n\n get hasGetPermission(): boolean {\n return this.currPerms.has([\"core.users.get\", \"core.roles.search\"]);\n }\n\n}\n","import { Component } from \"@angular/core\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { Store } from \"@ngrx/store\";\nimport { getUsers, getUsersLoading, getUsersError } from \"@merchant_app/storage/users/users.selectors\";\nimport { getCurrentUserPermissions } from \"@merchant_app/storage/current-user/current-user.selectors\";\n\n@Component({\n selector: \"app-users\",\n templateUrl: \"./users.component.html\",\n styleUrls: [ \"./users.component.less\" ]\n})\nexport class UsersComponent {\n\n users$ = this.store.select(getUsers);\n\n loading$ = this.store.select(getUsersLoading);\n\n error$ = this.store.select(getUsersError);\n\n constructor(private store: Store<IStore>) {}\n\n}\n","<app-user-log\n [users]=\"users$ | async\"\n [loading]=\"loading$ | async\"\n [error]=\"error$ | async\">\n</app-user-log>\n","import { Component } from \"@angular/core\";\nimport { ActionButtonKind, AuthService } from \"shared-lib\";\n\n@Component({\n selector: \"app-forbidden\",\n templateUrl: \"./forbidden.component.html\",\n styleUrls: [\"./forbidden.component.less\"]\n})\nexport class ForbiddenComponent {\n\n ActionButtonKind = ActionButtonKind;\n\n constructor(\n private authService: AuthService,\n ) {}\n\n logOut() {\n\n this.authService.logout();\n }\n}\n","<div class=\"container\">\n <div class=\"access-denied\">\n <div>\n <h1>Access Denied!</h1>\n <lib-action-button\n label=\"Back to Login\"\n fontImage=\"far fa-long-arrow-left fa-bg\"\n [kind]=\"ActionButtonKind.PRIMARY\"\n (click)=\"logOut()\">\n </lib-action-button>\n </div>\n </div>\n</div>\n","import { Component } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { ActionButtonKind } from \"shared-lib\";\n\n@Component({\n selector: \"app-page-unavailable\",\n templateUrl: \"./page-unavailable.component.html\",\n styleUrls: [\"./page-unavailable.component.less\"]\n})\nexport class PageUnavailableComponent {\n\n ActionButtonKind = ActionButtonKind;\n\n constructor(\n private router: Router\n ) {}\n\n onClick() {\n\n this.router.navigate([`/`]);\n }\n}\n","<div class=\"container\">\n <div class=\"inner-container\">\n <div>\n <h1>Page Unavailable!</h1>\n <lib-action-button\n label=\"Back to Dashboard\"\n fontImage=\"far fa-long-arrow-left fa-bg\"\n [kind]=\"ActionButtonKind.PRIMARY\"\n (click)=\"onClick()\">\n </lib-action-button>\n </div>\n </div>\n</div>\n","import { Action } from \"@ngrx/store\";\nimport { CreateRoleDto } from \"@merchant_api/models/create-role-dto\";\nimport { PermissionDto } from \"@merchant_api/models/permission-dto\";\nimport { RoleDetailsDto } from \"@merchant_api/models/role-details-dto\";\n\n\nexport enum ActionTypes {\n GetRole = \"[Role] GetRole\",\n GetNewRole = \"[Role] GetNewRole\",\n GetRoleSucceed = \"[Role] GetRoleSucceed\",\n GetRoleFail = \"[Role] GetRoleFail\",\n UpdateRole = \"[Role] UpdateRole\",\n DeleteRole = \"[Role] DeleteRole\",\n CreateRole = \"[Role] CreateRole\"\n}\n\nexport class GetRoleAction implements Action {\n\n constructor(\n public id: number\n ) {}\n\n readonly type = ActionTypes.GetRole;\n}\n\nexport class GetNewRoleAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.GetNewRole;\n}\n\nexport class GetRoleSucceedAction implements Action {\n\n constructor(\n public role: RoleDetailsDto,\n public permissionList: PermissionDto[]\n ) {}\n\n readonly type = ActionTypes.GetRoleSucceed;\n}\n\nexport class GetRoleFailAction implements Action {\n\n constructor(\n public error: any\n ) {}\n\n readonly type = ActionTypes.GetRoleFail;\n}\n\nexport class UpdateRoleAction implements Action {\n\n constructor(public role: RoleDetailsDto) {}\n\n readonly type = ActionTypes.UpdateRole;\n}\n\nexport class DeleteRoleAction implements Action {\n\n constructor(public role: RoleDetailsDto) {}\n\n readonly type = ActionTypes.DeleteRole;\n}\n\nexport class CreateRoleAction implements Action {\n\n constructor(public role: CreateRoleDto) {}\n\n readonly type = ActionTypes.CreateRole;\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getRoleState = (store: IStore) => store.role;\n\nexport const getRoleInfo = createSelector(\n getRoleState,\n roleState => roleState.role,\n);\n\nexport const getRolePermissionList = createSelector(\n getRoleState,\n roleState => roleState.permissionList,\n);\n\nexport const getRoleLoading = createSelector(\n getRoleState,\n roleState => roleState.loading,\n);\n","<div class=\"outer-container\">\n\n <lib-title-bar\n [crumbs]=\"[{ 'label': 'Roles' , 'link': '/dashboard/roles' }, { 'label': pageTitle }]\">\n </lib-title-bar>\n\n <div class=\"details-container\">\n <ng-container *ngIf=\"!role then spinner\"></ng-container>\n <ng-container *ngIf=\"role then details\"></ng-container>\n </div>\n\n</div>\n\n<ng-template #spinner>\n <lib-busy-indicator>\n </lib-busy-indicator>\n</ng-template>\n\n<ng-template #details>\n\n <form class=\"form\" [formGroup]=\"roleForm\" [libVituForm]=\"roleForm\" (libVituFormSubmit)=\"onSubmit()\">\n\n <div class=\"form-inner-container\">\n\n <lib-vitu-form-field-input\n class=\"field\"\n [formGroup]=\"roleForm\"\n formFieldName=\"name\"\n label=\"Name\"\n [disabled]=\"!isCreate && (!(role?.isCustom) || !hasUpdateRolePermission)\"\n [errorOverrides]=\"[{'pattern': 'Contains invalid character(s)'}]\">\n </lib-vitu-form-field-input>\n\n <lib-permissions-switch-array\n heading=\"PERMISSIONS\"\n [atLeastOneRequired]=\"false\"\n formControlName=\"permissionIds\"\n [readonly]=\"!isCreate && (!(role?.isCustom) || !hasUpdateRolePermission)\">\n </lib-permissions-switch-array>\n \n <div class=\"actions-line\" *ngIf=\"!isCreate && role?.isCustom\">\n\n <div class=\"action-buttons\">\n\n <lib-action-button\n *ngIf=\"hasDeleteRolePermission\"\n id=\"deleteRoleButton\"\n class=\"action-button\"\n label=\"Delete Role\"\n fontImage=\"far fa-trash fa-bg\"\n [kind]=\"ActionButtonKind.ALERT\"\n [disabled]=\"loading || !role\"\n (click)=\"onClickDelete()\">\n </lib-action-button>\n \n </div>\n\n </div>\n\n </div>\n\n <lib-vitu-form-buttons>\n\n <lib-vitu-form-abort-button\n (onAbort)=\"onClickBack()\">\n </lib-vitu-form-abort-button>\n\n <lib-vitu-form-submit-button\n *ngIf=\"isCreate || (role?.isCustom && hasUpdateRolePermission)\"\n [label]=\"submitButtonText\"\n [neverDisable]=\"isCreate\">\n </lib-vitu-form-submit-button>\n\n </lib-vitu-form-buttons>\n\n </form>\n\n</ng-template>\n","import { Component, EventEmitter, Input, OnInit, OnChanges, Output, SimpleChanges } from \"@angular/core\";\nimport { AbstractControl, FormArray, UntypedFormBuilder, Validators } from \"@angular/forms\";\nimport { ActionButtonKind } from \"shared-lib\";\nimport { RoleDetailsDto } from \"@merchant_api/models/role-details-dto\";\nimport { PermissionDto } from \"@merchant_api/models/permission-dto\";\nimport { CreateRoleDto } from \"@merchant_api/models/create-role-dto\";\nimport { CurrentUserPermissions } from \"@merchant_app/shared/current-user-permissions\";\n\ntype FormConfig<T> = { [P in keyof T]: any[] };\ntype FormControls<T> = { [P in keyof T]: AbstractControl };\n\n@Component({\n selector: \"app-role-details\",\n templateUrl: \"./role-details.component.html\",\n styleUrls: [\"./role-details.component.less\"],\n})\nexport class RoleDetailsComponent implements OnInit, OnChanges {\n\n @Input() isCreate: boolean;\n @Input() role: RoleDetailsDto;\n @Input() permissionList: PermissionDto[];\n @Input() loading: boolean;\n\n @Output() deleteRole = new EventEmitter<RoleDetailsDto>();\n @Output() updateRole = new EventEmitter<RoleDetailsDto>();\n @Output() createRole = new EventEmitter<CreateRoleDto>();\n @Output() back = new EventEmitter<void>();\n\n submitButtonText: string;\n\n ActionButtonKind = ActionButtonKind;\n\n constructor(private fb: UntypedFormBuilder, private currPerms: CurrentUserPermissions) {}\n\n roleForm = this.fb.group({\n name: [null, [Validators.required, Validators.pattern(/^[\\w][\\w- &()]*$/)]],\n permissionIds: [null as Array<{id: number; name: string; checked: boolean}>]\n });\n\n get formControls(): FormControls<RoleDetailsDto> { return this.roleForm.controls; }\n\n ngOnInit() {\n this.submitButtonText = (this.isCreate ? \"Submit\" : \"Update\");\n }\n\n get pageTitle(): string {\n if (this.isCreate) {\n return \"New Role\";\n }\n if (!this.role) {\n return \"---\";\n }\n if (this.role.isCustom && this.hasUpdateRolePermission) {\n return \"Edit Role\";\n }\n return \"View Role\";\n }\n\n ngOnChanges(changes: SimpleChanges) {\n\n if (\"role\" in changes && this.role) {\n this.roleForm.controls.name.patchValue(this.role.name);\n }\n\n if (\"permissionList\" in changes && this.permissionList) {\n this.formControls?.permissionIds.patchValue(this.getFormArray());\n }\n\n if (!this.isCreate) {\n this.roleForm.markAllAsTouched();\n }\n }\n\n private getFormArray(): Array<any> {\n return this.permissionList?.map(i => ({\n ...i,\n checked: this.isChecked(i, this.role)\n }));\n }\n\n private isChecked(permission, role: RoleDetailsDto) {\n\n return role?.permissionIds\n ? role.permissionIds?.indexOf(permission.id) >= 0\n : false;\n }\n\n onClickDelete() {\n\n this.deleteRole.emit(this.role);\n }\n\n onClickBack() {\n\n this.back.emit();\n }\n\n onSubmit() {\n\n const roleForm = this.roleForm.value;\n\n const name = roleForm.name;\n const permissionIds = roleForm.permissionIds.filter(i => i.checked).map(i => i.id);\n\n if (this.isCreate) {\n const createRoleDto: CreateRoleDto = {\n name,\n permissionIds\n };\n this.createRole.emit(createRoleDto);\n }\n else {\n const roleDetailsDto: RoleDetailsDto = {\n id: this.role.id,\n concurrencyToken: this.role?.concurrencyToken,\n name,\n permissionIds\n };\n this.updateRole.emit(roleDetailsDto);\n }\n\n }\n\n get hasDeleteRolePermission(): boolean {\n return this.currPerms.has([\"core.roles.delete\"]);\n }\n\n get hasUpdateRolePermission(): boolean {\n return this.currPerms.has([\"core.roles.update\"]);\n }\n\n}\n","import { Component, OnInit } from \"@angular/core\";\nimport { Store } from \"@ngrx/store\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport * as RoleActions from \"@merchant_app/storage/role/role.actions\";\nimport * as RoleSelectors from \"@merchant_app/storage/role/role.selectors\";\nimport { GoBackAction } from \"@merchant_app/storage/router/router.actions\";\nimport { RoleDetailsDto } from \"@merchant_api/models/role-details-dto\";\nimport { CreateRoleDto } from \"@merchant_api/models/create-role-dto\";\n\n@Component({\n selector: \"app-role\",\n templateUrl: \"./role.component.html\",\n styleUrls: [\"./role.component.less\"]\n})\nexport class RoleComponent implements OnInit {\n\n constructor(\n private store: Store<IStore>,\n private route: ActivatedRoute\n ) {}\n\n role$ = this.store.select(RoleSelectors.getRoleInfo);\n permissionList$ = this.store.select(RoleSelectors.getRolePermissionList);\n loading$ = this.store.select(RoleSelectors.getRoleLoading);\n\n isCreate: boolean;\n\n ngOnInit() {\n\n this.isCreate = !this.route.snapshot.params.id;\n\n if (this.isCreate) {\n this.store.dispatch(new RoleActions.GetNewRoleAction());\n }\n else {\n this.store.dispatch(new RoleActions.GetRoleAction(this.route.snapshot.params.id));\n }\n }\n\n updateRole(role: RoleDetailsDto) {\n\n this.store.dispatch(new RoleActions.UpdateRoleAction(role));\n }\n\n createRole(role: CreateRoleDto) {\n\n this.store.dispatch(new RoleActions.CreateRoleAction(role));\n }\n\n deleteRole(role: RoleDetailsDto) {\n\n this.store.dispatch(new RoleActions.DeleteRoleAction(role));\n }\n\n onBack(): void {\n\n this.store.dispatch(GoBackAction());\n }\n\n}\n","<app-role-details\n [isCreate]=\"isCreate\"\n [role]=\"role$ | async\"\n [permissionList]=\"permissionList$ | async\"\n [loading]=\"loading$ | async\"\n (deleteRole)=\"deleteRole($event)\"\n (updateRole)=\"updateRole($event)\"\n (createRole)=\"createRole($event)\"\n (back)=\"onBack()\">\n</app-role-details>\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getRolesState = (store: IStore) => store.roles;\n\nexport const getRoles = createSelector(\n getRolesState,\n rolesState => rolesState.record,\n);\n\nexport const getRolesLoading = createSelector(\n getRolesState,\n rolesState => rolesState.loading,\n);\n\nexport const getRolesError = createSelector(\n getRolesState,\n rolesState => rolesState.error,\n);\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"'id'\">\n <lib-text-table-column>\n {{ element.id }}\n </lib-text-table-column>\n <lib-table-column-sort [key]=\"element.id ?? 0\"></lib-table-column-sort>\n </ng-container>\n \n <ng-container *ngSwitchCase=\"'name'\">\n <lib-text-table-column>\n {{ element.name }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <lib-binary-status-icon\n [value]=\"element?.isCustom\"\n [showPositiveOnly]=\"true\">\n </lib-binary-status-icon>\n <lib-table-column-sort [key]=\"element.isCustom ? 1 : 0\"></lib-table-column-sort>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"app-roles-table-cell-content\",\n templateUrl: \"./roles-table-cell-content.component.html\",\n styleUrls: [\"./roles-table-cell-content.component.less\"],\n})\nexport class RolesTableCellContentComponent {\n @Input() columnId: string;\n @Input() element: any;\n}\n","<div class=\"outer-container\">\n\n <lib-title-bar [crumbs]=\"[{ 'label': 'Roles' }]\">\n <lib-action-button *ngIf=\"hasCreateRolePermission\"\n label=\"New Role\" fontImage=\"far fa-plus-circle fa-bg\" (click)=\"onClickCreateRole()\">\n </lib-action-button>\n </lib-title-bar>\n\n <lib-table-base\n class=\"roles-table\"\n [columnDefs]=\"roleColumnDefs\"\n [rowsData]=\"roles\"\n [rowsDataLoading]=\"loading\"\n [rowsDataError]=\"error\"\n rowsDataErrorMessage=\"Error Loading Roles\"\n (rowSelected)=\"onRowSelected($event)\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-roles-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\">\n </app-roles-table-cell-content>\n </ng-template>\n </lib-table-base>\n\n</div>\n","import { Component, Input } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { ColumnDef } from \"shared-lib\";\nimport { RoleDto } from \"@merchant_api/models/role-dto\";\nimport { CurrentUserPermissions } from \"@merchant_app/shared/current-user-permissions\";\n\n@Component({\n selector: \"app-role-log\",\n templateUrl: \"./role-log.component.html\",\n styleUrls: [ \"./role-log.component.less\" ]\n})\nexport class RoleLogComponent {\n\n @Input() roles: RoleDto[];\n @Input() loading = false;\n @Input() error: Error;\n\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n roleColumnDefs: ColumnDef[] = [\n { id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n { id: \"id\", title: \"ID\", flexWidthBasisInPixels: 150, flexWidthGrow: 0, canSort: true},\n { id: \"name\", title: \"Name\", flexWidthBasisInPixels: 400, flexWidthGrow: 0, canSort: true},\n { id: \"custom\", title: \"Custom\", flexWidthBasisInPixels: 60, flexWidthGrow: 0, canSort: true},\n { id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n ];\n\n onClickCreateRole() {\n if (this.hasCreateRolePermission) {\n this.router.navigate([`/dashboard/roles/create`]);\n }\n }\n\n onRowSelected(roleDto: RoleDto) {\n if (this.hasGetRolePermission) {\n this.router.navigate([`/dashboard/roles/${roleDto.id}`]);\n }\n }\n\n constructor(private router: Router, private currPerms: CurrentUserPermissions) {}\n\n get hasCreateRolePermission(): boolean {\n return this.currPerms.has([\"core.roles.create\"]);\n }\n\n get hasGetRolePermission(): boolean {\n return this.currPerms.has([\"core.roles.get\"]);\n }\n\n}\n","import { Component } from \"@angular/core\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { Store } from \"@ngrx/store\";\nimport { getRoles, getRolesError, getRolesLoading } from \"@merchant_app/storage/roles/roles.selectors\";\n\n@Component({\n selector: \"app-roles\",\n templateUrl: \"./roles.component.html\",\n styleUrls: [ \"./roles.component.less\" ]\n})\nexport class RolesComponent {\n\n roles$ = this.store.select(getRoles);\n\n loading$ = this.store.select(getRolesLoading);\n\n error$ = this.store.select(getRolesError);\n\n constructor(private store: Store<IStore>) {}\n\n}\n","<app-role-log\n [roles]=\"roles$ | async\"\n [loading]=\"loading$ | async\"\n [error]=\"error$ | async\">\n</app-role-log>\n","import { Action } from \"@ngrx/store\";\nimport { CreateWebhookDto } from \"@merchant_api/models/create-webhook-dto\";\nimport { UpdateWebhookDto } from \"@merchant_api/models/update-webhook-dto\";\nimport { WebhookDto } from \"@merchant_api/models/webhook-dto\";\nimport { WebhookEventTypesDto } from \"@merchant_api/models/webhook-event-types-dto\";\n\nexport enum ActionTypes {\n GetWebhook = \"[Webhook] GetWebhook\",\n GetNewWebhook = \"[Webhook] GetNewWebhook\",\n GetWebhookSucceed = \"[Webhook] GetWebhookSucceed\",\n GetWebhookFail = \"[Webhook] GetWebhookFail\",\n UpdateWebhook = \"[Webhook] UpdateWebhook\",\n DeleteWebhook = \"[Webhook] DeleteWebhook\",\n CreateWebhook = \"[Webhook] CreateWebhook\",\n ToggleWebhook = \"[Webhook] ToggleWebhook\",\n ToggleWebhookSucceed = \"[Webhook] ToggleWebhookSucceed\",\n ToggleWebhookFail = \"[Webhook] ToggleWebhookFail\",\n GetWebhookLookups = \"[Webhook] GetWebhookLookups\",\n GetWebhookLookupsSucceed = \"[Webhook] GetWebhookLookupsSucceed\"\n}\n\nexport class GetWebhookAction implements Action {\n\n constructor(\n public id: number\n ) {}\n\n readonly type = ActionTypes.GetWebhook;\n}\n\nexport class GetNewWebhookAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.GetNewWebhook;\n}\n\nexport class GetWebhookSucceedAction implements Action {\n\n constructor(\n public webhook: WebhookDto,\n public lookups: WebhookEventTypesDto\n ) {}\n\n readonly type = ActionTypes.GetWebhookSucceed;\n}\n\nexport class GetWebhookFailAction implements Action {\n\n constructor(\n public error: any\n ) {}\n\n readonly type = ActionTypes.GetWebhookFail;\n}\n\nexport class UpdateWebhookAction implements Action {\n\n constructor(public id: number, public webhook: UpdateWebhookDto) {}\n\n readonly type = ActionTypes.UpdateWebhook;\n}\n\nexport class DeleteWebhookAction implements Action {\n\n constructor(public id: number) {}\n\n readonly type = ActionTypes.DeleteWebhook;\n}\n\nexport class CreateWebhookAction implements Action {\n\n constructor(public webhook: CreateWebhookDto) {}\n\n readonly type = ActionTypes.CreateWebhook;\n}\n\nexport class ToggleWebhookAction implements Action {\n\n constructor(\n public id: number,\n public webhook: UpdateWebhookDto,\n public undo: () => void\n ) {}\n\n readonly type = ActionTypes.ToggleWebhook;\n}\n\nexport class ToggleWebhookSucceedAction implements Action {\n\n constructor(\n public id: number\n ) {}\n\n readonly type = ActionTypes.ToggleWebhookSucceed;\n}\n\nexport class ToggleWebhookFailAction implements Action {\n\n constructor(\n public id: number,\n public error: any,\n public undo: () => void\n ) {}\n\n readonly type = ActionTypes.ToggleWebhookFail;\n}\n\nexport class GetWebhookLookupsAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.GetWebhookLookups;\n}\n\nexport class GetWebhookLookupsSucceedAction implements Action {\n\n constructor(public lookups: WebhookEventTypesDto) {}\n\n readonly type = ActionTypes.GetWebhookLookupsSucceed;\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getWebhooksState = (store: IStore) => store.webhooks;\n\nexport const getWebhooks = createSelector(\n getWebhooksState,\n webhookState => webhookState.record,\n);\n\nexport const getWebhooksLoading = createSelector(\n getWebhooksState,\n webhookState => webhookState.loading,\n);\n\nexport const getWebhooksError = createSelector(\n getWebhooksState,\n webhookState => webhookState.error,\n);\n\nexport const getWebhooksSecret = createSelector(\n getWebhooksState,\n webhookState => webhookState.secret,\n);\n\nexport const getWebhooksSecretLoading = createSelector(\n getWebhooksState,\n webhookState => webhookState.secretLoading,\n);\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getWebhookState = (store: IStore) => store.webhook;\n\nexport const getWebhookInfo = createSelector(\n getWebhookState,\n webhookState => webhookState.webhook,\n);\n\nexport const getWebhookLookups = createSelector(\n getWebhookState,\n webhookState => webhookState.lookups,\n);\n\nexport const getWebhookLoading = createSelector(\n getWebhookState,\n webhookState => webhookState.loading,\n);\n\nexport const getToggleWebhooksLoading = createSelector(\n getWebhookState,\n webhookState => webhookState.toggleWebhooksLoading,\n);\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"'id'\">\n <lib-text-table-column>\n {{ element.id }}\n </lib-text-table-column>\n <lib-table-column-sort [key]=\"element.id ?? 0\"></lib-table-column-sort>\n </ng-container>\n \n <ng-container *ngSwitchCase=\"'url'\">\n <lib-text-table-column>\n {{ element.url }}\n </lib-text-table-column>\n </ng-container>\n \n <ng-container *ngSwitchCase=\"'active'\">\n <span (mousedown)=\"stopPropagation($event)\" (mouseup)=\"stopPropagation($event)\">\n <lib-vitu-slide-toggle\n [checked]=\"element.isActive\"\n (checkedChange)=\"isActiveToggled($event)\"\n [disabled]=\"toggleWebhookLoading\">\n </lib-vitu-slide-toggle>\n </span>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n\n\n\n\n\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { WebhookDto } from \"@merchant_api/models/webhook-dto\";\n\n@Component({\n selector: \"app-webhooks-table-cell-content\",\n templateUrl: \"./webhooks-table-cell-content.component.html\",\n styleUrls: [\"./webhooks-table-cell-content.component.less\"],\n})\nexport class WebhooksTableCellContentComponent {\n @Input() columnId: string;\n @Input() element: WebhookDto;\n @Input() toggleWebhookLoading: boolean;\n @Output() activeToggled = new EventEmitter<{webhook: WebhookDto; undo: () => void}>();\n\n isActiveToggled(checked) {\n this.element.isActive = checked;\n\n const undo = () => {\n this.element.isActive = !this.element.isActive;\n };\n\n const updatedWebhook: WebhookDto = {\n ...this.element,\n isActive: checked\n };\n\n this.activeToggled.emit({\n webhook: updatedWebhook,\n undo\n });\n }\n\n stopPropagation(event: Event) {\n event.stopPropagation();\n }\n\n}\n","<div class=\"outer-container\">\n\n <lib-title-bar [crumbs]=\"[{ 'label': 'Developer Tools' }, { 'label': 'Webhooks' }, { 'label': 'Configure' }]\">\n <lib-action-button *ngIf=\"hasCreatePermission\"\n label=\"New Webhook\" fontImage=\"far fa-plus-circle fa-bg\" (click)=\"onClickCreate()\">\n </lib-action-button>\n </lib-title-bar>\n\n <lib-table-base\n class=\"webhooks-table\"\n [columnDefs]=\"webhookColumnDefs\"\n [rowsData]=\"webhooks\"\n [rowsDataLoading]=\"loading\"\n [rowsDataError]=\"error\"\n rowsDataErrorMessage=\"Error Loading Webhooks\"\n selectedRowProperty=\"id\"\n (rowSelected)=\"onRowSelected($event)\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-webhooks-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\"\n [toggleWebhookLoading]=\"toggleWebhooksLoading.indexOf(element.id) !== -1\"\n (activeToggled)=\"onIsActiveToggled($event)\">\n </app-webhooks-table-cell-content>\n </ng-template>\n </lib-table-base>\n\n</div>\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { ColumnDef } from \"shared-lib\";\nimport { WebhookDto } from \"@merchant_api/models/webhook-dto\";\nimport { CurrentUserPermissions } from \"@merchant_app/shared/current-user-permissions\";\n\n@Component({\n selector: \"app-webhook-log\",\n templateUrl: \"./webhook-log.component.html\",\n styleUrls: [ \"./webhook-log.component.less\" ]\n})\nexport class WebhookLogComponent {\n\n @Input() webhooks: WebhookDto[];\n @Input() loading = false;\n @Input() error: Error;\n @Input() toggleWebhooksLoading: Array<number> = [];\n @Output() activeToggled = new EventEmitter<{webhook: WebhookDto; undo: () => void}>();\n\n get webhookColumnDefs(): ColumnDef[] {\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n const retVal: ColumnDef[] = [\n { id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n { id: \"id\", title: \"ID\", flexWidthBasisInPixels: 150, flexWidthGrow: 0, canSort: true},\n { id: \"url\", title: \"URL\", flexWidthBasisInPixels: 700, flexWidthGrow: 0, canSort: true},\n { id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n ];\n if (this.hasTogglePermission) {\n const activeColumn: ColumnDef = { id: \"active\", title: \"Active\", flexWidthBasisInPixels: 80, flexWidthGrow: 1};\n retVal.splice(3, 0, activeColumn);\n }\n return retVal;\n }\n\n onIsActiveToggled(payload: {webhook: WebhookDto; undo: () => void}) {\n this.activeToggled.emit(payload);\n }\n\n onClickCreate() {\n if (this.hasCreatePermission) {\n this.router.navigate([`/dashboard/developer/webhooks/configure/create`]);\n }\n }\n\n onRowSelected(id: string) {\n if (this.hasGetPermission) {\n this.router.navigate([`/dashboard/developer/webhooks/configure/${id}`]);\n }\n }\n\n constructor(private router: Router, private currPerms: CurrentUserPermissions) {}\n\n get hasCreatePermission(): boolean {\n return this.currPerms.has([\"core.webhooks.create\"]);\n }\n\n get hasGetPermission(): boolean {\n return this.currPerms.has([\"core.webhooks.get\"]);\n }\n\n get hasTogglePermission(): boolean {\n return this.currPerms.has([\"core.webhooks.toggle\"]);\n }\n\n}\n","import { Component } from \"@angular/core\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { Store } from \"@ngrx/store\";\nimport * as WebhookActions from \"@merchant_app/storage/webhook/webhook.actions\";\nimport { getWebhooks, getWebhooksLoading, getWebhooksError } from \"@merchant_app/storage/webhooks/webhooks.selectors\";\nimport { getToggleWebhooksLoading } from \"@merchant_app/storage/webhook/webhook.selectors\";\nimport { WebhookDto } from \"@merchant_api/models/webhook-dto\";\nimport { UpdateWebhookDto } from \"@merchant_api/models/update-webhook-dto\";\n\n@Component({\n selector: \"app-webhooks\",\n templateUrl: \"./webhooks.component.html\",\n styleUrls: [ \"./webhooks.component.less\" ]\n})\nexport class WebhooksComponent {\n\n webhooks$ = this.store.select(getWebhooks);\n loading$ = this.store.select(getWebhooksLoading);\n error$ = this.store.select(getWebhooksError);\n toggleWebhooksLoading$ = this.store.select(getToggleWebhooksLoading);\n\n constructor(private store: Store<IStore>) {}\n\n onIsActiveToggled(payload: {webhook: WebhookDto; undo: () => void}) {\n this.store.dispatch(new WebhookActions.ToggleWebhookAction(payload.webhook.id, payload.webhook, payload.undo));\n }\n\n}\n","<app-webhook-log\n [webhooks]=\"webhooks$ | async\"\n [loading]=\"loading$ | async\"\n [error]=\"error$ | async\"\n [toggleWebhooksLoading]=\"toggleWebhooksLoading$ | async\"\n (activeToggled)=\"onIsActiveToggled($event)\">\n</app-webhook-log>\n","import { Action } from \"@ngrx/store\";\nimport { UserDto } from \"@merchant_api/models/user-dto\";\nimport { WebhookDto } from \"@merchant_api/models/webhook-dto\";\n\nexport enum ActionTypes {\n GetWebhooks = \"[Webhooks] GetWebhooks\",\n GetWebhooksSucceed = \"[Webhooks] GetWebhooksSucceed\",\n GetWebhooksFail = \"[Webhooks] GetWebhooksFail\",\n GenerateWebhooksSecret = \"[Webhooks] GenerateWebhooksSecret\",\n GenerateWebhooksSecretSucceed = \"[Webhooks] GenerateWebhooksSecretSucceed\",\n GenerateWebhooksSecretFail = \"[Webhooks] GenerateWebhooksSecretFail\",\n ResetWebhooksSecret = \"[Webhooks] ResetWebhooksSecret\"\n}\n\nexport class GetWebhooksAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.GetWebhooks;\n}\n\nexport class GetWebhooksSucceedAction implements Action {\n\n constructor(public webhooks: Array<WebhookDto>) {}\n\n readonly type = ActionTypes.GetWebhooksSucceed;\n}\n\nexport class GetWebhooksFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetWebhooksFail;\n}\n\nexport class GenerateWebhooksSecretAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.GenerateWebhooksSecret;\n}\n\nexport class GenerateWebhooksSecretSucceedAction implements Action {\n\n constructor(public secret: string) {}\n\n readonly type = ActionTypes.GenerateWebhooksSecretSucceed;\n}\n\nexport class GenerateWebhooksSecretFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GenerateWebhooksSecretFail;\n}\n\nexport class ResetWebhooksSecretAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.ResetWebhooksSecret;\n}\n","<div class=\"outer-container\">\n\n <lib-title-bar\n [crumbs]=\"[{ 'label': 'Developer Tools' }, { 'label': 'Webhooks' }, { 'label': 'Configure' , 'link': '/dashboard/developer/webhooks/configure' }, { 'label': pageTitle }]\">\n </lib-title-bar>\n\n <div class=\"details-container\">\n <ng-container *ngIf=\"!webhook then spinner\"></ng-container>\n <ng-container *ngIf=\"webhook then details\"></ng-container>\n </div>\n\n</div>\n\n<ng-template #spinner>\n <lib-busy-indicator>\n </lib-busy-indicator>\n</ng-template>\n\n<ng-template #details>\n\n <form class=\"form\" [formGroup]=\"webhookForm\" [libVituForm]=\"webhookForm\" (libVituFormSubmit)=\"onSubmit()\">\n\n <div class=\"form-inner-container\">\n\n <lib-vitu-form-field-input\n class=\"field\"\n [formGroup]=\"webhookForm\"\n formFieldName=\"url\"\n label=\"URL\"\n [disabled]=\"viewOnly\">\n </lib-vitu-form-field-input>\n\n <lib-grouped-switch-array\n heading=\"EVENT TYPES\"\n errorMessageAtLeastOneRequired=\"At least one event type is required\"\n formControlName=\"eventTypes\"\n [readonly]=\"viewOnly\">\n </lib-grouped-switch-array>\n\n <div class=\"secret-fields-container\" *ngIf=\"!isCreate\">\n\n <lib-vitu-form-field-input\n class=\"field secret\"\n [formGroup]=\"webhookForm\"\n formFieldName=\"secret\"\n label=\"Secret\"\n type=\"obscured\"\n [(showObscured)]=\"showSecret\"\n readonly>\n </lib-vitu-form-field-input>\n\n <lib-action-button\n *ngIf=\"hasGenerateSecretPermission && hasUpdateWebhookPermission\"\n class=\"selection-button align-buttons-y\"\n label=\"Generate Secret\"\n [kind]=\"ActionButtonKind.SECONDARY\"\n [disabled]=\"loading || generatedSecretLoading\"\n (click)=\"onClickGenerateSecret()\">\n </lib-action-button>\n\n </div>\n\n <div class=\"actions-line\" *ngIf=\"!isCreate\">\n\n <lib-vitu-form-field-switch\n formControlName=\"isActive\"\n label=\"Active\"\n [disableControl]=\"viewOnly\">\n </lib-vitu-form-field-switch>\n\n <div class=\"action-buttons\">\n\n <lib-action-button\n *ngIf=\"hasDeleteWebhookPermission\"\n id=\"deleteWebhookButton\"\n class=\"action-button\"\n label=\"Delete Webhook\"\n fontImage=\"far fa-trash fa-bg\"\n [kind]=\"ActionButtonKind.ALERT\"\n [disabled]=\"loading || !webhook\"\n (click)=\"onClickDelete()\">\n </lib-action-button>\n \n </div>\n\n </div>\n\n </div>\n\n <lib-vitu-form-buttons>\n\n <lib-vitu-form-abort-button\n (onAbort)=\"onClickBack()\">\n </lib-vitu-form-abort-button>\n\n <lib-vitu-form-submit-button\n *ngIf=\"isCreate || hasUpdateWebhookPermission\"\n [label]=\"submitButtonText\"\n [neverDisable]=\"isCreate\">\n </lib-vitu-form-submit-button>\n\n </lib-vitu-form-buttons>\n\n </form>\n\n</ng-template>\n","import { Component, EventEmitter, Input, OnInit, OnChanges, Output, SimpleChanges } from \"@angular/core\";\nimport { AbstractControl, FormArray, UntypedFormBuilder, UntypedFormControl, Validators } from \"@angular/forms\";\nimport { ActionButtonKind, ValidatorsVituCustom } from \"shared-lib\";\nimport { CurrentUserDto } from \"@merchant_app/storage/current-user/current-user.state\";\nimport { WebhookDto } from \"@merchant_api/models/webhook-dto\";\nimport { WebhookEventTypesDto } from \"@merchant_api/models/webhook-event-types-dto\";\nimport { LookupDto } from \"@merchant_api/models/lookup-dto\";\nimport { CreateWebhookDto } from \"@merchant_api/models/create-webhook-dto\";\nimport { UpdateWebhookDto } from \"@merchant_api/models/update-webhook-dto\";\nimport { CurrentUserPermissions } from \"@merchant_app/shared/current-user-permissions\";\n\ntype FormConfig<T> = { [P in keyof T]: any[] };\ntype FormControls<T> = { [P in keyof T]: AbstractControl };\n\n@Component({\n selector: \"app-webhook-details\",\n templateUrl: \"./webhook-details.component.html\",\n styleUrls: [\"./webhook-details.component.less\"],\n})\nexport class WebhookDetailsComponent implements OnInit, OnChanges {\n\n @Input() isCreate: boolean;\n @Input() webhook: WebhookDto;\n @Input() lookups: WebhookEventTypesDto;\n @Input() currentUser: CurrentUserDto;\n @Input() loading: boolean;\n @Input() generatedSecret: string;\n @Input() generatedSecretLoading: boolean;\n\n @Output() generateSecret = new EventEmitter<void>();\n @Output() deleteWebhook = new EventEmitter<number>();\n @Output() updateWebhook = new EventEmitter<{id: number; webhook: UpdateWebhookDto}>();\n @Output() createWebhook = new EventEmitter<CreateWebhookDto>();\n @Output() back = new EventEmitter<void>();\n\n submitButtonText: string;\n showSecret = false;\n\n ActionButtonKind = ActionButtonKind;\n\n constructor(\n private fb: UntypedFormBuilder,\n private currPerms: CurrentUserPermissions\n ) {}\n\n webhookForm = this.fb.group({\n url: [null, [Validators.required, ValidatorsVituCustom.validHttpsUrl]],\n eventTypes: [null as Array<{id: string; name: string; checked: boolean}>],\n isActive: [true],\n secret: [null, [Validators.required]]\n });\n\n get formControls(): FormControls<any> { return this.webhookForm.controls; }\n\n formControl(controlName: string) { return this.webhookForm.controls[controlName] as UntypedFormControl; }\n\n get viewOnly(): boolean {\n return !this.isCreate && !this.hasUpdateWebhookPermission;\n }\n\n onClickGenerateSecret() {\n this.generateSecret.emit();\n }\n\n onClickToggleShowSecret() {\n this.showSecret = !this.showSecret;\n }\n\n ngOnInit() {\n\n this.submitButtonText = (this.isCreate ? \"Submit\" : \"Update\");\n\n if (this.isCreate) {\n this.formControls?.secret.disable();\n }\n }\n\n get pageTitle(): string {\n let firstPart: string;\n if (this.isCreate) {\n firstPart = \"New\";\n }\n else if(this.hasUpdateWebhookPermission) {\n firstPart = \"Edit\";\n }\n else {\n firstPart = \"View\";\n }\n return firstPart + \" Webhook\";\n }\n\n ngOnChanges(changes: SimpleChanges) {\n\n if (\"webhook\" in changes && this.webhook) {\n\n this.webhookForm.patchValue(this.webhook);\n\n if (!this.isCreate) {\n this.webhookForm.markAllAsTouched();\n }\n }\n\n if (\"lookups\" in changes && this.lookups) {\n this.formControls?.eventTypes.patchValue(this.getFormArray());\n }\n\n if (\"generatedSecret\" in changes && this.generatedSecret) {\n\n this.webhookForm.markAsDirty(); // because we're dirtying it manually here (ie. programmatic)\n this.formControls?.secret.patchValue(this.generatedSecret);\n }\n }\n\n private getFormArray(): Array<{id: string; name: string; checked: boolean}> {\n\n return this.lookups?.eventTypes?.map(i => ({\n id: i.id,\n name: i.name,\n checked: this.isChecked(i, this.webhook)\n }));\n }\n\n private isChecked(eventType: LookupDto, webhook: WebhookDto) {\n\n return webhook?.eventTypes\n ? webhook.eventTypes?.indexOf(eventType.id) >= 0\n : false;\n }\n\n onClickDelete() {\n\n this.deleteWebhook.emit(this.webhook.id);\n }\n\n onClickBack() {\n\n this.back.emit();\n }\n\n onSubmit() {\n\n const webhookForm = this.webhookForm.value;\n\n const url = webhookForm.url;\n const eventTypes = webhookForm.eventTypes.filter(i => i.checked).map(i => i.id);\n\n if (this.isCreate) {\n const createWebhookDto: CreateWebhookDto = {\n url,\n eventTypes\n };\n this.createWebhook.emit(createWebhookDto);\n }\n else {\n const secret = webhookForm.secret;\n const isActive = webhookForm.isActive;\n const updateWebhookDto: UpdateWebhookDto = {\n url,\n eventTypes,\n secret,\n isActive\n };\n this.updateWebhook.emit({\n id: this.webhook.id,\n webhook: updateWebhookDto\n });\n }\n\n }\n\n get hasDeleteWebhookPermission(): boolean {\n return this.currPerms.has([\"core.webhooks.delete\"]);\n }\n\n get hasUpdateWebhookPermission(): boolean {\n return this.currPerms.has([\"core.webhooks.update\"]);\n }\n\n get hasGenerateSecretPermission(): boolean {\n return this.currPerms.has([\"core.webhooks.generate-secret\"]);\n }\n\n}\n","import { Component, OnInit } from \"@angular/core\";\nimport { Store } from \"@ngrx/store\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport * as WebhookActions from \"@merchant_app/storage/webhook/webhook.actions\";\nimport * as WebhookSelectors from \"@merchant_app/storage/webhook/webhook.selectors\";\nimport * as CurrentUserSelectors from \"@merchant_app/storage/current-user/current-user.selectors\";\nimport * as WebhooksSelectors from \"@merchant_app/storage/webhooks/webhooks.selectors\";\nimport * as WebhooksActions from \"@merchant_app/storage/webhooks/webhooks.actions\";\nimport { GoBackAction } from \"@merchant_app/storage/router/router.actions\";\nimport { CreateWebhookDto } from \"@merchant_api/models/create-webhook-dto\";\nimport { UpdateWebhookDto } from \"@merchant_api/models/update-webhook-dto\";\n\n@Component({\n selector: \"app-webhook\",\n templateUrl: \"./webhook.component.html\",\n styleUrls: [\"./webhook.component.less\"]\n})\nexport class WebhookComponent implements OnInit {\n\n constructor(\n private store: Store<IStore>,\n private route: ActivatedRoute,\n ) {}\n\n webhook$ = this.store.select(WebhookSelectors.getWebhookInfo);\n lookups$ = this.store.select(WebhookSelectors.getWebhookLookups);\n loading$ = this.store.select(WebhookSelectors.getWebhookLoading);\n currentUser$ = this.store.select(CurrentUserSelectors.getCurrentUser);\n generatedSecret$ = this.store.select(WebhooksSelectors.getWebhooksSecret);\n generatedSecretLoading$ = this.store.select(WebhooksSelectors.getWebhooksSecretLoading);\n\n isCreate: boolean;\n\n ngOnInit() {\n\n this.store.dispatch(new WebhooksActions.ResetWebhooksSecretAction());\n\n this.isCreate = !this.route.snapshot.params.id;\n\n if (this.isCreate) {\n this.store.dispatch(new WebhookActions.GetNewWebhookAction());\n }\n else {\n this.store.dispatch(new WebhookActions.GetWebhookAction(this.route.snapshot.params.id));\n }\n }\n\n generateSecret() {\n\n this.store.dispatch(new WebhooksActions.GenerateWebhooksSecretAction());\n }\n\n updateWebhook(payload: {id: number; webhook: UpdateWebhookDto}) {\n\n this.store.dispatch(new WebhookActions.UpdateWebhookAction(payload.id, payload.webhook));\n }\n\n createWebhook(webhook: CreateWebhookDto) {\n\n this.store.dispatch(new WebhookActions.CreateWebhookAction(webhook));\n }\n\n deleteWebhook(webhookId: number) {\n\n this.store.dispatch(new WebhookActions.DeleteWebhookAction(webhookId));\n }\n\n onBack(): void {\n\n this.store.dispatch(GoBackAction());\n }\n\n}\n","<app-webhook-details\n [isCreate]=\"isCreate\"\n [webhook]=\"webhook$ | async\"\n [lookups]=\"lookups$ | async\"\n [currentUser]=\"currentUser$ | async\"\n [loading]=\"loading$ | async\"\n [generatedSecret]=\"generatedSecret$ | async\"\n [generatedSecretLoading]=\"generatedSecretLoading$ | async\"\n (generateSecret)=\"generateSecret()\"\n (deleteWebhook)=\"deleteWebhook($event)\"\n (updateWebhook)=\"updateWebhook($event)\"\n (createWebhook)=\"createWebhook($event)\"\n (back)=\"onBack()\">\n</app-webhook-details>\n","export enum ReportType {\n TRANSACTIONS = \"Transactions\",\n STATEMENT = \"Statement\",\n FUNDING = \"Funding\"\n}\n","import { ReportType } from \"@merchant_app/shared/download-report-modal/report-type\";\nimport { Action } from \"@ngrx/store\";\n\nexport enum ActionTypes {\n DownloadReport = \"[REPORT] DownloadReport\",\n DownloadReportSucceed = \"[REPORT] DownloadReportSucceed\"\n}\n\nexport class DownloadReportAction implements Action {\n\n constructor(public reportType: ReportType) {}\n\n readonly type = ActionTypes.DownloadReport;\n}\n\nexport class DownloadReportSucceedAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.DownloadReportSucceed;\n}\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"'name'\">\n <lib-text-table-column>\n {{ report.name }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'description'\">\n <lib-text-table-column>\n {{ report.description }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'download'\">\n <lib-vitu-tooltip text=\"Download\">\n <i class=\"far fa-file-download global-table-cell-image-link\" (click)=\"onClickDownload()\"></i>\n </lib-vitu-tooltip>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n","import { ReportType } from \"@merchant_app/shared/download-report-modal/report-type\";\nimport { Component, Input, Output, EventEmitter } from \"@angular/core\";\nimport { Report } from \"../../../../shared/download-report-modal/report\";\n\n@Component({\n selector: \"app-reports-table-cell-content\",\n templateUrl: \"./reports-table-cell-content.component.html\",\n styleUrls: [\"./reports-table-cell-content.component.less\"],\n})\nexport class ReportsTableCellContentComponent {\n\n @Input() columnId: string;\n @Input() report: Report;\n @Output() downloadReport = new EventEmitter<ReportType>();\n\n constructor() {}\n\n onClickDownload() {\n this.downloadReport.emit(this.report.type);\n }\n\n}\n","<div class=\"outer-container\">\n\n <lib-title-bar [crumbs]=\"[{ 'label': 'Reports' }]\">\n </lib-title-bar>\n\n <lib-table-base\n class=\"reports-table\"\n [columnDefs]=\"columnDefs\"\n [rowsData]=\"reports\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-reports-table-cell-content\n [columnId]=\"columnId\"\n [report]=\"element\"\n (downloadReport)=\"onDownloadReport($event)\">\n </app-reports-table-cell-content>\n </ng-template>\n </lib-table-base>\n\n</div>\n","import { ReportType } from \"@merchant_app/shared/download-report-modal/report-type\";\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { ColumnDef } from \"shared-lib\";\nimport { Report } from \"../../../shared/download-report-modal/report\";\n\n@Component({\n selector: \"app-reports-log\",\n templateUrl: \"./reports-log.component.html\",\n styleUrls: [\"./reports-log.component.less\"],\n})\nexport class ReportsLogComponent {\n\n @Input() reports: Array<Report> = [];\n @Output() downloadReport = new EventEmitter<ReportType>();\n\n readonly columnDefs: ColumnDef[];\n\n constructor() {\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n this.columnDefs = [\n {id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n {id: \"name\", title: \"Report Type\", flexWidthBasisInPixels: 250, flexWidthGrow: 0, canSort: true},\n {id: \"description\", title: \"Description\", flexWidthBasisInPixels: 550, flexWidthGrow: 0, canSort: true},\n {id: \"download\", title: \"Download\", flexWidthBasisInPixels: 80, flexWidthGrow: 1},\n {id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n ];\n }\n\n onDownloadReport(reportType: ReportType) {\n this.downloadReport.emit(reportType);\n }\n\n}\n","import { ReportType } from \"@merchant_app/shared/download-report-modal/report-type\";\nimport { DownloadReportAction } from \"@merchant_app/storage/report/report.actions\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { Component } from \"@angular/core\";\nimport { Store } from \"@ngrx/store\";\nimport { Report } from \"../../shared/download-report-modal/report\";\n\n@Component({\n selector: \"app-reports\",\n templateUrl: \"./reports.component.html\",\n styleUrls: [\"./reports.component.less\"],\n})\nexport class ReportsComponent {\n\n reports: Array<Report>;\n\n constructor(private store: Store<IStore>) {\n this.reports = Object.values(ReportType).map(reportType => {\n\n const reportName = (reportType === ReportType.STATEMENT ? reportType : reportType + \" Report\");\n\n const report: Report = {\n type: reportType,\n name: reportName\n };\n\n switch (reportType) {\n case ReportType.TRANSACTIONS: {\n report.description = \"All data held for each transaction processed within a date range\";\n break;\n }\n case ReportType.STATEMENT: {\n report.description = \"Merchant statements\";\n break;\n }\n case ReportType.FUNDING: {\n report.description = \"All funding instructions issued within a date range\";\n break;\n }\n }\n\n return report;\n });\n\n }\n\n onDownloadReport(reportType: ReportType) {\n this.store.dispatch(new DownloadReportAction(reportType));\n }\n\n}\n","<app-reports-log\n [reports]=\"reports\"\n (downloadReport)=\"onDownloadReport($event)\">\n</app-reports-log>\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getClientsState = (store: IStore) => store.clients;\n\nexport const getClients = createSelector(\n getClientsState,\n clientState => clientState.record,\n);\n\nexport const getClientsLoading = createSelector(\n getClientsState,\n clientState => clientState.loading,\n);\n\nexport const getClientsError = createSelector(\n getClientsState,\n clientState => clientState.error,\n);\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"'id'\">\n <lib-text-table-column>\n {{ element.id }}\n </lib-text-table-column>\n <lib-table-column-sort [key]=\"element.id ?? 0\"></lib-table-column-sort>\n </ng-container>\n \n <ng-container *ngSwitchCase=\"'name'\">\n <lib-text-table-column>\n {{ element.name }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'clientId'\">\n <lib-text-table-column>\n {{ element.claimClientId }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n\n\n\n\n\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"app-clients-table-cell-content\",\n templateUrl: \"./clients-table-cell-content.component.html\",\n styleUrls: [\"./clients-table-cell-content.component.less\"],\n})\nexport class ClientsTableCellContentComponent {\n @Input() columnId: string;\n @Input() element: any;\n}\n","<div class=\"outer-container\">\n\n <lib-title-bar [crumbs]=\"[{ 'label': 'Developer Tools' }, { 'label': 'Clients' }]\">\n <lib-action-button *ngIf=\"hasCreatePermission\"\n label=\"New Client\" fontImage=\"far fa-plus-circle fa-bg\" (click)=\"onClickCreate()\">\n </lib-action-button>\n </lib-title-bar>\n\n <lib-table-base\n class=\"clients-table\"\n [columnDefs]=\"clientColumnDefs\"\n [rowsData]=\"clients\"\n [rowsDataLoading]=\"loading\"\n [rowsDataError]=\"error\"\n rowsDataErrorMessage=\"Error Loading Clients\"\n selectedRowProperty=\"id\"\n (rowSelected)=\"onRowSelected($event)\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-clients-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\">\n </app-clients-table-cell-content>\n </ng-template>\n </lib-table-base>\n\n</div>\n","import { Component, Input } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { ColumnDef } from \"shared-lib\";\nimport { ClientDto } from \"@merchant_api/models/client-dto\";\nimport { CurrentUserPermissions } from \"@merchant_app/shared/current-user-permissions\";\n\n@Component({\n selector: \"app-client-log\",\n templateUrl: \"./client-log.component.html\",\n styleUrls: [ \"./client-log.component.less\" ]\n})\nexport class ClientLogComponent {\n\n @Input() clients: ClientDto[];\n @Input() loading = false;\n @Input() error: Error;\n\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n clientColumnDefs: ColumnDef[] = [\n { id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n { id: \"id\", title: \"ID\", flexWidthBasisInPixels: 150, flexWidthGrow: 0, canSort: true},\n { id: \"name\", title: \"Name\", flexWidthBasisInPixels: 320, flexWidthGrow: 0, canSort: true},\n { id: \"clientId\", title: \"Client ID\", flexWidthBasisInPixels: 380, flexWidthGrow: 1, canSort: true},\n { id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n ];\n\n onClickCreate() {\n if (this.hasCreatePermission) {\n this.router.navigate([`/dashboard/developer/clients/create`]);\n }\n }\n\n onRowSelected(id: string) {\n if (this.hasGetPermission) {\n this.router.navigate([`/dashboard/developer/clients/${id}`]);\n }\n }\n\n constructor(private router: Router, private currPerms: CurrentUserPermissions) {}\n\n get hasCreatePermission(): boolean {\n return this.currPerms.has([\"core.clients.create\"]);\n }\n\n get hasGetPermission(): boolean {\n return this.currPerms.has([\"core.clients.get\", \"core.roles.search\"]);\n }\n\n}\n","import { Component } from \"@angular/core\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { Store } from \"@ngrx/store\";\nimport * as ClientsSelectors from \"@merchant_app/storage/clients/clients.selectors\";\nimport { getCurrentUserPermissions } from \"@merchant_app/storage/current-user/current-user.selectors\";\n\n@Component({\n selector: \"app-clients\",\n templateUrl: \"./clients.component.html\",\n styleUrls: [ \"./clients.component.less\" ]\n})\nexport class ClientsComponent {\n\n clients$ = this.store.select(ClientsSelectors.getClients);\n loading$ = this.store.select(ClientsSelectors.getClientsLoading);\n error$ = this.store.select(ClientsSelectors.getClientsError);\n\n constructor(private store: Store<IStore>) {}\n\n}\n","<app-client-log\n [clients]=\"clients$ | async\"\n [loading]=\"loading$ | async\"\n [error]=\"error$ | async\">\n</app-client-log>\n","import { Action } from \"@ngrx/store\";\nimport { UpdateClientDto } from \"@merchant_api/models/update-client-dto\";\nimport { CreateClientDto } from \"@merchant_api/models/create-client-dto\";\nimport { RoleDto } from \"@merchant_api/models/role-dto\";\nimport { ClientDetailsDto } from \"@merchant_api/models/client-details-dto\";\nimport { ClientSecretLookupsDto } from \"@merchant_api/models/client-secret-lookups-dto\";\n\nexport enum ActionTypes {\n GetClient = \"[Client] GetClient\",\n GetNewClient = \"[Client] GetNewClient\",\n GetClientSucceed = \"[Client] GetClientSucceed\",\n GetClientFail = \"[Client] GetClientFail\",\n UpdateClient = \"[Client] UpdateClient\",\n DeleteClient = \"[Client] DeleteClient\",\n CreateClient = \"[Client] CreateClient\",\n AddClientSecret = \"[Client] AddClientSecret\",\n DeleteClientSecret = \"[Client] DeleteClientSecret\"\n}\n\nexport class GetClientAction implements Action {\n\n constructor(\n public id: number\n ) {}\n\n readonly type = ActionTypes.GetClient;\n}\n\nexport class GetNewClientAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.GetNewClient;\n}\n\nexport class GetClientSucceedAction implements Action {\n\n constructor(\n public client: ClientDetailsDto,\n public roles: Array<RoleDto>,\n public lookups: ClientSecretLookupsDto\n ) {}\n\n readonly type = ActionTypes.GetClientSucceed;\n}\n\nexport class GetClientFailAction implements Action {\n\n constructor(\n public error: any\n ) {}\n\n readonly type = ActionTypes.GetClientFail;\n}\n\nexport class UpdateClientAction implements Action {\n\n constructor(public id: number, public client: UpdateClientDto) {}\n\n readonly type = ActionTypes.UpdateClient;\n}\n\nexport class DeleteClientAction implements Action {\n\n constructor(public id: number) {}\n\n readonly type = ActionTypes.DeleteClient;\n}\n\nexport class CreateClientAction implements Action {\n\n constructor(public client: CreateClientDto) {}\n\n readonly type = ActionTypes.CreateClient;\n}\n\nexport class AddClientSecretAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.AddClientSecret;\n}\n\nexport class DeleteClientSecretAction implements Action {\n\n constructor(public secretId: number) {}\n\n readonly type = ActionTypes.DeleteClientSecret;\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getClientState = (store: IStore) => store.client;\n\nexport const getClientInfo = createSelector(\n getClientState,\n clientState => clientState.client,\n);\n\nexport const getClientRoles = createSelector(\n getClientState,\n clientState => clientState.roles,\n);\n\nexport const getClientLoading = createSelector(\n getClientState,\n clientState => clientState.loading,\n);\n","import { Action } from \"@ngrx/store\";\nimport { ClientSecretDto } from \"@merchant_api/models/client-secret-dto\";\n\nexport enum ActionTypes {\n ResetClientSecrets = \"[ClientSecrets] ResetClientSecrets\",\n GetClientSecrets = \"[ClientSecrets] GetClientSecrets\",\n GetClientSecretsSucceed = \"[ClientSecrets] GetClientSecretsSucceed\",\n GetClientSecretsFail = \"[ClientSecrets] GetClientSecretsFail\",\n}\n\nexport class ResetClientSecretsAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.ResetClientSecrets;\n}\n\nexport class GetClientSecretsAction implements Action {\n\n constructor(public clientId: number) {}\n\n readonly type = ActionTypes.GetClientSecrets;\n}\n\nexport class GetClientSecretsSucceedAction implements Action {\n\n constructor(public clientSecrets: Array<ClientSecretDto>) {}\n\n readonly type = ActionTypes.GetClientSecretsSucceed;\n}\n\nexport class GetClientSecretsFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetClientSecretsFail;\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getClientSecretsState = (store: IStore) => store.clientSecrets;\n\nexport const getClientSecrets = createSelector(\n getClientSecretsState,\n clientSecretsState => clientSecretsState.record,\n);\n\nexport const getClientSecretsLoading = createSelector(\n getClientSecretsState,\n clientSecretsState => clientSecretsState.loading,\n);\n\nexport const getClientSecretsError = createSelector(\n getClientSecretsState,\n clientSecretsState => clientSecretsState.error,\n);\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"'type'\">\n <lib-text-table-column>\n {{ element.type }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'value'\">\n <div class=\"value-container\">\n <div class=\"value-eye\" (click)=\"onClickToggleShowSecret()\">\n <i [class]=\"'far ' + (showSecret ? 'fa-eye-slash' : 'fa-eye')\"></i>\n </div>\n <input\n class=\"value-input\"\n [type]=\"showSecret ? 'text' : 'password'\"\n [value]=\"element.value\"\n [readonly]=\"true\">\n <lib-copy-to-clipboard-button *ngIf=\"showSecret\" [value]=\"element.value\">\n </lib-copy-to-clipboard-button>\n </div>\n </ng-container>\n \n <ng-container *ngSwitchCase=\"'description'\">\n <lib-text-table-column>\n {{ element.description }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'expirationDate'\">\n <lib-date-time-label [dateUtc]=\"element.expirationUtc\">\n </lib-date-time-label>\n <lib-table-column-sort [key]=\"sortingKeyForExpirationDate\"></lib-table-column-sort>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'delete'\">\n <lib-vitu-tooltip text=\"Delete\">\n <i class=\"far fa-trash global-table-cell-image-link\" (click)=\"onClickDeleteSecret()\"></i>\n </lib-vitu-tooltip>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { ActionButtonKind } from \"shared-lib\";\n\n@Component({\n selector: \"app-client-secrets-table-cell-content\",\n templateUrl: \"./client-secrets-table-cell-content.component.html\",\n styleUrls: [\"./client-secrets-table-cell-content.component.less\"],\n})\nexport class ClientSecretsTableCellContentComponent {\n\n @Input() columnId: string;\n @Input() element: any;\n\n @Output() deleteClientSecret = new EventEmitter<number>();\n\n showSecret = false;\n\n ActionButtonKind = ActionButtonKind;\n\n onClickToggleShowSecret() {\n this.showSecret = !this.showSecret;\n }\n\n onClickDeleteSecret() {\n this.deleteClientSecret.emit(this.element.id);\n }\n\n get sortingKeyForExpirationDate(): number {\n // Timezone independent (as just for comparision with like values)\n return new Date(this.element.expirationUtc).getTime();\n }\n}\n","<div class=\"outer-container\">\n\n <lib-title-bar\n [crumbs]=\"[{ 'label': 'Developer Tools' }, { 'label': 'Clients' , 'link': '/dashboard/developer/clients' }, { 'label': pageTitle }]\">\n </lib-title-bar>\n\n <div class=\"details-container\">\n <ng-container *ngIf=\"!client then spinner\"></ng-container>\n <ng-container *ngIf=\"client then details\"></ng-container>\n </div>\n\n</div>\n\n<ng-template #spinner>\n <lib-busy-indicator>\n </lib-busy-indicator>\n</ng-template>\n\n<ng-template #details>\n\n <form class=\"form\" [formGroup]=\"clientForm\" [libVituForm]=\"clientForm\" (libVituFormSubmit)=\"onSubmit()\">\n\n <div class=\"form-inner-container\">\n\n <lib-vitu-form-field-input\n class=\"field\"\n [formGroup]=\"clientForm\"\n formFieldName=\"name\"\n label=\"Name\"\n [disabled]=\"!isCreate && !hasUpdateClientPermission\">\n </lib-vitu-form-field-input>\n\n <lib-vitu-form-field-select\n class=\"field\"\n [formGroup]=\"clientForm\"\n formFieldName=\"roleIds\"\n multiple\n label=\"Role(s)\"\n [options]=\"groupedRoleList\"\n optionLabelKey=\"name\"\n optionValueKey=\"id\"\n [groups]=\"roleGroups\"\n [disabled]=\"!isCreate && !hasUpdateClientPermission\">\n </lib-vitu-form-field-select>\n\n <div class=\"actions-line\" *ngIf=\"!isCreate\">\n\n <div class=\"action-buttons\">\n\n <lib-action-button\n *ngIf=\"hasDeleteClientPermission\"\n id=\"deleteClientButton\"\n class=\"action-button\"\n label=\"Delete Client\"\n fontImage=\"far fa-trash fa-bg\"\n [kind]=\"ActionButtonKind.ALERT\"\n [disabled]=\"loading || !client\"\n (click)=\"onClickDeleteClient()\">\n </lib-action-button>\n\n <lib-action-button\n *ngIf=\"hasCreateSecretPermission\"\n id=\"createSecretButton\"\n class=\"action-button\"\n label=\"Create Secret\"\n [kind]=\"ActionButtonKind.SECONDARY\"\n fontImage=\"far fa-plus-circle fa-bg\"\n (click)=\"onClickCreateSecret()\">\n </lib-action-button>\n \n </div>\n\n </div>\n\n <lib-vitu-form-buttons>\n\n <lib-vitu-form-abort-button\n (onAbort)=\"onClickBack()\">\n </lib-vitu-form-abort-button>\n \n <lib-vitu-form-submit-button\n *ngIf=\"isCreate || hasUpdateClientPermission\"\n [label]=\"submitButtonText\"\n [neverDisable]=\"isCreate\">\n </lib-vitu-form-submit-button>\n \n </lib-vitu-form-buttons>\n\n <div class=\"tabs-container\">\n\n <mat-tab-group *ngIf=\"!isCreate\" class=\"tab-group\" [selectedIndex]=\"0\">\n \n <mat-tab [label]=\"getSecretsTabLabel()\">\n \n <lib-table-base\n class=\"tab-container\"\n [columnDefs]=\"secretsColumnDefs\"\n [rowsData]=\"secrets ? secrets : []\"\n [rowsDataLoading]=\"secretsLoading\"\n [rowsDataError]=\"secretsError\"\n rowsDataErrorMessage=\"Error Loading Secrets\"\n [rowsDataShowWhileLoading]=\"true\"\n rowsDataEmptyMessage=\"No Secrets\"\n selectedRowProperty=\"id\"\n (rowSelected)=\"onSecretRowSelected($event)\">\n \n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-client-secrets-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\"\n (deleteClientSecret)=\"onDeleteClientSecret($event)\">\n </app-client-secrets-table-cell-content>\n </ng-template>\n </lib-table-base>\n \n </mat-tab>\n \n </mat-tab-group>\n \n </div>\n\n </div>\n\n </form>\n\n</ng-template>\n","import { Component, EventEmitter, Input, OnInit, OnChanges, Output, SimpleChanges } from \"@angular/core\";\nimport { AbstractControl, FormArray, UntypedFormBuilder, Validators } from \"@angular/forms\";\nimport { ActionButtonKind, ColumnDef, LocalTimePoint, ValidatorsVituCustom } from \"shared-lib\";\nimport { CurrentUserDto } from \"@merchant_app/storage/current-user/current-user.state\";\nimport { UpdateClientDto } from \"@merchant_api/models/update-client-dto\";\nimport { CreateClientDto } from \"@merchant_api/models/create-client-dto\";\nimport { RoleDto } from \"@merchant_api/models/role-dto\";\nimport { ClientDetailsDto } from \"@merchant_api/models/client-details-dto\";\nimport { ClientSecretDto } from \"@merchant_api/models/client-secret-dto\";\nimport { CurrentUserPermissions } from \"@merchant_app/shared/current-user-permissions\";\n\ntype FormConfig<T> = { [P in keyof T]: any[] };\ntype FormControls<T> = { [P in keyof T]: AbstractControl };\n\n@Component({\n selector: \"app-client-details\",\n templateUrl: \"./client-details.component.html\",\n styleUrls: [\"./client-details.component.less\"],\n})\nexport class ClientDetailsComponent implements OnInit, OnChanges {\n\n @Input() isCreate: boolean;\n @Input() client: ClientDetailsDto;\n @Input() rolesLookup: Array<RoleDto>;\n @Input() currentUser: CurrentUserDto;\n @Input() loading: boolean;\n @Input() secrets: Array<ClientSecretDto>;\n @Input() secretsLoading: boolean;\n @Input() secretsError: Error;\n\n @Output() deleteClient = new EventEmitter<number>();\n @Output() updateClient = new EventEmitter<{id: number; client: UpdateClientDto}>();\n @Output() createClient = new EventEmitter<CreateClientDto>();\n @Output() back = new EventEmitter<void>();\n @Output() createClientSecret = new EventEmitter<void>();\n @Output() deleteClientSecret = new EventEmitter<number>();\n\n submitButtonText: string;\n\n ActionButtonKind = ActionButtonKind;\n LocalTimePoint = LocalTimePoint;\n\n get secretsColumnDefs(): ColumnDef[] {\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n const retVal: ColumnDef[] = [\n {id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n {id: \"type\", title: \"Type\", flexWidthBasisInPixels: 160, flexWidthGrow: 1, canSort: true},\n {id: \"value\", title: \"Value\", flexWidthBasisInPixels: 470, flexWidthGrow: 2},\n {id: \"description\", title: \"Description\", flexWidthBasisInPixels: 230, flexWidthGrow: 1, canSort: true},\n {id: \"expirationDate\", title: `Expiration Date (${LocalTimePoint.formatZ()})`,\n flexWidthBasisInPixels: 180, flexWidthGrow: 0, canSort: true},\n {id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n ];\n if (this.hasDeleteSecretPermission) {\n const deleteSecretColumn: ColumnDef = {id: \"delete\", title: \"Delete\", flexWidthBasisInPixels: 40, flexWidthGrow: 0};\n retVal.splice(5, 0, deleteSecretColumn);\n }\n return retVal;\n }\n\n constructor(\n private fb: UntypedFormBuilder,\n private currPerms: CurrentUserPermissions\n ) {}\n\n clientForm = this.fb.group({\n name: [null, [Validators.required]],\n roleIds: [null, [ValidatorsVituCustom.selectMultiIntegrity(() => this.rolesLookup?.map((role) => role.id))]]\n });\n\n get formControls(): FormControls<any> { return this.clientForm.controls; }\n\n ngOnInit() {\n this.submitButtonText = (this.isCreate ? \"Submit\" : \"Update\");\n }\n\n get pageTitle(): string {\n let firstPart: string;\n if (this.isCreate) {\n firstPart = \"New\";\n }\n else if(this.hasUpdateClientPermission) {\n firstPart = \"Edit\";\n }\n else {\n firstPart = \"View\";\n }\n return firstPart + \" Client\";\n }\n\n ngOnChanges(changes: SimpleChanges) {\n\n if (\"client\" in changes && this.client) {\n\n this.clientForm.patchValue(this.client);\n\n if (!this.isCreate) {\n this.clientForm.markAllAsTouched();\n }\n }\n\n }\n\n onClickDeleteClient() {\n\n this.deleteClient.emit(this.client.id);\n }\n\n onClickCreateSecret() {\n\n this.createClientSecret.emit();\n }\n\n onDeleteClientSecret(secretId: number) {\n\n this.deleteClientSecret.emit(secretId);\n }\n\n onClickBack() {\n\n this.back.emit();\n }\n\n getSecretsTabLabel(): string {\n let count = 0;\n if (this.secrets?.length) {\n count = this.secrets?.length;\n }\n return this.appendCountIfNecessary(\"Secrets\", count);\n }\n\n onSecretRowSelected(secretId: number) {\n }\n\n onSubmit() {\n\n const clientForm = this.clientForm.value;\n\n const name = clientForm.name;\n const roleIds = clientForm.roleIds;\n\n if (this.isCreate) {\n const createClientDto: CreateClientDto = {\n name,\n roleIds\n };\n this.createClient.emit(createClientDto);\n }\n else {\n const updateClientDto: UpdateClientDto = {\n name,\n roleIds\n };\n this.updateClient.emit({\n id: this.client.id,\n client: updateClientDto\n });\n }\n\n }\n\n get globalRoleList() {\n let retVal = [];\n if (this.rolesLookup?.length) {\n retVal = retVal.concat(this.rolesLookup.filter(role => !role.isCustom));\n }\n return retVal.sort(ClientDetailsComponent.compareRole);\n }\n\n get customRoleList() {\n let retVal = [];\n if (this.rolesLookup?.length) {\n retVal = retVal.concat(this.rolesLookup.filter(role => role.isCustom));\n }\n return retVal.sort(ClientDetailsComponent.compareRole);\n }\n\n get groupedRoleList() {\n return this.globalRoleList.concat(this.customRoleList);\n }\n\n get hasUpdateClientPermission(): boolean {\n return this.currPerms.has([\"core.clients.update\"]);\n }\n\n get hasDeleteClientPermission(): boolean {\n return this.currPerms.has([\"core.clients.delete\"]);\n }\n\n get hasCreateSecretPermission(): boolean {\n return this.currPerms.has([\"core.clients.create-secret\"]);\n }\n\n get hasDeleteSecretPermission(): boolean {\n return this.currPerms.has([\"core.clients.delete-secret\"]);\n }\n\n get roleGroups() {\n\n const groups = [];\n let currentMinIdx = 0;\n\n if (this.globalRoleList?.length) {\n groups.push({name: \"\", minIdx: 0, maxIdx: this.globalRoleList.length - 1});\n currentMinIdx = this.globalRoleList.length;\n }\n if (this.customRoleList?.length) {\n groups.push({name: \"CUSTOM\", minIdx: currentMinIdx, maxIdx: currentMinIdx + this.customRoleList.length - 1});\n }\n\n return JSON.stringify(groups);\n }\n\n private static compareRole(a: RoleDto, b: RoleDto): number {\n const aVal = a.name?.toLowerCase();\n const bVal = b.name?.toLowerCase();\n if (aVal > bVal) {\n return 1;\n }\n else if (aVal < bVal) {\n return -1;\n }\n return 0;\n }\n\n private appendCountIfNecessary(title: string, count: number): string {\n return title + ((count > 0) ? ` (${count})` : \"\");\n }\n\n}\n","import { Component, OnInit } from \"@angular/core\";\nimport { Store } from \"@ngrx/store\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport * as ClientActions from \"@merchant_app/storage/client/client.actions\";\nimport * as ClientSelectors from \"@merchant_app/storage/client/client.selectors\";\nimport * as CurrentUserSelectors from \"@merchant_app/storage/current-user/current-user.selectors\";\nimport * as ClientSecretsActions from \"@merchant_app/storage/client-secrets/client-secrets.actions\";\nimport * as ClientSecretsSelectors from \"@merchant_app/storage/client-secrets/client-secrets.selectors\";\nimport { GoBackAction } from \"@merchant_app/storage/router/router.actions\";\nimport { UpdateClientDto } from \"@merchant_api/models/update-client-dto\";\nimport { CreateClientDto } from \"@merchant_api/models/create-client-dto\";\n\n@Component({\n selector: \"app-client\",\n templateUrl: \"./client.component.html\",\n styleUrls: [\"./client.component.less\"]\n})\nexport class ClientComponent implements OnInit {\n\n constructor(\n private store: Store<IStore>,\n private route: ActivatedRoute,\n ) {}\n\n client$ = this.store.select(ClientSelectors.getClientInfo);\n rolesLookup$ = this.store.select(ClientSelectors.getClientRoles);\n loading$ = this.store.select(ClientSelectors.getClientLoading);\n currentUser$ = this.store.select(CurrentUserSelectors.getCurrentUser);\n secrets$ = this.store.select(ClientSecretsSelectors.getClientSecrets);\n secretsLoading$ = this.store.select(ClientSecretsSelectors.getClientSecretsLoading);\n secretsError$ = this.store.select(ClientSecretsSelectors.getClientSecretsError);\n\n isCreate: boolean;\n\n ngOnInit() {\n\n this.isCreate = !this.route.snapshot.params.id;\n\n if (this.isCreate) {\n this.store.dispatch(new ClientActions.GetNewClientAction());\n }\n else {\n this.store.dispatch(new ClientSecretsActions.ResetClientSecretsAction());\n this.store.dispatch(new ClientSecretsActions.GetClientSecretsAction(this.route.snapshot.params.id));\n this.store.dispatch(new ClientActions.GetClientAction(this.route.snapshot.params.id));\n }\n }\n\n onUpdateClient(payload: {id: number; client: UpdateClientDto}) {\n\n this.store.dispatch(new ClientActions.UpdateClientAction(payload.id, payload.client));\n }\n\n onCreateClient(client: CreateClientDto) {\n\n this.store.dispatch(new ClientActions.CreateClientAction(client));\n }\n\n onDeleteClient(clientId: number) {\n\n this.store.dispatch(new ClientActions.DeleteClientAction(clientId));\n }\n\n onBack(): void {\n\n this.store.dispatch(GoBackAction());\n }\n\n onCreateClientSecret(): void {\n\n this.store.dispatch(new ClientActions.AddClientSecretAction());\n }\n\n onDeleteClientSecret(secretId: number): void {\n\n this.store.dispatch(new ClientActions.DeleteClientSecretAction(secretId));\n }\n\n}\n","<app-client-details\n [isCreate]=\"isCreate\"\n [client]=\"client$ | async\"\n [rolesLookup]=\"rolesLookup$ | async\"\n [currentUser]=\"currentUser$ | async\"\n [loading]=\"loading$ | async\"\n [secrets]=\"secrets$ | async\"\n [secretsLoading]=\"secretsLoading$ | async\"\n [secretsError]=\"secretsError$ | async\"\n (deleteClient)=\"onDeleteClient($event)\"\n (updateClient)=\"onUpdateClient($event)\"\n (createClient)=\"onCreateClient($event)\"\n (createClientSecret)=\"onCreateClientSecret()\"\n (deleteClientSecret)=\"onDeleteClientSecret($event)\"\n (back)=\"onBack()\">\n</app-client-details>\n","import { Action } from \"@ngrx/store\";\nimport { PagedDataDtoOfTidResult } from \"@merchant_api/models/paged-data-dto-of-tid-result\";\n\nexport enum ActionTypes {\n ResetTids = \"[TIDS] ResetTids\",\n GetTids = \"[TIDS] GetTids\",\n GetTidsSucceed = \"[TIDS] GetTidsSucceed\",\n GetTidsFail = \"[TIDS] GetTidsFail\",\n PageChangedTids = \"[TIDS] PageChangedTids\"\n}\n\nexport class ResetTidsAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.ResetTids;\n}\n\nexport class GetTidsAction implements Action {\n\n constructor(public page: number, public pageSize?: number) {}\n\n readonly type = ActionTypes.GetTids;\n}\n\nexport class GetTidsSucceedAction implements Action {\n\n constructor(\n public response: PagedDataDtoOfTidResult,\n public pageSize: number,\n public page: number) {}\n\n readonly type = ActionTypes.GetTidsSucceed;\n}\n\nexport class GetTidsFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetTidsFail;\n}\n\nexport class PageChangedTidsAction implements Action {\n\n constructor(public page: number) {}\n\n readonly type = ActionTypes.PageChangedTids;\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getTidsState = (store: IStore) => store.tids;\n\nexport const getTids = createSelector(\n getTidsState,\n tidsState => tidsState.record\n);\n\nexport const getTidsLoading = createSelector(\n getTidsState,\n tidsState => tidsState.loading\n);\n\nexport const getTidsError = createSelector(\n getTidsState,\n tidsState => tidsState.error\n);\n\nexport const getTidsPager = createSelector(\n getTidsState,\n tidsState => tidsState.pager\n);\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"'tid'\">\n <lib-text-table-column>\n {{ element.tid }}\n </lib-text-table-column>\n </ng-container>\n \n <ng-container *ngSwitchCase=\"'mid'\">\n <lib-text-table-column>\n {{ element.mid }}\n </lib-text-table-column>\n </ng-container>\n \n <ng-container *ngSwitchCase=\"'gateway'\">\n <lib-text-table-column>\n {{ element.gateway }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'feePlan'\">\n <lib-text-table-column>\n {{ element.feePlan }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'surchargePercent'\">\n <lib-text-table-column>\n {{ element.surcharge?.percent | vituPercentage }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'deviceSerial'\">\n <lib-text-table-column>\n {{ cloverPosConfig?.deviceSerial }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'deviceName'\">\n <lib-text-table-column>\n {{ cloverPosConfig?.deviceName }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'deviceManufacturer'\">\n <lib-text-table-column>\n {{ cloverPosConfig?.deviceManufacturer }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'deviceModel'\">\n <lib-text-table-column>\n {{ cloverPosConfig?.deviceModel }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'deviceLocation'\">\n <lib-text-table-column>\n {{ cloverPosConfig?.deviceLocation }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'status'\">\n <lib-status-chip\n *ngIf=\"cloverPosConfig?.status; else noPosTerminalStatus\"\n class=\"pos-terminal-statuses\"\n [status]=\"cloverPosConfig?.status\">\n </lib-status-chip>\n <ng-template #noPosTerminalStatus>\n <lib-text-table-column>\n </lib-text-table-column>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n\n\n\n\n\n","import { Component, Input } from \"@angular/core\";\nimport { CloverPosConfig } from \"@merchant_api/models/clover-pos-config\";\nimport { TidResult } from \"@merchant_api/models/tid-result\";\n\n@Component({\n selector: \"app-configurations-table-cell-content\",\n templateUrl: \"./configurations-table-cell-content.component.html\",\n styleUrls: [\"./configurations-table-cell-content.component.less\"],\n})\nexport class ConfigurationsTableCellContentComponent {\n\n @Input() columnId: string;\n @Input() element: TidResult;\n\n get cloverPosConfig(): null | CloverPosConfig {\n\n if (this.element?.config?.$type === \"CloverPos\") {\n return this.element?.config;\n }\n\n return null;\n }\n\n}\n","<div class=\"outer-container\">\n\n <lib-title-bar [crumbs]=\"[{ 'label': 'Configurations' }]\">\n </lib-title-bar>\n\n <lib-table-base\n class=\"tids-table\"\n [columnDefs]=\"tidColumnDefs\"\n [rowsData]=\"tids\"\n [rowsDataLoading]=\"loading\"\n [rowsDataError]=\"error\"\n rowsDataErrorMessage=\"Error Loading Configurations\"\n [rowsDataShowWhileLoading]=\"true\"\n selectedRowProperty=\"id\"\n [pager]=\"pager\"\n (pageChanged)=\"pageChanged.emit($event)\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-configurations-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\">\n </app-configurations-table-cell-content>\n </ng-template>\n </lib-table-base>\n\n</div>\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { ColumnDef, Pager } from \"shared-lib\";\nimport { TidResult } from \"@merchant_api/models/tid-result\";\n\n@Component({\n selector: \"app-configuration-log\",\n templateUrl: \"./configuration-log.component.html\",\n styleUrls: [ \"./configuration-log.component.less\" ]\n})\nexport class ConfigurationLogComponent {\n\n @Input() tids: Array<TidResult>;\n @Input() loading = false;\n @Input() error: Error;\n\n @Input() pager: Pager;\n\n @Output() pageChanged = new EventEmitter<number>();\n\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n tidColumnDefs: ColumnDef[] = [\n { id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n { id: \"tid\", title: \"TID\", flexWidthBasisInPixels: 130, flexWidthGrow: 1},\n { id: \"mid\", title: \"MID\", flexWidthBasisInPixels: 140, flexWidthGrow: 1},\n { id: \"gateway\", title: \"Gateway\", flexWidthBasisInPixels: 90, flexWidthGrow: 1},\n { id: \"feePlan\", title: \"Fee Plan\", flexWidthBasisInPixels: 80, flexWidthGrow: 1},\n { id: \"surchargePercent\", title: \"Surcharge\", flexWidthBasisInPixels: 80, flexWidthGrow: 1},\n { id: \"deviceSerial\", title: \"Device Serial\", flexWidthBasisInPixels: 110, flexWidthGrow: 1},\n { id: \"deviceName\", title: \"Device Name\", flexWidthBasisInPixels: 115, flexWidthGrow: 1},\n { id: \"deviceManufacturer\", title: \"Device Manufacturer\", flexWidthBasisInPixels: 100, flexWidthGrow: 1},\n { id: \"deviceModel\", title: \"Device Model\", flexWidthBasisInPixels: 80, flexWidthGrow: 1},\n { id: \"deviceLocation\", title: \"Location\", flexWidthBasisInPixels: 70, flexWidthGrow: 1},\n { id: \"status\", title: \"Status\", flexWidthBasisInPixels: 100, flexWidthGrow: 1},\n { id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n ];\n\n}\n","import { Component, OnInit } from \"@angular/core\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { Store } from \"@ngrx/store\";\n\nimport * as TidsActions from \"@merchant_app/storage/tids/tids.actions\";\nimport * as TidsSelectors from \"@merchant_app/storage/tids/tids.selectors\";\n\n@Component({\n selector: \"app-configurations\",\n templateUrl: \"./configurations.component.html\",\n styleUrls: [ \"./configurations.component.less\" ]\n})\nexport class ConfigurationsComponent implements OnInit {\n\n tids$ = this.store.select(TidsSelectors.getTids);\n\n loading$ = this.store.select(TidsSelectors.getTidsLoading);\n\n error$ = this.store.select(TidsSelectors.getTidsError);\n\n pager$ = this.store.select(TidsSelectors.getTidsPager);\n\n constructor(private store: Store<IStore>) {}\n\n ngOnInit() {\n this.store.dispatch(new TidsActions.GetTidsAction(1));\n }\n\n onPageChanged(page: number) {\n this.store.dispatch(new TidsActions.PageChangedTidsAction(page));\n }\n\n}\n","<app-configuration-log\n [tids]=\"tids$ | async\"\n [loading]=\"loading$ | async\"\n [error]=\"error$ | async\"\n [pager]=\"pager$ | async\"\n (pageChanged)=\"onPageChanged($event)\">\n</app-configuration-log>\n","import { PagedDataDtoOfFundingInstruction } from \"@merchant_api/models/paged-data-dto-of-funding-instruction\";\nimport { Action } from \"@ngrx/store\";\nimport { Filter, Sorting } from \"./funding.state\";\n\nexport enum ActionTypes {\n GetFunding = \"[FUNDING] GetFunding\",\n GetFundingSucceed = \"[FUNDING] GetFundingSucceed\",\n GetFundingFail = \"[FUNDING] GetFundingFail\",\n SortFunding = \"[FUNDING] SortFunding\",\n PageChangedFunding = \"[FUNDING] PageChangedFunding\",\n FilterFunding = \"[FUNDING] FilterFunding\",\n}\n\nexport class GetFundingAction implements Action {\n\n constructor(public page: number, public pageSize?: number, public filter?: Filter, public sorting?: Sorting) {}\n\n readonly type = ActionTypes.GetFunding;\n}\n\nexport class GetFundingSucceedAction implements Action {\n\n constructor(\n public response: PagedDataDtoOfFundingInstruction,\n public pageSize: number,\n public page: number,\n public stateExtensions?: any) {}\n\n readonly type = ActionTypes.GetFundingSucceed;\n}\n\nexport class GetFundingFailAction implements Action {\n\n constructor(public error: Error) {}\n\n readonly type = ActionTypes.GetFundingFail;\n}\n\nexport class SortFundingAction implements Action {\n\n constructor(public sorting: Sorting) {}\n\n readonly type = ActionTypes.SortFunding;\n}\n\nexport class PageChangedFundingAction implements Action {\n\n constructor(public page: number) {}\n\n readonly type = ActionTypes.PageChangedFunding;\n}\n\nexport class FilterFundingAction implements Action {\n\n constructor(public filter: Filter) {}\n\n readonly type = ActionTypes.FilterFunding;\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getFundingState = (store: IStore) => store.funding;\n\nexport const getFunding = createSelector(\n getFundingState,\n fundingState => fundingState.record\n);\n\nexport const getFundingLoading = createSelector(\n getFundingState,\n fundingState => fundingState.loading\n);\n\nexport const getFundingError = createSelector(\n getFundingState,\n fundingState => fundingState.error\n);\n\nexport const getFundingSorting = createSelector(\n getFundingState,\n fundingState => fundingState.sorting\n);\n\nexport const getFundingPager = createSelector(\n getFundingState,\n fundingState => fundingState.pager\n);\n\nexport const getFundingFilter = createSelector(\n getFundingState,\n fundingState => fundingState.filter\n);\n","/* tslint:disable */\n/* eslint-disable */\nexport enum FundingInstructionsOrderBy {\n Ref = 'Ref',\n MID = 'MID',\n DateCreated = 'DateCreated',\n FundingStatus = 'FundingStatus',\n DateFunded = 'DateFunded'\n}\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"FundingInstructionsOrderBy.MID\">\n <lib-text-table-column>\n {{ element.mid }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"FundingInstructionsOrderBy.DateCreated\">\n <lib-date-time-label [dateUtc]=\"element.dateCreated\"></lib-date-time-label>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'vituPayDepositAmount'\">\n <lib-text-table-column>\n {{ element.vituPayDepositAmount | vituCurrencyUsd }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'merchantDepositAmount'\">\n <lib-text-table-column>\n {{ element.merchantDepositAmount | vituCurrencyUsd }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"FundingInstructionsOrderBy.FundingStatus\">\n <lib-funding-item-status-chip\n [status]=\"element.fundingStatus\">\n </lib-funding-item-status-chip>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"FundingInstructionsOrderBy.DateFunded\">\n <lib-date-time-label [dateUtc]=\"element.dateFunded\"></lib-date-time-label>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n","import { Component, Input } from \"@angular/core\";\nimport { FundingInstructionsOrderBy } from \"@merchant_api/models/funding-instructions-order-by\";\n\n@Component({\n selector: \"app-funding-table-cell-content\",\n templateUrl: \"./funding-table-cell-content.component.html\",\n styleUrls: [\"./funding-table-cell-content.component.less\"],\n})\nexport class FundingTableCellContentComponent {\n\n @Input() columnId: string;\n @Input() element: any;\n\n FundingInstructionsOrderBy = FundingInstructionsOrderBy;\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nexport enum FundingStatus {\n Processing = 'Processing',\n Success = 'Success',\n Error = 'Error',\n OnHold = 'OnHold',\n NoFunding = 'NoFunding',\n Funded = 'Funded',\n InsufficientFunds = 'InsufficientFunds',\n Rejected = 'Rejected',\n Reprocessed = 'Reprocessed',\n MissingBalance = 'MissingBalance'\n}\n","/* tslint:disable */\n/* eslint-disable */\nexport enum ProcessorEnum {\n Fiserv = 'Fiserv',\n PayPal = 'PayPal'\n}\n","<lib-filters-base\n #filtersBase\n [filterForm]=\"filterForm\"\n (filterChanged)=\"onFilterChanged($event)\"\n [filter]=\"filter\"\n suppressInitialRequest>\n\n <div [formGroup]=\"filterForm\"> <!-- required -->\n\n <ng-template #basicFilters>\n\n <div class=\"global-form-line-regular-layout\">\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-date\n [formGroup]=\"filterForm\"\n formFieldName=\"localDateInterval\"\n label=\"Date Created\"\n [clearValue]=\"filter?._initialFilter?.localDateInterval\"\n restrictFuture\n isFilter\n readonly>\n </lib-vitu-form-field-date>\n </div>\n \n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"fundingStatuses\"\n isFilter\n multiple\n label=\"Funding Status\"\n [options]=\"fundingStatusList\"\n [showReset]=\"filtersBase.resetFieldVisible('fundingStatuses')\"\n (handleReset)=\"wipeField('fundingStatuses')\"\n [spaceBetweenCapsOnLabels]=\"true\">\n </lib-vitu-form-field-select>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"mid\"\n label=\"MID\"\n isFilter\n autocomplete=\"off\"\n [maxlength]=\"100\"\n [showReset]=\"filtersBase.resetFieldVisible('mid')\"\n (handleReset)=\"filtersBase.resetField('mid')\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-date\n [formGroup]=\"filterForm\"\n formFieldName=\"localFundedDateInterval\"\n label=\"Date Funded\"\n restrictFuture\n isFilter\n readonly>\n </lib-vitu-form-field-date>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"processors\"\n isFilter\n multiple\n label=\"Processor\"\n [options]=\"processorList\"\n [showReset]=\"filtersBase.resetFieldVisible('processors')\"\n (handleReset)=\"filtersBase.resetField('processors')\">\n </lib-vitu-form-field-select>\n </div>\n<!--\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"dba\"\n label=\"DBA\"\n isFilter\n autocomplete=\"off\"\n [maxlength]=\"100\"\n [showReset]=\"filtersBase.resetFieldVisible('dba')\"\n (handleReset)=\"filtersBase.resetField('dba')\">\n </lib-vitu-form-field-input>\n </div>\n-->\n </div>\n\n </ng-template>\n\n </div>\n\n</lib-filters-base>\n","import { Component, Input, Output, EventEmitter } from \"@angular/core\";\nimport { UntypedFormBuilder } from \"@angular/forms\";\nimport { Filter } from \"@merchant_app/storage/funding/funding.state\";\nimport { LocalTimePoint } from \"shared-lib\";\nimport { FundingStatus } from \"@merchant_api/models/funding-status\";\nimport { ProcessorEnum } from \"@merchant_api/models/processor-enum\";\n\n@Component({\n selector: \"app-funding-log-filters\",\n templateUrl: \"./funding-log-filters.component.html\",\n styleUrls: [\"./funding-log-filters.component.less\"]\n})\nexport class FundingLogFiltersComponent {\n\n @Output() filterChanged = new EventEmitter<Filter>();\n @Input() filter: Filter;\n\n LocalTimePoint = LocalTimePoint;\n\n fundingStatusList: Array<FundingStatus>;\n processorList: Array<ProcessorEnum>;\n\n constructor(\n private fb: UntypedFormBuilder\n ) {\n this.fundingStatusList = Object.values(FundingStatus);\n\n // Remove 'Processing' item from current position\n const processingIndex = this.fundingStatusList.findIndex((element) => element === FundingStatus.Processing);\n this.fundingStatusList.splice(processingIndex, 1);\n\n this.processorList = Object.values(ProcessorEnum);\n }\n\n filterForm = this.fb.group({\n localDateInterval: [null],\n fundingStatuses: [null],\n mid: [null],\n dba: [null],\n localFundedDateInterval: [null],\n processors: [null]\n });\n\n onFilterChanged(filter: Filter) {\n this.filterChanged.emit(filter);\n }\n\n wipeField(fieldName: string) {\n this.filterForm.get(fieldName).setValue(undefined);\n this.filterForm.updateValueAndValidity();\n }\n\n}\n","<div class=\"outer-container\">\n\n <lib-title-bar\n [crumbs]=\"[{ 'label': 'Funding' }]\">\n </lib-title-bar>\n\n <app-funding-log-filters\n [filter]=\"filter\"\n (filterChanged)=\"filterChanged.emit($event)\">\n </app-funding-log-filters>\n\n <lib-table-base\n class=\"funding-table\"\n [columnDefs]=\"columnDefs\"\n [rowsData]=\"funding\"\n [rowsDataLoading]=\"fundingLoading\"\n [rowsDataError]=\"fundingError\"\n rowsDataErrorMessage=\"Error Loading Funding\"\n [rowsDataShowWhileLoading]=\"true\"\n selectedRowProperty=\"ref\"\n [sorting]=\"sorting\"\n (sortingChanged)=\"onSortingChanged($event)\"\n [pager]=\"pager\"\n (pageChanged)=\"pageChanged.emit($event)\"\n (rowSelected)=\"onRowSelected($event)\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-funding-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\">\n </app-funding-table-cell-content>\n </ng-template>\n </lib-table-base>\n\n</div>\n","import { Filter, Sorting } from \"@merchant_app/storage/funding/funding.state\";\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { ColumnDef, LocalTimePoint, Pager, TableSorting } from \"shared-lib\";\nimport { FundingInstruction } from \"@merchant_api/models/funding-instruction\";\nimport { FundingInstructionsOrderBy } from \"@merchant_api/models/funding-instructions-order-by\";\nimport { CurrentUserPermissions } from \"@merchant_app/shared/current-user-permissions\";\n\n@Component({\n selector: \"app-funding-log\",\n templateUrl: \"./funding-log.component.html\",\n styleUrls: [\"./funding-log.component.less\"],\n})\nexport class FundingLogComponent {\n\n @Input() funding: Array<FundingInstruction>;\n @Input() fundingLoading = false;\n @Input() fundingError: Error;\n @Input() sorting: Sorting = {\n orderBy: null,\n orderDirection: null\n };\n @Input() pager: Pager;\n\n @Output() sortingChanged = new EventEmitter<Sorting>();\n @Output() pageChanged = new EventEmitter<number>();\n\n @Input() filter: Filter;\n @Output() filterChanged = new EventEmitter<Filter>();\n\n readonly columnDefs: ColumnDef[];\n\n constructor(private router: Router, private currPerms: CurrentUserPermissions) {\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n this.columnDefs = [\n {id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n {id: FundingInstructionsOrderBy.DateCreated, title: `Date Created (${LocalTimePoint.formatZ()})`,\n flexWidthBasisInPixels: 130, flexWidthGrow: 1, canSort: true},\n {id: FundingInstructionsOrderBy.MID, title: \"MID\", flexWidthBasisInPixels: 170, flexWidthGrow: 1, canSort: true},\n {id: \"vituPayDepositAmount\", title: \"VituPay Deposit Amount\", flexWidthBasisInPixels: 120, flexWidthGrow: 1, canSort: false},\n {id: \"merchantDepositAmount\", title: \"Merchant Deposit Amount\", flexWidthBasisInPixels: 120, flexWidthGrow: 1, canSort: false},\n {id: FundingInstructionsOrderBy.FundingStatus, title: \"Funding Status\",\n flexWidthBasisInPixels: 150, flexWidthGrow: 1, canSort: true},\n {id: FundingInstructionsOrderBy.DateFunded, title: `Date Funded (${LocalTimePoint.formatZ()})`,\n flexWidthBasisInPixels: 100, flexWidthGrow: 1, canSort: true},\n {id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n ];\n }\n\n onSortingChanged(sorting: TableSorting) {\n this.sortingChanged.emit({\n orderBy: sorting.orderBy as any,\n orderDirection: sorting.orderDirection\n });\n }\n\n onRowSelected(id: string) {\n if (this.currPerms.has([\"core.funding.get\"])) {\n this.router.navigate([`/dashboard/funding/${id}`]);\n }\n }\n\n}\n","import { IStore } from \"@merchant_app/storage/store\";\nimport { Component } from \"@angular/core\";\nimport { Store } from \"@ngrx/store\";\nimport { Filter, Sorting } from \"@merchant_app/storage/funding/funding.state\";\n\nimport * as FundingActions from \"@merchant_app/storage/funding/funding.actions\";\nimport * as FundingSelectors from \"@merchant_app/storage/funding/funding.selectors\";\n\n@Component({\n selector: \"app-funding\",\n templateUrl: \"./funding.component.html\",\n styleUrls: [\"./funding.component.less\"],\n})\nexport class FundingComponent {\n\n funding$ = this.store.select(FundingSelectors.getFunding);\n fundingLoading$ = this.store.select(FundingSelectors.getFundingLoading);\n fundingError$ = this.store.select(FundingSelectors.getFundingError);\n\n pager$ = this.store.select(FundingSelectors.getFundingPager);\n sorting$ = this.store.select(FundingSelectors.getFundingSorting);\n filter$ = this.store.select(FundingSelectors.getFundingFilter);\n\n constructor(private store: Store<IStore>) {}\n\n onSortingChanged(sorting: Sorting) {\n this.store.dispatch(new FundingActions.SortFundingAction(sorting));\n }\n\n onPageChanged(page: number) {\n this.store.dispatch(new FundingActions.PageChangedFundingAction(page));\n }\n\n onFilterChanged(filter: Filter) {\n this.store.dispatch(new FundingActions.FilterFundingAction(filter));\n }\n\n}\n","<app-funding-log\n [funding]=\"funding$ | async\"\n [fundingLoading]=\"fundingLoading$ | async\"\n [fundingError]=\"fundingError$ | async\"\n [sorting]=\"sorting$ | async\"\n (sortingChanged)=\"onSortingChanged($event)\"\n [pager]=\"pager$ | async\"\n (pageChanged)=\"onPageChanged($event)\"\n [filter]=\"filter$ | async\"\n (filterChanged)=\"onFilterChanged($event)\">\n</app-funding-log>\n","import { AdjustmentDto } from \"@merchant_api/models/adjustment-dto\";\nimport { FundingFee } from \"@merchant_api/models/funding-fee\";\nimport { FundingInstructionDetails } from \"@merchant_api/models/funding-instruction-details\";\nimport { PagedDataDtoOfFundingTransaction } from \"@merchant_api/models/paged-data-dto-of-funding-transaction\";\nimport { StrictHttpResponse } from \"@merchant_api/strict-http-response\";\nimport { Action } from \"@ngrx/store\";\nimport { TransactionsFilter, TransactionsSorting } from \"./funding-item.state\";\n\nexport enum ActionTypes {\n ResetFundingItem = \"[FUNDING_ITEM] ResetFundingItem\",\n GetFundingItem = \"[FUNDING_ITEM] GetFundingItem\",\n GetFundingItemSucceed = \"[FUNDING_ITEM] GetFundingItemSucceed\",\n GetFundingItemFail = \"[FUNDING_ITEM] GetFundingItemFail\",\n GetFundingItemTransactions = \"[FUNDING_ITEM] GetFundingItemTransactions\",\n GetFundingItemTransactionsSucceed = \"[FUNDING_ITEM] GetFundingItemTransactionsSucceed\",\n GetFundingItemTransactionsFail = \"[FUNDING_ITEM] GetFundingItemTransactionsFail\",\n PageChangedFundingItemTransactions=\"[FUNDING_ITEM] PageChangedFundingItemTransactions\",\n SortFundingItemTransactions=\"[FUNDING_ITEM] SortFundingItemTransactions\",\n FilterFundingItemTransactions=\"[FUNDING_ITEM] FilterFundingItemTransactions\",\n ExportTransactionsToCsv=\"[FUNDING_ITEM] ExportTransactionsToCsv\",\n ExportTransactionsToCsvSucceed=\"[FUNDING_ITEM] ExportTransactionsToCsvSucceed\",\n ExportTransactionsToCsvFail=\"[FUNDING_ITEM] ExportTransactionsToCsvFail\",\n GetFundingItemMidFees = \"[FUNDING_ITEM] GetFundingItemMidFees\",\n GetFundingItemMidFeesSucceed = \"[FUNDING_ITEM] GetFundingItemMidFeesSucceed\",\n GetFundingItemMidFeesFail = \"[FUNDING_ITEM] GetFundingItemMidFeesFail\",\n GetFundingItemAdjustments = \"[FUNDING_ITEM] GetFundingItemAdjustments\",\n GetFundingItemAdjustmentsSucceed = \"[FUNDING_ITEM] GetFundingItemAdjustmentsSucceed\",\n GetFundingItemAdjustmentsFail = \"[FUNDING_ITEM] GetFundingItemAdjustmentsFail\",\n}\n\nexport class ResetFundingItemAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.ResetFundingItem;\n}\n\nexport class GetFundingItemAction implements Action {\n\n constructor(public ref: string) {}\n\n readonly type = ActionTypes.GetFundingItem;\n}\n\nexport class GetFundingItemSucceedAction implements Action {\n\n constructor(\n public fundingItem: FundingInstructionDetails) {}\n\n readonly type = ActionTypes.GetFundingItemSucceed;\n}\n\nexport class GetFundingItemFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetFundingItemFail;\n}\n\nexport class PageChangedFundingItemTransactionsAction implements Action {\n\n constructor(public ref: string, public page: number) {}\n\n readonly type = ActionTypes.PageChangedFundingItemTransactions;\n}\n\nexport class SortFundingItemTransactionsAction implements Action {\n\n constructor(public ref: string, public sorting: TransactionsSorting) {}\n\n readonly type = ActionTypes.SortFundingItemTransactions;\n}\n\nexport class FilterFundingItemTransactionsAction implements Action {\n\n constructor(public ref: string, public filter: TransactionsFilter) {}\n\n readonly type = ActionTypes.FilterFundingItemTransactions;\n}\n\nexport class GetFundingItemTransactionsAction implements Action {\n\n constructor(\n public ref: string,\n public page: number,\n public pageSize?: number,\n public sorting?: TransactionsSorting,\n public filter?: TransactionsFilter,\n ) {}\n\n readonly type = ActionTypes.GetFundingItemTransactions;\n}\n\nexport class GetFundingItemTransactionsSucceedAction implements Action {\n\n constructor(\n public response: PagedDataDtoOfFundingTransaction,\n public pageSize: number,\n public page: number,\n public stateExtensions?: any) {}\n\n readonly type = ActionTypes.GetFundingItemTransactionsSucceed;\n}\n\nexport class GetFundingItemTransactionsFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetFundingItemTransactionsFail;\n}\n\nexport class ExportTransactionsToCsvAction implements Action {\n\n constructor(public ref: string) {}\n\n readonly type = ActionTypes.ExportTransactionsToCsv;\n}\n\nexport class ExportTransactionsToCsvSucceedAction implements Action {\n\n constructor(public response: StrictHttpResponse<Blob>) {}\n\n readonly type = ActionTypes.ExportTransactionsToCsvSucceed;\n}\n\nexport class ExportTransactionsToCsvFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.ExportTransactionsToCsvFail;\n}\n\nexport class GetFundingItemMidFeesAction implements Action {\n\n constructor(public ref: string) {}\n\n readonly type = ActionTypes.GetFundingItemMidFees;\n}\n\nexport class GetFundingItemMidFeesSucceedAction implements Action {\n\n constructor(public response: Array<FundingFee>) {}\n\n readonly type = ActionTypes.GetFundingItemMidFeesSucceed;\n}\n\nexport class GetFundingItemMidFeesFailAction implements Action {\n\n constructor(public error: Error) {}\n\n readonly type = ActionTypes.GetFundingItemMidFeesFail;\n}\n\nexport class GetFundingItemAdjustmentsAction implements Action {\n\n constructor(public ref: string) {}\n\n readonly type = ActionTypes.GetFundingItemAdjustments;\n}\n\nexport class GetFundingItemAdjustmentsSucceedAction implements Action {\n\n constructor(public response: Array<AdjustmentDto>) {}\n\n readonly type = ActionTypes.GetFundingItemAdjustmentsSucceed;\n}\n\nexport class GetFundingItemAdjustmentsFailAction implements Action {\n\n constructor(public error: Error) {}\n\n readonly type = ActionTypes.GetFundingItemAdjustmentsFail;\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getFundingItemState = (store: IStore) => store.fundingItem;\n\nexport const getFundingItem = createSelector(\n getFundingItemState,\n fundingItem => fundingItem.record\n);\n\nexport const getFundingItemLoading = createSelector(\n getFundingItemState,\n fundingItem => fundingItem.loading\n);\n\nexport const getFundingItemTransactions = createSelector(\n getFundingItemState,\n fundingItem => fundingItem.transactions\n);\n\nexport const getFundingItemTransactionsLoading = createSelector(\n getFundingItemState,\n fundingItem => fundingItem.transactionsLoading\n);\n\nexport const getFundingItemTransactionsError = createSelector(\n getFundingItemState,\n fundingItem => fundingItem.transactionsError\n);\n\nexport const getFundingItemTransactionsPager = createSelector(\n getFundingItemState,\n fundingItem => fundingItem.transactionsPager\n);\n\nexport const getFundingItemTransactionsSorting = createSelector(\n getFundingItemState,\n fundingItem => fundingItem.transactionsSorting\n);\n\nexport const getFundingItemTransactionsFilter = createSelector(\n getFundingItemState,\n fundingItem => fundingItem.transactionsFilter\n);\n\nexport const getFundingItemExportLoading = createSelector(\n getFundingItemState,\n fundingItem => fundingItem.exportLoading\n);\n\nexport const getFundingItemMidFees = createSelector(\n getFundingItemState,\n fundingItem => fundingItem.midFees\n);\n\nexport const getFundingItemMidFeesLoading = createSelector(\n getFundingItemState,\n fundingItem => fundingItem.midFeesLoading\n);\n\nexport const getFundingItemMidFeesError = createSelector(\n getFundingItemState,\n fundingItem => fundingItem.midFeesError\n);\n\nexport const getFundingItemAdjustments = createSelector(\n getFundingItemState,\n fundingItem => fundingItem.adjustments\n);\n\nexport const getFundingItemAdjustmentsLoading = createSelector(\n getFundingItemState,\n fundingItem => fundingItem.adjustmentsLoading\n);\n\nexport const getFundingItemAdjustmentsError = createSelector(\n getFundingItemState,\n fundingItem => fundingItem.adjustmentsError\n);\n","/* tslint:disable */\n/* eslint-disable */\nexport enum FundingTransactionOrderBy {\n TransactionId = 'TransactionId',\n Amount = 'Amount',\n DateCreated = 'DateCreated',\n CardBrand = 'CardBrand',\n CardNumber = 'CardNumber',\n PayerName = 'PayerName'\n}\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"FundingTransactionOrderBy.DateCreated\">\n <lib-date-time-label [dateUtc]=\"element.dateCreated\"></lib-date-time-label>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'type'\">\n <lib-text-table-column>\n {{ displayTextForTransactionType }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'status'\">\n <lib-transaction-status-chip\n [status]=\"element?.status\">\n </lib-transaction-status-chip>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"FundingTransactionOrderBy.Amount\">\n <lib-text-table-column>\n {{ element.amount | vituCurrencyUsd }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"FundingTransactionOrderBy.PayerName\">\n <lib-text-table-column>\n {{ getDisplayTextForPayerName() }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"FundingTransactionOrderBy.CardBrand\">\n <span *ngIf=\"element.card?.cardBrand\" class=\"card-image\">\n <i [class]=\"'fab fa-cc-' + element.card.cardBrand.toLowerCase() + ' fa-2x'\"></i>\n </span>\n <lib-text-table-column *ngIf=\"!element.card?.cardBrand\">\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"FundingTransactionOrderBy.CardNumber\">\n <lib-text-table-column>\n {{ getDisplayTextForCardNumber() }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"FundingTransactionOrderBy.TransactionId\">\n <lib-text-table-column>\n {{ element.id }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'feesOnly'\">\n <lib-binary-status-icon\n [value]=\"element?.feesOnly\"\n [showPositiveOnly]=\"true\">\n </lib-binary-status-icon>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'DigitalWallet'\">\n <lib-digital-wallet-image-table-column\n [kind]=\"element.digitalWallet\">\n </lib-digital-wallet-image-table-column>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n","import { Component, Input } from \"@angular/core\";\nimport { FundingTransactionOrderBy } from \"@merchant_api/models/funding-transaction-order-by\";\nimport { LocalTimePoint } from \"shared-lib\";\n\n@Component({\n selector: \"app-funding-item-transactions-table-cell-content\",\n templateUrl: \"./funding-item-transactions-table-cell-content.component.html\",\n styleUrls: [\"./funding-item-transactions-table-cell-content.component.less\"],\n})\nexport class FundingItemTransactionsTableCellContentComponent {\n\n LocalTimePoint = LocalTimePoint;\n FundingTransactionOrderBy = FundingTransactionOrderBy;\n\n @Input() columnId: string;\n @Input() element: any;\n\n getDisplayTextForPayerName() {\n let displayText;\n if (this.element.payer?.fullName) {\n displayText = `${this.element.payer.fullName}`.toUpperCase();\n }\n return displayText;\n }\n\n getDisplayTextForCardNumber() {\n let displayText;\n if ((this.element.card?.first6) && (this.element.card?.last4)) {\n displayText = `${this.element.card.first6}XXX${this.element.card?.last4}`;\n }\n return displayText;\n }\n\n get displayTextForTransactionType() {\n let suffix = \"\";\n if (this.element.isServiceFee) {\n suffix = \" (SF)\";\n }\n return `${this.element.type}${suffix}`;\n }\n\n}\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"'name'\">\n <lib-text-table-column>\n {{ element?.name }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'category'\">\n <lib-text-table-column>\n {{ element?.category | spaceBetweenCaps }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'amount'\">\n <lib-text-table-column>\n {{ element?.amount | vituCurrencyUsd }}\n </lib-text-table-column>\n <lib-table-column-sort [key]=\"element.amount ?? 0\"></lib-table-column-sort>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'isAbsorbed'\">\n <lib-binary-status-icon\n [value]=\"element?.isAbsorbed\"\n [showPositiveOnly]=\"true\">\n </lib-binary-status-icon>\n <lib-table-column-sort [key]=\"element?.isAbsorbed ? 1 : 0\"></lib-table-column-sort>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"app-funding-item-mid-fees-table-cell-content\",\n templateUrl: \"./funding-item-mid-fees-table-cell-content.component.html\",\n styleUrls: [\"./funding-item-mid-fees-table-cell-content.component.less\"],\n})\nexport class FundingItemMidFeesTableCellContentComponent {\n\n @Input() columnId: string;\n @Input() element: any;\n\n}\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"'adjustmentDate'\">\n <lib-date-time-label [dateUtc]=\"element.adjustmentDate\" [rawDateWithNoTime]=\"true\"></lib-date-time-label>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'amount'\">\n <lib-text-table-column>\n {{ element?.amount | vituCurrencyUsd }}\n </lib-text-table-column>\n <lib-table-column-sort [key]=\"element.amount ?? 0\"></lib-table-column-sort>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'createdUtc'\">\n <lib-date-time-label [dateUtc]=\"element.createdUtc\"></lib-date-time-label>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'reason'\">\n <lib-text-table-column>\n {{ element?.reason | spaceBetweenCaps }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'type'\">\n <lib-text-table-column>\n {{ element?.type | spaceBetweenCaps }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n","import { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"app-funding-item-adjustments-table-cell-content\",\n templateUrl: \"./funding-item-adjustments-table-cell-content.component.html\",\n styleUrls: [\"./funding-item-adjustments-table-cell-content.component.less\"],\n})\nexport class FundingItemAdjustmentsTableCellContentComponent {\n\n @Input() columnId: string;\n @Input() element: any;\n\n}\n","<lib-filters-base\n #filtersBase\n [filterForm]=\"filterForm\"\n (filterChanged)=\"onTransactionsFilterChanged($event)\"\n [filter]=\"transactionsFilter\"\n suppressInitialRequest\n shortLayout>\n\n <div [formGroup]=\"filterForm\"> <!-- required -->\n\n <ng-template #basicFilters>\n\n <div class=\"global-form-line-short-layout\">\n<!--\n <div class=\"form-field-container\">\n <lib-vitu-form-field-date\n [formGroup]=\"filterForm\"\n formFieldName=\"localDateInterval\"\n label=\"Date\"\n [clearValue]=\"transactionsFilter?._initialFilter?.localDateInterval\"\n restrictFuture\n isFilter\n readonly>\n </lib-vitu-form-field-date>\n </div>\n-->\n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"localFeesOnly\"\n isFilter\n label=\"Fees Only\"\n [options]=\"feesOnlyList\"\n [showReset]=\"filtersBase.resetFieldVisible('localFeesOnly')\"\n (handleReset)=\"filtersBase.resetField('localFeesOnly')\">\n </lib-vitu-form-field-select>\n </div>\n\n <div class=\"form-field-container\">\n </div>\n\n <div class=\"form-field-container\">\n </div>\n\n <div class=\"form-field-container\">\n </div>\n\n <div class=\"form-field-container\">\n </div>\n\n <div class=\"form-field-container\">\n </div>\n\n </div>\n\n </ng-template>\n\n </div>\n\n</lib-filters-base>\n","import { Component, Input, Output, EventEmitter } from \"@angular/core\";\nimport { UntypedFormBuilder } from \"@angular/forms\";\nimport { LocalTimePoint } from \"shared-lib\";\nimport { TransactionsFilter } from \"@admin_app/storage/funding-item/funding-item.state\";\n\n@Component({\n selector: \"app-funding-item-transaction-filters\",\n templateUrl: \"./funding-item-transaction-filters.component.html\",\n styleUrls: [\"./funding-item-transaction-filters.component.less\"]\n})\nexport class FundingItemTransactionFiltersComponent {\n\n @Output() transactionsFilterChanged = new EventEmitter<TransactionsFilter>();\n @Input() transactionsFilter: TransactionsFilter;\n\n feesOnlyList = [\n \"No\",\n \"Yes\"\n ];\n\n LocalTimePoint = LocalTimePoint;\n\n constructor(\n private fb: UntypedFormBuilder\n ) {}\n\n filterForm = this.fb.group({\n// localDateInterval: [null],\n localFeesOnly: [null]\n });\n\n onTransactionsFilterChanged(filter: TransactionsFilter) {\n this.transactionsFilterChanged.emit(filter);\n }\n\n}\n","<div class=\"outer-container\">\n\n <lib-title-bar\n [crumbs]=\"[{ 'label': 'Funding' , 'link': '/dashboard/funding' }, { 'label': pageTitle }]\">\n </lib-title-bar>\n\n <div class=\"details-container\">\n\n <ng-container *ngIf=\"!fundingItem then spinner\"></ng-container>\n <ng-container *ngIf=\"fundingItem then formFields\"></ng-container>\n\n </div>\n\n</div>\n\n<ng-template #formFields>\n\n <div class=\"details-common-container\">\n\n <lib-text-field label=\"Funding Ref\">\n {{ fundingItem.ref }}\n </lib-text-field>\n\n <lib-text-field label=\"MID\">\n {{ fundingItem.mid }}\n </lib-text-field>\n\n <lib-text-field [label]=\"'Date Created (' + LocalTimePoint.formatZ() + ')'\">\n <lib-date-time-label *ngIf=\"fundingItem.dateCreated\" [singleLine]=\"true\" [dateUtc]=\"fundingItem.dateCreated\"></lib-date-time-label>\n </lib-text-field>\n\n <lib-text-field id=\"fundingStatusTextField\" label=\"Funding Status\">\n <lib-funding-item-status-chip\n [status]=\"fundingItem.fundingStatus\">\n </lib-funding-item-status-chip>\n </lib-text-field>\n\n <lib-text-field [label]=\"'Date Funded (' + LocalTimePoint.formatZ() + ')'\">\n <lib-date-time-label *ngIf=\"fundingItem.dateFunded\" [singleLine]=\"true\" [dateUtc]=\"fundingItem.dateFunded\"></lib-date-time-label>\n </lib-text-field>\n\n <lib-text-field label=\"Transaction Fees\">\n {{ fundingItem.transactionFees | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field label=\"MID Fees\">\n {{ fundingItem.midFees | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field label=\"Adjustments Total\">\n {{ fundingItem.adjustmentsTotal | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field label=\"Absorbed Fees\">\n {{ fundingItem.absorbedFees | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field label=\"Chargeback Amount\">\n {{ fundingItem.chargebackAmount | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field label=\"Chargeback Reversal Amount\">\n {{ fundingItem.chargebackReversalAmount | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field label=\"VituPay Deposit Amount\" [infoTip]=\"vituPayDepositAmountInfoTip\">\n {{ fundingItem.vituPayDepositAmount | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field label=\"Transaction Amount\">\n {{ fundingItem.transactionAmount | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field label=\"Refund Amount\">\n {{ fundingItem.refundAmount | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field label=\"Rejected Amount\">\n {{ fundingItem.rejectedAmount | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field label=\"Net Transaction Amount\" [infoTip]=\"netTransactionAmountInfoTip\">\n {{ fundingItem.netTransactionAmount | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field id=\"merchantDepositAmountTextField\" label=\"Merchant Deposit Amount\" [infoTip]=\"merchantDepositAmountInfoTip\">\n {{ fundingItem.merchantDepositAmount | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field label=\"Instruction Date\">\n <lib-date-time-label *ngIf=\"fundingItem.instructionDate\" [rawDateWithNoTime]=\"true\" [dateUtc]=\"fundingItem.instructionDate\"></lib-date-time-label>\n </lib-text-field>\n\n </div>\n\n <div class=\"tabs-container\">\n\n <mat-tab-group class=\"tab-group\" [selectedIndex]=\"0\">\n\n <mat-tab [label]=\"getTransactionsTabLabel()\">\n\n <div class=\"table-filters\">\n <app-funding-item-transaction-filters\n [transactionsFilter]=\"transactionsFilter\"\n (transactionsFilterChanged)=\"onTransactionsFilterChanged($event)\">\n </app-funding-item-transaction-filters>\n </div>\n\n <div *ngIf=\"hasGetTransactionsReportPermission && fundingItemTransactions?.length > 0\" class=\"table-header\">\n <lib-action-button label=\"Export\" (click)=\"onExportTransactionsToCsv()\" [disabled]=\"exportTransactionsButtonDisabled()\"\n fontImage=\"far fa-file-export fa-lg\" [kind]=\"ActionButtonKind.SECONDARY\">\n </lib-action-button>\n </div>\n\n <lib-table-base\n class=\"tab-container\"\n [columnDefs]=\"transactionsColumnDefs\"\n [rowsData]=\"fundingItemTransactions ? fundingItemTransactions : []\"\n [rowsDataLoading]=\"fundingItemTransactionsLoading\"\n [rowsDataError]=\"fundingItemTransactionsError\"\n rowsDataErrorMessage=\"Error Loading Transactions\"\n [rowsDataShowWhileLoading]=\"true\"\n rowsDataEmptyMessage=\"No Transactions\"\n [pager]=\"transactionsPager\"\n (pageChanged)=\"onTransactionsPageChanged($event)\"\n [sorting]=\"transactionsSorting\"\n (sortingChanged)=\"onTransactionsSortingChanged($event)\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-funding-item-transactions-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\">\n </app-funding-item-transactions-table-cell-content>\n </ng-template>\n </lib-table-base>\n\n </mat-tab>\n\n <mat-tab [label]=\"getMidFeesTabLabel()\">\n\n <lib-table-base\n class=\"tab-container\"\n [columnDefs]=\"midFeesColumnDefs\"\n [rowsData]=\"fundingItemMidFees\"\n [rowsDataLoading]=\"fundingItemMidFeesLoading\"\n [rowsDataError]=\"fundingItemMidFeesError\"\n rowsDataErrorMessage=\"Error Loading MID Fees\"\n [rowsDataShowWhileLoading]=\"true\"\n rowsDataEmptyMessage=\"No MID Fees\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-funding-item-mid-fees-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\">\n </app-funding-item-mid-fees-table-cell-content>\n </ng-template>\n </lib-table-base>\n\n </mat-tab>\n\n <mat-tab [label]=\"getAdjustmentsTabLabel()\">\n\n <lib-table-base\n class=\"tab-container\"\n [columnDefs]=\"adjustmentsColumnDefs\"\n [rowsData]=\"fundingItemAdjustments\"\n [rowsDataLoading]=\"fundingItemAdjustmentsLoading\"\n [rowsDataError]=\"fundingItemAdjustmentsError\"\n rowsDataErrorMessage=\"Error Loading Adjustments\"\n [rowsDataShowWhileLoading]=\"true\"\n rowsDataEmptyMessage=\"No Adjustments\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-funding-item-adjustments-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\">\n </app-funding-item-adjustments-table-cell-content>\n </ng-template>\n </lib-table-base>\n\n </mat-tab>\n\n </mat-tab-group>\n\n </div>\n\n <div class=\"form-buttons-line\">\n <lib-action-button\n [kind]=\"ActionButtonKind.STROKED\"\n largeButton\n label=\"Back\"\n (click)=\"onCancel()\">\n </lib-action-button>\n </div>\n\n</ng-template>\n\n<ng-template #spinner>\n <lib-busy-indicator>\n </lib-busy-indicator>\n</ng-template>\n","import { FundingInstructionDetails } from \"@merchant_api/models/funding-instruction-details\";\nimport { FundingStatus } from \"@merchant_api/models/funding-status\";\nimport { FundingTransaction } from \"@merchant_api/models/funding-transaction\";\nimport { FundingTransactionOrderBy } from \"@merchant_api/models/funding-transaction-order-by\";\nimport { TransactionsFilter, TransactionsSorting } from \"@merchant_app/storage/funding-item/funding-item.state\";\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { ActionButtonKind, ColumnDef, LocalTimePoint, Pager, TableSorting } from \"shared-lib\";\nimport { FundingFee } from \"@merchant_api/models/funding-fee\";\nimport { CurrentUserDto } from \"@merchant_app/storage/current-user/current-user.state\";\nimport { CurrentUserPermissions } from \"@merchant_app/shared/current-user-permissions\";\nimport { AdjustmentDto } from \"@merchant_api/models/adjustment-dto\";\n\n@Component({\n selector: \"app-funding-item-details\",\n templateUrl: \"./funding-item-details.component.html\",\n styleUrls: [\"./funding-item-details.component.less\"],\n})\nexport class FundingItemDetailsComponent {\n\n @Input() currentUser: CurrentUserDto;\n\n @Input() fundingItem: FundingInstructionDetails;\n @Input() fundingItemLoading: boolean;\n\n @Input() fundingItemTransactions: Array<FundingTransaction>;\n @Input() fundingItemTransactionsLoading: boolean;\n @Input() fundingItemTransactionsError: Error;\n\n @Input() fundingItemMidFees: Array<FundingFee>;\n @Input() fundingItemMidFeesLoading: boolean;\n @Input() fundingItemMidFeesError: Error;\n\n @Input() fundingItemAdjustments: Array<AdjustmentDto>;\n @Input() fundingItemAdjustmentsLoading: boolean;\n @Input() fundingItemAdjustmentsError: Error;\n\n @Input() fundingItemExportLoading: boolean;\n\n @Input() transactionsPager: Pager;\n @Output() transactionsPageChanged = new EventEmitter<{ref: string; page: number}>();\n\n @Input() transactionsSorting: TransactionsSorting;\n @Output() transactionsSortingChanged = new EventEmitter<{ref: string; sorting: TransactionsSorting}>();\n\n @Input() transactionsFilter: TransactionsFilter;\n @Output() transactionsFilterChanged = new EventEmitter<{ref: string; filter: TransactionsFilter}>();\n\n @Output() cancel = new EventEmitter<void>();\n\n @Output() exportTransactionsToCsv = new EventEmitter<string>();\n\n merchantId: string;\n\n pageTitle = \"View Funding Item\";\n\n ActionButtonKind = ActionButtonKind;\n LocalTimePoint = LocalTimePoint;\n FundingStatus = FundingStatus;\n\n readonly transactionsColumnDefs: ColumnDef[];\n readonly midFeesColumnDefs: ColumnDef[];\n readonly adjustmentsColumnDefs: ColumnDef[];\n\n constructor(private currPerms: CurrentUserPermissions) {\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n this.transactionsColumnDefs = [\n {id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n {id: FundingTransactionOrderBy.DateCreated, title: `Date (${LocalTimePoint.formatZ()})`,\n flexWidthBasisInPixels: 100, flexWidthGrow: 3, canSort: true},\n {id: \"type\", title: \"Type\", flexWidthBasisInPixels: 65, flexWidthGrow: 4},\n {id: \"status\", title: \"Status\", flexWidthBasisInPixels: 115, flexWidthGrow: 4},\n {id: FundingTransactionOrderBy.Amount, title: \"Amount\", flexWidthBasisInPixels: 96, flexWidthGrow: 4, canSort: true},\n {id: FundingTransactionOrderBy.CardBrand, title: \"Card\", flexWidthBasisInPixels: 50, flexWidthGrow: 4, canSort: true},\n {id: FundingTransactionOrderBy.CardNumber, title: \"Card Number\", flexWidthBasisInPixels: 150, flexWidthGrow: 4, canSort: true},\n {id: \"DigitalWallet\", title: \"Digital Wallet\", flexWidthBasisInPixels: 75, flexWidthGrow: 4},\n {id: FundingTransactionOrderBy.PayerName,\n title: \"Payer Name\", flexWidthBasisInPixels: 120, flexWidthGrow: 8, canSort: true},\n {id: FundingTransactionOrderBy.TransactionId,\n title: \"Transaction ID\", flexWidthBasisInPixels: 120, flexWidthGrow: 4, canSort: true},\n {id: \"feesOnly\", title: \"Fees Only\", flexWidthBasisInPixels: 60, flexWidthGrow: 4},\n {id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0}\n ];\n\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n this.midFeesColumnDefs = [\n {id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n {id: \"name\", title: \"Name\", flexWidthBasisInPixels: 300, flexWidthGrow: 0, canSort: true},\n {id: \"category\", title: \"Category\", flexWidthBasisInPixels: 300, flexWidthGrow: 0, canSort: true},\n {id: \"amount\", title: \"Amount\", flexWidthBasisInPixels: 200, flexWidthGrow: 0, canSort: true},\n {id: \"isAbsorbed\", title: \"Absorbed By Vitu\", flexWidthBasisInPixels: 200, flexWidthGrow: 0, canSort: true},\n {id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0}\n ];\n\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n this.adjustmentsColumnDefs = [\n {id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n {id: \"createdUtc\", title: `Date Created (${LocalTimePoint.formatZ()})`,\n flexWidthBasisInPixels: 130, flexWidthGrow: 1 },\n {id: \"adjustmentDate\", title: \"Adjustment Date\", flexWidthBasisInPixels: 130, flexWidthGrow: 1 },\n {id: \"amount\", title: \"Amount\", flexWidthBasisInPixels: 100, flexWidthGrow: 1 },\n {id: \"reason\", title: \"Reason\", flexWidthBasisInPixels: 130, flexWidthGrow: 1 },\n {id: \"type\", title: \"Type\", flexWidthBasisInPixels: 130, flexWidthGrow: 1},\n {id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0}\n ];\n }\n\n get vituPayDepositAmountInfoTip() {\n const preseveMultilineIndentation = `VituPay Deposit Amount =\n Transaction Fees\n + MID Fees\n + Chargeback Amount\n - Absorbed Fees`;\n return preseveMultilineIndentation;\n }\n\n get netTransactionAmountInfoTip() {\n const preseveMultilineIndentation = `Net Transaction Amount =\n Transaction Amount\n - Refund Amount\n + Rejected Amount`;\n return preseveMultilineIndentation;\n }\n\n get merchantDepositAmountInfoTip() {\n const preseveMultilineIndentation = `Merchant Deposit Amount =\n Net Transaction Amount\n - Fee Amount\n - Chargeback Amount`;\n return preseveMultilineIndentation;\n }\n\n onCancel(): void {\n\n this.cancel.emit();\n }\n\n onTransactionsPageChanged(page: number): void {\n this.transactionsPageChanged.emit({ref: this.fundingItem.ref, page});\n }\n\n onTransactionsSortingChanged(sorting: TableSorting): void {\n this.transactionsSortingChanged.emit({\n ref: this.fundingItem.ref,\n sorting: {\n orderBy: sorting.orderBy as FundingTransactionOrderBy,\n orderDirection: sorting.orderDirection\n }\n });\n }\n\n onTransactionsFilterChanged(filter: TransactionsFilter): void {\n this.transactionsFilterChanged.emit({\n ref: this.fundingItem.ref,\n filter\n });\n }\n\n onExportTransactionsToCsv(): void {\n this.exportTransactionsToCsv.emit(this.fundingItem.ref);\n }\n\n getTransactionsTabLabel(): string {\n return \"Transactions\";\n }\n\n getMidFeesTabLabel(): string {\n let count = 0;\n if (this.fundingItemMidFees?.length) {\n count = this.fundingItemMidFees.length;\n }\n return this.appendCountIfNecessary(\"MID Fees\", count);\n }\n\n/*\n getSettlementsTabLabel(): string {\n let count = 0;\n if (this.fundingItem?.settlementSummary?.length) {\n count = this.fundingItem.settlementSummary.length;\n }\n return this.appendCountIfNecessary(\"Settlements\", count);\n }\n*/\n\n getAdjustmentsTabLabel(): string {\n let count = 0;\n if (this.fundingItemAdjustments?.length) {\n count = this.fundingItemAdjustments.length;\n }\n return this.appendCountIfNecessary(\"Adjustments\", count);\n }\n\n exportTransactionsButtonDisabled(): boolean {\n return this.fundingItemTransactionsLoading || this.fundingItemExportLoading;\n }\n\n get hasGetTransactionsReportPermission(): boolean {\n return this.currPerms.has([\"core.funding.get-transactions-report\"]);\n }\n\n private appendCountIfNecessary(title: string, count: number): string {\n return title + ((count > 0) ? ` (${count})` : \"\");\n }\n\n}\n","import { Component, OnInit } from \"@angular/core\";\nimport { Store } from \"@ngrx/store\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { IStore } from \"@merchant_app/storage/store\";\n\nimport * as CurrentUserSelectors from \"@merchant_app/storage/current-user/current-user.selectors\";\n\nimport * as FundingItemActions from \"@merchant_app/storage/funding-item/funding-item.actions\";\nimport * as FundingItemSelectors from \"@merchant_app/storage/funding-item/funding-item.selectors\";\n\nimport { GoBackAction } from \"@merchant_app/storage/router/router.actions\";\nimport { FundingInstructionDetails } from \"@merchant_api/models/funding-instruction-details\";\nimport {\n ExportTransactionsToCsvAction,\n FilterFundingItemTransactionsAction,\n PageChangedFundingItemTransactionsAction,\n SortFundingItemTransactionsAction\n} from \"@merchant_app/storage/funding-item/funding-item.actions\";\nimport { TransactionsFilter, TransactionsSorting } from \"@merchant_app/storage/funding-item/funding-item.state\";\n\n@Component({\n selector: \"app-funding-item\",\n templateUrl: \"./funding-item.component.html\",\n styleUrls: [\"./funding-item.component.less\"]\n})\nexport class FundingItemComponent implements OnInit {\n\n constructor(\n private store: Store<IStore>,\n private route: ActivatedRoute,\n ) {}\n\n currentUser$ = this.store.select(CurrentUserSelectors.getCurrentUser);\n fundingItem$ = this.store.select(FundingItemSelectors.getFundingItem);\n fundingItemLoading$ = this.store.select(FundingItemSelectors.getFundingItemLoading);\n fundingItemTransactions$ = this.store.select(FundingItemSelectors.getFundingItemTransactions);\n fundingItemTransactionsLoading$ = this.store.select(FundingItemSelectors.getFundingItemTransactionsLoading);\n fundingItemTransactionsError$ = this.store.select(FundingItemSelectors.getFundingItemTransactionsError);\n fundingItemTransactionsPager$ = this.store.select(FundingItemSelectors.getFundingItemTransactionsPager);\n fundingItemTransactionsSorting$ = this.store.select(FundingItemSelectors.getFundingItemTransactionsSorting);\n fundingItemTransactionsFilter$ = this.store.select(FundingItemSelectors.getFundingItemTransactionsFilter);\n fundingItemExportLoading$ = this.store.select(FundingItemSelectors.getFundingItemExportLoading);\n fundingItemMidFees$ = this.store.select(FundingItemSelectors.getFundingItemMidFees);\n fundingItemMidFeesLoading$ = this.store.select(FundingItemSelectors.getFundingItemMidFeesLoading);\n fundingItemMidFeesError$ = this.store.select(FundingItemSelectors.getFundingItemMidFeesError);\n fundingItemAdjustments$ = this.store.select(FundingItemSelectors.getFundingItemAdjustments);\n fundingItemAdjustmentsLoading$ = this.store.select(FundingItemSelectors.getFundingItemAdjustmentsLoading);\n fundingItemAdjustmentsError$ = this.store.select(FundingItemSelectors.getFundingItemAdjustmentsError);\n\n ngOnInit() {\n\n this.store.dispatch(new FundingItemActions.ResetFundingItemAction());\n this.store.dispatch(new FundingItemActions.GetFundingItemAction(this.route.snapshot.params.id));\n }\n\n onCancel(): void {\n\n this.store.dispatch(GoBackAction());\n }\n\n onFundingItemTransactionsPageChanged(payload: {ref: string; page: number}) {\n\n this.store.dispatch(new PageChangedFundingItemTransactionsAction(payload.ref, payload.page));\n }\n\n onFundingItemTransactionsSortingChanged(payload: {ref: string; sorting: TransactionsSorting}) {\n\n this.store.dispatch(new SortFundingItemTransactionsAction(payload.ref, payload.sorting));\n }\n\n onFundingItemTransactionsFilterChanged(payload: {ref: string; filter: TransactionsFilter}) {\n\n this.store.dispatch(new FilterFundingItemTransactionsAction(payload.ref, payload.filter));\n }\n\n onExportTransactionsToCsv(ref: string) {\n\n this.store.dispatch(new ExportTransactionsToCsvAction(ref));\n }\n\n}\n","<app-funding-item-details\n [currentUser]=\"currentUser$ | async\"\n [fundingItem]=\"fundingItem$ | async\"\n [fundingItemLoading]=\"fundingItemLoading$ | async\"\n [fundingItemTransactions]=\"fundingItemTransactions$ | async\"\n [fundingItemTransactionsLoading]=\"fundingItemTransactionsLoading$ | async\"\n [fundingItemTransactionsError]=\"fundingItemTransactionsError$ | async\"\n [fundingItemExportLoading]=\"fundingItemExportLoading$ | async\"\n [transactionsPager]=\"fundingItemTransactionsPager$ | async\"\n (transactionsPageChanged)=\"onFundingItemTransactionsPageChanged($event)\"\n [transactionsSorting]=\"fundingItemTransactionsSorting$ | async\"\n (transactionsSortingChanged)=\"onFundingItemTransactionsSortingChanged($event)\"\n [transactionsFilter]=\"fundingItemTransactionsFilter$ | async\"\n (transactionsFilterChanged)=\"onFundingItemTransactionsFilterChanged($event)\"\n (exportTransactionsToCsv)=\"onExportTransactionsToCsv($event)\"\n [fundingItemMidFees]=\"fundingItemMidFees$ | async\"\n [fundingItemMidFeesLoading]=\"fundingItemMidFeesLoading$ | async\"\n [fundingItemMidFeesError]=\"fundingItemMidFeesError$ | async\"\n [fundingItemAdjustments]=\"fundingItemAdjustments$ | async\"\n [fundingItemAdjustmentsLoading]=\"fundingItemAdjustmentsLoading$ | async\"\n [fundingItemAdjustmentsError]=\"fundingItemAdjustmentsError$ | async\"\n (cancel)=\"onCancel()\">\n</app-funding-item-details>\n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-help-details\",\n templateUrl: \"./help-details.component.html\",\n styleUrls: [\"./help-details.component.less\"],\n})\nexport class HelpDetailsComponent {\n\n}\n","<div class=\"outer-container\">\n \n <lib-title-bar [crumbs]=\"[{ 'label': 'Help and Support' }]\">\n </lib-title-bar>\n\n <div class=\"links-container\">\n <div class=\"link-container\" id=\"vituPaySupport\">\n <div class=\"link-container-inner\">\n <div class=\"link-icon\">\n <div class=\"link-icon-inner\">\n <i class=\"far fa-question-circle\"></i>\n </div>\n </div>\n <div class=\"link-details\">\n <div class=\"link-main\">\n <a class=\"link-anchor\" href=\"https://support.vitupay.com\" target=\"_blank\">VituPay Support</a>\n </div>\n </div>\n </div>\n </div>\n <br />\n <div class=\"link-container\" id=\"customerSupport\">\n <div class=\"link-container-inner\">\n <div class=\"link-icon\">\n <div class=\"link-icon-inner\">\n <i class=\"far fa-user-headset\"></i>\n </div>\n </div>\n <div class=\"link-details\">\n <div class=\"link-main\">\n Customer Support\n </div>\n <div class=\"link-sub\">\n Phone: 833-207-0522\n </div>\n </div>\n </div>\n </div>\n </div>\n\n</div>\n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-help\",\n templateUrl: \"./help.component.html\",\n styleUrls: [\"./help.component.less\"],\n})\nexport class HelpComponent {\n\n constructor() {}\n\n}\n","<app-help-details>\n</app-help-details>\n","import { Injectable } from \"@angular/core\";\nimport { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree } from \"@angular/router\";\nimport { getCurrentUser } from \"@merchant_app/storage/current-user/current-user.selectors\";\nimport { CurrentUserDto } from \"@merchant_app/storage/current-user/current-user.state\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { select, Store } from \"@ngrx/store\";\nimport { Observable } from \"rxjs\";\n\n@Injectable({\n providedIn: \"root\"\n})\nexport class DynamicDefaultRouteGuard implements CanActivate {\n\n private currentUser: CurrentUserDto = null;\n\n currentUser$ = this.store.pipe(\n select(getCurrentUser)\n );\n\n constructor(private store: Store<IStore>, private router: Router) {\n this.currentUser$.subscribe(currentUser => {\n this.currentUser = currentUser;\n });\n }\n\n canActivate(\n next: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {\n\n // Assumes that currentUser is already loaded!\n return (this.currentUser ? this.router.createUrlTree([this.currentUser.defaultRoute]) : false);\n }\n\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getEventState = (store: IStore) => store.event;\n\nexport const getEvent = createSelector(\n getEventState,\n eventState => eventState.record,\n);\n\nexport const getEventLoading = createSelector(\n getEventState,\n eventState => eventState.loading,\n);\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getEventDeliveriesState = (store: IStore) => store.eventDeliveries;\n\nexport const getEventDeliveries = createSelector(\n getEventDeliveriesState,\n eventDeliveriesState => eventDeliveriesState.rows,\n);\n\nexport const getEventDeliveriesLoading = createSelector(\n getEventDeliveriesState,\n eventDeliveriesState => eventDeliveriesState.loading,\n);\n\nexport const getEventDeliveriesError = createSelector(\n getEventDeliveriesState,\n eventDeliveriesState => eventDeliveriesState.error,\n);\n\nexport const getEventDeliveriesPager = createSelector(\n getEventDeliveriesState,\n eventDeliveriesState => eventDeliveriesState.pager,\n);\n\nexport const getEventDeliveriesSorting = createSelector(\n getEventDeliveriesState,\n eventDeliveriesState => eventDeliveriesState.sorting,\n);\n","import { Action } from \"@ngrx/store\";\n\nexport enum ActionTypes {\n GetEventDelivery = \"[EventDelivery] GetEventDelivery\",\n GetEventDeliverySucceed = \"[EventDelivery] GetEventDeliverySucceed\",\n GetEventDeliveryFail = \"[EventDelivery] GetEventDeliveryFail\",\n ResendEventDelivery = \"[EventDelivery] ResendEventDelivery\"\n}\n\nexport class GetEventDeliveryAction implements Action {\n\n constructor(public id: number) {}\n\n readonly type = ActionTypes.GetEventDelivery;\n}\n\nexport class GetEventDeliverySucceedAction implements Action {\n\n constructor(public response: any) {}\n\n readonly type = ActionTypes.GetEventDeliverySucceed;\n}\n\nexport class GetEventDeliveryFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetEventDeliveryFail;\n}\n\nexport class ResendEventDeliveryAction implements Action {\n\n constructor(public token: string, public eventDeliveryId: number, public isDelivered: boolean) {}\n\n readonly type = ActionTypes.ResendEventDelivery;\n}\n","import { Action } from \"@ngrx/store\";\nimport { Sorting, Filter } from \"./event-deliveries.state\";\nimport { EventDeliveriesDto } from \"@merchant_api/models/event-deliveries-dto\";\n\nexport enum ActionTypes {\n FilterEventDeliveries = \"[EventDeliveries] FilterEventDeliveries\",\n SortEventDeliveries = \"[EventDeliveries] SortEventDeliveries\",\n PageChangedEventDeliveries = \"[EventDeliveries] PageChangedEventDeliveries\",\n ResetEventDeliveries = \"[EventDeliveries] ResetEventDeliveries\",\n GetEventDeliveries = \"[EventDeliveries] GetEventDeliveries\",\n GetEventDeliveriesSucceed = \"[EventDeliveries] GetEventDeliveriesSucceed\",\n GetEventDeliveriesFail = \"[EventDeliveries] GetEventDeliveriesFail\"\n}\n\nexport class FilterEventDeliveriesAction implements Action {\n\n constructor(public filter: Filter) {}\n\n readonly type = ActionTypes.FilterEventDeliveries;\n}\n\nexport class SortEventDeliveriesAction implements Action {\n\n constructor(public token, public sorting: Sorting) {}\n\n readonly type = ActionTypes.SortEventDeliveries;\n}\n\nexport class PageChangedEventDeliveriesAction implements Action {\n\n constructor(public token, public page: number) {}\n\n readonly type = ActionTypes.PageChangedEventDeliveries;\n}\n\nexport class ResetEventDeliveriesAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.ResetEventDeliveries;\n}\n\nexport class GetEventDeliveriesAction implements Action {\n\n constructor(public token, public page: number, public filter?: Filter, public sorting?: Sorting) {}\n\n readonly type = ActionTypes.GetEventDeliveries;\n}\n\nexport class GetEventDeliveriesSucceedAction implements Action {\n\n constructor(\n public response: EventDeliveriesDto,\n public pageSize: number,\n public page: number,\n public stateExtensions?: any) {}\n\n readonly type = ActionTypes.GetEventDeliveriesSucceed;\n}\n\nexport class GetEventDeliveriesFailAction implements Action {\n\n constructor(public error: Error) {}\n\n readonly type = ActionTypes.GetEventDeliveriesFail;\n}\n","import { SelectionModel, isDataSource } from '@angular/cdk/collections';\nimport { isObservable, Subject, BehaviorSubject, of } from 'rxjs';\nimport { take, filter, takeUntil } from 'rxjs/operators';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Directive, Inject, Optional, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, ViewChild, ContentChildren, NgModule } from '@angular/core';\nimport { coerceNumberProperty, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport * as i2 from '@angular/cdk/bidi';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 tree control. It has basic toggle/expand/collapse operations on a single data node. */\nclass BaseTreeControl {\n constructor() {\n /** A selection model with multi-selection to track expansion status. */\n this.expansionModel = new SelectionModel(true);\n }\n /** Toggles one single data node's expanded/collapsed state. */\n toggle(dataNode) {\n this.expansionModel.toggle(this._trackByValue(dataNode));\n }\n /** Expands one single data node. */\n expand(dataNode) {\n this.expansionModel.select(this._trackByValue(dataNode));\n }\n /** Collapses one single data node. */\n collapse(dataNode) {\n this.expansionModel.deselect(this._trackByValue(dataNode));\n }\n /** Whether a given data node is expanded or not. Returns true if the data node is expanded. */\n isExpanded(dataNode) {\n return this.expansionModel.isSelected(this._trackByValue(dataNode));\n }\n /** Toggles a subtree rooted at `node` recursively. */\n toggleDescendants(dataNode) {\n this.expansionModel.isSelected(this._trackByValue(dataNode))\n ? this.collapseDescendants(dataNode)\n : this.expandDescendants(dataNode);\n }\n /** Collapse all dataNodes in the tree. */\n collapseAll() {\n this.expansionModel.clear();\n }\n /** Expands a subtree rooted at given data node recursively. */\n expandDescendants(dataNode) {\n let toBeProcessed = [dataNode];\n toBeProcessed.push(...this.getDescendants(dataNode));\n this.expansionModel.select(...toBeProcessed.map(value => this._trackByValue(value)));\n }\n /** Collapses a subtree rooted at given data node recursively. */\n collapseDescendants(dataNode) {\n let toBeProcessed = [dataNode];\n toBeProcessed.push(...this.getDescendants(dataNode));\n this.expansionModel.deselect(...toBeProcessed.map(value => this._trackByValue(value)));\n }\n _trackByValue(value) {\n return this.trackBy ? this.trackBy(value) : 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/** Flat tree control. Able to expand/collapse a subtree recursively for flattened tree. */\nclass FlatTreeControl extends BaseTreeControl {\n /** Construct with flat tree data node functions getLevel and isExpandable. */\n constructor(getLevel, isExpandable, options) {\n super();\n this.getLevel = getLevel;\n this.isExpandable = isExpandable;\n this.options = options;\n if (this.options) {\n this.trackBy = this.options.trackBy;\n }\n }\n /**\n * Gets a list of the data node's subtree of descendent data nodes.\n *\n * To make this working, the `dataNodes` of the TreeControl must be flattened tree nodes\n * with correct levels.\n */\n getDescendants(dataNode) {\n const startIndex = this.dataNodes.indexOf(dataNode);\n const results = [];\n // Goes through flattened tree nodes in the `dataNodes` array, and get all descendants.\n // The level of descendants of a tree node must be greater than the level of the given\n // tree node.\n // If we reach a node whose level is equal to the level of the tree node, we hit a sibling.\n // If we reach a node whose level is greater than the level of the tree node, we hit a\n // sibling of an ancestor.\n for (let i = startIndex + 1; i < this.dataNodes.length && this.getLevel(dataNode) < this.getLevel(this.dataNodes[i]); i++) {\n results.push(this.dataNodes[i]);\n }\n return results;\n }\n /**\n * Expands all data nodes in the tree.\n *\n * To make this working, the `dataNodes` variable of the TreeControl must be set to all flattened\n * data nodes of the tree.\n */\n expandAll() {\n this.expansionModel.select(...this.dataNodes.map(node => this._trackByValue(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 */\n/** Nested tree control. Able to expand/collapse a subtree recursively for NestedNode type. */\nclass NestedTreeControl extends BaseTreeControl {\n /** Construct with nested tree function getChildren. */\n constructor(getChildren, options) {\n super();\n this.getChildren = getChildren;\n this.options = options;\n if (this.options) {\n this.trackBy = this.options.trackBy;\n }\n }\n /**\n * Expands all dataNodes in the tree.\n *\n * To make this working, the `dataNodes` variable of the TreeControl must be set to all root level\n * data nodes of the tree.\n */\n expandAll() {\n this.expansionModel.clear();\n const allNodes = this.dataNodes.reduce((accumulator, dataNode) => [...accumulator, ...this.getDescendants(dataNode), dataNode], []);\n this.expansionModel.select(...allNodes.map(node => this._trackByValue(node)));\n }\n /** Gets a list of descendant dataNodes of a subtree rooted at given data node recursively. */\n getDescendants(dataNode) {\n const descendants = [];\n this._getDescendants(descendants, dataNode);\n // Remove the node itself\n return descendants.splice(1);\n }\n /** A helper function to get descendants recursively. */\n _getDescendants(descendants, dataNode) {\n descendants.push(dataNode);\n const childrenNodes = this.getChildren(dataNode);\n if (Array.isArray(childrenNodes)) {\n childrenNodes.forEach((child) => this._getDescendants(descendants, child));\n }\n else if (isObservable(childrenNodes)) {\n // TypeScript as of version 3.5 doesn't seem to treat `Boolean` like a function that\n // returns a `boolean` specifically in the context of `filter`, so we manually clarify that.\n childrenNodes.pipe(take(1), filter(Boolean)).subscribe(children => {\n for (const child of children) {\n this._getDescendants(descendants, child);\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 * Injection token used to provide a `CdkTreeNode` to its outlet.\n * Used primarily to avoid circular imports.\n * @docs-private\n */\nconst CDK_TREE_NODE_OUTLET_NODE = new InjectionToken('CDK_TREE_NODE_OUTLET_NODE');\n/**\n * Outlet for nested CdkNode. Put `[cdkTreeNodeOutlet]` on a tag to place children dataNodes\n * inside the outlet.\n */\nclass CdkTreeNodeOutlet {\n constructor(viewContainer, _node) {\n this.viewContainer = viewContainer;\n this._node = _node;\n }\n}\nCdkTreeNodeOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTreeNodeOutlet, deps: [{ token: i0.ViewContainerRef }, { token: CDK_TREE_NODE_OUTLET_NODE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkTreeNodeOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkTreeNodeOutlet, selector: \"[cdkTreeNodeOutlet]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTreeNodeOutlet, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkTreeNodeOutlet]',\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [CDK_TREE_NODE_OUTLET_NODE]\n }, {\n type: Optional\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Context provided to the tree node component. */\nclass CdkTreeNodeOutletContext {\n constructor(data) {\n this.$implicit = data;\n }\n}\n/**\n * Data node definition for the CdkTree.\n * Captures the node's template and a when predicate that describes when this node should be used.\n */\nclass CdkTreeNodeDef {\n /** @docs-private */\n constructor(template) {\n this.template = template;\n }\n}\nCdkTreeNodeDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTreeNodeDef, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkTreeNodeDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkTreeNodeDef, selector: \"[cdkTreeNodeDef]\", inputs: { when: [\"cdkTreeNodeDefWhen\", \"when\"] }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTreeNodeDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkTreeNodeDef]',\n inputs: ['when: cdkTreeNodeDefWhen'],\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 error to be thrown when there is no usable data.\n * @docs-private\n */\nfunction getTreeNoValidDataSourceError() {\n return Error(`A valid data source must be provided.`);\n}\n/**\n * Returns an error to be thrown when there are multiple nodes that are missing a when function.\n * @docs-private\n */\nfunction getTreeMultipleDefaultNodeDefsError() {\n return Error(`There can only be one default row without a when predicate function.`);\n}\n/**\n * Returns an error to be thrown when there are no matching node defs for a particular set of data.\n * @docs-private\n */\nfunction getTreeMissingMatchingNodeDefError() {\n return Error(`Could not find a matching node definition for the provided node data.`);\n}\n/**\n * Returns an error to be thrown when there are tree control.\n * @docs-private\n */\nfunction getTreeControlMissingError() {\n return Error(`Could not find a tree control for the tree.`);\n}\n/**\n * Returns an error to be thrown when tree control did not implement functions for flat/nested node.\n * @docs-private\n */\nfunction getTreeControlFunctionsMissingError() {\n return Error(`Could not find functions for nested/flat tree in tree control.`);\n}\n\n/**\n * CDK tree component that connects with a data source to retrieve data of type `T` and renders\n * dataNodes with hierarchy. Updates the dataNodes when new data is provided by the data source.\n */\nclass CdkTree {\n constructor(_differs, _changeDetectorRef) {\n this._differs = _differs;\n this._changeDetectorRef = _changeDetectorRef;\n /** Subject that emits when the component has been destroyed. */\n this._onDestroy = new Subject();\n /** Level of nodes */\n this._levels = new Map();\n // TODO(tinayuangao): Setup a listener for scrolling, emit the calculated view to viewChange.\n // Remove the MAX_VALUE in viewChange\n /**\n * Stream containing the latest information on what rows are being displayed on screen.\n * Can be used by the data source to as a heuristic of what data should be provided.\n */\n this.viewChange = new BehaviorSubject({\n start: 0,\n end: Number.MAX_VALUE,\n });\n }\n /**\n * Provides a stream containing the latest data array to render. Influenced by the tree's\n * stream of view window (what dataNodes are currently on screen).\n * Data source can be an observable of data array, or a data array to render.\n */\n get dataSource() {\n return this._dataSource;\n }\n set dataSource(dataSource) {\n if (this._dataSource !== dataSource) {\n this._switchDataSource(dataSource);\n }\n }\n ngOnInit() {\n this._dataDiffer = this._differs.find([]).create(this.trackBy);\n if (!this.treeControl && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTreeControlMissingError();\n }\n }\n ngOnDestroy() {\n this._nodeOutlet.viewContainer.clear();\n this.viewChange.complete();\n this._onDestroy.next();\n this._onDestroy.complete();\n if (this._dataSource && typeof this._dataSource.disconnect === 'function') {\n this.dataSource.disconnect(this);\n }\n if (this._dataSubscription) {\n this._dataSubscription.unsubscribe();\n this._dataSubscription = null;\n }\n }\n ngAfterContentChecked() {\n const defaultNodeDefs = this._nodeDefs.filter(def => !def.when);\n if (defaultNodeDefs.length > 1 && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTreeMultipleDefaultNodeDefsError();\n }\n this._defaultNodeDef = defaultNodeDefs[0];\n if (this.dataSource && this._nodeDefs && !this._dataSubscription) {\n this._observeRenderChanges();\n }\n }\n // TODO(tinayuangao): Work on keyboard traversal and actions, make sure it's working for RTL\n // and nested trees.\n /**\n * Switch to the provided data source by resetting the data and unsubscribing from the current\n * render change subscription if one exists. If the data source is null, interpret this by\n * clearing the node outlet. Otherwise start listening for new data.\n */\n _switchDataSource(dataSource) {\n if (this._dataSource && typeof this._dataSource.disconnect === 'function') {\n this.dataSource.disconnect(this);\n }\n if (this._dataSubscription) {\n this._dataSubscription.unsubscribe();\n this._dataSubscription = null;\n }\n // Remove the all dataNodes if there is now no data source\n if (!dataSource) {\n this._nodeOutlet.viewContainer.clear();\n }\n this._dataSource = dataSource;\n if (this._nodeDefs) {\n this._observeRenderChanges();\n }\n }\n /** Set up a subscription for the data provided by the data source. */\n _observeRenderChanges() {\n let dataStream;\n if (isDataSource(this._dataSource)) {\n dataStream = this._dataSource.connect(this);\n }\n else if (isObservable(this._dataSource)) {\n dataStream = this._dataSource;\n }\n else if (Array.isArray(this._dataSource)) {\n dataStream = of(this._dataSource);\n }\n if (dataStream) {\n this._dataSubscription = dataStream\n .pipe(takeUntil(this._onDestroy))\n .subscribe(data => this.renderNodeChanges(data));\n }\n else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throw getTreeNoValidDataSourceError();\n }\n }\n /** Check for changes made in the data and render each change (node added/removed/moved). */\n renderNodeChanges(data, dataDiffer = this._dataDiffer, viewContainer = this._nodeOutlet.viewContainer, parentData) {\n const changes = dataDiffer.diff(data);\n if (!changes) {\n return;\n }\n changes.forEachOperation((item, adjustedPreviousIndex, currentIndex) => {\n if (item.previousIndex == null) {\n this.insertNode(data[currentIndex], currentIndex, viewContainer, parentData);\n }\n else if (currentIndex == null) {\n viewContainer.remove(adjustedPreviousIndex);\n this._levels.delete(item.item);\n }\n else {\n const view = viewContainer.get(adjustedPreviousIndex);\n viewContainer.move(view, currentIndex);\n }\n });\n this._changeDetectorRef.detectChanges();\n }\n /**\n * Finds the matching node definition that should be used for this node data. If there is only\n * one node definition, it is returned. Otherwise, find the node definition that has a when\n * predicate that returns true with the data. If none return true, return the default node\n * definition.\n */\n _getNodeDef(data, i) {\n if (this._nodeDefs.length === 1) {\n return this._nodeDefs.first;\n }\n const nodeDef = this._nodeDefs.find(def => def.when && def.when(i, data)) || this._defaultNodeDef;\n if (!nodeDef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTreeMissingMatchingNodeDefError();\n }\n return nodeDef;\n }\n /**\n * Create the embedded view for the data node template and place it in the correct index location\n * within the data node view container.\n */\n insertNode(nodeData, index, viewContainer, parentData) {\n const node = this._getNodeDef(nodeData, index);\n // Node context that will be provided to created embedded view\n const context = new CdkTreeNodeOutletContext(nodeData);\n // If the tree is flat tree, then use the `getLevel` function in flat tree control\n // Otherwise, use the level of parent node.\n if (this.treeControl.getLevel) {\n context.level = this.treeControl.getLevel(nodeData);\n }\n else if (typeof parentData !== 'undefined' && this._levels.has(parentData)) {\n context.level = this._levels.get(parentData) + 1;\n }\n else {\n context.level = 0;\n }\n this._levels.set(nodeData, context.level);\n // Use default tree nodeOutlet, or nested node's nodeOutlet\n const container = viewContainer ? viewContainer : this._nodeOutlet.viewContainer;\n container.createEmbeddedView(node.template, context, index);\n // Set the data to just created `CdkTreeNode`.\n // The `CdkTreeNode` created from `createEmbeddedView` will be saved in static variable\n // `mostRecentTreeNode`. We get it from static variable and pass the node data to it.\n if (CdkTreeNode.mostRecentTreeNode) {\n CdkTreeNode.mostRecentTreeNode.data = nodeData;\n }\n }\n}\nCdkTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTree, deps: [{ token: i0.IterableDiffers }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });\nCdkTree.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkTree, selector: \"cdk-tree\", inputs: { dataSource: \"dataSource\", treeControl: \"treeControl\", trackBy: \"trackBy\" }, host: { attributes: { \"role\": \"tree\" }, classAttribute: \"cdk-tree\" }, queries: [{ propertyName: \"_nodeDefs\", predicate: CdkTreeNodeDef, descendants: true }], viewQueries: [{ propertyName: \"_nodeOutlet\", first: true, predicate: CdkTreeNodeOutlet, descendants: true, static: true }], exportAs: [\"cdkTree\"], ngImport: i0, template: `<ng-container cdkTreeNodeOutlet></ng-container>`, isInline: true, dependencies: [{ kind: \"directive\", type: CdkTreeNodeOutlet, selector: \"[cdkTreeNodeOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTree, decorators: [{\n type: Component,\n args: [{\n selector: 'cdk-tree',\n exportAs: 'cdkTree',\n template: `<ng-container cdkTreeNodeOutlet></ng-container>`,\n host: {\n 'class': 'cdk-tree',\n 'role': 'tree',\n },\n encapsulation: ViewEncapsulation.None,\n // The \"OnPush\" status for the `CdkTree` component is effectively a noop, so we are removing it.\n // The view for `CdkTree` consists entirely of templates declared in other views. As they are\n // declared elsewhere, they are checked when their declaration points are checked.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n }]\n }], ctorParameters: function () { return [{ type: i0.IterableDiffers }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { dataSource: [{\n type: Input\n }], treeControl: [{\n type: Input\n }], trackBy: [{\n type: Input\n }], _nodeOutlet: [{\n type: ViewChild,\n args: [CdkTreeNodeOutlet, { static: true }]\n }], _nodeDefs: [{\n type: ContentChildren,\n args: [CdkTreeNodeDef, {\n // We need to use `descendants: true`, because Ivy will no longer match\n // indirect descendants if it's left as false.\n descendants: true,\n }]\n }] } });\n/**\n * Tree node for CdkTree. It contains the data in the tree node.\n */\nclass CdkTreeNode {\n constructor(_elementRef, _tree) {\n this._elementRef = _elementRef;\n this._tree = _tree;\n /** Subject that emits when the component has been destroyed. */\n this._destroyed = new Subject();\n /** Emits when the node's data has changed. */\n this._dataChanges = new Subject();\n CdkTreeNode.mostRecentTreeNode = this;\n this.role = 'treeitem';\n }\n /**\n * The role of the tree node.\n * @deprecated The correct role is 'treeitem', 'group' should not be used. This input will be\n * removed in a future version.\n * @breaking-change 12.0.0 Remove this input\n */\n get role() {\n return 'treeitem';\n }\n set role(_role) {\n // TODO: move to host after View Engine deprecation\n this._elementRef.nativeElement.setAttribute('role', _role);\n }\n /** The tree node's data. */\n get data() {\n return this._data;\n }\n set data(value) {\n if (value !== this._data) {\n this._data = value;\n this._setRoleFromData();\n this._dataChanges.next();\n }\n }\n get isExpanded() {\n return this._tree.treeControl.isExpanded(this._data);\n }\n get level() {\n // If the treeControl has a getLevel method, use it to get the level. Otherwise read the\n // aria-level off the parent node and use it as the level for this node (note aria-level is\n // 1-indexed, while this property is 0-indexed, so we don't need to increment).\n return this._tree.treeControl.getLevel\n ? this._tree.treeControl.getLevel(this._data)\n : this._parentNodeAriaLevel;\n }\n ngOnInit() {\n this._parentNodeAriaLevel = getParentNodeAriaLevel(this._elementRef.nativeElement);\n this._elementRef.nativeElement.setAttribute('aria-level', `${this.level + 1}`);\n }\n ngOnDestroy() {\n // If this is the last tree node being destroyed,\n // clear out the reference to avoid leaking memory.\n if (CdkTreeNode.mostRecentTreeNode === this) {\n CdkTreeNode.mostRecentTreeNode = null;\n }\n this._dataChanges.complete();\n this._destroyed.next();\n this._destroyed.complete();\n }\n /** Focuses the menu item. Implements for FocusableOption. */\n focus() {\n this._elementRef.nativeElement.focus();\n }\n // TODO: role should eventually just be set in the component host\n _setRoleFromData() {\n if (!this._tree.treeControl.isExpandable &&\n !this._tree.treeControl.getChildren &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTreeControlFunctionsMissingError();\n }\n this.role = 'treeitem';\n }\n}\n/**\n * The most recently created `CdkTreeNode`. We save it in static variable so we can retrieve it\n * in `CdkTree` and set the data to it.\n */\nCdkTreeNode.mostRecentTreeNode = null;\nCdkTreeNode.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTreeNode, deps: [{ token: i0.ElementRef }, { token: CdkTree }], target: i0.ɵɵFactoryTarget.Directive });\nCdkTreeNode.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkTreeNode, selector: \"cdk-tree-node\", inputs: { role: \"role\" }, host: { properties: { \"attr.aria-expanded\": \"isExpanded\" }, classAttribute: \"cdk-tree-node\" }, exportAs: [\"cdkTreeNode\"], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTreeNode, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-tree-node',\n exportAs: 'cdkTreeNode',\n host: {\n 'class': 'cdk-tree-node',\n '[attr.aria-expanded]': 'isExpanded',\n },\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: CdkTree }]; }, propDecorators: { role: [{\n type: Input\n }] } });\nfunction getParentNodeAriaLevel(nodeElement) {\n let parent = nodeElement.parentElement;\n while (parent && !isNodeElement(parent)) {\n parent = parent.parentElement;\n }\n if (!parent) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throw Error('Incorrect tree structure containing detached node.');\n }\n else {\n return -1;\n }\n }\n else if (parent.classList.contains('cdk-nested-tree-node')) {\n return coerceNumberProperty(parent.getAttribute('aria-level'));\n }\n else {\n // The ancestor element is the cdk-tree itself\n return 0;\n }\n}\nfunction isNodeElement(element) {\n const classList = element.classList;\n return !!(classList?.contains('cdk-nested-tree-node') || classList?.contains('cdk-tree'));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Nested node is a child of `<cdk-tree>`. It works with nested tree.\n * By using `cdk-nested-tree-node` component in tree node template, children of the parent node will\n * be added in the `cdkTreeNodeOutlet` in tree node template.\n * The children of node will be automatically added to `cdkTreeNodeOutlet`.\n */\nclass CdkNestedTreeNode extends CdkTreeNode {\n constructor(elementRef, tree, _differs) {\n super(elementRef, tree);\n this._differs = _differs;\n }\n ngAfterContentInit() {\n this._dataDiffer = this._differs.find([]).create(this._tree.trackBy);\n if (!this._tree.treeControl.getChildren && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTreeControlFunctionsMissingError();\n }\n const childrenNodes = this._tree.treeControl.getChildren(this.data);\n if (Array.isArray(childrenNodes)) {\n this.updateChildrenNodes(childrenNodes);\n }\n else if (isObservable(childrenNodes)) {\n childrenNodes\n .pipe(takeUntil(this._destroyed))\n .subscribe(result => this.updateChildrenNodes(result));\n }\n this.nodeOutlet.changes\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this.updateChildrenNodes());\n }\n // This is a workaround for https://github.com/angular/angular/issues/23091\n // In aot mode, the lifecycle hooks from parent class are not called.\n ngOnInit() {\n super.ngOnInit();\n }\n ngOnDestroy() {\n this._clear();\n super.ngOnDestroy();\n }\n /** Add children dataNodes to the NodeOutlet */\n updateChildrenNodes(children) {\n const outlet = this._getNodeOutlet();\n if (children) {\n this._children = children;\n }\n if (outlet && this._children) {\n const viewContainer = outlet.viewContainer;\n this._tree.renderNodeChanges(this._children, this._dataDiffer, viewContainer, this._data);\n }\n else {\n // Reset the data differ if there's no children nodes displayed\n this._dataDiffer.diff([]);\n }\n }\n /** Clear the children dataNodes. */\n _clear() {\n const outlet = this._getNodeOutlet();\n if (outlet) {\n outlet.viewContainer.clear();\n this._dataDiffer.diff([]);\n }\n }\n /** Gets the outlet for the current node. */\n _getNodeOutlet() {\n const outlets = this.nodeOutlet;\n // Note that since we use `descendants: true` on the query, we have to ensure\n // that we don't pick up the outlet of a child node by accident.\n return outlets && outlets.find(outlet => !outlet._node || outlet._node === this);\n }\n}\nCdkNestedTreeNode.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkNestedTreeNode, deps: [{ token: i0.ElementRef }, { token: CdkTree }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });\nCdkNestedTreeNode.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkNestedTreeNode, selector: \"cdk-nested-tree-node\", inputs: { role: \"role\", disabled: \"disabled\", tabIndex: \"tabIndex\" }, host: { classAttribute: \"cdk-nested-tree-node\" }, providers: [\n { provide: CdkTreeNode, useExisting: CdkNestedTreeNode },\n { provide: CDK_TREE_NODE_OUTLET_NODE, useExisting: CdkNestedTreeNode },\n ], queries: [{ propertyName: \"nodeOutlet\", predicate: CdkTreeNodeOutlet, descendants: true }], exportAs: [\"cdkNestedTreeNode\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkNestedTreeNode, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-nested-tree-node',\n exportAs: 'cdkNestedTreeNode',\n inputs: ['role', 'disabled', 'tabIndex'],\n providers: [\n { provide: CdkTreeNode, useExisting: CdkNestedTreeNode },\n { provide: CDK_TREE_NODE_OUTLET_NODE, useExisting: CdkNestedTreeNode },\n ],\n host: {\n 'class': 'cdk-nested-tree-node',\n },\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: CdkTree }, { type: i0.IterableDiffers }]; }, propDecorators: { nodeOutlet: [{\n type: ContentChildren,\n args: [CdkTreeNodeOutlet, {\n // We need to use `descendants: true`, because Ivy will no longer match\n // indirect descendants if it's left as false.\n descendants: 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/** Regex used to split a string on its CSS units. */\nconst cssUnitPattern = /([A-Za-z%]+)$/;\n/**\n * Indent for the children tree dataNodes.\n * This directive will add left-padding to the node to show hierarchy.\n */\nclass CdkTreeNodePadding {\n constructor(_treeNode, _tree, _element, _dir) {\n this._treeNode = _treeNode;\n this._tree = _tree;\n this._element = _element;\n this._dir = _dir;\n /** Subject that emits when the component has been destroyed. */\n this._destroyed = new Subject();\n /** CSS units used for the indentation value. */\n this.indentUnits = 'px';\n this._indent = 40;\n this._setPadding();\n if (_dir) {\n _dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => this._setPadding(true));\n }\n // In Ivy the indentation binding might be set before the tree node's data has been added,\n // which means that we'll miss the first render. We have to subscribe to changes in the\n // data to ensure that everything is up to date.\n _treeNode._dataChanges.subscribe(() => this._setPadding());\n }\n /** The level of depth of the tree node. The padding will be `level * indent` pixels. */\n get level() {\n return this._level;\n }\n set level(value) {\n this._setLevelInput(value);\n }\n /**\n * The indent for each level. Can be a number or a CSS string.\n * Default number 40px from material design menu sub-menu spec.\n */\n get indent() {\n return this._indent;\n }\n set indent(indent) {\n this._setIndentInput(indent);\n }\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n /** The padding indent value for the tree node. Returns a string with px numbers if not null. */\n _paddingIndent() {\n const nodeLevel = this._treeNode.data && this._tree.treeControl.getLevel\n ? this._tree.treeControl.getLevel(this._treeNode.data)\n : null;\n const level = this._level == null ? nodeLevel : this._level;\n return typeof level === 'number' ? `${level * this._indent}${this.indentUnits}` : null;\n }\n _setPadding(forceChange = false) {\n const padding = this._paddingIndent();\n if (padding !== this._currentPadding || forceChange) {\n const element = this._element.nativeElement;\n const paddingProp = this._dir && this._dir.value === 'rtl' ? 'paddingRight' : 'paddingLeft';\n const resetProp = paddingProp === 'paddingLeft' ? 'paddingRight' : 'paddingLeft';\n element.style[paddingProp] = padding || '';\n element.style[resetProp] = '';\n this._currentPadding = padding;\n }\n }\n /**\n * This has been extracted to a util because of TS 4 and VE.\n * View Engine doesn't support property rename inheritance.\n * TS 4.0 doesn't allow properties to override accessors or vice-versa.\n * @docs-private\n */\n _setLevelInput(value) {\n // Set to null as the fallback value so that _setPadding can fall back to the node level if the\n // consumer set the directive as `cdkTreeNodePadding=\"\"`. We still want to take this value if\n // they set 0 explicitly.\n this._level = coerceNumberProperty(value, null);\n this._setPadding();\n }\n /**\n * This has been extracted to a util because of TS 4 and VE.\n * View Engine doesn't support property rename inheritance.\n * TS 4.0 doesn't allow properties to override accessors or vice-versa.\n * @docs-private\n */\n _setIndentInput(indent) {\n let value = indent;\n let units = 'px';\n if (typeof indent === 'string') {\n const parts = indent.split(cssUnitPattern);\n value = parts[0];\n units = parts[1] || units;\n }\n this.indentUnits = units;\n this._indent = coerceNumberProperty(value);\n this._setPadding();\n }\n}\nCdkTreeNodePadding.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTreeNodePadding, deps: [{ token: CdkTreeNode }, { token: CdkTree }, { token: i0.ElementRef }, { token: i2.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkTreeNodePadding.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkTreeNodePadding, selector: \"[cdkTreeNodePadding]\", inputs: { level: [\"cdkTreeNodePadding\", \"level\"], indent: [\"cdkTreeNodePaddingIndent\", \"indent\"] }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTreeNodePadding, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkTreeNodePadding]',\n }]\n }], ctorParameters: function () { return [{ type: CdkTreeNode }, { type: CdkTree }, { type: i0.ElementRef }, { type: i2.Directionality, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { level: [{\n type: Input,\n args: ['cdkTreeNodePadding']\n }], indent: [{\n type: Input,\n args: ['cdkTreeNodePaddingIndent']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Node toggle to expand/collapse the node.\n */\nclass CdkTreeNodeToggle {\n constructor(_tree, _treeNode) {\n this._tree = _tree;\n this._treeNode = _treeNode;\n this._recursive = false;\n }\n /** Whether expand/collapse the node recursively. */\n get recursive() {\n return this._recursive;\n }\n set recursive(value) {\n this._recursive = coerceBooleanProperty(value);\n }\n _toggle(event) {\n this.recursive\n ? this._tree.treeControl.toggleDescendants(this._treeNode.data)\n : this._tree.treeControl.toggle(this._treeNode.data);\n event.stopPropagation();\n }\n}\nCdkTreeNodeToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTreeNodeToggle, deps: [{ token: CdkTree }, { token: CdkTreeNode }], target: i0.ɵɵFactoryTarget.Directive });\nCdkTreeNodeToggle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: CdkTreeNodeToggle, selector: \"[cdkTreeNodeToggle]\", inputs: { recursive: [\"cdkTreeNodeToggleRecursive\", \"recursive\"] }, host: { listeners: { \"click\": \"_toggle($event)\" } }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTreeNodeToggle, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkTreeNodeToggle]',\n host: {\n '(click)': '_toggle($event)',\n },\n }]\n }], ctorParameters: function () { return [{ type: CdkTree }, { type: CdkTreeNode }]; }, propDecorators: { recursive: [{\n type: Input,\n args: ['cdkTreeNodeToggleRecursive']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 EXPORTED_DECLARATIONS = [\n CdkNestedTreeNode,\n CdkTreeNodeDef,\n CdkTreeNodePadding,\n CdkTreeNodeToggle,\n CdkTree,\n CdkTreeNode,\n CdkTreeNodeOutlet,\n];\nclass CdkTreeModule {\n}\nCdkTreeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nCdkTreeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTreeModule, declarations: [CdkNestedTreeNode,\n CdkTreeNodeDef,\n CdkTreeNodePadding,\n CdkTreeNodeToggle,\n CdkTree,\n CdkTreeNode,\n CdkTreeNodeOutlet], exports: [CdkNestedTreeNode,\n CdkTreeNodeDef,\n CdkTreeNodePadding,\n CdkTreeNodeToggle,\n CdkTree,\n CdkTreeNode,\n CdkTreeNodeOutlet] });\nCdkTreeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTreeModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: CdkTreeModule, decorators: [{\n type: NgModule,\n args: [{\n exports: EXPORTED_DECLARATIONS,\n declarations: EXPORTED_DECLARATIONS,\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 * Generated bundle index. Do not edit.\n */\n\nexport { BaseTreeControl, CDK_TREE_NODE_OUTLET_NODE, CdkNestedTreeNode, CdkTree, CdkTreeModule, CdkTreeNode, CdkTreeNodeDef, CdkTreeNodeOutlet, CdkTreeNodeOutletContext, CdkTreeNodePadding, CdkTreeNodeToggle, FlatTreeControl, NestedTreeControl, getTreeControlFunctionsMissingError, getTreeControlMissingError, getTreeMissingMatchingNodeDefError, getTreeMultipleDefaultNodeDefsError, getTreeNoValidDataSourceError };\n","import * as i1 from '@angular/cdk/tree';\nimport { CdkTreeNode, CdkTreeNodeDef, CdkNestedTreeNode, CDK_TREE_NODE_OUTLET_NODE, CdkTreeNodePadding, CdkTreeNodeOutlet, CdkTree, CdkTreeNodeToggle, CdkTreeModule } from '@angular/cdk/tree';\nimport * as i0 from '@angular/core';\nimport { Directive, Attribute, Input, Inject, Optional, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';\nimport { mixinTabIndex, mixinDisabled, MatCommonModule } from '@angular/material/core';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DataSource } from '@angular/cdk/collections';\nimport { BehaviorSubject, merge } from 'rxjs';\nimport { take, 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 */\nconst _MatTreeNodeBase = mixinTabIndex(mixinDisabled(CdkTreeNode));\n/**\n * Wrapper for the CdkTree node with Material design styles.\n */\nclass MatTreeNode extends _MatTreeNodeBase {\n constructor(elementRef, tree, tabIndex) {\n super(elementRef, tree);\n this.tabIndex = Number(tabIndex) || 0;\n }\n // This is a workaround for https://github.com/angular/angular/issues/23091\n // In aot mode, the lifecycle hooks from parent class are not called.\n ngOnInit() {\n super.ngOnInit();\n }\n ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\nMatTreeNode.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTreeNode, deps: [{ token: i0.ElementRef }, { token: i1.CdkTree }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatTreeNode.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTreeNode, selector: \"mat-tree-node\", inputs: { role: \"role\", disabled: \"disabled\", tabIndex: \"tabIndex\" }, host: { classAttribute: \"mat-tree-node\" }, providers: [{ provide: CdkTreeNode, useExisting: MatTreeNode }], exportAs: [\"matTreeNode\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTreeNode, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-tree-node',\n exportAs: 'matTreeNode',\n inputs: ['role', 'disabled', 'tabIndex'],\n providers: [{ provide: CdkTreeNode, useExisting: MatTreeNode }],\n host: {\n 'class': 'mat-tree-node',\n },\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.CdkTree }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }]; } });\n/**\n * Wrapper for the CdkTree node definition with Material design styles.\n * Captures the node's template and a when predicate that describes when this node should be used.\n */\nclass MatTreeNodeDef extends CdkTreeNodeDef {\n}\nMatTreeNodeDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTreeNodeDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatTreeNodeDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTreeNodeDef, selector: \"[matTreeNodeDef]\", inputs: { when: [\"matTreeNodeDefWhen\", \"when\"], data: [\"matTreeNode\", \"data\"] }, providers: [{ provide: CdkTreeNodeDef, useExisting: MatTreeNodeDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTreeNodeDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matTreeNodeDef]',\n inputs: ['when: matTreeNodeDefWhen'],\n providers: [{ provide: CdkTreeNodeDef, useExisting: MatTreeNodeDef }],\n }]\n }], propDecorators: { data: [{\n type: Input,\n args: ['matTreeNode']\n }] } });\n/**\n * Wrapper for the CdkTree nested node with Material design styles.\n */\nclass MatNestedTreeNode extends CdkNestedTreeNode {\n constructor(elementRef, tree, differs, tabIndex) {\n super(elementRef, tree, differs);\n this._disabled = false;\n this.tabIndex = Number(tabIndex) || 0;\n }\n /** Whether the node is disabled. */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n }\n /** Tabindex for the node. */\n get tabIndex() {\n return this.disabled ? -1 : this._tabIndex;\n }\n set tabIndex(value) {\n // If the specified tabIndex value is null or undefined, fall back to the default value.\n this._tabIndex = value != null ? value : 0;\n }\n // This is a workaround for https://github.com/angular/angular/issues/19145\n // In aot mode, the lifecycle hooks from parent class are not called.\n // TODO(tinayuangao): Remove when the angular issue #19145 is fixed\n ngOnInit() {\n super.ngOnInit();\n }\n ngAfterContentInit() {\n super.ngAfterContentInit();\n }\n ngOnDestroy() {\n super.ngOnDestroy();\n }\n}\nMatNestedTreeNode.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatNestedTreeNode, deps: [{ token: i0.ElementRef }, { token: i1.CdkTree }, { token: i0.IterableDiffers }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatNestedTreeNode.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatNestedTreeNode, selector: \"mat-nested-tree-node\", inputs: { role: \"role\", disabled: \"disabled\", tabIndex: \"tabIndex\", node: [\"matNestedTreeNode\", \"node\"] }, host: { classAttribute: \"mat-nested-tree-node\" }, providers: [\n { provide: CdkNestedTreeNode, useExisting: MatNestedTreeNode },\n { provide: CdkTreeNode, useExisting: MatNestedTreeNode },\n { provide: CDK_TREE_NODE_OUTLET_NODE, useExisting: MatNestedTreeNode },\n ], exportAs: [\"matNestedTreeNode\"], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatNestedTreeNode, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-nested-tree-node',\n exportAs: 'matNestedTreeNode',\n inputs: ['role', 'disabled', 'tabIndex'],\n providers: [\n { provide: CdkNestedTreeNode, useExisting: MatNestedTreeNode },\n { provide: CdkTreeNode, useExisting: MatNestedTreeNode },\n { provide: CDK_TREE_NODE_OUTLET_NODE, useExisting: MatNestedTreeNode },\n ],\n host: {\n 'class': 'mat-nested-tree-node',\n },\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.CdkTree }, { type: i0.IterableDiffers }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }]; }, propDecorators: { node: [{\n type: Input,\n args: ['matNestedTreeNode']\n }], disabled: [{\n type: Input\n }], tabIndex: [{\n type: Input\n }] } });\n\n/**\n * Wrapper for the CdkTree padding with Material design styles.\n */\nclass MatTreeNodePadding extends CdkTreeNodePadding {\n /** The level of depth of the tree node. The padding will be `level * indent` pixels. */\n get level() {\n return this._level;\n }\n set level(value) {\n this._setLevelInput(value);\n }\n /** The indent for each level. Default number 40px from material design menu sub-menu spec. */\n get indent() {\n return this._indent;\n }\n set indent(indent) {\n this._setIndentInput(indent);\n }\n}\nMatTreeNodePadding.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTreeNodePadding, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatTreeNodePadding.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTreeNodePadding, selector: \"[matTreeNodePadding]\", inputs: { level: [\"matTreeNodePadding\", \"level\"], indent: [\"matTreeNodePaddingIndent\", \"indent\"] }, providers: [{ provide: CdkTreeNodePadding, useExisting: MatTreeNodePadding }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTreeNodePadding, decorators: [{\n type: Directive,\n args: [{\n selector: '[matTreeNodePadding]',\n providers: [{ provide: CdkTreeNodePadding, useExisting: MatTreeNodePadding }],\n }]\n }], propDecorators: { level: [{\n type: Input,\n args: ['matTreeNodePadding']\n }], indent: [{\n type: Input,\n args: ['matTreeNodePaddingIndent']\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Outlet for nested CdkNode. Put `[matTreeNodeOutlet]` on a tag to place children dataNodes\n * inside the outlet.\n */\nclass MatTreeNodeOutlet {\n constructor(viewContainer, _node) {\n this.viewContainer = viewContainer;\n this._node = _node;\n }\n}\nMatTreeNodeOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTreeNodeOutlet, deps: [{ token: i0.ViewContainerRef }, { token: CDK_TREE_NODE_OUTLET_NODE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nMatTreeNodeOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTreeNodeOutlet, selector: \"[matTreeNodeOutlet]\", providers: [\n {\n provide: CdkTreeNodeOutlet,\n useExisting: MatTreeNodeOutlet,\n },\n ], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTreeNodeOutlet, decorators: [{\n type: Directive,\n args: [{\n selector: '[matTreeNodeOutlet]',\n providers: [\n {\n provide: CdkTreeNodeOutlet,\n useExisting: MatTreeNodeOutlet,\n },\n ],\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: undefined, decorators: [{\n type: Inject,\n args: [CDK_TREE_NODE_OUTLET_NODE]\n }, {\n type: Optional\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Wrapper for the CdkTable with Material design styles.\n */\nclass MatTree extends CdkTree {\n}\nMatTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTree, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatTree.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTree, selector: \"mat-tree\", host: { attributes: { \"role\": \"tree\" }, classAttribute: \"mat-tree\" }, providers: [{ provide: CdkTree, useExisting: MatTree }], viewQueries: [{ propertyName: \"_nodeOutlet\", first: true, predicate: MatTreeNodeOutlet, descendants: true, static: true }], exportAs: [\"matTree\"], usesInheritance: true, ngImport: i0, template: `<ng-container matTreeNodeOutlet></ng-container>`, isInline: true, styles: [\".mat-tree{display:block}.mat-tree-node{display:flex;align-items:center;flex:1;word-wrap:break-word}.mat-nested-tree-node{border-bottom-width:0}\"], dependencies: [{ kind: \"directive\", type: MatTreeNodeOutlet, selector: \"[matTreeNodeOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTree, decorators: [{\n type: Component,\n args: [{ selector: 'mat-tree', exportAs: 'matTree', template: `<ng-container matTreeNodeOutlet></ng-container>`, host: {\n 'class': 'mat-tree',\n 'role': 'tree',\n }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, providers: [{ provide: CdkTree, useExisting: MatTree }], styles: [\".mat-tree{display:block}.mat-tree-node{display:flex;align-items:center;flex:1;word-wrap:break-word}.mat-nested-tree-node{border-bottom-width:0}\"] }]\n }], propDecorators: { _nodeOutlet: [{\n type: ViewChild,\n args: [MatTreeNodeOutlet, { static: 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 * Wrapper for the CdkTree's toggle with Material design styles.\n */\nclass MatTreeNodeToggle extends CdkTreeNodeToggle {\n}\nMatTreeNodeToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTreeNodeToggle, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatTreeNodeToggle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatTreeNodeToggle, selector: \"[matTreeNodeToggle]\", inputs: { recursive: [\"matTreeNodeToggleRecursive\", \"recursive\"] }, providers: [{ provide: CdkTreeNodeToggle, useExisting: MatTreeNodeToggle }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTreeNodeToggle, decorators: [{\n type: Directive,\n args: [{\n selector: '[matTreeNodeToggle]',\n providers: [{ provide: CdkTreeNodeToggle, useExisting: MatTreeNodeToggle }],\n inputs: ['recursive: matTreeNodeToggleRecursive'],\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 MAT_TREE_DIRECTIVES = [\n MatNestedTreeNode,\n MatTreeNodeDef,\n MatTreeNodePadding,\n MatTreeNodeToggle,\n MatTree,\n MatTreeNode,\n MatTreeNodeOutlet,\n];\nclass MatTreeModule {\n}\nMatTreeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatTreeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTreeModule, declarations: [MatNestedTreeNode,\n MatTreeNodeDef,\n MatTreeNodePadding,\n MatTreeNodeToggle,\n MatTree,\n MatTreeNode,\n MatTreeNodeOutlet], imports: [CdkTreeModule, MatCommonModule], exports: [MatCommonModule, MatNestedTreeNode,\n MatTreeNodeDef,\n MatTreeNodePadding,\n MatTreeNodeToggle,\n MatTree,\n MatTreeNode,\n MatTreeNodeOutlet] });\nMatTreeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTreeModule, imports: [CdkTreeModule, MatCommonModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatTreeModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CdkTreeModule, MatCommonModule],\n exports: [MatCommonModule, MAT_TREE_DIRECTIVES],\n declarations: MAT_TREE_DIRECTIVES,\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 * Tree flattener to convert a normal type of node to node with children & level information.\n * Transform nested nodes of type `T` to flattened nodes of type `F`.\n *\n * For example, the input data of type `T` is nested, and contains its children data:\n * SomeNode: {\n * key: 'Fruits',\n * children: [\n * NodeOne: {\n * key: 'Apple',\n * },\n * NodeTwo: {\n * key: 'Pear',\n * }\n * ]\n * }\n * After flattener flatten the tree, the structure will become\n * SomeNode: {\n * key: 'Fruits',\n * expandable: true,\n * level: 1\n * },\n * NodeOne: {\n * key: 'Apple',\n * expandable: false,\n * level: 2\n * },\n * NodeTwo: {\n * key: 'Pear',\n * expandable: false,\n * level: 2\n * }\n * and the output flattened type is `F` with additional information.\n */\nclass MatTreeFlattener {\n constructor(transformFunction, getLevel, isExpandable, getChildren) {\n this.transformFunction = transformFunction;\n this.getLevel = getLevel;\n this.isExpandable = isExpandable;\n this.getChildren = getChildren;\n }\n _flattenNode(node, level, resultNodes, parentMap) {\n const flatNode = this.transformFunction(node, level);\n resultNodes.push(flatNode);\n if (this.isExpandable(flatNode)) {\n const childrenNodes = this.getChildren(node);\n if (childrenNodes) {\n if (Array.isArray(childrenNodes)) {\n this._flattenChildren(childrenNodes, level, resultNodes, parentMap);\n }\n else {\n childrenNodes.pipe(take(1)).subscribe(children => {\n this._flattenChildren(children, level, resultNodes, parentMap);\n });\n }\n }\n }\n return resultNodes;\n }\n _flattenChildren(children, level, resultNodes, parentMap) {\n children.forEach((child, index) => {\n let childParentMap = parentMap.slice();\n childParentMap.push(index != children.length - 1);\n this._flattenNode(child, level + 1, resultNodes, childParentMap);\n });\n }\n /**\n * Flatten a list of node type T to flattened version of node F.\n * Please note that type T may be nested, and the length of `structuredData` may be different\n * from that of returned list `F[]`.\n */\n flattenNodes(structuredData) {\n let resultNodes = [];\n structuredData.forEach(node => this._flattenNode(node, 0, resultNodes, []));\n return resultNodes;\n }\n /**\n * Expand flattened node with current expansion status.\n * The returned list may have different length.\n */\n expandFlattenedNodes(nodes, treeControl) {\n let results = [];\n let currentExpand = [];\n currentExpand[0] = true;\n nodes.forEach(node => {\n let expand = true;\n for (let i = 0; i <= this.getLevel(node); i++) {\n expand = expand && currentExpand[i];\n }\n if (expand) {\n results.push(node);\n }\n if (this.isExpandable(node)) {\n currentExpand[this.getLevel(node) + 1] = treeControl.isExpanded(node);\n }\n });\n return results;\n }\n}\n/**\n * Data source for flat tree.\n * The data source need to handle expansion/collapsion of the tree node and change the data feed\n * to `MatTree`.\n * The nested tree nodes of type `T` are flattened through `MatTreeFlattener`, and converted\n * to type `F` for `MatTree` to consume.\n */\nclass MatTreeFlatDataSource extends DataSource {\n constructor(_treeControl, _treeFlattener, initialData) {\n super();\n this._treeControl = _treeControl;\n this._treeFlattener = _treeFlattener;\n this._flattenedData = new BehaviorSubject([]);\n this._expandedData = new BehaviorSubject([]);\n this._data = new BehaviorSubject([]);\n if (initialData) {\n // Assign the data through the constructor to ensure that all of the logic is executed.\n this.data = initialData;\n }\n }\n get data() {\n return this._data.value;\n }\n set data(value) {\n this._data.next(value);\n this._flattenedData.next(this._treeFlattener.flattenNodes(this.data));\n this._treeControl.dataNodes = this._flattenedData.value;\n }\n connect(collectionViewer) {\n return merge(collectionViewer.viewChange, this._treeControl.expansionModel.changed, this._flattenedData).pipe(map(() => {\n this._expandedData.next(this._treeFlattener.expandFlattenedNodes(this._flattenedData.value, this._treeControl));\n return this._expandedData.value;\n }));\n }\n disconnect() {\n // no op\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 * Data source for nested tree.\n *\n * The data source for nested tree doesn't have to consider node flattener, or the way to expand\n * or collapse. The expansion/collapsion will be handled by TreeControl and each non-leaf node.\n */\nclass MatTreeNestedDataSource extends DataSource {\n constructor() {\n super(...arguments);\n this._data = new BehaviorSubject([]);\n }\n /**\n * Data for the nested tree\n */\n get data() {\n return this._data.value;\n }\n set data(value) {\n this._data.next(value);\n }\n connect(collectionViewer) {\n return merge(...[collectionViewer.viewChange, this._data]).pipe(map(() => this.data));\n }\n disconnect() {\n // no op\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 * Generated bundle index. Do not edit.\n */\n\nexport { MatNestedTreeNode, MatTree, MatTreeFlatDataSource, MatTreeFlattener, MatTreeModule, MatTreeNestedDataSource, MatTreeNode, MatTreeNodeDef, MatTreeNodeOutlet, MatTreeNodePadding, MatTreeNodeToggle };\n","/* tslint:disable */\n/* eslint-disable */\nexport enum EventDeliveryStatusEnum {\n DeliverNotAttempted = 'DeliverNotAttempted',\n Delivered = 'Delivered',\n Failed = 'Failed'\n}\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"'id'\">\n <lib-text-table-column>\n {{ element.id }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'webhook'\">\n <lib-text-table-column horizAlign=\"right\">\n {{ element.webhookUrl }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'solution'\">\n <lib-text-table-column>\n {{ element.webhookSolutionName }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'status'\">\n <lib-status-chip\n class=\"event-delivery-statuses\"\n [status]=\"element.status\">\n </lib-status-chip>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'createdUtc'\">\n <lib-date-time-label [dateUtc]=\"element.createdUtc\"></lib-date-time-label>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'resend'\">\n <lib-vitu-tooltip text=\"Resend\">\n <i class=\"far fa-redo global-table-cell-image-link\" (click)=\"onClickResend()\"></i>\n </lib-vitu-tooltip>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { EventDeliveryStatusEnum } from \"@merchant_api/models/event-delivery-status-enum\";\n\n@Component({\n selector: \"app-event-deliveries-table-cell-content\",\n templateUrl: \"./event-deliveries-table-cell-content.component.html\",\n styleUrls: [\"./event-deliveries-table-cell-content.component.less\"],\n})\nexport class EventDeliveriesTableCellContentComponent {\n\n @Input() columnId: string;\n @Input() element: any;\n\n @Output() resend = new EventEmitter<{eventDeliveryId: number; isDelivered: boolean}>();\n\n constructor() {}\n\n onClickResend() {\n this.resend.emit({eventDeliveryId: this.element.id, isDelivered: this.element.status === EventDeliveryStatusEnum.Delivered});\n }\n\n}\n","<div class=\"outer-container\">\n\n <lib-title-bar\n [crumbs]=\"[{ 'label': 'Developer Tools' }, { 'label': 'Webhooks' }, { 'label': 'Event History' , 'link': '/dashboard/developer/webhooks/event-history' }, { 'label': pageTitle }]\">\n </lib-title-bar>\n\n <div class=\"details-container\">\n\n <ng-container *ngIf=\"!event then spinner\"></ng-container>\n <ng-container *ngIf=\"event then formFields\"></ng-container>\n\n </div>\n\n</div>\n\n<ng-template #formFields>\n\n <div class=\"details-common-container\">\n\n <lib-text-field label=\"ID\">\n {{ event.id }}\n </lib-text-field>\n\n <lib-text-field label=\"Token\">\n {{ event.token }}\n </lib-text-field>\n\n <lib-text-field id=\"eventTypeTextField\" label=\"Event Type\">\n {{ event.eventType }}\n </lib-text-field>\n\n <lib-text-field [label]=\"'Date (' + LocalTimePoint.formatZ() + ')'\">\n <lib-date-time-label *ngIf=\"event.createdUtc\" [singleLine]=\"true\" [dateUtc]=\"event.createdUtc\"></lib-date-time-label>\n </lib-text-field>\n\n </div>\n\n <div class=\"label\">\n DETAILS\n </div>\n\n <div class=\"details-custom-container\" *ngIf=\"this.dataSource\">\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <!-- This is the tree node template for leaf nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <!-- use a disabled button to provide padding for tree leaf -->\n <button mat-icon-button disabled></button>\n {{node.name}}\n </mat-tree-node>\n <!-- This is the tree node template for expandable nodes -->\n <mat-tree-node *matTreeNodeDef=\"let node;when: hasChild\" matTreeNodePadding>\n <button mat-icon-button matTreeNodeToggle\n [attr.aria-label]=\"'Toggle ' + node.name\">\n <i [class]=\"'far ' + (treeControl.isExpanded(node) ? 'fa-chevron-down' : 'fa-chevron-right')\"></i>\n </button>\n {{node.name}}\n </mat-tree-node>\n </mat-tree>\n\n </div>\n\n <div class=\"label\">\n <ng-container *ngIf=\"eventDeliveriesLoading || eventDeliveries?.length > 0; else deliveriesNotLoaded\">\n DELIVERIES\n </ng-container>\n <ng-template #deliveriesNotLoaded>\n <ng-container *ngIf=\"eventDeliveriesError; else noDeliveries\">\n ERROR LOADING DELIVERIES\n </ng-container>\n <ng-template #noDeliveries>\n NO DELIVERIES\n </ng-template>\n </ng-template>\n </div>\n\n <div *ngIf=\"eventDeliveriesLoading || eventDeliveries?.length > 0\" class=\"events-container\">\n\n <lib-table-base\n #eventDeliveriesTableComponent\n [columnDefs]=\"eventDeliveriesColumnDefs\"\n [rowsData]=\"eventDeliveries\"\n [rowsDataLoading]=\"eventDeliveriesLoading\"\n [rowsDataShowWhileLoading]=\"true\"\n rowsDataEmptyMessage=\"No Deliveries\"\n [pager]=\"pager\"\n (pageChanged)=\"onPageChanged($event)\"\n [sorting]=\"sorting\"\n (sortingChanged)=\"onSortingChanged($event)\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-event-deliveries-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\"\n (resend)=\"onResend($event)\">\n </app-event-deliveries-table-cell-content>\n </ng-template>\n </lib-table-base>\n\n </div>\n\n <div class=\"form-buttons-line\">\n <lib-action-button\n [kind]=\"ActionButtonKind.STROKED\"\n largeButton\n label=\"Back\"\n (click)=\"onCancel()\">\n </lib-action-button>\n </div>\n\n</ng-template>\n\n<ng-template #spinner>\n <lib-busy-indicator>\n </lib-busy-indicator>\n</ng-template>\n","import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from \"@angular/core\";\nimport { ActionButtonKind, LocalTimePoint, ColumnDef, Pager, TableSorting } from \"shared-lib\";\nimport { FlatTreeControl } from \"@angular/cdk/tree\";\nimport { MatTreeFlatDataSource, MatTreeFlattener } from \"@angular/material/tree\";\nimport { EventDetailsDto } from \"@merchant_api/models/event-details-dto\";\nimport { EventDeliveryDto } from \"@merchant_api/models/event-delivery-dto\";\nimport { Sorting } from \"@merchant_app/storage/event-deliveries/event-deliveries.state\";\n\ninterface TreeNode {\n name: string;\n children?: TreeNode[];\n}\n\n/** Flat node with expandable and level information */\ninterface FlatNode {\n expandable: boolean;\n name: string;\n level: number;\n}\n\n@Component({\n selector: \"app-event-details\",\n templateUrl: \"./event-details.component.html\",\n styleUrls: [\"./event-details.component.less\"],\n})\nexport class EventDetailsComponent implements OnChanges {\n\n @Input() event: EventDetailsDto;\n @Input() eventLoading: boolean;\n\n @Input() eventDeliveries: Array<EventDeliveryDto>;\n @Input() eventDeliveriesLoading: boolean;\n @Input() eventDeliveriesError: Error;\n\n @Output() cancel = new EventEmitter<void>();\n @Output() resend = new EventEmitter<{token: string; eventDeliveryId: number; isDelivered: boolean}>();\n\n @Input() pager: Pager;\n @Output() pageChanged = new EventEmitter<{token: string; page: number}>();\n\n @Input() sorting: Sorting;\n @Output() sortingChanged = new EventEmitter<{token: string; sorting: Sorting}>();\n\n merchantId: string;\n\n pageTitle: string;\n\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n eventDeliveriesColumnDefs: ColumnDef[] = [\n { id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n { id: \"id\", title: \"ID\", flexWidthBasisInPixels: 130, flexWidthGrow: 1, canSort: true},\n { id: \"webhook\", title: \"Webhook\", flexWidthBasisInPixels: 400, flexWidthGrow: 8},\n { id: \"solution\", title: \"Solution\", flexWidthBasisInPixels: 160, flexWidthGrow: 1},\n { id: \"status\", title: \"Status\", flexWidthBasisInPixels: 175, flexWidthGrow: 1, canSort: true},\n { id: \"createdUtc\", title: `Date (${LocalTimePoint.formatZ()})`,\n flexWidthBasisInPixels: 140, flexWidthGrow: 1, canSort: true},\n { id: \"resend\", title: \"Resend\", flexWidthBasisInPixels: 40, flexWidthGrow: 1},\n { id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n ];\n\n ActionButtonKind = ActionButtonKind;\n LocalTimePoint = LocalTimePoint;\n\n private _transformer = (node: TreeNode, level: number) => ({\n expandable: !!node.children && node.children.length > 0,\n name: node.name,\n level,\n });\n\n treeControl = new FlatTreeControl<FlatNode>(\n node => node.level, node => node.expandable);\n\n treeFlattener = new MatTreeFlattener(\n this._transformer, node => node.level, node => node.expandable, node => node.children);\n\n dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);\n\n hasChild = (_: number, node: FlatNode) => node.expandable;\n\n constructor() {}\n\n ngOnChanges(changes: SimpleChanges) {\n\n this.pageTitle = \"View Event\";\n if (\"event\" in changes && this.event) {\n this.dataSource.data = this.createTreeData();\n }\n }\n\n onResend(payload: {eventDeliveryId: number; isDelivered: boolean}): void {\n\n this.resend.emit({token: this.event.token, eventDeliveryId: payload.eventDeliveryId, isDelivered: payload.isDelivered});\n }\n\n onPageChanged(page: number): void {\n\n this.pageChanged.emit({token: this.event.token, page});\n }\n\n onSortingChanged(sorting: TableSorting): void {\n\n this.sortingChanged.emit({\n token: this.event.token,\n sorting: {\n orderBy: sorting.orderBy as any,\n orderDirection: sorting.orderDirection\n }}\n );\n }\n\n onCancel(): void {\n\n this.cancel.emit();\n }\n\n private createTreeData() {\n\n const tree = JSON.parse(this.event.data);\n const retVal = this.traverse(null, tree);\n return retVal.children;\n }\n\n private traverse(jsonKey: any, jsonValue: any) {\n let retVal;\n if( jsonValue !== null && typeof jsonValue == \"object\" ) {\n retVal = {\n name: jsonKey,\n children: []\n };\n Object.entries(jsonValue).forEach(([key, value]) => {\n // key is either an array index or object key\n retVal.children.push(this.traverse(key, value));\n });\n }\n else {\n // jsonValue is a number or string\n retVal = { name: `${jsonKey} : ${jsonValue}` };\n }\n return retVal;\n }\n\n}\n","import { Component } from \"@angular/core\";\nimport { Store } from \"@ngrx/store\";\nimport { IStore } from \"@merchant_app/storage/store\";\n\nimport * as EventSelectors from \"@merchant_app/storage/event/event.selectors\";\n\nimport * as EventDeliveriesSelectors from \"@merchant_app/storage/event-deliveries/event-deliveries.selectors\";\n\nimport { GoBackAction } from \"@merchant_app/storage/router/router.actions\";\nimport { ResendEventDeliveryAction } from \"@merchant_app/storage/event-delivery/event-delivery.actions\";\nimport {\n PageChangedEventDeliveriesAction,\n SortEventDeliveriesAction\n} from \"@merchant_app/storage/event-deliveries/event-deliveries.actions\";\nimport { Sorting } from \"@merchant_app/storage/event-deliveries/event-deliveries.state\";\n\n@Component({\n selector: \"app-event\",\n templateUrl: \"./event.component.html\",\n styleUrls: [\"./event.component.less\"]\n})\nexport class EventComponent {\n\n constructor(\n private store: Store<IStore>\n ) {}\n\n event$ = this.store.select(EventSelectors.getEvent);\n eventLoading$ = this.store.select(EventSelectors.getEventLoading);\n\n eventDeliveries$ = this.store.select(EventDeliveriesSelectors.getEventDeliveries);\n eventDeliveriesLoading$ = this.store.select(EventDeliveriesSelectors.getEventDeliveriesLoading);\n eventDeliveriesError$ = this.store.select(EventDeliveriesSelectors.getEventDeliveriesError);\n\n pager$ = this.store.select(EventDeliveriesSelectors.getEventDeliveriesPager);\n sorting$ = this.store.select(EventDeliveriesSelectors.getEventDeliveriesSorting);\n\n onCancel(): void {\n\n this.store.dispatch(GoBackAction());\n }\n\n onResend(payload: {token: string; eventDeliveryId: number; isDelivered: boolean}): void {\n\n this.store.dispatch(new ResendEventDeliveryAction(payload.token, payload.eventDeliveryId, payload.isDelivered));\n }\n\n onPageChanged(payload: {token: string; page: number}) {\n this.store.dispatch(new PageChangedEventDeliveriesAction(payload.token, payload.page));\n }\n\n onSortingChanged(payload: {token: string; sorting: Sorting}) {\n this.store.dispatch(new SortEventDeliveriesAction(payload.token, payload.sorting));\n }\n\n}\n","<app-event-details\n [event]=\"event$ | async\"\n [eventLoading]=\"eventLoading$ | async\"\n [eventDeliveries]=\"eventDeliveries$ | async\"\n [eventDeliveriesLoading]=\"eventDeliveriesLoading$ | async\"\n [eventDeliveriesError]=\"eventDeliveriesError$ | async\"\n (cancel)=\"onCancel()\"\n (resend)=\"onResend($event)\"\n [pager]=\"pager$ | async\"\n (pageChanged)=\"onPageChanged($event)\"\n [sorting]=\"sorting$ | async\"\n (sortingChanged)=\"onSortingChanged($event)\">\n</app-event-details>\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getEventsState = (store: IStore) => store.events;\n\nexport const getEvents = createSelector(\n getEventsState,\n eventsState => eventsState.rows,\n);\n\nexport const getEventsLoading = createSelector(\n getEventsState,\n eventsState => eventsState.loading,\n);\n\nexport const getEventsError = createSelector(\n getEventsState,\n eventsState => eventsState.error,\n);\n","import { EventsDto } from \"@merchant_api/models/events-dto\";\nimport { Action } from \"@ngrx/store\";\nimport { Sorting, Filter } from \"./events.state\";\n\nexport enum ActionTypes {\n FilterEvents = \"[Events] FilterEvents\",\n SortEvents = \"[Events] SortEvents\",\n PageChangedEvents = \"[Events] PageChangedEvents\",\n GetEvents = \"[Events] GetEvents\",\n GetEventsSucceed = \"[Events] GetEventsSucceed\",\n GetEventsFail = \"[Events] GetEventsFail\"\n}\n\nexport class FilterEventsAction implements Action {\n\n constructor(public filter: Filter) {}\n\n readonly type = ActionTypes.FilterEvents;\n}\n\nexport class SortEventsAction implements Action {\n\n constructor(public sorting: Sorting) {}\n\n readonly type = ActionTypes.SortEvents;\n}\n\nexport class PageChangedEventsAction implements Action {\n\n constructor(public page: number) {}\n\n readonly type = ActionTypes.PageChangedEvents;\n}\n\nexport class GetEventsAction implements Action {\n\n constructor(public page: number, public filter?: Filter, public sorting?: Sorting) {}\n\n readonly type = ActionTypes.GetEvents;\n}\n\nexport class GetEventsSucceedAction implements Action {\n\n constructor(\n public response: EventsDto,\n public pageSize: number,\n public page: number,\n public stateExtensions?: any) {}\n\n readonly type = ActionTypes.GetEventsSucceed;\n}\n\nexport class GetEventsFailAction implements Action {\n\n constructor(public error: Error) {}\n\n readonly type = ActionTypes.GetEventsFail;\n}\n","/* tslint:disable */\n/* eslint-disable */\nexport enum EventOrderByEnum {\n Id = 'Id',\n CreatedUtc = 'CreatedUtc',\n EventType = 'EventType'\n}\n","/* tslint:disable */\n/* eslint-disable */\nexport enum MerchantEventOrderByEnum {\n Id = 'Id',\n CreatedUtc = 'CreatedUtc',\n EventType = 'EventType'\n}\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"MerchantEventOrderByEnum.Id\">\n <lib-text-table-column>\n {{ element.id }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'token'\">\n <lib-text-table-column>\n {{ element.token }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"MerchantEventOrderByEnum.EventType\">\n <lib-text-table-column>\n {{ element.eventType }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"MerchantEventOrderByEnum.CreatedUtc\">\n <lib-date-time-label [dateUtc]=\"element.createdUtc\"></lib-date-time-label>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n\n\n\n\n\n","import { MerchantEventOrderByEnum } from \"@admin_api/models/merchant-event-order-by-enum\";\nimport { Component, Input } from \"@angular/core\";\n\n@Component({\n selector: \"app-event-history-table-cell-content\",\n templateUrl: \"./event-history-table-cell-content.component.html\",\n styleUrls: [\"./event-history-table-cell-content.component.less\"],\n})\nexport class EventHistoryTableCellContentComponent {\n\n @Input() columnId: string;\n @Input() element: any;\n\n MerchantEventOrderByEnum = MerchantEventOrderByEnum;\n\n}\n","<lib-filters-base\n #filtersBase\n [filterForm]=\"filterForm\"\n (filterChanged)=\"onFilterChanged($event)\"\n [filter]=\"filter\"\n suppressInitialRequest>\n\n <div [formGroup]=\"filterForm\"> <!-- required -->\n\n <ng-template #basicFilters>\n\n <div class=\"global-form-line-regular-layout\">\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-date\n [formGroup]=\"filterForm\"\n formFieldName=\"localDateInterval\"\n label=\"Date\"\n [clearValue]=\"filter?._initialFilter?.localDateInterval\"\n restrictFuture\n isFilter\n readonly>\n </lib-vitu-form-field-date>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"eventTypes\"\n isFilter\n multiple\n label=\"Event Type\"\n [options]=\"webhookLookups?.eventTypes\"\n optionLabelKey=\"name\"\n optionValueKey=\"id\"\n [showReset]=\"filtersBase.resetFieldVisible('eventTypes')\"\n (handleReset)=\"filtersBase.resetField('eventTypes')\">\n </lib-vitu-form-field-select>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"mid\"\n label=\"MID\"\n isFilter\n autocomplete=\"off\"\n [maxlength]=\"100\"\n [showReset]=\"filtersBase.resetFieldVisible('mid')\"\n (handleReset)=\"filtersBase.resetField('mid')\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"tid\"\n isFilter\n label=\"TID\"\n autocomplete=\"off\"\n [maxlength]=\"14\"\n [showReset]=\"filtersBase.resetFieldVisible('tid')\"\n (handleReset)=\"filtersBase.resetField('tid')\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"fundingInstructionRef\"\n isFilter\n label=\"Funding Ref\"\n autocomplete=\"off\"\n [maxlength]=\"100\"\n [showReset]=\"filtersBase.resetFieldVisible('fundingInstructionRef')\"\n (handleReset)=\"filtersBase.resetField('fundingInstructionRef')\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"transactionId\"\n isFilter\n label=\"Transaction ID\"\n [maxlength]=\"20\"\n [showReset]=\"filtersBase.resetFieldVisible('transactionId')\"\n (handleReset)=\"filtersBase.resetField('transactionId')\">\n </lib-vitu-form-field-input>\n </div>\n\n </div>\n\n </ng-template>\n\n </div>\n\n</lib-filters-base>\n","import { Component, Input, Output, EventEmitter } from \"@angular/core\";\nimport { UntypedFormBuilder } from \"@angular/forms\";\nimport { LocalTimePoint } from \"shared-lib\";\nimport { WebhookEventTypesDto } from \"@merchant_api/models/webhook-event-types-dto\";\nimport { Filter } from \"@admin_app/storage/events/events.state\";\n\n@Component({\n selector: \"app-event-history-log-filters\",\n templateUrl: \"./event-history-log-filters.component.html\",\n styleUrls: [\"./event-history-log-filters.component.less\"]\n})\nexport class EventHistoryLogFiltersComponent {\n\n @Output() filterChanged = new EventEmitter<Filter>();\n @Input() filter: Filter;\n @Input() webhookLookups: WebhookEventTypesDto;\n\n LocalTimePoint = LocalTimePoint;\n\n constructor(\n private fb: UntypedFormBuilder\n ) {}\n\n filterForm = this.fb.group({\n localDateInterval: [null],\n eventTypes: [null],\n mid: [null],\n tid: [null],\n fundingInstructionRef: [null],\n transactionId: [null]\n });\n\n onFilterChanged(filter: Filter) {\n this.filterChanged.emit(filter);\n }\n\n}\n","<div class=\"outer-container\">\n\n <lib-title-bar\n [crumbs]=\"[{ 'label': 'Developer Tools' }, { 'label': 'Webhooks' }, { 'label': 'Event History' }]\">\n </lib-title-bar>\n\n <app-event-history-log-filters\n [filter]=\"filter\"\n (filterChanged)=\"filterChanged.emit($event)\"\n [webhookLookups]=\"webhookLookups\">\n </app-event-history-log-filters>\n\n <lib-table-base\n class=\"events-table\"\n [columnDefs]=\"eventsColumnDefs\"\n [rowsData]=\"events\"\n [rowsDataLoading]=\"loading\"\n [rowsDataShowWhileLoading]=\"true\"\n [rowsDataError]=\"error\"\n rowsDataErrorMessage=\"Error Loading Event History\"\n [sorting]=\"sorting\"\n (sortingChanged)=\"onSortingChanged($event)\"\n [pager]=\"pager\"\n (pageChanged)=\"pageChanged.emit($event)\"\n selectedRowProperty=\"token\"\n (rowSelected)=\"onRowSelected($event)\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-event-history-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\">\n </app-event-history-table-cell-content>\n </ng-template>\n </lib-table-base>\n\n</div>\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { ColumnDef, LocalTimePoint, TableSorting, Pager } from \"shared-lib\";\nimport { Router } from \"@angular/router\";\nimport { WebhookEventTypesDto } from \"@merchant_api/models/webhook-event-types-dto\";\nimport { EventOrderByEnum } from \"@merchant_api/models/event-order-by-enum\";\nimport { Filter, Sorting } from \"@merchant_app/storage/events/events.state\";\nimport { EventsDto } from \"@merchant_api/models/events-dto\";\n\n@Component({\n selector: \"app-event-history-log\",\n templateUrl: \"./event-history-log.component.html\",\n styleUrls: [ \"./event-history-log.component.less\" ]\n})\nexport class EventHistoryLogComponent {\n\n @Input() events: Array<EventsDto>;\n @Input() loading = false;\n @Input() error: Error;\n @Input() webhookLookups: WebhookEventTypesDto;\n\n @Input() sorting: Sorting = {\n orderBy: null,\n orderDirection: null\n };\n @Input() pager: Pager;\n @Input() filter: Filter;\n\n @Output() sortingChanged = new EventEmitter<Sorting>();\n @Output() pageChanged = new EventEmitter<number>();\n @Output() filterChanged = new EventEmitter<Filter>();\n\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n eventsColumnDefs: ColumnDef[] = [\n { id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n { id: EventOrderByEnum.Id, title: \"ID\", flexWidthBasisInPixels: 150, flexWidthGrow: 0, canSort: true},\n { id: \"token\", title: \"Token\", flexWidthBasisInPixels: 340, flexWidthGrow: 0},\n { id: EventOrderByEnum.EventType, title: \"Event Type\", flexWidthBasisInPixels: 440, flexWidthGrow: 0, canSort: true},\n { id: EventOrderByEnum.CreatedUtc, title:`Date (${LocalTimePoint.formatZ()})`,\n flexWidthBasisInPixels: 140, flexWidthGrow: 0, canSort: true},\n { id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n ];\n\n constructor(private router: Router) {}\n\n onSortingChanged(sorting: TableSorting) {\n this.sortingChanged.emit({\n orderBy: sorting.orderBy as EventOrderByEnum,\n orderDirection: sorting.orderDirection\n });\n }\n\n onRowSelected(token: string) {\n this.router.navigate([`/dashboard/developer/webhooks/event-history/${token}`]);\n }\n\n}\n","import { Component } from \"@angular/core\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { select, Store } from \"@ngrx/store\";\nimport { map } from \"rxjs/operators\";\nimport { getWebhookLookups } from \"@merchant_app/storage/webhook/webhook.selectors\";\nimport { getEvents, getEventsError, getEventsLoading, getEventsState } from \"@merchant_app/storage/events/events.selectors\";\nimport { FilterEventsAction, PageChangedEventsAction, SortEventsAction } from \"@merchant_app/storage/events/events.actions\";\nimport { Filter, Sorting } from \"@merchant_app/storage/events/events.state\";\n\n@Component({\n selector: \"app-event-history\",\n templateUrl: \"./event-history.component.html\",\n styleUrls: [ \"./event-history.component.less\" ]\n})\nexport class EventHistoryComponent {\n\n events$ = this.store.select(getEvents);\n loading$ = this.store.select(getEventsLoading);\n error$ = this.store.select(getEventsError);\n webhookLookups$ = this.store.select(getWebhookLookups);\n\n pager$ = this.store.pipe(select(getEventsState), map((i) => i.pager));\n sorting$ = this.store.pipe(select(getEventsState), map((i) => i.sorting));\n filter$ = this.store.pipe(select(getEventsState), map((i) => i.filter));\n\n constructor(private store: Store<IStore>) {}\n\n onSortingChanged(sorting: Sorting) {\n this.store.dispatch(new SortEventsAction(sorting));\n }\n\n onPageChanged(page: number) {\n this.store.dispatch(new PageChangedEventsAction(page));\n }\n\n onFilterChanged(filter: Filter) {\n this.store.dispatch(new FilterEventsAction(filter));\n }\n\n}\n","<app-event-history-log\n [events]=\"events$ | async\"\n [loading]=\"loading$ | async\"\n [error]=\"error$ | async\"\n [webhookLookups]=\"webhookLookups$ | async\"\n [sorting]=\"sorting$ | async\"\n (sortingChanged)=\"onSortingChanged($event)\"\n [pager]=\"pager$ | async\"\n (pageChanged)=\"onPageChanged($event)\"\n [filter]=\"filter$ | async\"\n (filterChanged)=\"onFilterChanged($event)\">\n</app-event-history-log>\n","import { Action } from \"@ngrx/store\";\nimport { PagedDataDtoOfDisputeDto } from \"@merchant_api/models/paged-data-dto-of-dispute-dto\";\nimport { Filter, Sorting } from \"./disputes.state\";\n\nexport enum ActionTypes {\n GetDisputes = \"[DISPUTES] GetDisputes\",\n GetDisputesSucceed = \"[DISPUTES] GetDisputesSucceed\",\n GetDisputesFail = \"[DISPUTES] GetDisputesFail\",\n SortDisputes = \"[DISPUTES] SortDisputes\",\n PageChangedDisputes = \"[DISPUTES] PageChangedDisputes\",\n FilterDisputes = \"[DISPUTES] FilterDisputes\"\n}\n\nexport class GetDisputesAction implements Action {\n\n constructor(public page: number, public pageSize?: number, public filter?: Filter, public sorting?: Sorting) {}\n\n readonly type = ActionTypes.GetDisputes;\n}\n\nexport class GetDisputesSucceedAction implements Action {\n\n constructor(public response: PagedDataDtoOfDisputeDto,\n public pageSize: number,\n public page: number,\n public stateExtensions?: any) {}\n\n readonly type = ActionTypes.GetDisputesSucceed;\n}\n\nexport class GetDisputesFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetDisputesFail;\n}\n\nexport class SortDisputesAction implements Action {\n\n constructor(public sorting: Sorting) {}\n\n readonly type = ActionTypes.SortDisputes;\n}\n\nexport class PageChangedDisputesAction implements Action {\n\n constructor(public page: number) {}\n\n readonly type = ActionTypes.PageChangedDisputes;\n}\n\nexport class FilterDisputesAction implements Action {\n\n constructor(public filter: Filter) {}\n\n readonly type = ActionTypes.FilterDisputes;\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getDisputesState = (store: IStore) => store.disputes;\n\nexport const getDisputes = createSelector(\n getDisputesState,\n disputesState => disputesState.record\n);\n\nexport const getDisputesLoading = createSelector(\n getDisputesState,\n disputesState => disputesState.loading\n);\n\nexport const getDisputesError = createSelector(\n getDisputesState,\n disputesState => disputesState.error\n);\n\nexport const getDisputesPager = createSelector(\n getDisputesState,\n disputesState => disputesState.pager\n);\n\nexport const getDisputesSorting = createSelector(\n getDisputesState,\n disputesState => disputesState.sorting\n);\n\nexport const getDisputesFilter = createSelector(\n getDisputesState,\n disputesState => disputesState.filter\n);\n","<lib-filters-base\n #filtersBase\n [filterForm]=\"filterForm\"\n (filterChanged)=\"onFilterChanged($event)\"\n [filter]=\"filter\"\n [moreFields]=\"moreFields\"\n suppressInitialRequest>\n\n <div [formGroup]=\"filterForm\"> <!-- required -->\n\n <ng-template #basicFilters>\n\n <div class=\"global-form-line-regular-layout\">\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-date\n [formGroup]=\"filterForm\"\n formFieldName=\"localRaiseDateInterval\"\n label=\"Date Created\"\n restrictFuture\n isFilter\n readonly>\n </lib-vitu-form-field-date>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"caseNumber\"\n label=\"Case\"\n isFilter\n autocomplete=\"off\"\n [maxlength]=\"100\"\n [showReset]=\"filtersBase.resetFieldVisible('caseNumber')\"\n (handleReset)=\"filtersBase.resetField('caseNumber')\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"disputeType\"\n isFilter\n label=\"Type\"\n [options]=\"disputeTypeList\"\n [showReset]=\"filtersBase.resetFieldVisible('disputeType')\"\n (handleReset)=\"wipeField('disputeType')\">\n </lib-vitu-form-field-select>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"processor\"\n isFilter\n label=\"Processor\"\n [options]=\"processorList\"\n [showReset]=\"filtersBase.resetFieldVisible('processor')\"\n (handleReset)=\"wipeField('processor')\">\n </lib-vitu-form-field-select>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"mid\"\n label=\"MID\"\n isFilter\n autocomplete=\"off\"\n [maxlength]=\"100\"\n [showReset]=\"filtersBase.resetFieldVisible('mid')\"\n (handleReset)=\"filtersBase.resetField('mid')\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"disputeAmount\"\n isFilter\n label=\"Amount\"\n autocomplete=\"off\"\n [mask]=\"amountMask\"\n [showReset]=\"filtersBase.resetFieldVisible('disputeAmount')\"\n (handleReset)=\"filtersBase.resetField('disputeAmount')\">\n </lib-vitu-form-field-input>\n </div>\n\n </div>\n\n </ng-template>\n\n <ng-template #moreFilters>\n\n <div class=\"global-form-line-regular-layout\">\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"paymentToken\"\n label=\"Payment Token\"\n isFilter\n autocomplete=\"off\"\n [maxlength]=\"100\"\n [showReset]=\"filtersBase.resetFieldVisible('paymentToken')\"\n (handleReset)=\"filtersBase.resetField('paymentToken')\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"disputeOutcome\"\n label=\"Outcome\"\n isFilter\n autocomplete=\"off\"\n [maxlength]=\"100\"\n [showReset]=\"filtersBase.resetFieldVisible('disputeOutcome')\"\n (handleReset)=\"filtersBase.resetField('disputeOutcome')\">\n </lib-vitu-form-field-input>\n </div>\n\n </div>\n\n </ng-template>\n\n </div>\n\n</lib-filters-base>\n","import { Component, Input, Output, EventEmitter } from \"@angular/core\";\nimport { UntypedFormBuilder } from \"@angular/forms\";\nimport { Filter } from \"@merchant_app/storage/disputes/disputes.state\";\nimport { LocalTimePoint } from \"shared-lib\";\nimport { ProcessorEnum } from \"@merchant_api/models/processor-enum\";\nimport { DisputeTypeEnum } from \"@merchant_api/models/dispute-type-enum\";\n\n@Component({\n selector: \"app-disputes-log-filters\",\n templateUrl: \"./disputes-log-filters.component.html\",\n styleUrls: [\"./disputes-log-filters.component.less\"]\n})\nexport class DisputesLogFiltersComponent {\n\n @Output() filterChanged = new EventEmitter<Filter>();\n @Input() filter: Filter;\n\n LocalTimePoint = LocalTimePoint;\n\n processorList: Array<ProcessorEnum>;\n disputeTypeList: Array<DisputeTypeEnum>;\n\n readonly moreFields = [\"paymentToken\", \"disputeOutcome\"];\n\n constructor(\n private fb: UntypedFormBuilder\n ) {\n this.processorList = Object.values(ProcessorEnum);\n this.disputeTypeList = Object.values(DisputeTypeEnum);\n }\n\n amountMask = {\n mask: Number,\n scale: 2,\n thousandsSeparator: \",\",\n padFractionalZeros: true,\n radix: \".\",\n mapToRadix: [\",\"]\n };\n\n filterForm = this.fb.group({\n caseNumber: [null],\n mid: [null],\n processor: [null],\n disputeType: [null],\n disputeAmount: [null],\n disputeOutcome: [null],\n localRaiseDateInterval: [null],\n localStatusDateInterval: [null],\n localDueDateInterval: [null],\n paymentToken: [null],\n publicTransactionId: [null]\n });\n\n onFilterChanged(filter: Filter) {\n this.filterChanged.emit(filter);\n }\n\n wipeField(fieldName: string) {\n this.filterForm.get(fieldName).setValue(undefined);\n this.filterForm.updateValueAndValidity();\n }\n\n}\n","<div class=\"outer-container\">\n\n <lib-title-bar\n [crumbs]=\"[{ 'label': 'Disputes' }]\">\n </lib-title-bar>\n\n <app-disputes-log-filters\n [filter]=\"filter\"\n (filterChanged)=\"filterChanged.emit($event)\">\n </app-disputes-log-filters>\n\n <lib-table-base\n class=\"disputes-table\"\n [columnDefs]=\"columnDefs\"\n [rowsData]=\"disputes\"\n [rowsDataLoading]=\"disputesLoading\"\n [rowsDataError]=\"disputesError\"\n rowsDataErrorMessage=\"Error Loading Disputes\"\n [rowsDataShowWhileLoading]=\"true\"\n selectedRowProperty=\"token\"\n [sorting]=\"sorting\"\n (sortingChanged)=\"onSortingChanged($event)\"\n [pager]=\"pager\"\n (pageChanged)=\"pageChanged.emit($event)\"\n (rowSelected)=\"onRowSelected($event)\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-disputes-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\">\n </app-disputes-table-cell-content>\n </ng-template>\n </lib-table-base>\n\n</div>\n","import { DisputeDto } from \"@merchant_api/models/dispute-dto\";\nimport { DisputeOrderBy } from \"@merchant_api/models/dispute-order-by\";\nimport { Filter, Sorting } from \"@merchant_app/storage/disputes/disputes.state\";\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { ColumnDef, LocalTimePoint, Pager, TableSorting } from \"shared-lib\";\n\n@Component({\n selector: \"app-disputes-log\",\n templateUrl: \"./disputes-log.component.html\",\n styleUrls: [\"./disputes-log.component.less\"],\n})\nexport class DisputesLogComponent {\n\n @Input() disputes: Array<DisputeDto>;\n @Input() disputesLoading = false;\n @Input() disputesError: Error;\n @Input() sorting: Sorting = {\n orderBy: null,\n orderDirection: null\n };\n @Input() pager: Pager;\n\n @Output() sortingChanged = new EventEmitter<Sorting>();\n @Output() pageChanged = new EventEmitter<number>();\n\n @Input() filter: Filter;\n @Output() filterChanged = new EventEmitter<Filter>();\n\n readonly columnDefs: ColumnDef[];\n\n constructor(private router: Router) {\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n this.columnDefs = [\n { id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n { id: DisputeOrderBy.RaiseDateUtc, title: `Date Created (${LocalTimePoint.formatZ()})`,\n flexWidthBasisInPixels: 130, flexWidthGrow: 0, canSort: true},\n { id: DisputeOrderBy.CaseNumber, title: \"Case\", flexWidthBasisInPixels: 210, flexWidthGrow: 0, canSort: true},\n { id: \"disputeType\", title: \"Type\", flexWidthBasisInPixels: 110, flexWidthGrow: 0},\n { id: \"processor\", title: \"Processor\", flexWidthBasisInPixels: 90, flexWidthGrow: 0},\n { id: \"mid\", title: \"MID\", flexWidthBasisInPixels: 120, flexWidthGrow: 1},\n { id: DisputeOrderBy.CaseReason, title: \"Reason Type\", flexWidthBasisInPixels: 100, flexWidthGrow: 6, canSort: true},\n { id: \"amount\", title: \"Amount\", flexWidthBasisInPixels: 80, flexWidthGrow: 1},\n { id: \"statusDescription\", title: \"Status\", flexWidthBasisInPixels: 60, flexWidthGrow: 3, canSort: false},\n { id: \"disputeOutcome\", title: \"Outcome\", flexWidthBasisInPixels: 60, flexWidthGrow: 1},\n { id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0}\n ];\n }\n\n onSortingChanged(sorting: TableSorting) {\n this.sortingChanged.emit({\n orderBy: sorting.orderBy as any,\n orderDirection: sorting.orderDirection\n });\n }\n\n onRowSelected(token: string) {\n this.router.navigate([`/dashboard/disputes/${token}`]);\n }\n\n}\n","import { IStore } from \"@merchant_app/storage/store\";\nimport { Component, OnInit } from \"@angular/core\";\nimport { Store } from \"@ngrx/store\";\n\nimport * as DisputesActions from \"@merchant_app/storage/disputes/disputes.actions\";\nimport * as DisputesSelectors from \"@merchant_app/storage/disputes/disputes.selectors\";\nimport { Filter, Sorting } from \"@merchant_app/storage/disputes/disputes.state\";\n\n@Component({\n selector: \"app-disputes\",\n templateUrl: \"./disputes.component.html\",\n styleUrls: [\"./disputes.component.less\"],\n})\nexport class DisputesComponent implements OnInit {\n\n disputes$ = this.store.select(DisputesSelectors.getDisputes);\n disputesLoading$ = this.store.select(DisputesSelectors.getDisputesLoading);\n disputesError$ = this.store.select(DisputesSelectors.getDisputesError);\n\n pager$ = this.store.select(DisputesSelectors.getDisputesPager);\n sorting$ = this.store.select(DisputesSelectors.getDisputesSorting);\n filter$ = this.store.select(DisputesSelectors.getDisputesFilter);\n\n constructor(private store: Store<IStore>) {}\n\n ngOnInit() {}\n\n onSortingChanged(sorting: Sorting) {\n this.store.dispatch(new DisputesActions.SortDisputesAction(sorting));\n }\n\n onPageChanged(page: number) {\n this.store.dispatch(new DisputesActions.PageChangedDisputesAction(page));\n }\n\n onFilterChanged(filter: Filter) {\n this.store.dispatch(new DisputesActions.FilterDisputesAction(filter));\n }\n\n}\n","<app-disputes-log\n [disputes]=\"disputes$ | async\"\n [disputesLoading]=\"disputesLoading$ | async\"\n [disputesError]=\"disputesError$ | async\"\n [pager]=\"pager$ | async\"\n (pageChanged)=\"onPageChanged($event)\"\n [sorting]=\"sorting$ | async\"\n (sortingChanged)=\"onSortingChanged($event)\"\n [filter]=\"filter$ | async\"\n (filterChanged)=\"onFilterChanged($event)\">\n</app-disputes-log>\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getDisputeState = (store: IStore) => store.dispute;\n\nexport const getDispute = createSelector(\n getDisputeState,\n disputeState => disputeState.record,\n);\n\nexport const getDisputeLoading = createSelector(\n getDisputeState,\n disputeState => disputeState.loading,\n);\n","<div class=\"outer-container\">\n\n <lib-title-bar\n [crumbs]=\"[{ 'label': 'Disputes' , 'link': '/dashboard/disputes' }, { 'label': pageTitle }]\">\n </lib-title-bar>\n\n <div class=\"details-container\">\n\n <ng-container *ngIf=\"!dispute then spinner\"></ng-container>\n <ng-container *ngIf=\"dispute then formFields\"></ng-container>\n\n </div>\n\n</div>\n\n<ng-template #formFields>\n\n <div class=\"details-common-container\">\n\n <lib-text-field [label]=\"'Date Created (' + LocalTimePoint.formatZ() + ')'\">\n <lib-date-time-label *ngIf=\"dispute.raiseDateUtc\" [singleLine]=\"true\" [dateUtc]=\"dispute.raiseDateUtc\"></lib-date-time-label>\n </lib-text-field>\n\n <lib-text-field label=\"Case\">\n {{ dispute.caseNumber }}\n </lib-text-field>\n\n <lib-text-field label=\"Type\">\n {{ dispute.disputeType }}\n </lib-text-field>\n\n <lib-text-field label=\"Processor\">\n {{ dispute.processor }}\n </lib-text-field>\n\n <lib-text-field label=\"MID\">\n {{ dispute.mid }}\n </lib-text-field>\n\n <lib-text-field label=\"Reason Type\">\n {{ dispute.reasonCodeDescription }}\n </lib-text-field>\n\n <lib-text-field label=\"Amount\">\n {{ dispute.disputeAmount | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field label=\"Status\">\n {{ dispute.statusDescription }}\n </lib-text-field>\n\n <lib-text-field [label]=\"'Date Updated (' + LocalTimePoint.formatZ() + ')'\">\n <lib-date-time-label *ngIf=\"dispute.statusDateUtc\" [singleLine]=\"true\" [dateUtc]=\"dispute.statusDateUtc\"></lib-date-time-label>\n </lib-text-field>\n\n <lib-text-field label=\"Outcome\">\n {{ dispute.disputeOutcome }}\n </lib-text-field>\n\n <lib-text-field [label]=\"'Date Due (' + LocalTimePoint.formatZ() + ')'\">\n <lib-date-time-label *ngIf=\"dispute.dueDateUtc\" [singleLine]=\"true\" [dateUtc]=\"dispute.dueDateUtc\"></lib-date-time-label>\n </lib-text-field>\n\n <lib-text-field label=\"Fees\">\n {{ dispute.fees | vituCurrencyUsd }}\n </lib-text-field>\n\n <lib-text-field label=\"Payment Token\">\n {{ dispute.paymentToken }}\n </lib-text-field>\n\n <lib-text-field label=\"Transaction ID\">\n {{ dispute.publicTransactionId }}\n </lib-text-field>\n\n <lib-text-field label=\"Token\">\n {{ dispute.token }}\n </lib-text-field>\n\n </div>\n\n <div class=\"form-buttons-line\">\n <lib-action-button\n [kind]=\"ActionButtonKind.STROKED\"\n largeButton\n label=\"Back\"\n (click)=\"onCancel()\">\n </lib-action-button>\n </div>\n\n</ng-template>\n\n<ng-template #spinner>\n <lib-busy-indicator>\n </lib-busy-indicator>\n</ng-template>\n","import { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { ActionButtonKind, LocalTimePoint } from \"shared-lib\";\nimport { DisputeDto } from \"@merchant_api/models/dispute-dto\";\n\n@Component({\n selector: \"app-dispute-details\",\n templateUrl: \"./dispute-details.component.html\",\n styleUrls: [\"./dispute-details.component.less\"],\n})\nexport class DisputeDetailsComponent {\n\n @Input() dispute: DisputeDto;\n @Input() disputeLoading: boolean;\n\n @Output() cancel = new EventEmitter<void>();\n\n pageTitle = \"View Dispute\";\n\n ActionButtonKind = ActionButtonKind;\n LocalTimePoint = LocalTimePoint;\n\n onCancel(): void {\n this.cancel.emit();\n }\n\n}\n","import { Component } from \"@angular/core\";\nimport { Store } from \"@ngrx/store\";\nimport { IStore } from \"@merchant_app/storage/store\";\n\nimport * as DisputeSelectors from \"@merchant_app/storage/dispute/dispute.selectors\";\nimport { GoBackAction } from \"@merchant_app/storage/router/router.actions\";\n\n@Component({\n selector: \"app-dispute\",\n templateUrl: \"./dispute.component.html\",\n styleUrls: [\"./dispute.component.less\"]\n})\nexport class DisputeComponent {\n\n constructor(private store: Store<IStore>) {}\n\n dispute$ = this.store.select(DisputeSelectors.getDispute);\n disputeLoading$ = this.store.select(DisputeSelectors.getDisputeLoading);\n\n onCancel(): void {\n this.store.dispatch(GoBackAction());\n }\n\n}\n","<app-dispute-details\n [dispute]=\"dispute$ | async\"\n [disputeLoading]=\"disputeLoading$ | async\"\n (cancel)=\"onCancel()\">\n</app-dispute-details>\n","import { Action } from \"@ngrx/store\";\nimport { Sorting, Filter } from \"./payments.state\";\nimport { GcpStorageResource } from \"@merchant_api/models/gcp-storage-resource\";\nimport { PagedDataDtoOfPayment } from \"@merchant_api/models/paged-data-dto-of-payment\";\n\nexport enum ActionTypes {\n FilterPayments = \"[Payments] FilterPayments\",\n SortPayments = \"[Payments] SortPayments\",\n PageChangedPayments = \"[Payments] PageChangedPayments\",\n GetPayments = \"[Payments] GetPayments\",\n GetPaymentsSucceed = \"[Payments] GetPaymentsSucceed\",\n GetPaymentsFail = \"[Payments] GetPaymentsFail\",\n ExportPaymentsToCsv = \"[Payments] ExportPaymentsToCSV\",\n ExportPaymentsToCsvSucceed = \"[Payments] ExportPaymentsToCSVSucceed\",\n ExportPaymentsToCsvFail = \"[Payments] ExportPaymentsToCSVFail\"\n}\n\nexport class FilterPaymentsAction implements Action {\n\n constructor(public filter: Filter) {}\n\n readonly type = ActionTypes.FilterPayments;\n}\n\nexport class SortPaymentsAction implements Action {\n\n constructor(public sorting: Sorting) {}\n\n readonly type = ActionTypes.SortPayments;\n}\n\nexport class PageChangedPaymentsAction implements Action {\n\n constructor(public page: number) {}\n\n readonly type = ActionTypes.PageChangedPayments;\n}\n\nexport class GetPaymentsAction implements Action {\n\n constructor(public page: number, public filter?: Filter, public sorting?: Sorting) {}\n\n readonly type = ActionTypes.GetPayments;\n}\n\nexport class GetPaymentsSucceedAction implements Action {\n\n constructor(public response: PagedDataDtoOfPayment, public pageSize: number,\n public page: number, public stateExtensions?: any) {}\n\n readonly type = ActionTypes.GetPaymentsSucceed;\n}\n\nexport class GetPaymentsFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetPaymentsFail;\n}\n\nexport class ExportPaymentsToCsvAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.ExportPaymentsToCsv;\n}\n\nexport class ExportPaymentsToCsvSucceedAction implements Action {\n\n constructor(public resource: GcpStorageResource) {}\n\n readonly type = ActionTypes.ExportPaymentsToCsvSucceed;\n}\n\nexport class ExportPaymentsToCsvFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.ExportPaymentsToCsvFail;\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getPaymentsState = createSelector(\n (store: IStore) => store.payments,\n store => store,\n);\n","/* tslint:disable */\n/* eslint-disable */\nexport enum PaymentOrderBy {\n Amount = 'Amount',\n DateAndTime = 'DateAndTime',\n PayerName = 'PayerName',\n CardNumber = 'CardNumber',\n TransactionType = 'TransactionType'\n}\n","<ng-container [ngSwitch]=\"columnId\">\n\n <ng-container *ngSwitchCase=\"PaymentOrderBy.Amount\">\n <lib-text-table-column>\n {{ element.amount | vituCurrencyUsd }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Token'\">\n <lib-text-table-column>\n {{ element.token }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'TransactionStatus'\">\n <lib-status-chip\n class=\"group-transaction-statuses\"\n [status]=\"element?.status\">\n </lib-status-chip>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"PaymentOrderBy.PayerName\">\n <lib-text-table-column>\n {{ getDisplayTextForPayerName() }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'DigitalWallet'\">\n <lib-digital-wallet-image-table-column\n [kind]=\"element.digitalWallet\">\n </lib-digital-wallet-image-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'CardBrand'\">\n <span *ngIf=\"element.card?.cardBrand\" class=\"card-image\">\n <i [class]=\"'fab fa-cc-' + element.card.cardBrand.toLowerCase() + ' fa-2x'\"></i>\n </span>\n <lib-text-table-column *ngIf=\"!element.card?.cardBrand\">\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"PaymentOrderBy.CardNumber\">\n <lib-text-table-column>\n {{ getDisplayTextForCardNumber() }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'DisputeType'\">\n <ng-container *ngIf=\"element.disputeTypes?.length; else noDisputes\">\n <ng-container *ngFor=\"let type of element.disputeTypes\">\n <lib-vitu-tooltip [text]=\"type\" position=\"above\" [showDelayInMillis]=\"0\">\n <div class=\"icon\" (mousedown)=\"onMouseDownDisputeType($event, type)\">\n\n <ng-container [ngSwitch]=\"type\">\n\n <ng-container *ngSwitchCase=\"DisputeTypeEnum.Chargeback\">\n <span class=\"fa-stack\">\n <i class=\"fas fa-history fa-stack-2x\"></i>\n <div class=\"dispute-type-chargeback-icon-mask\"></div>\n <i class=\"far fa-dollar-sign fa-stack-1x\"></i>\n </span>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"DisputeTypeEnum.Retrieval\">\n <i class=\"fas fa-hand-holding-usd fa-2x\"></i>\n </ng-container>\n\n </ng-container>\n\n </div>\n </lib-vitu-tooltip>\n </ng-container>\n </ng-container>\n <ng-template #noDisputes>\n <lib-text-table-column>\n </lib-text-table-column>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"PaymentOrderBy.DateAndTime\">\n <lib-date-time-label [dateUtc]=\"element.dateUtc\"></lib-date-time-label>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Fees'\">\n <lib-text-table-column>\n {{ element.fees | vituCurrencyUsd }}\n </lib-text-table-column>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n </ng-container>\n\n</ng-container>\n\n\n\n\n\n","import { Component, Input } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { DigitalWalletEnum } from \"@merchant_api/models/digital-wallet-enum\";\nimport { DisputeTypeEnum } from \"@merchant_api/models/dispute-type-enum\";\nimport { PaymentOrderBy } from \"@merchant_api/models/payment-order-by\";\nimport { DateTimeFormatUtils } from \"shared-lib\";\n\n@Component({\n selector: \"app-group-transactions-table-cell-content\",\n templateUrl: \"./group-transactions-table-cell-content.component.html\",\n styleUrls: [\"./group-transactions-table-cell-content.component.less\"],\n})\nexport class GroupTransactionsTableCellContentComponent {\n @Input() columnId: string;\n @Input() element: any;\n\n PaymentOrderBy = PaymentOrderBy;\n DateTimeFormatUtils = DateTimeFormatUtils;\n DisputeTypeEnum = DisputeTypeEnum;\n DigitalWalletEnum = DigitalWalletEnum;\n\n constructor(private router: Router) {}\n\n getDisplayTextForPayerName() {\n let displayText;\n if (this.element.payer?.fullName) {\n displayText = `${this.element.payer.fullName}`.toUpperCase();\n }\n return displayText;\n }\n\n getDisplayTextForCardNumber() {\n let displayText;\n if ((this.element.card?.first6) && (this.element.card?.last4)) {\n displayText = `${this.element.card.first6}XXX${this.element.card?.last4}`;\n }\n return displayText;\n }\n\n onMouseDownDisputeType(event: MouseEvent, disputeType: DisputeTypeEnum) {\n let suffix;\n if (disputeType === DisputeTypeEnum.Retrieval) {\n suffix = \"retrievals\";\n }\n if (disputeType === DisputeTypeEnum.Chargeback) {\n suffix = \"chargebacks\";\n }\n if (suffix) {\n event.stopPropagation();\n const url = `/dashboard/transactions/${this.element.recentTransaction}/${suffix}`;\n this.router.navigate([url]);\n }\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nexport enum PaymentStatus {\n Pending = 'Pending',\n Success = 'Success',\n Failed = 'Failed',\n Rejected = 'Rejected',\n Funded = 'Funded',\n Refunded = 'Refunded',\n PartiallyRefunded = 'PartiallyRefunded',\n Voided = 'Voided'\n}\n","<lib-filters-base\n #filtersBase\n [filterForm]=\"filterForm\"\n (filterChanged)=\"onFilterChanged($event)\"\n [filter]=\"filter\"\n [moreFields]=\"moreFields\"\n suppressInitialRequest>\n\n <div [formGroup]=\"filterForm\"> <!-- required -->\n\n <ng-template #basicFilters>\n\n <div class=\"global-form-line-regular-layout\">\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-date\n [formGroup]=\"filterForm\"\n formFieldName=\"localDateInterval\"\n label=\"Date\"\n restrictFuture\n isFilter\n readonly>\n </lib-vitu-form-field-date>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"token\"\n label=\"Token\"\n isFilter\n autocomplete=\"off\"\n [maxlength]=\"100\"\n [showReset]=\"filtersBase.resetFieldVisible('token')\"\n (handleReset)=\"filtersBase.resetField('token')\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"statuses\"\n isFilter\n multiple\n label=\"Status\"\n [options]=\"statusList\"\n [showReset]=\"filtersBase.resetFieldVisible('statuses')\"\n (handleReset)=\"filtersBase.resetField('statuses')\"\n [spaceBetweenCapsOnLabels]=\"true\">\n </lib-vitu-form-field-select>\n </div>\n\n <div class=\"form-field-container\">\n <div class=\"global-form-line-combo-field\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"first6\"\n isFilter\n label=\"First6\"\n autocomplete=\"off\"\n [mask]=\"{ mask: '000000' }\"\n [showReset]=\"filtersBase.resetFieldVisible('first6')\"\n (handleReset)=\"filtersBase.resetField('first6')\">\n </lib-vitu-form-field-input>\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"last4\"\n isFilter\n label=\"Last4\"\n autocomplete=\"off\"\n [mask]=\"{ mask: '0000' }\"\n [showReset]=\"filtersBase.resetFieldVisible('last4')\"\n (handleReset)=\"filtersBase.resetField('last4')\">\n </lib-vitu-form-field-input>\n </div>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"amount\"\n isFilter\n label=\"Amount\"\n autocomplete=\"off\"\n [mask]=\"amountMask\"\n [showReset]=\"filtersBase.resetFieldVisible('amount')\"\n (handleReset)=\"filtersBase.resetField('amount')\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"payerName\"\n isFilter\n label=\"Payer Name\"\n [maxlength]=\"71\"\n [showReset]=\"filtersBase.resetFieldVisible('payerName')\"\n (handleReset)=\"filtersBase.resetField('payerName')\"\n [errorOverrides]=\"[{'pattern': 'Only alphanumeric and space chars'}]\">\n </lib-vitu-form-field-input>\n </div>\n\n </div>\n\n </ng-template>\n\n <ng-template #moreFilters>\n\n <div class=\"global-form-line-regular-layout\">\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"cardBrands\"\n isFilter\n multiple\n label=\"Card Brand\"\n [options]=\"cardList\"\n [showReset]=\"filtersBase.resetFieldVisible('cardBrands')\"\n (handleReset)=\"filtersBase.resetField('cardBrands')\">\n </lib-vitu-form-field-select>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"disputeTypes\"\n isFilter\n multiple\n label=\"Dispute Type\"\n [options]=\"disputeTypeList\"\n [showReset]=\"filtersBase.resetFieldVisible('disputeTypes')\"\n (handleReset)=\"filtersBase.resetField('disputeTypes')\">\n </lib-vitu-form-field-select>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"gateways\"\n isFilter\n multiple\n label=\"Gateway\"\n [options]=\"gatewayList\"\n [showReset]=\"filtersBase.resetFieldVisible('gateways')\"\n (handleReset)=\"filtersBase.resetField('gateways')\">\n </lib-vitu-form-field-select>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"tid\"\n isFilter\n label=\"TID\"\n autocomplete=\"off\"\n [maxlength]=\"14\"\n [showReset]=\"filtersBase.resetFieldVisible('tid')\"\n (handleReset)=\"filtersBase.resetField('tid')\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-date\n [formGroup]=\"filterForm\"\n formFieldName=\"localDateSettledInterval\"\n label=\"Date Settled\"\n restrictFuture\n isFilter\n readonly>\n </lib-vitu-form-field-date>\n </div>\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-input\n [formGroup]=\"filterForm\"\n formFieldName=\"mid\"\n label=\"MID\"\n isFilter\n autocomplete=\"off\"\n [maxlength]=\"100\"\n [showReset]=\"filtersBase.resetFieldVisible('mid')\"\n (handleReset)=\"filtersBase.resetField('mid')\">\n </lib-vitu-form-field-input>\n </div>\n\n </div>\n\n <div class=\"global-form-line-regular-layout\">\n\n <div class=\"form-field-container\">\n <lib-vitu-form-field-select\n [formGroup]=\"filterForm\"\n formFieldName=\"digitalWallets\"\n isFilter\n multiple\n label=\"Digital Wallet\"\n [options]=\"digitalWalletList\"\n [showReset]=\"filtersBase.resetFieldVisible('digitalWallets')\"\n (handleReset)=\"filtersBase.resetField('digitalWallets')\">\n </lib-vitu-form-field-select>\n </div>\n\n </div>\n\n </ng-template>\n\n </div>\n\n</lib-filters-base>\n","import { Component, Input, Output, EventEmitter } from \"@angular/core\";\nimport { UntypedFormBuilder, Validators } from \"@angular/forms\";\nimport { Filter } from \"@merchant_app/storage/payments/payments.state\";\nimport { CardBrandEnum } from \"@merchant_api/models/card-brand-enum\";\nimport { TransactionType } from \"@merchant_api/models/transaction-type\";\nimport { DisputeTypeEnum } from \"@merchant_api/models/dispute-type-enum\";\nimport { LocalTimePoint } from \"shared-lib\";\nimport { GatewayEnum } from \"@merchant_api/models/gateway-enum\";\nimport { PaymentStatus } from \"@merchant_api/models/payment-status\";\nimport { DigitalWalletEnum } from \"@merchant_api/models/digital-wallet-enum\";\n\n@Component({\n selector: \"app-group-transaction-log-filters\",\n templateUrl: \"./group-transaction-log-filters.component.html\",\n styleUrls: [\"./group-transaction-log-filters.component.less\"]\n})\nexport class GroupTransactionLogFiltersComponent {\n\n @Output() filterChanged = new EventEmitter<Filter>();\n\n @Input() filter: Filter;\n\n gatewayList: Array<GatewayEnum>;\n typeList: Array<TransactionType>;\n digitalWalletList: Array<DigitalWalletEnum>;\n\n readonly moreFields = [\"cardBrands\", \"disputeTypes\", \"gateways\", \"tid\", \"localDateSettledInterval\", \"mid\", \"digitalWallets\"];\n\n LocalTimePoint = LocalTimePoint;\n\n constructor(\n private fb: UntypedFormBuilder\n ) {\n this.gatewayList = Object.values(GatewayEnum);\n this.typeList = Object.values(TransactionType).sort();\n this.digitalWalletList = Object.values(DigitalWalletEnum);\n }\n\n amountMask = {\n mask: Number,\n scale: 2,\n thousandsSeparator: \",\",\n padFractionalZeros: true,\n radix: \".\",\n mapToRadix: [\",\"]\n };\n\n filterForm = this.fb.group({\n localDateInterval: [null],\n localDateSettledInterval: [null],\n amount: [null],\n first6: [null, [Validators.pattern(/^\\d{6}$/)]],\n last4: [null, [Validators.pattern(/^\\d{4}$/)]],\n payerName: [null, [Validators.pattern(/^[a-zA-Z0-9\\s]+$/)]],\n cardBrands: [null],\n disputeTypes: [null],\n token: [null],\n statuses: [null],\n gateways: [null],\n tid: [null],\n mid: [null],\n digitalWallets: [null]\n });\n\n cardList = [\n CardBrandEnum.Amex,\n CardBrandEnum.Discover,\n CardBrandEnum.MasterCard,\n CardBrandEnum.Visa,\n ];\n\n disputeTypeList = Object.values(DisputeTypeEnum);\n\n statusList = Object.values(PaymentStatus);\n\n onFilterChanged(filter: any) {\n\n this.filterChanged.emit(filter);\n }\n\n}\n","<div class=\"outer-container\">\n\n <lib-title-bar [crumbs]=\"[{ 'label': 'Payments' }]\">\n </lib-title-bar>\n\n <app-group-transaction-log-filters\n [filter]=\"filter\"\n (filterChanged)=\"filterChanged.emit($event)\">\n </app-group-transaction-log-filters>\n\n <div class=\"table-actions-bar\">\n <lib-action-button label=\"Export\" (click)=\"this.exportToCsv.emit()\" [disabled]=\"exportButtonDisabled()\"\n fontImage=\"far fa-file-export fa-lg\" [kind]=\"ActionButtonKind.SECONDARY\">\n </lib-action-button>\n </div>\n\n <div class=\"table-container\">\n <ng-container *ngIf=\"true then table\"></ng-container>\n <ng-container *ngIf=\"exportLoading then spinner\"></ng-container>\n </div>\n\n</div>\n\n<ng-template #spinner>\n <lib-busy-indicator>\n </lib-busy-indicator>\n</ng-template>\n\n<ng-template #table>\n\n <lib-table-base\n [columnDefs]=\"paymentsColumnDefs\"\n [rowsData]=\"rowsData\"\n [rowsDataLoading]=\"loading\"\n [rowsDataError]=\"error\"\n rowsDataErrorMessage=\"Error Loading Payments\"\n rowsDataEmptyMessage=\"No Payments Found\"\n [rowsDataShowWhileLoading]=\"true\"\n [sorting]=\"sorting\"\n (sortingChanged)=\"onSortingChanged($event)\"\n [pager]=\"pager\"\n (pageChanged)=\"pageChanged.emit($event)\"\n (rowSelected)=\"onRowSelected($event)\">\n\n <ng-template let-element=\"element\" let-columnId=\"columnId\">\n <app-group-transactions-table-cell-content\n [columnId]=\"columnId\"\n [element]=\"element\">\n </app-group-transactions-table-cell-content>\n </ng-template>\n\n </lib-table-base>\n\n</ng-template>\n","import { Component, Input, Output, EventEmitter } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { ColumnDef, TableSorting, LocalTimePoint, Pager, ActionButtonKind } from \"shared-lib\";\nimport { PaymentOrderBy } from \"@merchant_api/models/payment-order-by\";\n\nimport { Sorting, Filter } from \"@merchant_app/storage/payments/payments.state\";\nimport { Payment } from \"@merchant_api/models/payment\";\nimport { CurrentUserDto } from \"@merchant_app/storage/current-user/current-user.state\";\nimport { CurrentUserPermissions } from \"@merchant_app/shared/current-user-permissions\";\n\ntype RowsData = Payment[];\n\n@Component({\n selector: \"app-payment-log\",\n templateUrl: \"./payment-log.component.html\",\n styleUrls: [\"./payment-log.component.less\"],\n})\nexport class PaymentLogComponent {\n\n @Input() currentUser: CurrentUserDto;\n @Input() loading = false;\n @Input() error: Error;\n @Input() exportLoading = false;\n @Input() rowsData: RowsData;\n @Input() sorting: Sorting = {\n orderBy: null,\n orderDirection: null\n };\n @Input() pager: Pager;\n @Input() filter: Filter;\n\n @Output() filterChanged = new EventEmitter<Filter>();\n @Output() sortingChanged = new EventEmitter<Sorting>();\n @Output() pageChanged = new EventEmitter<number>();\n @Output() exportToCsv = new EventEmitter<void>();\n\n ActionButtonKind = ActionButtonKind;\n\n readonly paymentsColumnDefs: ColumnDef[];\n\n constructor(private router: Router, private currPerms: CurrentUserPermissions) {\n // NOTE: Optimise table widths against minimum table width (or table can have bottom horizontal scrollbar)\n this.paymentsColumnDefs = [\n { id: \"leftGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n { id: PaymentOrderBy.DateAndTime, title: `Date (${LocalTimePoint.formatZ()})`, flexWidthBasisInPixels: 100,\n flexWidthGrow: 1, canSort: true},\n { id: \"Token\", title: \"Token\", flexWidthBasisInPixels: 163, flexWidthGrow: 4},\n { id: \"TransactionStatus\", title: \"Status\", flexWidthBasisInPixels: 150, flexWidthGrow: 0},\n { id: PaymentOrderBy.Amount, title: \"Amount\", flexWidthBasisInPixels: 96, flexWidthGrow: 1, canSort: true},\n { id: \"CardBrand\", title: \"Card\", flexWidthBasisInPixels: 50, flexWidthGrow: 2},\n { id: PaymentOrderBy.CardNumber, title: \"Card Number\", flexWidthBasisInPixels: 130, flexWidthGrow: 2, canSort: true},\n { id: \"DigitalWallet\", title: \"Digital Wallet\", flexWidthBasisInPixels: 75, flexWidthGrow: 2},\n { id: PaymentOrderBy.PayerName, title: \"Payer Name\", flexWidthBasisInPixels: 80, flexWidthGrow: 8, canSort: true},\n { id: \"Fees\", title: \"Fees\", flexWidthBasisInPixels: 96, flexWidthGrow: 1},\n { id: \"DisputeType\", title: \"Dispute Type\", flexWidthBasisInPixels: 80, flexWidthGrow: 2},\n { id: \"rightGutter\", title: \"\", flexWidthBasisInPixels: 20, flexWidthGrow: 0},\n ];\n }\n\n onSortingChanged(sort: Sorting|TableSorting) {\n const sorting = sort as TableSorting;\n this.sortingChanged.emit({\n orderBy: sorting.orderBy as (null | PaymentOrderBy),\n orderDirection: sorting.orderDirection\n });\n }\n\n onRowSelected(rowData: string|Payment): void {\n if (!this.hasTransactionsGetAndPaymentsGetPermissions) {\n return;\n }\n const payment = rowData as Payment;\n this.router.navigate([`/dashboard/transactions/${payment.recentTransaction}`]);\n }\n\n exportButtonDisabled() {\n return this.exportLoading\n || !this.filter?.localDateInterval?.from\n || !this.filter?.localDateInterval?.to;\n }\n\n get hasTransactionsGetAndPaymentsGetPermissions(): boolean {\n return this.currPerms.has([\"core.payments.get\", \"core.transactions.get\"]);\n }\n\n}\n","import { NgModule } from \"@angular/core\";\nimport { Routes, RouterModule } from \"@angular/router\";\n\nimport { AuthGuard } from \"./shared/router-guards/auth.guard\";\nimport { PermissionsGuard } from \"./shared/router-guards/permissions.guard\";\n\nimport { DashboardComponent } from \"./pages/dashboard/dashboard.component\";\nimport { TransactionsComponent } from \"./pages/transactions/transactions.component\";\nimport { TransactionComponent } from \"./pages/transaction/transaction.component\";\nimport { UserComponent } from \"./pages/user/user.component\";\nimport { UsersComponent } from \"./pages/users/users.component\";\nimport { ForbiddenComponent } from \"./pages/forbidden/forbidden.component\";\nimport { PageUnavailableComponent } from \"./pages/page-unavailable/page-unavailable.component\";\nimport { RoleComponent } from \"./pages/role/role.component\";\nimport { RolesComponent } from \"./pages/roles/roles.component\";\nimport { WebhooksComponent } from \"./pages/webhooks/webhooks.component\";\nimport { WebhookComponent } from \"./pages/webhook/webhook.component\";\nimport { ReportsComponent } from \"./pages/reports/reports.component\";\nimport { ClientsComponent } from \"./pages/clients/clients.component\";\nimport { ClientComponent } from \"./pages/client/client.component\";\nimport { ConfigurationsComponent } from \"./pages/configurations/configurations.component\";\nimport { FundingComponent } from \"./pages/funding/funding.component\";\nimport { FundingItemComponent } from \"./pages/funding-item/funding-item.component\";\nimport { HelpComponent } from \"./pages/help/help.component\";\nimport { ErrorUiService } from \"shared-lib\";\nimport { DynamicDefaultRouteGuard } from \"./shared/router-guards/default-dynamic-route.guard\";\nimport { EventComponent } from \"./pages/event/event.component\";\nimport { EventHistoryComponent } from \"./pages/event-history/event-history.component\";\nimport { DisputesComponent } from \"./pages/disputes/disputes.component\";\nimport { DisputeComponent } from \"./pages/dispute/dispute.component\";\nimport { PaymentsComponent } from \"./pages/payments/payments.component\";\n\nclass DummyComponent {}\n\nconst routes: Routes = [\n { path: \"\", redirectTo: \"dashboard\", pathMatch: \"full\" },\n {\n path: \"dashboard\",\n component: DashboardComponent,\n canActivate: [AuthGuard],\n canActivateChild: [PermissionsGuard],\n children: [\n { path: \"payments\", component: PaymentsComponent,\n data: { requiredPermissions: [\"core.payments.search\"] } },\n { path: \"transactions\", component: TransactionsComponent,\n data: { requiredPermissions: [\"core.transactions.search\"] } },\n { path: \"transactions/:id/history\", component: TransactionComponent,\n data: { requiredPermissions: [\"core.payments.get\", \"core.transactions.get\"] } },\n { path: \"transactions/:id/chargebacks\", component: TransactionComponent,\n data: { requiredPermissions: [\"core.payments.get\", \"core.transactions.get\"] } },\n { path: \"transactions/:id/retrievals\", component: TransactionComponent,\n data: { requiredPermissions: [\"core.payments.get\", \"core.transactions.get\"] } },\n { path: \"transactions/:id/fees\", component: TransactionComponent,\n data: { requiredPermissions: [\"core.payments.get\", \"core.transactions.get\"] } },\n { path: \"transactions/:id/additional-information\", component: TransactionComponent,\n data: { requiredPermissions: [\"core.payments.get\", \"core.transactions.get\"] } },\n { path: \"transactions/:id\", component: TransactionComponent,\n data: { requiredPermissions: [\"core.payments.get\", \"core.transactions.get\"] } },\n { path: \"developer/webhooks/event-history/:id\", component: EventComponent,\n data: { requiredPermissions: [] } },\n { path: \"developer/webhooks/event-history\", component: EventHistoryComponent,\n data: { requiredPermissions: [\"core.webhooks.lookups\"] } },\n { path: \"developer/webhooks/configure/create\", component: WebhookComponent,\n data: { requiredPermissions: [\"core.webhooks.create\"] } },\n { path: \"developer/webhooks/configure/:id\", component: WebhookComponent,\n data: { requiredPermissions: [\"core.webhooks.get\"] } },\n { path: \"developer/webhooks/configure\", component: WebhooksComponent,\n data: { requiredPermissions: [\"core.webhooks.search\"] } },\n { path: \"users/create\", component: UserComponent, data: { requiredPermissions: [\"core.users.create\"] } },\n { path: \"users/:id\", component: UserComponent, data: { requiredPermissions: [\"core.users.get\"] } },\n { path: \"users\", component: UsersComponent, data: { requiredPermissions: [\"core.users.search\"] } },\n { path: \"roles/create\", component: RoleComponent, data: { requiredPermissions: [\"core.roles.create\"] } },\n { path: \"roles/:id\", component: RoleComponent, data: { requiredPermissions: [\"core.roles.get\"] } },\n { path: \"roles\", component: RolesComponent, data: { requiredPermissions: [\"core.roles.search\"] } },\n { path: \"reports\", component: ReportsComponent, data: { requiredPermissions: [\"core.reports.billing\"] } },\n { path: \"developer/clients/create\", component: ClientComponent, data: { requiredPermissions: [\"core.clients.create\"] } },\n { path: \"developer/clients/:id\", component: ClientComponent, data: { requiredPermissions: [\"core.clients.get\"] } },\n { path: \"developer/clients\", component: ClientsComponent, data: { requiredPermissions: [\"core.clients.search\"] } },\n { path: \"configurations\", component: ConfigurationsComponent, data: { requiredPermissions: [\"core.merchants.get-tids\"] } },\n { path: \"funding\", component: FundingComponent, data: { requiredPermissions: [\"core.funding.search\"] } },\n { path: \"funding/:id\", component: FundingItemComponent, data: { requiredPermissions: [\"core.funding.get\"] } },\n { path: \"help\", component: HelpComponent },\n { path: \"disputes/:id\", component: DisputeComponent, data: { requiredPermissions: [\"core.disputes.get\"] } },\n { path: \"disputes\", component: DisputesComponent, data: { requiredPermissions: [\"core.disputes.get\"] } },\n { path: \"**\", component: DummyComponent, canActivate: [DynamicDefaultRouteGuard], pathMatch: \"full\" }\n ]\n },\n { path: \"forbidden\", component: ForbiddenComponent },\n { path: \"page-unavailable\", component: PageUnavailableComponent },\n { path: \"**\", redirectTo: \"dashboard\", pathMatch: \"full\" }\n];\n\n@NgModule({\n imports: [RouterModule.forRoot(routes, { relativeLinkResolution: \"legacy\" })],\n exports: [RouterModule],\n providers: [AuthGuard, PermissionsGuard]\n})\nexport class AppRoutingModule {\n\n constructor(errorUi: ErrorUiService) {\n errorUi.reloadConfig = {\n origin: window.location.origin,\n help: \"/dashboard/help\"\n };\n }\n\n}\n","import { Component } from \"@angular/core\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { Store, select } from \"@ngrx/store\";\nimport { Observable } from \"rxjs\";\nimport { map } from \"rxjs/operators\";\nimport { Pager } from \"shared-lib\";\n\nimport {\n PageChangedPaymentsAction,\n ExportPaymentsToCsvAction,\n FilterPaymentsAction,\n SortPaymentsAction\n} from \"@merchant_app/storage/payments/payments.actions\";\n\nimport { Sorting, Filter } from \"@merchant_app/storage/payments/payments.state\";\nimport { getPaymentsState } from \"@merchant_app/storage/payments/payments.selectors\";\nimport { Payment } from \"@merchant_api/models/payment\";\nimport * as CurrentUserSelectors from \"@merchant_app/storage/current-user/current-user.selectors\";\n\ntype RowsData = Payment[];\n\n@Component({\n selector: \"app-payments\",\n templateUrl: \"./payments.component.html\",\n styleUrls: [\"./payments.component.less\"],\n})\nexport class PaymentsComponent {\n\n currentUser$ = this.store.select(CurrentUserSelectors.getCurrentUser);\n\n get rowsData$(): Observable<RowsData> {\n return this.store.pipe(select(getPaymentsState), map((i) => i.rows));\n }\n\n get sorting$(): Observable<Sorting> {\n return this.store.pipe(select(getPaymentsState), map((i) => i.sorting));\n }\n\n get pager$(): Observable<Pager> {\n return this.store.pipe(select(getPaymentsState), map((i) => i.pager));\n }\n\n get loading$(): Observable<boolean> {\n return this.store.pipe(select(getPaymentsState), map((i) => i.loading));\n }\n\n get error$(): Observable<Error> {\n return this.store.pipe(select(getPaymentsState), map((i) => i.error));\n }\n\n get filter$(): Observable<Filter> {\n return this.store.pipe(select(getPaymentsState), map((i) => i.filter));\n }\n\n get exportLoading$(): Observable<boolean> {\n return this.store.pipe(select(getPaymentsState), map((i) => i.exportLoading));\n }\n\n constructor(private store: Store<IStore>) {}\n\n onFilterChanged(filter: Filter) {\n this.store.dispatch(new FilterPaymentsAction(filter));\n }\n\n onSortingChanged(sorting: Sorting) {\n this.store.dispatch(new SortPaymentsAction(sorting));\n }\n\n onPageChanged(page: number) {\n this.store.dispatch(new PageChangedPaymentsAction(page));\n }\n\n exportToCsv() {\n this.store.dispatch(new ExportPaymentsToCsvAction());\n }\n}\n","<app-payment-log\n [rowsData]=\"rowsData$ | async\"\n [sorting]=\"sorting$ | async\"\n [pager]=\"pager$ | async\"\n [filter]=\"filter$ | async\"\n (filterChanged)=\"onFilterChanged($event)\"\n (sortingChanged)=\"onSortingChanged($event)\"\n [exportLoading]=\"exportLoading$ | async\"\n [loading]=\"loading$ | async\"\n [error]=\"error$ | async\"\n (pageChanged)=\"onPageChanged($event)\"\n (exportToCsv)=\"exportToCsv()\"\n [currentUser]=\"currentUser$ | async\">\n</app-payment-log>\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\n\n/**\n * Global configuration\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ApiConfiguration {\n rootUrl: string = 'http://api.test.vitupay.com';\n}\n\n/**\n * Parameters for `ApiModule.forRoot()`\n */\nexport interface ApiConfigurationParams {\n rootUrl?: string;\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { ApiConfiguration } from './api-configuration';\n\n/**\n * Base class for services\n */\n@Injectable()\nexport class BaseService {\n constructor(\n protected config: ApiConfiguration,\n protected http: HttpClient\n ) {\n }\n\n private _rootUrl: string = '';\n\n /**\n * Returns the root url for all operations in this service. If not set directly in this\n * service, will fallback to `ApiConfiguration.rootUrl`.\n */\n get rootUrl(): string {\n return this._rootUrl || this.config.rootUrl;\n }\n\n /**\n * Sets the root URL for API operations in this service.\n */\n set rootUrl(rootUrl: string) {\n this._rootUrl = rootUrl;\n }\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { HttpRequest, HttpParameterCodec, HttpParams, HttpHeaders } from '@angular/common/http';\n\n/**\n * Custom parameter codec to correctly handle the plus sign in parameter\n * values. See https://github.com/angular/angular/issues/18261\n */\nclass ParameterCodec implements HttpParameterCodec {\n encodeKey(key: string): string {\n return encodeURIComponent(key);\n }\n\n encodeValue(value: string): string {\n return encodeURIComponent(value);\n }\n\n decodeKey(key: string): string {\n return decodeURIComponent(key);\n }\n\n decodeValue(value: string): string {\n return decodeURIComponent(value);\n }\n}\nconst ParameterCodecInstance = new ParameterCodec();\n\n/**\n * Defines the options for appending a parameter\n */\ninterface ParameterOptions {\n style?: string;\n explode?: boolean;\n}\n\n/**\n * Base class for a parameter\n */\nabstract class Parameter {\n constructor(public name: string, public value: any, public options: ParameterOptions, defaultStyle: string, defaultExplode: boolean) {\n this.options = options || {};\n if (this.options.style === null || this.options.style === undefined) {\n this.options.style = defaultStyle;\n }\n if (this.options.explode === null || this.options.explode === undefined) {\n this.options.explode = defaultExplode;\n }\n }\n\n serializeValue(value: any, separator = ','): string {\n if (value === null || value === undefined) {\n return '';\n } else if (value instanceof Array) {\n return value.map(v => this.serializeValue(v).split(separator).join(encodeURIComponent(separator))).join(separator);\n } else if (typeof value === 'object') {\n const array: string[] = [];\n for (const key of Object.keys(value)) {\n let propVal = value[key];\n if (propVal !== null && propVal !== undefined) {\n propVal = this.serializeValue(propVal).split(separator).join(encodeURIComponent(separator));\n if (this.options.explode) {\n array.push(`${key}=${propVal}`);\n } else {\n array.push(key);\n array.push(propVal);\n }\n }\n }\n return array.join(separator);\n } else {\n return String(value);\n }\n }\n}\n\n/**\n * A parameter in the operation path\n */\nclass PathParameter extends Parameter {\n constructor(name: string, value: any, options: ParameterOptions) {\n super(name, value, options, 'simple', false);\n }\n\n append(path: string): string {\n let value = this.value;\n if (value === null || value === undefined) {\n value = '';\n }\n let prefix = this.options.style === 'label' ? '.' : '';\n let separator = this.options.explode ? prefix === '' ? ',' : prefix : ',';\n let alreadySerialized = false;\n if (this.options.style === 'matrix') {\n // The parameter name is just used as prefix, except in some cases...\n prefix = `;${this.name}=`;\n if (this.options.explode && typeof value === 'object') {\n prefix = ';';\n if (value instanceof Array) {\n // For arrays we have to repeat the name for each element\n value = value.map(v => `${this.name}=${this.serializeValue(v, ';')}`);\n value = value.join(';');\n alreadySerialized = true;\n } else {\n // For objects we have to put each the key / value pairs\n value = this.serializeValue(value, ';');\n alreadySerialized = true\n }\n }\n }\n value = prefix + (alreadySerialized ? value : this.serializeValue(value, separator));\n // Replace both the plain variable and the corresponding variant taking in the prefix and explode into account\n path = path.replace(`{${this.name}}`, value);\n path = path.replace(`{${prefix}${this.name}${this.options.explode ? '*' : ''}}`, value);\n return path;\n }\n\n // @ts-ignore\n serializeValue(value: any, separator = ','): string {\n var result = typeof value === 'string' ? encodeURIComponent(value) : super.serializeValue(value, separator);\n result = result.replace('%3D', '=');\n result = result.replace('%3B', ';');\n result = result.replace('%2C', ',');\n return result;\n }\n}\n\n/**\n * A parameter in the query\n */\nclass QueryParameter extends Parameter {\n constructor(name: string, value: any, options: ParameterOptions) {\n super(name, value, options, 'form', true);\n }\n\n append(params: HttpParams): HttpParams {\n if (this.value instanceof Array) {\n // Array serialization\n if (this.options.explode) {\n for (const v of this.value) {\n params = params.append(this.name, this.serializeValue(v));\n }\n } else {\n const separator = this.options.style === 'spaceDelimited'\n ? ' ' : this.options.style === 'pipeDelimited'\n ? '|' : ',';\n return params.append(this.name, this.serializeValue(this.value, separator));\n }\n } else if (this.value !== null && typeof this.value === 'object') {\n // Object serialization\n if (this.options.style === 'deepObject') {\n // Append a parameter for each key, in the form `name[key]`\n for (const key of Object.keys(this.value)) {\n const propVal = this.value[key];\n if (propVal !== null && propVal !== undefined) {\n params = params.append(`${this.name}[${key}]`, this.serializeValue(propVal));\n }\n }\n } else if (this.options.explode) {\n // Append a parameter for each key without using the parameter name\n for (const key of Object.keys(this.value)) {\n const propVal = this.value[key];\n if (propVal !== null && propVal !== undefined) {\n params = params.append(key, this.serializeValue(propVal));\n }\n }\n } else {\n // Append a single parameter whose values are a comma-separated list of key,value,key,value...\n const array: any[] = [];\n for (const key of Object.keys(this.value)) {\n const propVal = this.value[key];\n if (propVal !== null && propVal !== undefined) {\n array.push(key);\n array.push(propVal);\n }\n }\n params = params.append(this.name, this.serializeValue(array));\n }\n } else if (this.value !== null && this.value !== undefined) {\n // Plain value\n params = params.append(this.name, this.serializeValue(this.value));\n }\n return params;\n }\n}\n\n/**\n * A parameter in the HTTP request header\n */\nclass HeaderParameter extends Parameter {\n constructor(name: string, value: any, options: ParameterOptions) {\n super(name, value, options, 'simple', false);\n }\n\n append(headers: HttpHeaders): HttpHeaders {\n if (this.value !== null && this.value !== undefined) {\n if (this.value instanceof Array) {\n for (const v of this.value) {\n headers = headers.append(this.name, this.serializeValue(v));\n }\n } else {\n headers = headers.append(this.name, this.serializeValue(this.value));\n }\n }\n return headers;\n }\n}\n\n/**\n * Helper to build http requests from parameters\n */\nexport class RequestBuilder {\n\n private _path = new Map<string, PathParameter>();\n private _query = new Map<string, QueryParameter>();\n private _header = new Map<string, HeaderParameter>();\n _bodyContent: any | null;\n _bodyContentType?: string;\n\n constructor(\n public rootUrl: string,\n public operationPath: string,\n public method: string) {\n }\n\n /**\n * Sets a path parameter\n */\n path(name: string, value: any, options?: ParameterOptions): void {\n this._path.set(name, new PathParameter(name, value, options || {}));\n }\n\n /**\n * Sets a query parameter\n */\n query(name: string, value: any, options?: ParameterOptions): void {\n this._query.set(name, new QueryParameter(name, value, options || {}));\n }\n\n /**\n * Sets a header parameter\n */\n header(name: string, value: any, options?: ParameterOptions): void {\n this._header.set(name, new HeaderParameter(name, value, options || {}));\n }\n\n /**\n * Sets the body content, along with the content type\n */\n body(value: any, contentType = 'application/json'): void {\n if (value instanceof Blob) {\n this._bodyContentType = value.type;\n } else {\n this._bodyContentType = contentType;\n }\n if (this._bodyContentType === 'application/x-www-form-urlencoded' && value !== null && typeof value === 'object') {\n // Handle URL-encoded data\n const pairs: Array<[string, string]> = [];\n for (const key of Object.keys(value)) {\n let val = value[key];\n if (!(val instanceof Array)) {\n val = [val];\n }\n for (const v of val) {\n const formValue = this.formDataValue(v);\n if (formValue !== null) {\n pairs.push([key, formValue]);\n }\n }\n }\n this._bodyContent = pairs.map(p => `${encodeURIComponent(p[0])}=${encodeURIComponent(p[1])}`).join('&');\n } else if (this._bodyContentType === 'multipart/form-data') {\n // Handle multipart form data\n const formData = new FormData();\n if (value !== null && value !== undefined) {\n for (const key of Object.keys(value)) {\n const val = value[key];\n if (val instanceof Array) {\n for (const v of val) {\n const toAppend = this.formDataValue(v);\n if (toAppend !== null) {\n formData.append(key, toAppend);\n }\n }\n } else {\n const toAppend = this.formDataValue(val);\n if (toAppend !== null) {\n formData.set(key, toAppend);\n }\n }\n }\n }\n this._bodyContent = formData;\n } else {\n // The body is the plain content\n this._bodyContent = value;\n }\n }\n\n private formDataValue(value: any): any {\n if (value === null || value === undefined) {\n return null;\n }\n if (value instanceof Blob) {\n return value;\n }\n if (typeof value === 'object') {\n return JSON.stringify(value);\n }\n return String(value);\n }\n\n /**\n * Builds the request with the current set parameters\n */\n build<T = any>(options?: {\n /** Which content types to accept */\n accept?: string;\n\n /** The expected response type */\n responseType?: 'json' | 'text' | 'blob' | 'arraybuffer';\n\n /** Whether to report progress on uploads / downloads */\n reportProgress?: boolean;\n }): HttpRequest<T> {\n\n options = options || {};\n\n // Path parameters\n let path = this.operationPath;\n for (const pathParam of this._path.values()) {\n path = pathParam.append(path);\n }\n const url = this.rootUrl + path;\n\n // Query parameters\n let httpParams = new HttpParams({\n encoder: ParameterCodecInstance\n });\n for (const queryParam of this._query.values()) {\n httpParams = queryParam.append(httpParams);\n }\n\n // Header parameters\n let httpHeaders = new HttpHeaders();\n if (options.accept) {\n httpHeaders = httpHeaders.append('Accept', options.accept);\n }\n for (const headerParam of this._header.values()) {\n httpHeaders = headerParam.append(httpHeaders);\n }\n\n // Request content headers\n if (this._bodyContentType && !(this._bodyContent instanceof FormData)) {\n httpHeaders = httpHeaders.set('Content-Type', this._bodyContentType);\n }\n\n // Perform the request\n return new HttpRequest<T>(this.method.toUpperCase(), url, this._bodyContent, {\n params: httpParams,\n headers: httpHeaders,\n responseType: options.responseType,\n reportProgress: options.reportProgress\n });\n }\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { BaseService } from '../base-service';\nimport { ApiConfiguration } from '../api-configuration';\nimport { StrictHttpResponse } from '../strict-http-response';\nimport { RequestBuilder } from '../request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { EntityDto } from '../models/entity-dto';\nimport { EventDeliveriesDto } from '../models/event-deliveries-dto';\nimport { EventDeliveryOrderByEnum } from '../models/event-delivery-order-by-enum';\nimport { EventDeliveryStatusEnum } from '../models/event-delivery-status-enum';\nimport { EventDetailsDto } from '../models/event-details-dto';\nimport { EventOrderByEnum } from '../models/event-order-by-enum';\nimport { EventsDto } from '../models/events-dto';\nimport { OrderDirectionEnum } from '../models/order-direction-enum';\n\n\n/**\n * API to retrieve event history.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class EventsService extends BaseService {\n constructor(\n config: ApiConfiguration,\n http: HttpClient\n ) {\n super(config, http);\n }\n\n /**\n * Path part for operation eventDeliveriesSearch\n */\n static readonly EventDeliveriesSearchPath = '/v1/events/{token}/deliveries';\n\n /**\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `eventDeliveriesSearch()` instead.\n *\n * This method doesn't expect any request body.\n */\n eventDeliveriesSearch$Response(params: {\n token: string;\n OrderBy?: Array<EventDeliveryOrderByEnum>;\n Status?: EventDeliveryStatusEnum;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<StrictHttpResponse<EventDeliveriesDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, EventsService.EventDeliveriesSearchPath, 'get');\n if (params) {\n rb.path('token', params.token, {});\n rb.query('OrderBy', params.OrderBy, {\"style\":\"form\",\"explode\":true});\n rb.query('Status', params.Status, {});\n rb.query('StartDate', params.StartDate, {});\n rb.query('EndDate', params.EndDate, {});\n rb.query('OrderDirection', params.OrderDirection, {});\n rb.query('Pager.PageSize', params['Pager.PageSize'], {});\n rb.query('Pager.PageIndex', params['Pager.PageIndex'], {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<EventDeliveriesDto>;\n })\n );\n }\n\n /**\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `eventDeliveriesSearch$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n eventDeliveriesSearch(params: {\n token: string;\n OrderBy?: Array<EventDeliveryOrderByEnum>;\n Status?: EventDeliveryStatusEnum;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<EventDeliveriesDto> {\n\n return this.eventDeliveriesSearch$Response(params).pipe(\n map((r: StrictHttpResponse<EventDeliveriesDto>) => r.body as EventDeliveriesDto)\n );\n }\n\n /**\n * Path part for operation eventDeliveriesSend\n */\n static readonly EventDeliveriesSendPath = '/v1/events/{token}/deliveries/{id}/send';\n\n /**\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `eventDeliveriesSend()` instead.\n *\n * This method doesn't expect any request body.\n */\n eventDeliveriesSend$Response(params: {\n token: string;\n id: number;\n }): Observable<StrictHttpResponse<EntityDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, EventsService.EventDeliveriesSendPath, 'post');\n if (params) {\n rb.path('token', params.token, {});\n rb.path('id', params.id, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<EntityDto>;\n })\n );\n }\n\n /**\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `eventDeliveriesSend$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n eventDeliveriesSend(params: {\n token: string;\n id: number;\n }): Observable<EntityDto> {\n\n return this.eventDeliveriesSend$Response(params).pipe(\n map((r: StrictHttpResponse<EntityDto>) => r.body as EntityDto)\n );\n }\n\n /**\n * Path part for operation eventsSearch\n */\n static readonly EventsSearchPath = '/v1/events';\n\n /**\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `eventsSearch()` instead.\n *\n * This method doesn't expect any request body.\n */\n eventsSearch$Response(params?: {\n OrderBy?: Array<EventOrderByEnum>;\n EventTypes?: Array<string>;\n Mid?: string;\n Tid?: string;\n FundingInstructionRef?: string;\n TransactionId?: string;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<StrictHttpResponse<EventsDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, EventsService.EventsSearchPath, 'get');\n if (params) {\n rb.query('OrderBy', params.OrderBy, {\"style\":\"form\",\"explode\":true});\n rb.query('EventTypes', params.EventTypes, {\"style\":\"form\",\"explode\":true});\n rb.query('Mid', params.Mid, {});\n rb.query('Tid', params.Tid, {});\n rb.query('FundingInstructionRef', params.FundingInstructionRef, {});\n rb.query('TransactionId', params.TransactionId, {});\n rb.query('StartDate', params.StartDate, {});\n rb.query('EndDate', params.EndDate, {});\n rb.query('OrderDirection', params.OrderDirection, {});\n rb.query('Pager.PageSize', params['Pager.PageSize'], {});\n rb.query('Pager.PageIndex', params['Pager.PageIndex'], {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<EventsDto>;\n })\n );\n }\n\n /**\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `eventsSearch$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n eventsSearch(params?: {\n OrderBy?: Array<EventOrderByEnum>;\n EventTypes?: Array<string>;\n Mid?: string;\n Tid?: string;\n FundingInstructionRef?: string;\n TransactionId?: string;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<EventsDto> {\n\n return this.eventsSearch$Response(params).pipe(\n map((r: StrictHttpResponse<EventsDto>) => r.body as EventsDto)\n );\n }\n\n /**\n * Path part for operation eventsGet\n */\n static readonly EventsGetPath = '/v1/events/{token}';\n\n /**\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `eventsGet()` instead.\n *\n * This method doesn't expect any request body.\n */\n eventsGet$Response(params: {\n token: string;\n }): Observable<StrictHttpResponse<EventDetailsDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, EventsService.EventsGetPath, 'get');\n if (params) {\n rb.path('token', params.token, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<EventDetailsDto>;\n })\n );\n }\n\n /**\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `eventsGet$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n eventsGet(params: {\n token: string;\n }): Observable<EventDetailsDto> {\n\n return this.eventsGet$Response(params).pipe(\n map((r: StrictHttpResponse<EventDetailsDto>) => r.body as EventDetailsDto)\n );\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { BaseService } from '../base-service';\nimport { ApiConfiguration } from '../api-configuration';\nimport { StrictHttpResponse } from '../strict-http-response';\nimport { RequestBuilder } from '../request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { DeletedItemsInclusionEnum } from '../models/deleted-items-inclusion-enum';\nimport { MerchantProcessorDto } from '../models/merchant-processor-dto';\nimport { OrderDirectionEnum } from '../models/order-direction-enum';\nimport { OrganizationDto } from '../models/organization-dto';\nimport { PagedDataDtoOfTidResult } from '../models/paged-data-dto-of-tid-result';\nimport { ProcessorEnum } from '../models/processor-enum';\nimport { TidResult } from '../models/tid-result';\nimport { TidsOrderBy } from '../models/tids-order-by';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MerchantService extends BaseService {\n constructor(\n config: ApiConfiguration,\n http: HttpClient\n ) {\n super(config, http);\n }\n\n /**\n * Path part for operation merchantGet\n */\n static readonly MerchantGetPath = '/v1/merchant';\n\n /**\n * Permissions: core.merchants.get\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `merchantGet()` instead.\n *\n * This method doesn't expect any request body.\n */\n merchantGet$Response(params?: {\n }): Observable<StrictHttpResponse<OrganizationDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, MerchantService.MerchantGetPath, 'get');\n if (params) {\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<OrganizationDto>;\n })\n );\n }\n\n /**\n * Permissions: core.merchants.get\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `merchantGet$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n merchantGet(params?: {\n }): Observable<OrganizationDto> {\n\n return this.merchantGet$Response(params).pipe(\n map((r: StrictHttpResponse<OrganizationDto>) => r.body as OrganizationDto)\n );\n }\n\n /**\n * Path part for operation merchantGetTids\n */\n static readonly MerchantGetTidsPath = '/v1/merchant/tids';\n\n /**\n * Permissions: core.merchants.get-tids\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `merchantGetTids()` instead.\n *\n * This method doesn't expect any request body.\n */\n merchantGetTids$Response(params?: {\n OrderBy?: TidsOrderBy;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<StrictHttpResponse<PagedDataDtoOfTidResult>> {\n\n const rb = new RequestBuilder(this.rootUrl, MerchantService.MerchantGetTidsPath, 'get');\n if (params) {\n rb.query('OrderBy', params.OrderBy, {});\n rb.query('StartDate', params.StartDate, {});\n rb.query('EndDate', params.EndDate, {});\n rb.query('OrderDirection', params.OrderDirection, {});\n rb.query('Pager.PageSize', params['Pager.PageSize'], {});\n rb.query('Pager.PageIndex', params['Pager.PageIndex'], {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<PagedDataDtoOfTidResult>;\n })\n );\n }\n\n /**\n * Permissions: core.merchants.get-tids\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `merchantGetTids$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n merchantGetTids(params?: {\n OrderBy?: TidsOrderBy;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<PagedDataDtoOfTidResult> {\n\n return this.merchantGetTids$Response(params).pipe(\n map((r: StrictHttpResponse<PagedDataDtoOfTidResult>) => r.body as PagedDataDtoOfTidResult)\n );\n }\n\n /**\n * Path part for operation merchantGetTid\n */\n static readonly MerchantGetTidPath = '/v1/merchant/tid/{tid}';\n\n /**\n * Permissions: core.merchants.get-tids\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `merchantGetTid()` instead.\n *\n * This method doesn't expect any request body.\n */\n merchantGetTid$Response(params: {\n tid: string;\n }): Observable<StrictHttpResponse<TidResult>> {\n\n const rb = new RequestBuilder(this.rootUrl, MerchantService.MerchantGetTidPath, 'get');\n if (params) {\n rb.path('tid', params.tid, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<TidResult>;\n })\n );\n }\n\n /**\n * Permissions: core.merchants.get-tids\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `merchantGetTid$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n merchantGetTid(params: {\n tid: string;\n }): Observable<TidResult> {\n\n return this.merchantGetTid$Response(params).pipe(\n map((r: StrictHttpResponse<TidResult>) => r.body as TidResult)\n );\n }\n\n /**\n * Path part for operation merchantGetMids\n */\n static readonly MerchantGetMidsPath = '/v1/merchant/mids';\n\n /**\n * Permissions: core.merchants.get-mids\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `merchantGetMids()` instead.\n *\n * This method doesn't expect any request body.\n */\n merchantGetMids$Response(params?: {\n Processor?: ProcessorEnum;\n DeletedItems?: DeletedItemsInclusionEnum;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<StrictHttpResponse<Array<MerchantProcessorDto>>> {\n\n const rb = new RequestBuilder(this.rootUrl, MerchantService.MerchantGetMidsPath, 'get');\n if (params) {\n rb.query('Processor', params.Processor, {});\n rb.query('DeletedItems', params.DeletedItems, {});\n rb.query('StartDate', params.StartDate, {});\n rb.query('EndDate', params.EndDate, {});\n rb.query('OrderDirection', params.OrderDirection, {});\n rb.query('Pager.PageSize', params['Pager.PageSize'], {});\n rb.query('Pager.PageIndex', params['Pager.PageIndex'], {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Array<MerchantProcessorDto>>;\n })\n );\n }\n\n /**\n * Permissions: core.merchants.get-mids\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `merchantGetMids$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n merchantGetMids(params?: {\n Processor?: ProcessorEnum;\n DeletedItems?: DeletedItemsInclusionEnum;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<Array<MerchantProcessorDto>> {\n\n return this.merchantGetMids$Response(params).pipe(\n map((r: StrictHttpResponse<Array<MerchantProcessorDto>>) => r.body as Array<MerchantProcessorDto>)\n );\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { BaseService } from '../base-service';\nimport { ApiConfiguration } from '../api-configuration';\nimport { StrictHttpResponse } from '../strict-http-response';\nimport { RequestBuilder } from '../request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { CardBrandEnum } from '../models/card-brand-enum';\nimport { OrderDirectionEnum } from '../models/order-direction-enum';\nimport { PagedDataDtoOfPaymentMethod } from '../models/paged-data-dto-of-payment-method';\nimport { PaymentMethod } from '../models/payment-method';\nimport { PaymentMethodOrderBy } from '../models/payment-method-order-by';\nimport { PaymentMethodPayment } from '../models/payment-method-payment';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PaymentMethodsService extends BaseService {\n constructor(\n config: ApiConfiguration,\n http: HttpClient\n ) {\n super(config, http);\n }\n\n /**\n * Path part for operation paymentMethodsSearch\n */\n static readonly PaymentMethodsSearchPath = '/v1/payment-methods';\n\n /**\n * Retrieves a list of payment method token.\n *\n * Use this endpoint to retrieve a list of payment method tokens created by a merchant.\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentMethodsSearch()` instead.\n *\n * This method doesn't expect any request body.\n */\n paymentMethodsSearch$Response(params?: {\n TID?: string;\n MID?: string;\n Token?: string;\n Last4?: number;\n First6?: number;\n CardBrands?: Array<CardBrandEnum>;\n IsExpired?: boolean;\n IsDisabled?: boolean;\n PayerName?: string;\n OrderBy?: PaymentMethodOrderBy;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<StrictHttpResponse<PagedDataDtoOfPaymentMethod>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentMethodsService.PaymentMethodsSearchPath, 'get');\n if (params) {\n rb.query('TID', params.TID, {});\n rb.query('MID', params.MID, {});\n rb.query('Token', params.Token, {});\n rb.query('Last4', params.Last4, {});\n rb.query('First6', params.First6, {});\n rb.query('CardBrands', params.CardBrands, {\"style\":\"form\",\"explode\":true});\n rb.query('IsExpired', params.IsExpired, {});\n rb.query('IsDisabled', params.IsDisabled, {});\n rb.query('PayerName', params.PayerName, {});\n rb.query('OrderBy', params.OrderBy, {});\n rb.query('StartDate', params.StartDate, {});\n rb.query('EndDate', params.EndDate, {});\n rb.query('OrderDirection', params.OrderDirection, {});\n rb.query('Pager.PageSize', params['Pager.PageSize'], {});\n rb.query('Pager.PageIndex', params['Pager.PageIndex'], {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<PagedDataDtoOfPaymentMethod>;\n })\n );\n }\n\n /**\n * Retrieves a list of payment method token.\n *\n * Use this endpoint to retrieve a list of payment method tokens created by a merchant.\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentMethodsSearch$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n paymentMethodsSearch(params?: {\n TID?: string;\n MID?: string;\n Token?: string;\n Last4?: number;\n First6?: number;\n CardBrands?: Array<CardBrandEnum>;\n IsExpired?: boolean;\n IsDisabled?: boolean;\n PayerName?: string;\n OrderBy?: PaymentMethodOrderBy;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<PagedDataDtoOfPaymentMethod> {\n\n return this.paymentMethodsSearch$Response(params).pipe(\n map((r: StrictHttpResponse<PagedDataDtoOfPaymentMethod>) => r.body as PagedDataDtoOfPaymentMethod)\n );\n }\n\n /**\n * Path part for operation paymentMethodsGet\n */\n static readonly PaymentMethodsGetPath = '/v1/payment-methods/{token}';\n\n /**\n * Retrieves information stored for a payment method token.\n *\n * Use this endpoint to retrieve cardholder information associated to a specific payment method token.\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentMethodsGet()` instead.\n *\n * This method doesn't expect any request body.\n */\n paymentMethodsGet$Response(params: {\n token: string;\n }): Observable<StrictHttpResponse<PaymentMethod>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentMethodsService.PaymentMethodsGetPath, 'get');\n if (params) {\n rb.path('token', params.token, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<PaymentMethod>;\n })\n );\n }\n\n /**\n * Retrieves information stored for a payment method token.\n *\n * Use this endpoint to retrieve cardholder information associated to a specific payment method token.\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentMethodsGet$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n paymentMethodsGet(params: {\n token: string;\n }): Observable<PaymentMethod> {\n\n return this.paymentMethodsGet$Response(params).pipe(\n map((r: StrictHttpResponse<PaymentMethod>) => r.body as PaymentMethod)\n );\n }\n\n /**\n * Path part for operation paymentMethodsGetHistory\n */\n static readonly PaymentMethodsGetHistoryPath = '/v1/payment-methods/{token}/history';\n\n /**\n * Retrieves the list of payments created with a specific payment method.\n *\n * Use this endpoint to retrieve a list of payments which have been created using a specific payment method token.\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentMethodsGetHistory()` instead.\n *\n * This method doesn't expect any request body.\n */\n paymentMethodsGetHistory$Response(params: {\n token: string;\n }): Observable<StrictHttpResponse<Array<PaymentMethodPayment>>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentMethodsService.PaymentMethodsGetHistoryPath, 'get');\n if (params) {\n rb.path('token', params.token, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Array<PaymentMethodPayment>>;\n })\n );\n }\n\n /**\n * Retrieves the list of payments created with a specific payment method.\n *\n * Use this endpoint to retrieve a list of payments which have been created using a specific payment method token.\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentMethodsGetHistory$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n paymentMethodsGetHistory(params: {\n token: string;\n }): Observable<Array<PaymentMethodPayment>> {\n\n return this.paymentMethodsGetHistory$Response(params).pipe(\n map((r: StrictHttpResponse<Array<PaymentMethodPayment>>) => r.body as Array<PaymentMethodPayment>)\n );\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { BaseService } from '../base-service';\nimport { ApiConfiguration } from '../api-configuration';\nimport { StrictHttpResponse } from '../strict-http-response';\nimport { RequestBuilder } from '../request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { DisputeDto } from '../models/dispute-dto';\nimport { DisputeOrderBy } from '../models/dispute-order-by';\nimport { DisputeTypeEnum } from '../models/dispute-type-enum';\nimport { OrderDirectionEnum } from '../models/order-direction-enum';\nimport { PagedDataDtoOfDisputeDto } from '../models/paged-data-dto-of-dispute-dto';\nimport { ProcessorEnum } from '../models/processor-enum';\n\n\n/**\n * Provides an information about the disputes\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DisputesService extends BaseService {\n constructor(\n config: ApiConfiguration,\n http: HttpClient\n ) {\n super(config, http);\n }\n\n /**\n * Path part for operation disputesSearch\n */\n static readonly DisputesSearchPath = '/v1/payments/disputes';\n\n /**\n * Permissions: core.disputes.get\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `disputesSearch()` instead.\n *\n * This method doesn't expect any request body.\n */\n disputesSearch$Response(params?: {\n OrderBy?: DisputeOrderBy;\n CaseNumber?: string;\n Mid?: string;\n Processor?: ProcessorEnum;\n DisputeType?: DisputeTypeEnum;\n PaymentToken?: string;\n PublicTransactionId?: string;\n CurrentStatus?: string;\n DisputeAmount?: number;\n StatusDateStartUtc?: string;\n StatusDateEndUtc?: string;\n RaiseDateStartUtc?: string;\n RaiseDateEndUtc?: string;\n DueDateStartUtc?: string;\n DueDateEndUtc?: string;\n DisputeOutcome?: string;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<StrictHttpResponse<PagedDataDtoOfDisputeDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, DisputesService.DisputesSearchPath, 'get');\n if (params) {\n rb.query('OrderBy', params.OrderBy, {});\n rb.query('CaseNumber', params.CaseNumber, {});\n rb.query('Mid', params.Mid, {});\n rb.query('Processor', params.Processor, {});\n rb.query('DisputeType', params.DisputeType, {});\n rb.query('PaymentToken', params.PaymentToken, {});\n rb.query('PublicTransactionId', params.PublicTransactionId, {});\n rb.query('CurrentStatus', params.CurrentStatus, {});\n rb.query('DisputeAmount', params.DisputeAmount, {});\n rb.query('StatusDateStartUtc', params.StatusDateStartUtc, {});\n rb.query('StatusDateEndUtc', params.StatusDateEndUtc, {});\n rb.query('RaiseDateStartUtc', params.RaiseDateStartUtc, {});\n rb.query('RaiseDateEndUtc', params.RaiseDateEndUtc, {});\n rb.query('DueDateStartUtc', params.DueDateStartUtc, {});\n rb.query('DueDateEndUtc', params.DueDateEndUtc, {});\n rb.query('DisputeOutcome', params.DisputeOutcome, {});\n rb.query('StartDate', params.StartDate, {});\n rb.query('EndDate', params.EndDate, {});\n rb.query('OrderDirection', params.OrderDirection, {});\n rb.query('Pager.PageSize', params['Pager.PageSize'], {});\n rb.query('Pager.PageIndex', params['Pager.PageIndex'], {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<PagedDataDtoOfDisputeDto>;\n })\n );\n }\n\n /**\n * Permissions: core.disputes.get\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `disputesSearch$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n disputesSearch(params?: {\n OrderBy?: DisputeOrderBy;\n CaseNumber?: string;\n Mid?: string;\n Processor?: ProcessorEnum;\n DisputeType?: DisputeTypeEnum;\n PaymentToken?: string;\n PublicTransactionId?: string;\n CurrentStatus?: string;\n DisputeAmount?: number;\n StatusDateStartUtc?: string;\n StatusDateEndUtc?: string;\n RaiseDateStartUtc?: string;\n RaiseDateEndUtc?: string;\n DueDateStartUtc?: string;\n DueDateEndUtc?: string;\n DisputeOutcome?: string;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<PagedDataDtoOfDisputeDto> {\n\n return this.disputesSearch$Response(params).pipe(\n map((r: StrictHttpResponse<PagedDataDtoOfDisputeDto>) => r.body as PagedDataDtoOfDisputeDto)\n );\n }\n\n /**\n * Path part for operation disputesGet\n */\n static readonly DisputesGetPath = '/v1/payments/disputes/{token}';\n\n /**\n * Permissions: core.disputes.get\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `disputesGet()` instead.\n *\n * This method doesn't expect any request body.\n */\n disputesGet$Response(params: {\n token: string;\n }): Observable<StrictHttpResponse<DisputeDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, DisputesService.DisputesGetPath, 'get');\n if (params) {\n rb.path('token', params.token, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<DisputeDto>;\n })\n );\n }\n\n /**\n * Permissions: core.disputes.get\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `disputesGet$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n disputesGet(params: {\n token: string;\n }): Observable<DisputeDto> {\n\n return this.disputesGet$Response(params).pipe(\n map((r: StrictHttpResponse<DisputeDto>) => r.body as DisputeDto)\n );\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { BaseService } from '../base-service';\nimport { ApiConfiguration } from '../api-configuration';\nimport { StrictHttpResponse } from '../strict-http-response';\nimport { RequestBuilder } from '../request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { PaymentFormData } from '../models/payment-form-data';\nimport { PaymentFormResponse } from '../models/payment-form-response';\nimport { TokenizeFormData } from '../models/tokenize-form-data';\n\n\n/**\n * API for payment form to make E-Comm transactions\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class PaymentFormService extends BaseService {\n constructor(\n config: ApiConfiguration,\n http: HttpClient\n ) {\n super(config, http);\n }\n\n /**\n * Path part for operation paymentFormPaymentIframeLink\n */\n static readonly PaymentFormPaymentIframeLinkPath = '/v1/payment-form/payment-iframe-link';\n\n /**\n * Request the Online Card Payment Form source.\n *\n * Use this endpoint to retrieve a URL, which will be used with iframe tag for making payments using the VituPay\n * JavaScript SDK - Online Payment Form.\\\n * \\\n * Permissions: core.iframe.create-sale\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentFormPaymentIframeLink()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentFormPaymentIframeLink$Response(params: {\n body: PaymentFormData\n }): Observable<StrictHttpResponse<PaymentFormResponse>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentFormService.PaymentFormPaymentIframeLinkPath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<PaymentFormResponse>;\n })\n );\n }\n\n /**\n * Request the Online Card Payment Form source.\n *\n * Use this endpoint to retrieve a URL, which will be used with iframe tag for making payments using the VituPay\n * JavaScript SDK - Online Payment Form.\\\n * \\\n * Permissions: core.iframe.create-sale\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentFormPaymentIframeLink$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentFormPaymentIframeLink(params: {\n body: PaymentFormData\n }): Observable<PaymentFormResponse> {\n\n return this.paymentFormPaymentIframeLink$Response(params).pipe(\n map((r: StrictHttpResponse<PaymentFormResponse>) => r.body as PaymentFormResponse)\n );\n }\n\n /**\n * Path part for operation paymentFormTokenizeIframeLink\n */\n static readonly PaymentFormTokenizeIframeLinkPath = '/v1/payment-form/tokenize-iframe-link';\n\n /**\n * Request the Online Card Payment Method Form source.\n *\n * Use this endpoint to retrieve a URL which will be used with iframe tag for generating payment method tokens using\n * the VituPay JavaScript SDK - Online Payment Form.\\\n * \\\n * Permissions: core.iframe.create-token\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentFormTokenizeIframeLink()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentFormTokenizeIframeLink$Response(params: {\n body: TokenizeFormData\n }): Observable<StrictHttpResponse<PaymentFormResponse>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentFormService.PaymentFormTokenizeIframeLinkPath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<PaymentFormResponse>;\n })\n );\n }\n\n /**\n * Request the Online Card Payment Method Form source.\n *\n * Use this endpoint to retrieve a URL which will be used with iframe tag for generating payment method tokens using\n * the VituPay JavaScript SDK - Online Payment Form.\\\n * \\\n * Permissions: core.iframe.create-token\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentFormTokenizeIframeLink$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentFormTokenizeIframeLink(params: {\n body: TokenizeFormData\n }): Observable<PaymentFormResponse> {\n\n return this.paymentFormTokenizeIframeLink$Response(params).pipe(\n map((r: StrictHttpResponse<PaymentFormResponse>) => r.body as PaymentFormResponse)\n );\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { BaseService } from '../base-service';\nimport { ApiConfiguration } from '../api-configuration';\nimport { StrictHttpResponse } from '../strict-http-response';\nimport { RequestBuilder } from '../request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { AccrueCustomFeesRequest } from '../models/accrue-custom-fees-request';\nimport { ApplePayRequest } from '../models/apple-pay-request';\nimport { ApplePayStartSessionRequest } from '../models/apple-pay-start-session-request';\nimport { AppleSessionDto } from '../models/apple-session-dto';\nimport { Capture } from '../models/capture';\nimport { CardBrandEnum } from '../models/card-brand-enum';\nimport { CheckCreditCardResponse } from '../models/check-credit-card-response';\nimport { CreatePayPalOrderRequest } from '../models/create-pay-pal-order-request';\nimport { CreatePayPalOrderResponse } from '../models/create-pay-pal-order-response';\nimport { DigitalWalletEnum } from '../models/digital-wallet-enum';\nimport { DisputeTypeEnum } from '../models/dispute-type-enum';\nimport { GcpStorageResource } from '../models/gcp-storage-resource';\nimport { GatewayEnum } from '../models/gateway-enum';\nimport { GooglePayRequest } from '../models/google-pay-request';\nimport { NextPaymentAction } from '../models/next-payment-action';\nimport { OrderDirectionEnum } from '../models/order-direction-enum';\nimport { PagedDataDtoOfPayment } from '../models/paged-data-dto-of-payment';\nimport { PagedDataDtoOfTransaction } from '../models/paged-data-dto-of-transaction';\nimport { PayPalOrderRequest } from '../models/pay-pal-order-request';\nimport { PaymentDetails } from '../models/payment-details';\nimport { PaymentMethodType } from '../models/payment-method-type';\nimport { PaymentOrderBy } from '../models/payment-order-by';\nimport { PaymentRequest } from '../models/payment-request';\nimport { PaymentStatus } from '../models/payment-status';\nimport { Refund } from '../models/refund';\nimport { SurchargeVerifyRequest } from '../models/surcharge-verify-request';\nimport { TransactionDetails } from '../models/transaction-details';\nimport { TransactionFeesResult } from '../models/transaction-fees-result';\nimport { TransactionOrderBy } from '../models/transaction-order-by';\nimport { TransactionResult } from '../models/transaction-result';\nimport { TransactionStatus } from '../models/transaction-status';\nimport { TransactionType } from '../models/transaction-type';\nimport { Void } from '../models/void';\n\n\n/**\n * API to create payments/transactions.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class PaymentsService extends BaseService {\n constructor(\n config: ApiConfiguration,\n http: HttpClient\n ) {\n super(config, http);\n }\n\n /**\n * Path part for operation paymentsSearch\n */\n static readonly PaymentsSearchPath = '/v1/payments';\n\n /**\n * Retrieves a list of payments.\n *\n * Use this endpoint to retrieve a list of payments which have been created by a merchant.\\\n * \\\n * Permissions: core.payments.search\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentsSearch()` instead.\n *\n * This method doesn't expect any request body.\n */\n paymentsSearch$Response(params?: {\n OrderBy?: PaymentOrderBy;\n Amount?: number;\n Token?: string;\n TID?: string;\n MID?: string;\n Description?: string;\n CustomerName?: string;\n DisputeTypes?: Array<DisputeTypeEnum>;\n\n /**\n * Cardholder name, Payer name, etc.\n */\n PayerName?: string;\n Cardholder?: string;\n Last4?: string;\n First6?: string;\n CardBrands?: Array<CardBrandEnum>;\n Statuses?: Array<PaymentStatus>;\n Gateways?: Array<GatewayEnum>;\n DigitalWallets?: Array<DigitalWalletEnum>;\n SettlementStartDate?: string;\n SettlementEndDate?: string;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<StrictHttpResponse<PagedDataDtoOfPayment>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.PaymentsSearchPath, 'get');\n if (params) {\n rb.query('OrderBy', params.OrderBy, {});\n rb.query('Amount', params.Amount, {});\n rb.query('Token', params.Token, {});\n rb.query('TID', params.TID, {});\n rb.query('MID', params.MID, {});\n rb.query('Description', params.Description, {});\n rb.query('CustomerName', params.CustomerName, {});\n rb.query('DisputeTypes', params.DisputeTypes, {\"style\":\"form\",\"explode\":true});\n rb.query('PayerName', params.PayerName, {});\n rb.query('Cardholder', params.Cardholder, {});\n rb.query('Last4', params.Last4, {});\n rb.query('First6', params.First6, {});\n rb.query('CardBrands', params.CardBrands, {\"style\":\"form\",\"explode\":true});\n rb.query('Statuses', params.Statuses, {\"style\":\"form\",\"explode\":true});\n rb.query('Gateways', params.Gateways, {\"style\":\"form\",\"explode\":true});\n rb.query('DigitalWallets', params.DigitalWallets, {\"style\":\"form\",\"explode\":true});\n rb.query('SettlementStartDate', params.SettlementStartDate, {});\n rb.query('SettlementEndDate', params.SettlementEndDate, {});\n rb.query('StartDate', params.StartDate, {});\n rb.query('EndDate', params.EndDate, {});\n rb.query('OrderDirection', params.OrderDirection, {});\n rb.query('Pager.PageSize', params['Pager.PageSize'], {});\n rb.query('Pager.PageIndex', params['Pager.PageIndex'], {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<PagedDataDtoOfPayment>;\n })\n );\n }\n\n /**\n * Retrieves a list of payments.\n *\n * Use this endpoint to retrieve a list of payments which have been created by a merchant.\\\n * \\\n * Permissions: core.payments.search\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentsSearch$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n paymentsSearch(params?: {\n OrderBy?: PaymentOrderBy;\n Amount?: number;\n Token?: string;\n TID?: string;\n MID?: string;\n Description?: string;\n CustomerName?: string;\n DisputeTypes?: Array<DisputeTypeEnum>;\n\n /**\n * Cardholder name, Payer name, etc.\n */\n PayerName?: string;\n Cardholder?: string;\n Last4?: string;\n First6?: string;\n CardBrands?: Array<CardBrandEnum>;\n Statuses?: Array<PaymentStatus>;\n Gateways?: Array<GatewayEnum>;\n DigitalWallets?: Array<DigitalWalletEnum>;\n SettlementStartDate?: string;\n SettlementEndDate?: string;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<PagedDataDtoOfPayment> {\n\n return this.paymentsSearch$Response(params).pipe(\n map((r: StrictHttpResponse<PagedDataDtoOfPayment>) => r.body as PagedDataDtoOfPayment)\n );\n }\n\n /**\n * Path part for operation paymentsCreatePayment\n */\n static readonly PaymentsCreatePaymentPath = '/v1/payments';\n\n /**\n * Creates a payment.\n *\n * Use this endpoint to authorize, or charge, a card (credit or debit) using a valid payment method token.\\\n * You can generate the payment method token using the VituPay JavaScript SDK - Online Payment Method Form.\\\n * \\\n * Permissions: core.payments.create\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentsCreatePayment()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsCreatePayment$Response(params: {\n\n /**\n * Transaction details\n */\n body: PaymentRequest\n }): Observable<StrictHttpResponse<TransactionResult>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.PaymentsCreatePaymentPath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<TransactionResult>;\n })\n );\n }\n\n /**\n * Creates a payment.\n *\n * Use this endpoint to authorize, or charge, a card (credit or debit) using a valid payment method token.\\\n * You can generate the payment method token using the VituPay JavaScript SDK - Online Payment Method Form.\\\n * \\\n * Permissions: core.payments.create\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentsCreatePayment$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsCreatePayment(params: {\n\n /**\n * Transaction details\n */\n body: PaymentRequest\n }): Observable<TransactionResult> {\n\n return this.paymentsCreatePayment$Response(params).pipe(\n map((r: StrictHttpResponse<TransactionResult>) => r.body as TransactionResult)\n );\n }\n\n /**\n * Path part for operation paymentsCapture\n */\n static readonly PaymentsCapturePath = '/v1/payments/{token}/capture';\n\n /**\n * Captures an authorize transaction.\n *\n * Use this endpoint to capture an auth transaction.\\\n * An auth transaction can only be captured once, for an amount that is not greater than the authorized amount.\\\n * \\\n * Permissions: core.payments.capture\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentsCapture()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsCapture$Response(params: {\n\n /**\n * A payment token, e.g. py_ILgWHJSfcYL0Wir4bBNfRUuf6eZ0\n */\n token: string;\n\n /**\n * Transaction details\n */\n body: Capture\n }): Observable<StrictHttpResponse<TransactionResult>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.PaymentsCapturePath, 'post');\n if (params) {\n rb.path('token', params.token, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<TransactionResult>;\n })\n );\n }\n\n /**\n * Captures an authorize transaction.\n *\n * Use this endpoint to capture an auth transaction.\\\n * An auth transaction can only be captured once, for an amount that is not greater than the authorized amount.\\\n * \\\n * Permissions: core.payments.capture\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentsCapture$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsCapture(params: {\n\n /**\n * A payment token, e.g. py_ILgWHJSfcYL0Wir4bBNfRUuf6eZ0\n */\n token: string;\n\n /**\n * Transaction details\n */\n body: Capture\n }): Observable<TransactionResult> {\n\n return this.paymentsCapture$Response(params).pipe(\n map((r: StrictHttpResponse<TransactionResult>) => r.body as TransactionResult)\n );\n }\n\n /**\n * Path part for operation paymentsRefund\n */\n static readonly PaymentsRefundPath = '/v1/payments/{token}/refund';\n\n /**\n * Refund a payment.\n *\n * Use this endpoint to refund or void a charged payment. The refund amount cannot exceed the total charge amount,\n * Partial refunds are accepted provided the total refund amount of all the refunds does not exceed the total capture\n * amount.\\\n * When a full charge amount of the payment is refunded within 25 minutes of payment creation, then the refund will be\n * processed as a void. In this instance, funds will not impact the cardholder's account.\"\\\n * \\\n * Permissions: core.payments.refund\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentsRefund()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsRefund$Response(params: {\n\n /**\n * A payment token, e.g. py_a0RSCekCe4mGIIbAbMCp2ue7\n */\n token: string;\n\n /**\n * Transaction details\n */\n body: Refund\n }): Observable<StrictHttpResponse<TransactionResult>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.PaymentsRefundPath, 'post');\n if (params) {\n rb.path('token', params.token, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<TransactionResult>;\n })\n );\n }\n\n /**\n * Refund a payment.\n *\n * Use this endpoint to refund or void a charged payment. The refund amount cannot exceed the total charge amount,\n * Partial refunds are accepted provided the total refund amount of all the refunds does not exceed the total capture\n * amount.\\\n * When a full charge amount of the payment is refunded within 25 minutes of payment creation, then the refund will be\n * processed as a void. In this instance, funds will not impact the cardholder's account.\"\\\n * \\\n * Permissions: core.payments.refund\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentsRefund$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsRefund(params: {\n\n /**\n * A payment token, e.g. py_a0RSCekCe4mGIIbAbMCp2ue7\n */\n token: string;\n\n /**\n * Transaction details\n */\n body: Refund\n }): Observable<TransactionResult> {\n\n return this.paymentsRefund$Response(params).pipe(\n map((r: StrictHttpResponse<TransactionResult>) => r.body as TransactionResult)\n );\n }\n\n /**\n * Path part for operation paymentsGet\n */\n static readonly PaymentsGetPath = '/v1/payments/{token}';\n\n /**\n * Retrieve a payment.\n *\n * Use this endpoint to retrieve information for a specific payment.\\\n * \\\n * Permissions: core.payments.get\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentsGet()` instead.\n *\n * This method doesn't expect any request body.\n */\n paymentsGet$Response(params: {\n\n /**\n * A payment token, e.g. py_YA3jgM9ytApOmZHdY1iCFUmt\n */\n token: string;\n }): Observable<StrictHttpResponse<PaymentDetails>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.PaymentsGetPath, 'get');\n if (params) {\n rb.path('token', params.token, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<PaymentDetails>;\n })\n );\n }\n\n /**\n * Retrieve a payment.\n *\n * Use this endpoint to retrieve information for a specific payment.\\\n * \\\n * Permissions: core.payments.get\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentsGet$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n paymentsGet(params: {\n\n /**\n * A payment token, e.g. py_YA3jgM9ytApOmZHdY1iCFUmt\n */\n token: string;\n }): Observable<PaymentDetails> {\n\n return this.paymentsGet$Response(params).pipe(\n map((r: StrictHttpResponse<PaymentDetails>) => r.body as PaymentDetails)\n );\n }\n\n /**\n * Path part for operation paymentsExport\n */\n static readonly PaymentsExportPath = '/v1/payments/export';\n\n /**\n * Retrieves payments for current merchant.\n *\n * Permissions: core.payments.search\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentsExport()` instead.\n *\n * This method doesn't expect any request body.\n */\n paymentsExport$Response(params?: {\n OrderBy?: PaymentOrderBy;\n Amount?: number;\n Token?: string;\n TID?: string;\n MID?: string;\n Description?: string;\n CustomerName?: string;\n DisputeTypes?: Array<DisputeTypeEnum>;\n\n /**\n * Cardholder name, Payer name, etc.\n */\n PayerName?: string;\n Cardholder?: string;\n Last4?: string;\n First6?: string;\n CardBrands?: Array<CardBrandEnum>;\n Statuses?: Array<PaymentStatus>;\n Gateways?: Array<GatewayEnum>;\n DigitalWallets?: Array<DigitalWalletEnum>;\n SettlementStartDate?: string;\n SettlementEndDate?: string;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<StrictHttpResponse<GcpStorageResource>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.PaymentsExportPath, 'get');\n if (params) {\n rb.query('OrderBy', params.OrderBy, {});\n rb.query('Amount', params.Amount, {});\n rb.query('Token', params.Token, {});\n rb.query('TID', params.TID, {});\n rb.query('MID', params.MID, {});\n rb.query('Description', params.Description, {});\n rb.query('CustomerName', params.CustomerName, {});\n rb.query('DisputeTypes', params.DisputeTypes, {\"style\":\"form\",\"explode\":true});\n rb.query('PayerName', params.PayerName, {});\n rb.query('Cardholder', params.Cardholder, {});\n rb.query('Last4', params.Last4, {});\n rb.query('First6', params.First6, {});\n rb.query('CardBrands', params.CardBrands, {\"style\":\"form\",\"explode\":true});\n rb.query('Statuses', params.Statuses, {\"style\":\"form\",\"explode\":true});\n rb.query('Gateways', params.Gateways, {\"style\":\"form\",\"explode\":true});\n rb.query('DigitalWallets', params.DigitalWallets, {\"style\":\"form\",\"explode\":true});\n rb.query('SettlementStartDate', params.SettlementStartDate, {});\n rb.query('SettlementEndDate', params.SettlementEndDate, {});\n rb.query('StartDate', params.StartDate, {});\n rb.query('EndDate', params.EndDate, {});\n rb.query('OrderDirection', params.OrderDirection, {});\n rb.query('Pager.PageSize', params['Pager.PageSize'], {});\n rb.query('Pager.PageIndex', params['Pager.PageIndex'], {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<GcpStorageResource>;\n })\n );\n }\n\n /**\n * Retrieves payments for current merchant.\n *\n * Permissions: core.payments.search\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentsExport$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n paymentsExport(params?: {\n OrderBy?: PaymentOrderBy;\n Amount?: number;\n Token?: string;\n TID?: string;\n MID?: string;\n Description?: string;\n CustomerName?: string;\n DisputeTypes?: Array<DisputeTypeEnum>;\n\n /**\n * Cardholder name, Payer name, etc.\n */\n PayerName?: string;\n Cardholder?: string;\n Last4?: string;\n First6?: string;\n CardBrands?: Array<CardBrandEnum>;\n Statuses?: Array<PaymentStatus>;\n Gateways?: Array<GatewayEnum>;\n DigitalWallets?: Array<DigitalWalletEnum>;\n SettlementStartDate?: string;\n SettlementEndDate?: string;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<GcpStorageResource> {\n\n return this.paymentsExport$Response(params).pipe(\n map((r: StrictHttpResponse<GcpStorageResource>) => r.body as GcpStorageResource)\n );\n }\n\n /**\n * Path part for operation paymentsFees\n */\n static readonly PaymentsFeesPath = '/v1/payments/{token}/fees';\n\n /**\n * Retrieves all fees associated to a specific payment.\n *\n * Use this endpoint to retrieve all fees associated to a specific payment.\\\n * \\\n * Permissions: core.payments.get\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentsFees()` instead.\n *\n * This method doesn't expect any request body.\n */\n paymentsFees$Response(params: {\n\n /**\n * A payment token, e.g. py_YA3jgM9ytApOmZHdY1iCFUmt\n */\n token: string;\n }): Observable<StrictHttpResponse<TransactionFeesResult>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.PaymentsFeesPath, 'get');\n if (params) {\n rb.path('token', params.token, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<TransactionFeesResult>;\n })\n );\n }\n\n /**\n * Retrieves all fees associated to a specific payment.\n *\n * Use this endpoint to retrieve all fees associated to a specific payment.\\\n * \\\n * Permissions: core.payments.get\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentsFees$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n paymentsFees(params: {\n\n /**\n * A payment token, e.g. py_YA3jgM9ytApOmZHdY1iCFUmt\n */\n token: string;\n }): Observable<TransactionFeesResult> {\n\n return this.paymentsFees$Response(params).pipe(\n map((r: StrictHttpResponse<TransactionFeesResult>) => r.body as TransactionFeesResult)\n );\n }\n\n /**\n * Path part for operation paymentsGetNextPaymentActions\n */\n static readonly PaymentsGetNextPaymentActionsPath = '/v1/payments/get-next-payment-actions/{token}';\n\n /**\n * Permissions: core.payments.get\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentsGetNextPaymentActions()` instead.\n *\n * This method doesn't expect any request body.\n */\n paymentsGetNextPaymentActions$Response(params: {\n token: string;\n }): Observable<StrictHttpResponse<Array<NextPaymentAction>>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.PaymentsGetNextPaymentActionsPath, 'get');\n if (params) {\n rb.path('token', params.token, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Array<NextPaymentAction>>;\n })\n );\n }\n\n /**\n * Permissions: core.payments.get\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentsGetNextPaymentActions$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n paymentsGetNextPaymentActions(params: {\n token: string;\n }): Observable<Array<NextPaymentAction>> {\n\n return this.paymentsGetNextPaymentActions$Response(params).pipe(\n map((r: StrictHttpResponse<Array<NextPaymentAction>>) => r.body as Array<NextPaymentAction>)\n );\n }\n\n /**\n * Path part for operation paymentsGooglePay\n */\n static readonly PaymentsGooglePayPath = '/v1/payments/google-pay';\n\n /**\n * Create a Google Pay Payment.\n *\n * Use this endpoint to charge a card (credit or debit) using the Google Pay payment method token.\n * You can generate the Google Pay payment method token using the VituPay JavaScript SDK.\\\n * \\\n * Permissions: core.payments.process-googlepay\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentsGooglePay()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsGooglePay$Response(params: {\n\n /**\n * Google Pay payload\n */\n body: GooglePayRequest\n }): Observable<StrictHttpResponse<TransactionResult>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.PaymentsGooglePayPath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<TransactionResult>;\n })\n );\n }\n\n /**\n * Create a Google Pay Payment.\n *\n * Use this endpoint to charge a card (credit or debit) using the Google Pay payment method token.\n * You can generate the Google Pay payment method token using the VituPay JavaScript SDK.\\\n * \\\n * Permissions: core.payments.process-googlepay\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentsGooglePay$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsGooglePay(params: {\n\n /**\n * Google Pay payload\n */\n body: GooglePayRequest\n }): Observable<TransactionResult> {\n\n return this.paymentsGooglePay$Response(params).pipe(\n map((r: StrictHttpResponse<TransactionResult>) => r.body as TransactionResult)\n );\n }\n\n /**\n * Path part for operation paymentsGooglePaySurchargeVerify\n */\n static readonly PaymentsGooglePaySurchargeVerifyPath = '/v1/payments/google-pay-surcharge-verify';\n\n /**\n * Permissions: core.payments.process-googlepay\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentsGooglePaySurchargeVerify()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsGooglePaySurchargeVerify$Response(params: {\n body: SurchargeVerifyRequest\n }): Observable<StrictHttpResponse<CheckCreditCardResponse>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.PaymentsGooglePaySurchargeVerifyPath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<CheckCreditCardResponse>;\n })\n );\n }\n\n /**\n * Permissions: core.payments.process-googlepay\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentsGooglePaySurchargeVerify$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsGooglePaySurchargeVerify(params: {\n body: SurchargeVerifyRequest\n }): Observable<CheckCreditCardResponse> {\n\n return this.paymentsGooglePaySurchargeVerify$Response(params).pipe(\n map((r: StrictHttpResponse<CheckCreditCardResponse>) => r.body as CheckCreditCardResponse)\n );\n }\n\n /**\n * Path part for operation paymentsStartApplePaySession\n */\n static readonly PaymentsStartApplePaySessionPath = '/v1/payments/start-apple-pay-session';\n\n /**\n * Start Apple Pay session.\n *\n * Permissions: core.payments.process-applepay\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentsStartApplePaySession()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsStartApplePaySession$Response(params: {\n body: ApplePayStartSessionRequest\n }): Observable<StrictHttpResponse<AppleSessionDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.PaymentsStartApplePaySessionPath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<AppleSessionDto>;\n })\n );\n }\n\n /**\n * Start Apple Pay session.\n *\n * Permissions: core.payments.process-applepay\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentsStartApplePaySession$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsStartApplePaySession(params: {\n body: ApplePayStartSessionRequest\n }): Observable<AppleSessionDto> {\n\n return this.paymentsStartApplePaySession$Response(params).pipe(\n map((r: StrictHttpResponse<AppleSessionDto>) => r.body as AppleSessionDto)\n );\n }\n\n /**\n * Path part for operation paymentsApplePay\n */\n static readonly PaymentsApplePayPath = '/v1/payments/apple-pay';\n\n /**\n * Create an Apple Pay Payment.\n *\n * Use this endpoint to charge a card (credit or debit) using the Apple Pay payment method token.\n * You can generate the Apple Pay payment method token using the VituPay JavaScript SDK.\\\n * \\\n * Permissions: core.payments.process-applepay\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentsApplePay()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsApplePay$Response(params: {\n\n /**\n * Apple Pay payload\n */\n body: ApplePayRequest\n }): Observable<StrictHttpResponse<TransactionResult>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.PaymentsApplePayPath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<TransactionResult>;\n })\n );\n }\n\n /**\n * Create an Apple Pay Payment.\n *\n * Use this endpoint to charge a card (credit or debit) using the Apple Pay payment method token.\n * You can generate the Apple Pay payment method token using the VituPay JavaScript SDK.\\\n * \\\n * Permissions: core.payments.process-applepay\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentsApplePay$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsApplePay(params: {\n\n /**\n * Apple Pay payload\n */\n body: ApplePayRequest\n }): Observable<TransactionResult> {\n\n return this.paymentsApplePay$Response(params).pipe(\n map((r: StrictHttpResponse<TransactionResult>) => r.body as TransactionResult)\n );\n }\n\n /**\n * Path part for operation paymentsCreatePayPalOrder\n */\n static readonly PaymentsCreatePayPalOrderPath = '/v1/payments/create-pay-pal-order';\n\n /**\n * Create a PayPal order.\n *\n * Use this endpoint to create a PayPal order which, when created, must be approved by the customer and then captured\n * using POST/v1/payments/capture-PayPal-order.\\\n * \\\n * Permissions: core.payments.create-paypal-order\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentsCreatePayPalOrder()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsCreatePayPalOrder$Response(params: {\n body: CreatePayPalOrderRequest\n }): Observable<StrictHttpResponse<CreatePayPalOrderResponse>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.PaymentsCreatePayPalOrderPath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<CreatePayPalOrderResponse>;\n })\n );\n }\n\n /**\n * Create a PayPal order.\n *\n * Use this endpoint to create a PayPal order which, when created, must be approved by the customer and then captured\n * using POST/v1/payments/capture-PayPal-order.\\\n * \\\n * Permissions: core.payments.create-paypal-order\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentsCreatePayPalOrder$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsCreatePayPalOrder(params: {\n body: CreatePayPalOrderRequest\n }): Observable<CreatePayPalOrderResponse> {\n\n return this.paymentsCreatePayPalOrder$Response(params).pipe(\n map((r: StrictHttpResponse<CreatePayPalOrderResponse>) => r.body as CreatePayPalOrderResponse)\n );\n }\n\n /**\n * Path part for operation paymentsCapturePayPalOrder\n */\n static readonly PaymentsCapturePayPalOrderPath = '/v1/payments/capture-pay-pal-order';\n\n /**\n * Capture PayPal order.\n *\n * Use this endpoint to capture a PayPal order. The PayPal order can only be captured when the buyer has approved the\n * order.\\\n * \\\n * Permissions: core.payments.capture-paypal-order\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentsCapturePayPalOrder()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n *\n * @deprecated\n */\n paymentsCapturePayPalOrder$Response(params: {\n body: PayPalOrderRequest\n }): Observable<StrictHttpResponse<TransactionResult>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.PaymentsCapturePayPalOrderPath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<TransactionResult>;\n })\n );\n }\n\n /**\n * Capture PayPal order.\n *\n * Use this endpoint to capture a PayPal order. The PayPal order can only be captured when the buyer has approved the\n * order.\\\n * \\\n * Permissions: core.payments.capture-paypal-order\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentsCapturePayPalOrder$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n *\n * @deprecated\n */\n paymentsCapturePayPalOrder(params: {\n body: PayPalOrderRequest\n }): Observable<TransactionResult> {\n\n return this.paymentsCapturePayPalOrder$Response(params).pipe(\n map((r: StrictHttpResponse<TransactionResult>) => r.body as TransactionResult)\n );\n }\n\n /**\n * Path part for operation paymentsProcessPayPalOrder\n */\n static readonly PaymentsProcessPayPalOrderPath = '/v1/payments/process-pay-pal-order';\n\n /**\n * Capture PayPal order.\n *\n * Use this endpoint to capture a PayPal order. The PayPal order can only be captured when the buyer has approved the\n * order.\\\n * \\\n * Permissions: core.payments.capture-paypal-order\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `paymentsProcessPayPalOrder()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsProcessPayPalOrder$Response(params: {\n body: PayPalOrderRequest\n }): Observable<StrictHttpResponse<TransactionResult>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.PaymentsProcessPayPalOrderPath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<TransactionResult>;\n })\n );\n }\n\n /**\n * Capture PayPal order.\n *\n * Use this endpoint to capture a PayPal order. The PayPal order can only be captured when the buyer has approved the\n * order.\\\n * \\\n * Permissions: core.payments.capture-paypal-order\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `paymentsProcessPayPalOrder$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n paymentsProcessPayPalOrder(params: {\n body: PayPalOrderRequest\n }): Observable<TransactionResult> {\n\n return this.paymentsProcessPayPalOrder$Response(params).pipe(\n map((r: StrictHttpResponse<TransactionResult>) => r.body as TransactionResult)\n );\n }\n\n /**\n * Path part for operation refundsVoid\n */\n static readonly RefundsVoidPath = '/v1/payments/refunds/{token}/void';\n\n /**\n * Void a refund transaction.\n *\n * Permissions: core.payments.void-refund\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `refundsVoid()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n refundsVoid$Response(params: {\n\n /**\n * Referenced refund transaction token, e.g. tr_ILgWHJSfcYL0Wir4bBNfRUuf6eZ0\n */\n token: string;\n\n /**\n * Transaction details\n */\n body: Void\n }): Observable<StrictHttpResponse<TransactionResult>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.RefundsVoidPath, 'post');\n if (params) {\n rb.path('token', params.token, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<TransactionResult>;\n })\n );\n }\n\n /**\n * Void a refund transaction.\n *\n * Permissions: core.payments.void-refund\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `refundsVoid$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n refundsVoid(params: {\n\n /**\n * Referenced refund transaction token, e.g. tr_ILgWHJSfcYL0Wir4bBNfRUuf6eZ0\n */\n token: string;\n\n /**\n * Transaction details\n */\n body: Void\n }): Observable<TransactionResult> {\n\n return this.refundsVoid$Response(params).pipe(\n map((r: StrictHttpResponse<TransactionResult>) => r.body as TransactionResult)\n );\n }\n\n /**\n * Path part for operation transactionsSearch\n */\n static readonly TransactionsSearchPath = '/v1/payments/transactions';\n\n /**\n * Retrieve a transaction.\n *\n * A payment is made up for one or multiple individual transactions, include auth, capture, sale, refund or void.\n * Use this endpoint to retrieve a information for a specific transaction.\\\n * \\\n * Permissions: core.transactions.search\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `transactionsSearch()` instead.\n *\n * This method doesn't expect any request body.\n */\n transactionsSearch$Response(params?: {\n PaymentMethod?: PaymentMethodType;\n Amount?: number;\n OrderBy?: TransactionOrderBy;\n Token?: string;\n Types?: Array<TransactionType>;\n Description?: string;\n Customer?: string;\n\n /**\n * Cardholder name, Payer name, etc.\n */\n PayerName?: string;\n Cardholder?: string;\n AuthCode?: string;\n Last4?: string;\n First6?: string;\n CardBrands?: Array<CardBrandEnum>;\n\n /**\n * Public 14-digits transaction id\n */\n TransactionId?: string;\n TID?: string;\n MID?: string;\n Statuses?: Array<TransactionStatus>;\n Gateways?: Array<GatewayEnum>;\n DigitalWallets?: Array<DigitalWalletEnum>;\n SettlementStartDate?: string;\n SettlementEndDate?: string;\n IsServiceFee?: boolean;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n meta?: {\n[key: string]: string;\n};\n }): Observable<StrictHttpResponse<PagedDataDtoOfTransaction>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.TransactionsSearchPath, 'get');\n if (params) {\n rb.query('PaymentMethod', params.PaymentMethod, {});\n rb.query('Amount', params.Amount, {});\n rb.query('OrderBy', params.OrderBy, {});\n rb.query('Token', params.Token, {});\n rb.query('Types', params.Types, {\"style\":\"form\",\"explode\":true});\n rb.query('Description', params.Description, {});\n rb.query('Customer', params.Customer, {});\n rb.query('PayerName', params.PayerName, {});\n rb.query('Cardholder', params.Cardholder, {});\n rb.query('AuthCode', params.AuthCode, {});\n rb.query('Last4', params.Last4, {});\n rb.query('First6', params.First6, {});\n rb.query('CardBrands', params.CardBrands, {\"style\":\"form\",\"explode\":true});\n rb.query('TransactionId', params.TransactionId, {});\n rb.query('TID', params.TID, {});\n rb.query('MID', params.MID, {});\n rb.query('Statuses', params.Statuses, {\"style\":\"form\",\"explode\":true});\n rb.query('Gateways', params.Gateways, {\"style\":\"form\",\"explode\":true});\n rb.query('DigitalWallets', params.DigitalWallets, {\"style\":\"form\",\"explode\":true});\n rb.query('SettlementStartDate', params.SettlementStartDate, {});\n rb.query('SettlementEndDate', params.SettlementEndDate, {});\n rb.query('IsServiceFee', params.IsServiceFee, {});\n rb.query('StartDate', params.StartDate, {});\n rb.query('EndDate', params.EndDate, {});\n rb.query('OrderDirection', params.OrderDirection, {});\n rb.query('Pager.PageSize', params['Pager.PageSize'], {});\n rb.query('Pager.PageIndex', params['Pager.PageIndex'], {});\n rb.query('meta', params.meta, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<PagedDataDtoOfTransaction>;\n })\n );\n }\n\n /**\n * Retrieve a transaction.\n *\n * A payment is made up for one or multiple individual transactions, include auth, capture, sale, refund or void.\n * Use this endpoint to retrieve a information for a specific transaction.\\\n * \\\n * Permissions: core.transactions.search\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `transactionsSearch$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n transactionsSearch(params?: {\n PaymentMethod?: PaymentMethodType;\n Amount?: number;\n OrderBy?: TransactionOrderBy;\n Token?: string;\n Types?: Array<TransactionType>;\n Description?: string;\n Customer?: string;\n\n /**\n * Cardholder name, Payer name, etc.\n */\n PayerName?: string;\n Cardholder?: string;\n AuthCode?: string;\n Last4?: string;\n First6?: string;\n CardBrands?: Array<CardBrandEnum>;\n\n /**\n * Public 14-digits transaction id\n */\n TransactionId?: string;\n TID?: string;\n MID?: string;\n Statuses?: Array<TransactionStatus>;\n Gateways?: Array<GatewayEnum>;\n DigitalWallets?: Array<DigitalWalletEnum>;\n SettlementStartDate?: string;\n SettlementEndDate?: string;\n IsServiceFee?: boolean;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n meta?: {\n[key: string]: string;\n};\n }): Observable<PagedDataDtoOfTransaction> {\n\n return this.transactionsSearch$Response(params).pipe(\n map((r: StrictHttpResponse<PagedDataDtoOfTransaction>) => r.body as PagedDataDtoOfTransaction)\n );\n }\n\n /**\n * Path part for operation transactionsGet\n */\n static readonly TransactionsGetPath = '/v1/payments/transactions/{token}';\n\n /**\n * Retrieve a transaction.\n *\n * A payment is made up for one or multiple individual transactions, include auth, capture, sale, refund or void.\n * Use this endpoint to retrieve a information for a specific transaction.\\\n * \\\n * Permissions: core.transactions.get\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `transactionsGet()` instead.\n *\n * This method doesn't expect any request body.\n */\n transactionsGet$Response(params: {\n\n /**\n * A transaction token, e.g. tr_ILgWHJSfcYL0Wir4bBNfRUuf6eZ0\n */\n token: string;\n }): Observable<StrictHttpResponse<TransactionDetails>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.TransactionsGetPath, 'get');\n if (params) {\n rb.path('token', params.token, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<TransactionDetails>;\n })\n );\n }\n\n /**\n * Retrieve a transaction.\n *\n * A payment is made up for one or multiple individual transactions, include auth, capture, sale, refund or void.\n * Use this endpoint to retrieve a information for a specific transaction.\\\n * \\\n * Permissions: core.transactions.get\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `transactionsGet$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n transactionsGet(params: {\n\n /**\n * A transaction token, e.g. tr_ILgWHJSfcYL0Wir4bBNfRUuf6eZ0\n */\n token: string;\n }): Observable<TransactionDetails> {\n\n return this.transactionsGet$Response(params).pipe(\n map((r: StrictHttpResponse<TransactionDetails>) => r.body as TransactionDetails)\n );\n }\n\n /**\n * Path part for operation transactionsExport\n */\n static readonly TransactionsExportPath = '/v1/payments/transactions/export';\n\n /**\n * Retrieves transactions for current merchant.\n *\n * Permissions: core.transactions.search\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `transactionsExport()` instead.\n *\n * This method doesn't expect any request body.\n */\n transactionsExport$Response(params?: {\n PaymentMethod?: PaymentMethodType;\n Amount?: number;\n OrderBy?: TransactionOrderBy;\n Token?: string;\n Types?: Array<TransactionType>;\n Description?: string;\n Customer?: string;\n\n /**\n * Cardholder name, Payer name, etc.\n */\n PayerName?: string;\n Cardholder?: string;\n AuthCode?: string;\n Last4?: string;\n First6?: string;\n CardBrands?: Array<CardBrandEnum>;\n\n /**\n * Public 14-digits transaction id\n */\n TransactionId?: string;\n TID?: string;\n MID?: string;\n Statuses?: Array<TransactionStatus>;\n Gateways?: Array<GatewayEnum>;\n DigitalWallets?: Array<DigitalWalletEnum>;\n SettlementStartDate?: string;\n SettlementEndDate?: string;\n IsServiceFee?: boolean;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n meta?: {\n[key: string]: string;\n};\n }): Observable<StrictHttpResponse<GcpStorageResource>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.TransactionsExportPath, 'get');\n if (params) {\n rb.query('PaymentMethod', params.PaymentMethod, {});\n rb.query('Amount', params.Amount, {});\n rb.query('OrderBy', params.OrderBy, {});\n rb.query('Token', params.Token, {});\n rb.query('Types', params.Types, {\"style\":\"form\",\"explode\":true});\n rb.query('Description', params.Description, {});\n rb.query('Customer', params.Customer, {});\n rb.query('PayerName', params.PayerName, {});\n rb.query('Cardholder', params.Cardholder, {});\n rb.query('AuthCode', params.AuthCode, {});\n rb.query('Last4', params.Last4, {});\n rb.query('First6', params.First6, {});\n rb.query('CardBrands', params.CardBrands, {\"style\":\"form\",\"explode\":true});\n rb.query('TransactionId', params.TransactionId, {});\n rb.query('TID', params.TID, {});\n rb.query('MID', params.MID, {});\n rb.query('Statuses', params.Statuses, {\"style\":\"form\",\"explode\":true});\n rb.query('Gateways', params.Gateways, {\"style\":\"form\",\"explode\":true});\n rb.query('DigitalWallets', params.DigitalWallets, {\"style\":\"form\",\"explode\":true});\n rb.query('SettlementStartDate', params.SettlementStartDate, {});\n rb.query('SettlementEndDate', params.SettlementEndDate, {});\n rb.query('IsServiceFee', params.IsServiceFee, {});\n rb.query('StartDate', params.StartDate, {});\n rb.query('EndDate', params.EndDate, {});\n rb.query('OrderDirection', params.OrderDirection, {});\n rb.query('Pager.PageSize', params['Pager.PageSize'], {});\n rb.query('Pager.PageIndex', params['Pager.PageIndex'], {});\n rb.query('meta', params.meta, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<GcpStorageResource>;\n })\n );\n }\n\n /**\n * Retrieves transactions for current merchant.\n *\n * Permissions: core.transactions.search\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `transactionsExport$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n transactionsExport(params?: {\n PaymentMethod?: PaymentMethodType;\n Amount?: number;\n OrderBy?: TransactionOrderBy;\n Token?: string;\n Types?: Array<TransactionType>;\n Description?: string;\n Customer?: string;\n\n /**\n * Cardholder name, Payer name, etc.\n */\n PayerName?: string;\n Cardholder?: string;\n AuthCode?: string;\n Last4?: string;\n First6?: string;\n CardBrands?: Array<CardBrandEnum>;\n\n /**\n * Public 14-digits transaction id\n */\n TransactionId?: string;\n TID?: string;\n MID?: string;\n Statuses?: Array<TransactionStatus>;\n Gateways?: Array<GatewayEnum>;\n DigitalWallets?: Array<DigitalWalletEnum>;\n SettlementStartDate?: string;\n SettlementEndDate?: string;\n IsServiceFee?: boolean;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n meta?: {\n[key: string]: string;\n};\n }): Observable<GcpStorageResource> {\n\n return this.transactionsExport$Response(params).pipe(\n map((r: StrictHttpResponse<GcpStorageResource>) => r.body as GcpStorageResource)\n );\n }\n\n /**\n * Path part for operation transactionsGetFees\n */\n static readonly TransactionsGetFeesPath = '/v1/payments/transactions/{token}/fees';\n\n /**\n * Retrieves all fees associated to a specific transaction.\n *\n * Use this endpoint to retrieve all fees associated to a specific transaction.\\\n * \\\n * Permissions: core.transactions.get\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `transactionsGetFees()` instead.\n *\n * This method doesn't expect any request body.\n */\n transactionsGetFees$Response(params: {\n\n /**\n * A transaction token, e.g. tr_ILgWHJSfcYL0Wir4bBNfRUuf6eZ0\n */\n token: string;\n }): Observable<StrictHttpResponse<TransactionFeesResult>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.TransactionsGetFeesPath, 'get');\n if (params) {\n rb.path('token', params.token, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<TransactionFeesResult>;\n })\n );\n }\n\n /**\n * Retrieves all fees associated to a specific transaction.\n *\n * Use this endpoint to retrieve all fees associated to a specific transaction.\\\n * \\\n * Permissions: core.transactions.get\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `transactionsGetFees$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n transactionsGetFees(params: {\n\n /**\n * A transaction token, e.g. tr_ILgWHJSfcYL0Wir4bBNfRUuf6eZ0\n */\n token: string;\n }): Observable<TransactionFeesResult> {\n\n return this.transactionsGetFees$Response(params).pipe(\n map((r: StrictHttpResponse<TransactionFeesResult>) => r.body as TransactionFeesResult)\n );\n }\n\n /**\n * Path part for operation transactionsAccrueCustomFees\n */\n static readonly TransactionsAccrueCustomFeesPath = '/v1/payments/transactions/{token}/fees';\n\n /**\n * Use this endpoint to accrue custom fees to a transaction.\n * Custom fees can only be added to a successful sale or capture transaction which is not yet settled.\n *\n * Permissions: core.transactions.add-fee\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `transactionsAccrueCustomFees()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n transactionsAccrueCustomFees$Response(params: {\n\n /**\n * The transaction token, e.g. tr_ILgWHJSfcYL0Wir4bBNfRUuf6eZ0\n */\n token: string;\n\n /**\n * The object containing fees you want to add to the transaction.\n */\n body: AccrueCustomFeesRequest\n }): Observable<StrictHttpResponse<void>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.TransactionsAccrueCustomFeesPath, 'post');\n if (params) {\n rb.path('token', params.token, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as StrictHttpResponse<void>;\n })\n );\n }\n\n /**\n * Use this endpoint to accrue custom fees to a transaction.\n * Custom fees can only be added to a successful sale or capture transaction which is not yet settled.\n *\n * Permissions: core.transactions.add-fee\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `transactionsAccrueCustomFees$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n transactionsAccrueCustomFees(params: {\n\n /**\n * The transaction token, e.g. tr_ILgWHJSfcYL0Wir4bBNfRUuf6eZ0\n */\n token: string;\n\n /**\n * The object containing fees you want to add to the transaction.\n */\n body: AccrueCustomFeesRequest\n }): Observable<void> {\n\n return this.transactionsAccrueCustomFees$Response(params).pipe(\n map((r: StrictHttpResponse<void>) => r.body as void)\n );\n }\n\n /**\n * Path part for operation transactionsReceipt\n */\n static readonly TransactionsReceiptPath = '/v1/payments/transactions/{token}/receipt';\n\n /**\n * Retrieve a transaction receipt.\n *\n * Use this endpoint to receive a receipt URL for a specific transaction.\\\n * \\\n * Permissions: core.transactions.get\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `transactionsReceipt()` instead.\n *\n * This method doesn't expect any request body.\n */\n transactionsReceipt$Response(params: {\n\n /**\n * A transaction token, e.g. tr_ILgWHJSfcYL0Wir4bBNfRUuf6eZ0\n */\n token: string;\n }): Observable<StrictHttpResponse<GcpStorageResource>> {\n\n const rb = new RequestBuilder(this.rootUrl, PaymentsService.TransactionsReceiptPath, 'get');\n if (params) {\n rb.path('token', params.token, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<GcpStorageResource>;\n })\n );\n }\n\n /**\n * Retrieve a transaction receipt.\n *\n * Use this endpoint to receive a receipt URL for a specific transaction.\\\n * \\\n * Permissions: core.transactions.get\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `transactionsReceipt$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n transactionsReceipt(params: {\n\n /**\n * A transaction token, e.g. tr_ILgWHJSfcYL0Wir4bBNfRUuf6eZ0\n */\n token: string;\n }): Observable<GcpStorageResource> {\n\n return this.transactionsReceipt$Response(params).pipe(\n map((r: StrictHttpResponse<GcpStorageResource>) => r.body as GcpStorageResource)\n );\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { BaseService } from '../base-service';\nimport { ApiConfiguration } from '../api-configuration';\nimport { StrictHttpResponse } from '../strict-http-response';\nimport { RequestBuilder } from '../request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { CloverCancel } from '../models/clover-cancel';\nimport { CloverPayment } from '../models/clover-payment';\nimport { SurchargeResult } from '../models/surcharge-result';\nimport { TransactionDeliveryResponse } from '../models/transaction-delivery-response';\n\n\n/**\n * Clover Devices integration API\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class CloverPosService extends BaseService {\n constructor(\n config: ApiConfiguration,\n http: HttpClient\n ) {\n super(config, http);\n }\n\n /**\n * Path part for operation cloverSalesBeginSale\n */\n static readonly CloverSalesBeginSalePath = '/v1/payments/clover-sales';\n\n /**\n * Start the payment process on a clover device.\n *\n * Use this endpoint to start the payment process on your Clover device.\\\n * \\\n * Permissions: core.clover.sale\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `cloverSalesBeginSale()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n cloverSalesBeginSale$Response(params: {\n body: CloverPayment\n }): Observable<StrictHttpResponse<TransactionDeliveryResponse>> {\n\n const rb = new RequestBuilder(this.rootUrl, CloverPosService.CloverSalesBeginSalePath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<TransactionDeliveryResponse>;\n })\n );\n }\n\n /**\n * Start the payment process on a clover device.\n *\n * Use this endpoint to start the payment process on your Clover device.\\\n * \\\n * Permissions: core.clover.sale\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `cloverSalesBeginSale$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n cloverSalesBeginSale(params: {\n body: CloverPayment\n }): Observable<TransactionDeliveryResponse> {\n\n return this.cloverSalesBeginSale$Response(params).pipe(\n map((r: StrictHttpResponse<TransactionDeliveryResponse>) => r.body as TransactionDeliveryResponse)\n );\n }\n\n /**\n * Path part for operation cloverSalesCancel\n */\n static readonly CloverSalesCancelPath = '/v1/payments/clover-sales/cancel';\n\n /**\n * Starts the cancellation process on a clover device.\n *\n * Use this endpoint to cancel the payment process on your Clover device.\\\n * \\\n * Permissions: core.clover.cancel\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `cloverSalesCancel()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n cloverSalesCancel$Response(params: {\n body: CloverCancel\n }): Observable<StrictHttpResponse<TransactionDeliveryResponse>> {\n\n const rb = new RequestBuilder(this.rootUrl, CloverPosService.CloverSalesCancelPath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<TransactionDeliveryResponse>;\n })\n );\n }\n\n /**\n * Starts the cancellation process on a clover device.\n *\n * Use this endpoint to cancel the payment process on your Clover device.\\\n * \\\n * Permissions: core.clover.cancel\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `cloverSalesCancel$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n cloverSalesCancel(params: {\n body: CloverCancel\n }): Observable<TransactionDeliveryResponse> {\n\n return this.cloverSalesCancel$Response(params).pipe(\n map((r: StrictHttpResponse<TransactionDeliveryResponse>) => r.body as TransactionDeliveryResponse)\n );\n }\n\n /**\n * Path part for operation surchargeFee\n */\n static readonly SurchargeFeePath = '/v1/payments/surcharge/fee';\n\n /**\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `surchargeFee()` instead.\n *\n * This method doesn't expect any request body.\n *\n * @deprecated\n */\n surchargeFee$Response(params?: {\n First6?: string;\n Amount?: number;\n TID?: string;\n }): Observable<StrictHttpResponse<SurchargeResult>> {\n\n const rb = new RequestBuilder(this.rootUrl, CloverPosService.SurchargeFeePath, 'get');\n if (params) {\n rb.query('First6', params.First6, {});\n rb.query('Amount', params.Amount, {});\n rb.query('TID', params.TID, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<SurchargeResult>;\n })\n );\n }\n\n /**\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `surchargeFee$Response()` instead.\n *\n * This method doesn't expect any request body.\n *\n * @deprecated\n */\n surchargeFee(params?: {\n First6?: string;\n Amount?: number;\n TID?: string;\n }): Observable<SurchargeResult> {\n\n return this.surchargeFee$Response(params).pipe(\n map((r: StrictHttpResponse<SurchargeResult>) => r.body as SurchargeResult)\n );\n }\n\n /**\n * Path part for operation surchargeVerifyTidSurcharge\n */\n static readonly SurchargeVerifyTidSurchargePath = '/v1/payments/surcharge/verify-tid-surcharge';\n\n /**\n * Allows to retrieve expected surcharge data for a given TID.\n *\n *\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `surchargeVerifyTidSurcharge()` instead.\n *\n * This method doesn't expect any request body.\n *\n * @deprecated\n */\n surchargeVerifyTidSurcharge$Response(params?: {\n Amount?: number;\n TID?: string;\n }): Observable<StrictHttpResponse<SurchargeResult>> {\n\n const rb = new RequestBuilder(this.rootUrl, CloverPosService.SurchargeVerifyTidSurchargePath, 'get');\n if (params) {\n rb.query('Amount', params.Amount, {});\n rb.query('TID', params.TID, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<SurchargeResult>;\n })\n );\n }\n\n /**\n * Allows to retrieve expected surcharge data for a given TID.\n *\n *\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `surchargeVerifyTidSurcharge$Response()` instead.\n *\n * This method doesn't expect any request body.\n *\n * @deprecated\n */\n surchargeVerifyTidSurcharge(params?: {\n Amount?: number;\n TID?: string;\n }): Observable<SurchargeResult> {\n\n return this.surchargeVerifyTidSurcharge$Response(params).pipe(\n map((r: StrictHttpResponse<SurchargeResult>) => r.body as SurchargeResult)\n );\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { BaseService } from '../base-service';\nimport { ApiConfiguration } from '../api-configuration';\nimport { StrictHttpResponse } from '../strict-http-response';\nimport { RequestBuilder } from '../request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { ClientDetailsDto } from '../models/client-details-dto';\nimport { ClientDto } from '../models/client-dto';\nimport { CreateClientDto } from '../models/create-client-dto';\nimport { UpdateClientDto } from '../models/update-client-dto';\n\n\n/**\n * API to manage clients.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ClientsService extends BaseService {\n constructor(\n config: ApiConfiguration,\n http: HttpClient\n ) {\n super(config, http);\n }\n\n /**\n * Path part for operation clientsSearch\n */\n static readonly ClientsSearchPath = '/v1/clients';\n\n /**\n * Permissions: core.clients.search\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `clientsSearch()` instead.\n *\n * This method doesn't expect any request body.\n */\n clientsSearch$Response(params?: {\n PageSize?: number;\n PageIndex?: number;\n }): Observable<StrictHttpResponse<Array<ClientDto>>> {\n\n const rb = new RequestBuilder(this.rootUrl, ClientsService.ClientsSearchPath, 'get');\n if (params) {\n rb.query('PageSize', params.PageSize, {});\n rb.query('PageIndex', params.PageIndex, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Array<ClientDto>>;\n })\n );\n }\n\n /**\n * Permissions: core.clients.search\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `clientsSearch$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n clientsSearch(params?: {\n PageSize?: number;\n PageIndex?: number;\n }): Observable<Array<ClientDto>> {\n\n return this.clientsSearch$Response(params).pipe(\n map((r: StrictHttpResponse<Array<ClientDto>>) => r.body as Array<ClientDto>)\n );\n }\n\n /**\n * Path part for operation clientsPost\n */\n static readonly ClientsPostPath = '/v1/clients';\n\n /**\n * Permissions: core.clients.create\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `clientsPost()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n clientsPost$Response(params: {\n body: CreateClientDto\n }): Observable<StrictHttpResponse<number>> {\n\n const rb = new RequestBuilder(this.rootUrl, ClientsService.ClientsPostPath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: parseFloat(String((r as HttpResponse<any>).body)) }) as StrictHttpResponse<number>;\n })\n );\n }\n\n /**\n * Permissions: core.clients.create\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `clientsPost$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n clientsPost(params: {\n body: CreateClientDto\n }): Observable<number> {\n\n return this.clientsPost$Response(params).pipe(\n map((r: StrictHttpResponse<number>) => r.body as number)\n );\n }\n\n /**\n * Path part for operation clientsGet\n */\n static readonly ClientsGetPath = '/v1/clients/{id}';\n\n /**\n * Permissions: core.clients.get\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `clientsGet()` instead.\n *\n * This method doesn't expect any request body.\n */\n clientsGet$Response(params: {\n id: number;\n }): Observable<StrictHttpResponse<ClientDetailsDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, ClientsService.ClientsGetPath, 'get');\n if (params) {\n rb.path('id', params.id, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<ClientDetailsDto>;\n })\n );\n }\n\n /**\n * Permissions: core.clients.get\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `clientsGet$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n clientsGet(params: {\n id: number;\n }): Observable<ClientDetailsDto> {\n\n return this.clientsGet$Response(params).pipe(\n map((r: StrictHttpResponse<ClientDetailsDto>) => r.body as ClientDetailsDto)\n );\n }\n\n /**\n * Path part for operation clientsPut\n */\n static readonly ClientsPutPath = '/v1/clients/{id}';\n\n /**\n * Permissions: core.clients.update\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `clientsPut()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n clientsPut$Response(params: {\n id: number;\n body: UpdateClientDto\n }): Observable<StrictHttpResponse<number>> {\n\n const rb = new RequestBuilder(this.rootUrl, ClientsService.ClientsPutPath, 'put');\n if (params) {\n rb.path('id', params.id, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: parseFloat(String((r as HttpResponse<any>).body)) }) as StrictHttpResponse<number>;\n })\n );\n }\n\n /**\n * Permissions: core.clients.update\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `clientsPut$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n clientsPut(params: {\n id: number;\n body: UpdateClientDto\n }): Observable<number> {\n\n return this.clientsPut$Response(params).pipe(\n map((r: StrictHttpResponse<number>) => r.body as number)\n );\n }\n\n /**\n * Path part for operation clientsDelete\n */\n static readonly ClientsDeletePath = '/v1/clients/{id}';\n\n /**\n * Permissions: core.clients.delete\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `clientsDelete()` instead.\n *\n * This method doesn't expect any request body.\n */\n clientsDelete$Response(params: {\n id: number;\n }): Observable<StrictHttpResponse<void>> {\n\n const rb = new RequestBuilder(this.rootUrl, ClientsService.ClientsDeletePath, 'delete');\n if (params) {\n rb.path('id', params.id, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as StrictHttpResponse<void>;\n })\n );\n }\n\n /**\n * Permissions: core.clients.delete\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `clientsDelete$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n clientsDelete(params: {\n id: number;\n }): Observable<void> {\n\n return this.clientsDelete$Response(params).pipe(\n map((r: StrictHttpResponse<void>) => r.body as void)\n );\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { BaseService } from '../base-service';\nimport { ApiConfiguration } from '../api-configuration';\nimport { StrictHttpResponse } from '../strict-http-response';\nimport { RequestBuilder } from '../request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { ClientSecretDto } from '../models/client-secret-dto';\nimport { ClientSecretLookupsDto } from '../models/client-secret-lookups-dto';\nimport { CreateClientSecretDto } from '../models/create-client-secret-dto';\n\n\n/**\n * API to manage client secrets.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ClientSecretsService extends BaseService {\n constructor(\n config: ApiConfiguration,\n http: HttpClient\n ) {\n super(config, http);\n }\n\n /**\n * Path part for operation clientSecretsSearch\n */\n static readonly ClientSecretsSearchPath = '/v1/client-secrets';\n\n /**\n * Permissions: core.clients.search-secret\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `clientSecretsSearch()` instead.\n *\n * This method doesn't expect any request body.\n */\n clientSecretsSearch$Response(params?: {\n ClientId?: number;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<StrictHttpResponse<Array<ClientSecretDto>>> {\n\n const rb = new RequestBuilder(this.rootUrl, ClientSecretsService.ClientSecretsSearchPath, 'get');\n if (params) {\n rb.query('ClientId', params.ClientId, {});\n rb.query('Pager.PageSize', params['Pager.PageSize'], {});\n rb.query('Pager.PageIndex', params['Pager.PageIndex'], {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Array<ClientSecretDto>>;\n })\n );\n }\n\n /**\n * Permissions: core.clients.search-secret\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `clientSecretsSearch$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n clientSecretsSearch(params?: {\n ClientId?: number;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<Array<ClientSecretDto>> {\n\n return this.clientSecretsSearch$Response(params).pipe(\n map((r: StrictHttpResponse<Array<ClientSecretDto>>) => r.body as Array<ClientSecretDto>)\n );\n }\n\n /**\n * Path part for operation clientSecretsPost\n */\n static readonly ClientSecretsPostPath = '/v1/client-secrets';\n\n /**\n * Permissions: core.clients.create-secret\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `clientSecretsPost()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n clientSecretsPost$Response(params: {\n body: CreateClientSecretDto\n }): Observable<StrictHttpResponse<void>> {\n\n const rb = new RequestBuilder(this.rootUrl, ClientSecretsService.ClientSecretsPostPath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as StrictHttpResponse<void>;\n })\n );\n }\n\n /**\n * Permissions: core.clients.create-secret\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `clientSecretsPost$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n clientSecretsPost(params: {\n body: CreateClientSecretDto\n }): Observable<void> {\n\n return this.clientSecretsPost$Response(params).pipe(\n map((r: StrictHttpResponse<void>) => r.body as void)\n );\n }\n\n /**\n * Path part for operation clientSecretsLookups\n */\n static readonly ClientSecretsLookupsPath = '/v1/client-secrets/lookups';\n\n /**\n * Permissions: core.clients.secret-lookups\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `clientSecretsLookups()` instead.\n *\n * This method doesn't expect any request body.\n */\n clientSecretsLookups$Response(params?: {\n }): Observable<StrictHttpResponse<ClientSecretLookupsDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, ClientSecretsService.ClientSecretsLookupsPath, 'get');\n if (params) {\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<ClientSecretLookupsDto>;\n })\n );\n }\n\n /**\n * Permissions: core.clients.secret-lookups\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `clientSecretsLookups$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n clientSecretsLookups(params?: {\n }): Observable<ClientSecretLookupsDto> {\n\n return this.clientSecretsLookups$Response(params).pipe(\n map((r: StrictHttpResponse<ClientSecretLookupsDto>) => r.body as ClientSecretLookupsDto)\n );\n }\n\n /**\n * Path part for operation clientSecretsDelete\n */\n static readonly ClientSecretsDeletePath = '/v1/client-secrets/{id}';\n\n /**\n * Permissions: core.clients.delete-secret\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `clientSecretsDelete()` instead.\n *\n * This method doesn't expect any request body.\n */\n clientSecretsDelete$Response(params: {\n id: number;\n }): Observable<StrictHttpResponse<void>> {\n\n const rb = new RequestBuilder(this.rootUrl, ClientSecretsService.ClientSecretsDeletePath, 'delete');\n if (params) {\n rb.path('id', params.id, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as StrictHttpResponse<void>;\n })\n );\n }\n\n /**\n * Permissions: core.clients.delete-secret\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `clientSecretsDelete$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n clientSecretsDelete(params: {\n id: number;\n }): Observable<void> {\n\n return this.clientSecretsDelete$Response(params).pipe(\n map((r: StrictHttpResponse<void>) => r.body as void)\n );\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { BaseService } from '../base-service';\nimport { ApiConfiguration } from '../api-configuration';\nimport { StrictHttpResponse } from '../strict-http-response';\nimport { RequestBuilder } from '../request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { PermissionDto } from '../models/permission-dto';\n\n\n/**\n * API to manage permissions for merchant's individual users or API consumers/clients.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class PermissionsService extends BaseService {\n constructor(\n config: ApiConfiguration,\n http: HttpClient\n ) {\n super(config, http);\n }\n\n /**\n * Path part for operation permissionsSearch\n */\n static readonly PermissionsSearchPath = '/v1/permissions';\n\n /**\n * Permissions: core.roles.search-permissions\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `permissionsSearch()` instead.\n *\n * This method doesn't expect any request body.\n */\n permissionsSearch$Response(params?: {\n }): Observable<StrictHttpResponse<Array<PermissionDto>>> {\n\n const rb = new RequestBuilder(this.rootUrl, PermissionsService.PermissionsSearchPath, 'get');\n if (params) {\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Array<PermissionDto>>;\n })\n );\n }\n\n /**\n * Permissions: core.roles.search-permissions\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `permissionsSearch$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n permissionsSearch(params?: {\n }): Observable<Array<PermissionDto>> {\n\n return this.permissionsSearch$Response(params).pipe(\n map((r: StrictHttpResponse<Array<PermissionDto>>) => r.body as Array<PermissionDto>)\n );\n }\n\n /**\n * Path part for operation permissionsSearchForCurrentUser\n */\n static readonly PermissionsSearchForCurrentUserPath = '/v1/permissions/search-for-current-user';\n\n /**\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `permissionsSearchForCurrentUser()` instead.\n *\n * This method doesn't expect any request body.\n */\n permissionsSearchForCurrentUser$Response(params?: {\n }): Observable<StrictHttpResponse<Array<PermissionDto>>> {\n\n const rb = new RequestBuilder(this.rootUrl, PermissionsService.PermissionsSearchForCurrentUserPath, 'get');\n if (params) {\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Array<PermissionDto>>;\n })\n );\n }\n\n /**\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `permissionsSearchForCurrentUser$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n permissionsSearchForCurrentUser(params?: {\n }): Observable<Array<PermissionDto>> {\n\n return this.permissionsSearchForCurrentUser$Response(params).pipe(\n map((r: StrictHttpResponse<Array<PermissionDto>>) => r.body as Array<PermissionDto>)\n );\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { BaseService } from '../base-service';\nimport { ApiConfiguration } from '../api-configuration';\nimport { StrictHttpResponse } from '../strict-http-response';\nimport { RequestBuilder } from '../request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { CreateRoleDto } from '../models/create-role-dto';\nimport { RoleDetailsDto } from '../models/role-details-dto';\nimport { RoleDto } from '../models/role-dto';\nimport { UpdateRoleDto } from '../models/update-role-dto';\n\n\n/**\n * API to manage organization's roles. A role can be associated with a set of permissions.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class RolesService extends BaseService {\n constructor(\n config: ApiConfiguration,\n http: HttpClient\n ) {\n super(config, http);\n }\n\n /**\n * Path part for operation rolesSearch\n */\n static readonly RolesSearchPath = '/v1/roles';\n\n /**\n * Permissions: core.roles.search\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `rolesSearch()` instead.\n *\n * This method doesn't expect any request body.\n */\n rolesSearch$Response(params?: {\n }): Observable<StrictHttpResponse<Array<RoleDto>>> {\n\n const rb = new RequestBuilder(this.rootUrl, RolesService.RolesSearchPath, 'get');\n if (params) {\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Array<RoleDto>>;\n })\n );\n }\n\n /**\n * Permissions: core.roles.search\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `rolesSearch$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n rolesSearch(params?: {\n }): Observable<Array<RoleDto>> {\n\n return this.rolesSearch$Response(params).pipe(\n map((r: StrictHttpResponse<Array<RoleDto>>) => r.body as Array<RoleDto>)\n );\n }\n\n /**\n * Path part for operation rolesPost\n */\n static readonly RolesPostPath = '/v1/roles';\n\n /**\n * Permissions: core.roles.create\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `rolesPost()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n rolesPost$Response(params: {\n body: CreateRoleDto\n }): Observable<StrictHttpResponse<number>> {\n\n const rb = new RequestBuilder(this.rootUrl, RolesService.RolesPostPath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: parseFloat(String((r as HttpResponse<any>).body)) }) as StrictHttpResponse<number>;\n })\n );\n }\n\n /**\n * Permissions: core.roles.create\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `rolesPost$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n rolesPost(params: {\n body: CreateRoleDto\n }): Observable<number> {\n\n return this.rolesPost$Response(params).pipe(\n map((r: StrictHttpResponse<number>) => r.body as number)\n );\n }\n\n /**\n * Path part for operation rolesGet\n */\n static readonly RolesGetPath = '/v1/roles/{id}';\n\n /**\n * Permissions: core.roles.get\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `rolesGet()` instead.\n *\n * This method doesn't expect any request body.\n */\n rolesGet$Response(params: {\n id: number;\n }): Observable<StrictHttpResponse<RoleDetailsDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, RolesService.RolesGetPath, 'get');\n if (params) {\n rb.path('id', params.id, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<RoleDetailsDto>;\n })\n );\n }\n\n /**\n * Permissions: core.roles.get\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `rolesGet$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n rolesGet(params: {\n id: number;\n }): Observable<RoleDetailsDto> {\n\n return this.rolesGet$Response(params).pipe(\n map((r: StrictHttpResponse<RoleDetailsDto>) => r.body as RoleDetailsDto)\n );\n }\n\n /**\n * Path part for operation rolesPut\n */\n static readonly RolesPutPath = '/v1/roles/{id}';\n\n /**\n * Permissions: core.roles.update\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `rolesPut()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n rolesPut$Response(params: {\n id: number;\n body: UpdateRoleDto\n }): Observable<StrictHttpResponse<void>> {\n\n const rb = new RequestBuilder(this.rootUrl, RolesService.RolesPutPath, 'put');\n if (params) {\n rb.path('id', params.id, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as StrictHttpResponse<void>;\n })\n );\n }\n\n /**\n * Permissions: core.roles.update\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `rolesPut$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n rolesPut(params: {\n id: number;\n body: UpdateRoleDto\n }): Observable<void> {\n\n return this.rolesPut$Response(params).pipe(\n map((r: StrictHttpResponse<void>) => r.body as void)\n );\n }\n\n /**\n * Path part for operation rolesDelete\n */\n static readonly RolesDeletePath = '/v1/roles/{id}';\n\n /**\n * Permissions: core.roles.delete\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `rolesDelete()` instead.\n *\n * This method doesn't expect any request body.\n */\n rolesDelete$Response(params: {\n id: number;\n concurrencyToken?: number;\n }): Observable<StrictHttpResponse<void>> {\n\n const rb = new RequestBuilder(this.rootUrl, RolesService.RolesDeletePath, 'delete');\n if (params) {\n rb.path('id', params.id, {});\n rb.query('concurrencyToken', params.concurrencyToken, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as StrictHttpResponse<void>;\n })\n );\n }\n\n /**\n * Permissions: core.roles.delete\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `rolesDelete$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n rolesDelete(params: {\n id: number;\n concurrencyToken?: number;\n }): Observable<void> {\n\n return this.rolesDelete$Response(params).pipe(\n map((r: StrictHttpResponse<void>) => r.body as void)\n );\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { BaseService } from '../base-service';\nimport { ApiConfiguration } from '../api-configuration';\nimport { StrictHttpResponse } from '../strict-http-response';\nimport { RequestBuilder } from '../request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { CreateUserDto } from '../models/create-user-dto';\nimport { OrderDirectionEnum } from '../models/order-direction-enum';\nimport { SendPasswordResetLinkDto } from '../models/send-password-reset-link-dto';\nimport { UpdateUserDto } from '../models/update-user-dto';\nimport { UpdateUserPasswordDto } from '../models/update-user-password-dto';\nimport { UserDetailsDto } from '../models/user-details-dto';\nimport { UserDto } from '../models/user-dto';\nimport { UsersOrderBy } from '../models/users-order-by';\n\n\n/**\n * API to manage merchant's individual users. A user can be associated with roles.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class UsersService extends BaseService {\n constructor(\n config: ApiConfiguration,\n http: HttpClient\n ) {\n super(config, http);\n }\n\n /**\n * Path part for operation usersSearch\n */\n static readonly UsersSearchPath = '/v1/users';\n\n /**\n * Permissions: core.users.search\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `usersSearch()` instead.\n *\n * This method doesn't expect any request body.\n */\n usersSearch$Response(params?: {\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n OrderDirection?: OrderDirectionEnum;\n OrderBy?: UsersOrderBy;\n }): Observable<StrictHttpResponse<Array<UserDto>>> {\n\n const rb = new RequestBuilder(this.rootUrl, UsersService.UsersSearchPath, 'get');\n if (params) {\n rb.query('Pager.PageSize', params['Pager.PageSize'], {});\n rb.query('Pager.PageIndex', params['Pager.PageIndex'], {});\n rb.query('OrderDirection', params.OrderDirection, {});\n rb.query('OrderBy', params.OrderBy, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Array<UserDto>>;\n })\n );\n }\n\n /**\n * Permissions: core.users.search\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `usersSearch$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n usersSearch(params?: {\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n OrderDirection?: OrderDirectionEnum;\n OrderBy?: UsersOrderBy;\n }): Observable<Array<UserDto>> {\n\n return this.usersSearch$Response(params).pipe(\n map((r: StrictHttpResponse<Array<UserDto>>) => r.body as Array<UserDto>)\n );\n }\n\n /**\n * Path part for operation usersPost\n */\n static readonly UsersPostPath = '/v1/users';\n\n /**\n * Permissions: core.users.create\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `usersPost()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n usersPost$Response(params: {\n body: CreateUserDto\n }): Observable<StrictHttpResponse<UserDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, UsersService.UsersPostPath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<UserDto>;\n })\n );\n }\n\n /**\n * Permissions: core.users.create\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `usersPost$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n usersPost(params: {\n body: CreateUserDto\n }): Observable<UserDto> {\n\n return this.usersPost$Response(params).pipe(\n map((r: StrictHttpResponse<UserDto>) => r.body as UserDto)\n );\n }\n\n /**\n * Path part for operation usersGet\n */\n static readonly UsersGetPath = '/v1/users/{id}';\n\n /**\n * Permissions: core.users.get\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `usersGet()` instead.\n *\n * This method doesn't expect any request body.\n */\n usersGet$Response(params: {\n id: string;\n }): Observable<StrictHttpResponse<UserDetailsDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, UsersService.UsersGetPath, 'get');\n if (params) {\n rb.path('id', params.id, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<UserDetailsDto>;\n })\n );\n }\n\n /**\n * Permissions: core.users.get\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `usersGet$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n usersGet(params: {\n id: string;\n }): Observable<UserDetailsDto> {\n\n return this.usersGet$Response(params).pipe(\n map((r: StrictHttpResponse<UserDetailsDto>) => r.body as UserDetailsDto)\n );\n }\n\n /**\n * Path part for operation usersPut\n */\n static readonly UsersPutPath = '/v1/users/{id}';\n\n /**\n * Permissions: core.users.update\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `usersPut()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n usersPut$Response(params: {\n id: string;\n body: UpdateUserDto\n }): Observable<StrictHttpResponse<void>> {\n\n const rb = new RequestBuilder(this.rootUrl, UsersService.UsersPutPath, 'put');\n if (params) {\n rb.path('id', params.id, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as StrictHttpResponse<void>;\n })\n );\n }\n\n /**\n * Permissions: core.users.update\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `usersPut$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n usersPut(params: {\n id: string;\n body: UpdateUserDto\n }): Observable<void> {\n\n return this.usersPut$Response(params).pipe(\n map((r: StrictHttpResponse<void>) => r.body as void)\n );\n }\n\n /**\n * Path part for operation usersDelete\n */\n static readonly UsersDeletePath = '/v1/users/{id}';\n\n /**\n * Permissions: core.users.delete\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `usersDelete()` instead.\n *\n * This method doesn't expect any request body.\n */\n usersDelete$Response(params: {\n id: string;\n }): Observable<StrictHttpResponse<void>> {\n\n const rb = new RequestBuilder(this.rootUrl, UsersService.UsersDeletePath, 'delete');\n if (params) {\n rb.path('id', params.id, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as StrictHttpResponse<void>;\n })\n );\n }\n\n /**\n * Permissions: core.users.delete\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `usersDelete$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n usersDelete(params: {\n id: string;\n }): Observable<void> {\n\n return this.usersDelete$Response(params).pipe(\n map((r: StrictHttpResponse<void>) => r.body as void)\n );\n }\n\n /**\n * Path part for operation usersUpdatePassword\n */\n static readonly UsersUpdatePasswordPath = '/v1/users/{id}/update-password';\n\n /**\n * Permissions: core.users.update-password\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `usersUpdatePassword()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n usersUpdatePassword$Response(params: {\n id: string;\n body: UpdateUserPasswordDto\n }): Observable<StrictHttpResponse<void>> {\n\n const rb = new RequestBuilder(this.rootUrl, UsersService.UsersUpdatePasswordPath, 'put');\n if (params) {\n rb.path('id', params.id, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as StrictHttpResponse<void>;\n })\n );\n }\n\n /**\n * Permissions: core.users.update-password\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `usersUpdatePassword$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n usersUpdatePassword(params: {\n id: string;\n body: UpdateUserPasswordDto\n }): Observable<void> {\n\n return this.usersUpdatePassword$Response(params).pipe(\n map((r: StrictHttpResponse<void>) => r.body as void)\n );\n }\n\n /**\n * Path part for operation usersResetPassword\n */\n static readonly UsersResetPasswordPath = '/v1/users/{id}/reset-password';\n\n /**\n * Permissions: core.users.reset-password\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `usersResetPassword()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n usersResetPassword$Response(params: {\n id: string;\n body: SendPasswordResetLinkDto\n }): Observable<StrictHttpResponse<void>> {\n\n const rb = new RequestBuilder(this.rootUrl, UsersService.UsersResetPasswordPath, 'post');\n if (params) {\n rb.path('id', params.id, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as StrictHttpResponse<void>;\n })\n );\n }\n\n /**\n * Permissions: core.users.reset-password\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `usersResetPassword$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n usersResetPassword(params: {\n id: string;\n body: SendPasswordResetLinkDto\n }): Observable<void> {\n\n return this.usersResetPassword$Response(params).pipe(\n map((r: StrictHttpResponse<void>) => r.body as void)\n );\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { BaseService } from '../base-service';\nimport { ApiConfiguration } from '../api-configuration';\nimport { StrictHttpResponse } from '../strict-http-response';\nimport { RequestBuilder } from '../request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { CreateWebhookDto } from '../models/create-webhook-dto';\nimport { EntityDto } from '../models/entity-dto';\nimport { ItemsDtoOfWebhookDto } from '../models/items-dto-of-webhook-dto';\nimport { UpdateWebhookDto } from '../models/update-webhook-dto';\nimport { WebhookDto } from '../models/webhook-dto';\nimport { WebhookEventTypesDto } from '../models/webhook-event-types-dto';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WebhooksService extends BaseService {\n constructor(\n config: ApiConfiguration,\n http: HttpClient\n ) {\n super(config, http);\n }\n\n /**\n * Path part for operation webhooksSearch\n */\n static readonly WebhooksSearchPath = '/v1/webhooks';\n\n /**\n * Permissions: core.webhooks.search\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `webhooksSearch()` instead.\n *\n * This method doesn't expect any request body.\n */\n webhooksSearch$Response(params?: {\n }): Observable<StrictHttpResponse<ItemsDtoOfWebhookDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, WebhooksService.WebhooksSearchPath, 'get');\n if (params) {\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<ItemsDtoOfWebhookDto>;\n })\n );\n }\n\n /**\n * Permissions: core.webhooks.search\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `webhooksSearch$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n webhooksSearch(params?: {\n }): Observable<ItemsDtoOfWebhookDto> {\n\n return this.webhooksSearch$Response(params).pipe(\n map((r: StrictHttpResponse<ItemsDtoOfWebhookDto>) => r.body as ItemsDtoOfWebhookDto)\n );\n }\n\n /**\n * Path part for operation webhooksPost\n */\n static readonly WebhooksPostPath = '/v1/webhooks';\n\n /**\n * Permissions: core.webhooks.create\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `webhooksPost()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n webhooksPost$Response(params: {\n body: CreateWebhookDto\n }): Observable<StrictHttpResponse<EntityDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, WebhooksService.WebhooksPostPath, 'post');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<EntityDto>;\n })\n );\n }\n\n /**\n * Permissions: core.webhooks.create\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `webhooksPost$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n webhooksPost(params: {\n body: CreateWebhookDto\n }): Observable<EntityDto> {\n\n return this.webhooksPost$Response(params).pipe(\n map((r: StrictHttpResponse<EntityDto>) => r.body as EntityDto)\n );\n }\n\n /**\n * Path part for operation webhooksGet\n */\n static readonly WebhooksGetPath = '/v1/webhooks/{id}';\n\n /**\n * Permissions: core.webhooks.get\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `webhooksGet()` instead.\n *\n * This method doesn't expect any request body.\n */\n webhooksGet$Response(params: {\n id: number;\n }): Observable<StrictHttpResponse<WebhookDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, WebhooksService.WebhooksGetPath, 'get');\n if (params) {\n rb.path('id', params.id, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<WebhookDto>;\n })\n );\n }\n\n /**\n * Permissions: core.webhooks.get\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `webhooksGet$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n webhooksGet(params: {\n id: number;\n }): Observable<WebhookDto> {\n\n return this.webhooksGet$Response(params).pipe(\n map((r: StrictHttpResponse<WebhookDto>) => r.body as WebhookDto)\n );\n }\n\n /**\n * Path part for operation webhooksPut\n */\n static readonly WebhooksPutPath = '/v1/webhooks/{id}';\n\n /**\n * Permissions: core.webhooks.update\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `webhooksPut()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n webhooksPut$Response(params: {\n id: number;\n body: UpdateWebhookDto\n }): Observable<StrictHttpResponse<void>> {\n\n const rb = new RequestBuilder(this.rootUrl, WebhooksService.WebhooksPutPath, 'put');\n if (params) {\n rb.path('id', params.id, {});\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as StrictHttpResponse<void>;\n })\n );\n }\n\n /**\n * Permissions: core.webhooks.update\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `webhooksPut$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n webhooksPut(params: {\n id: number;\n body: UpdateWebhookDto\n }): Observable<void> {\n\n return this.webhooksPut$Response(params).pipe(\n map((r: StrictHttpResponse<void>) => r.body as void)\n );\n }\n\n /**\n * Path part for operation webhooksDelete\n */\n static readonly WebhooksDeletePath = '/v1/webhooks/{id}';\n\n /**\n * Permissions: core.webhooks.delete\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `webhooksDelete()` instead.\n *\n * This method doesn't expect any request body.\n */\n webhooksDelete$Response(params: {\n id: number;\n }): Observable<StrictHttpResponse<void>> {\n\n const rb = new RequestBuilder(this.rootUrl, WebhooksService.WebhooksDeletePath, 'delete');\n if (params) {\n rb.path('id', params.id, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as StrictHttpResponse<void>;\n })\n );\n }\n\n /**\n * Permissions: core.webhooks.delete\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `webhooksDelete$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n webhooksDelete(params: {\n id: number;\n }): Observable<void> {\n\n return this.webhooksDelete$Response(params).pipe(\n map((r: StrictHttpResponse<void>) => r.body as void)\n );\n }\n\n /**\n * Path part for operation webhooksGenerateSecret\n */\n static readonly WebhooksGenerateSecretPath = '/v1/webhooks/generate-secret';\n\n /**\n * Permissions: core.webhooks.generate-secret\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `webhooksGenerateSecret()` instead.\n *\n * This method doesn't expect any request body.\n */\n webhooksGenerateSecret$Response(params?: {\n }): Observable<StrictHttpResponse<string>> {\n\n const rb = new RequestBuilder(this.rootUrl, WebhooksService.WebhooksGenerateSecretPath, 'get');\n if (params) {\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<string>;\n })\n );\n }\n\n /**\n * Permissions: core.webhooks.generate-secret\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `webhooksGenerateSecret$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n webhooksGenerateSecret(params?: {\n }): Observable<string> {\n\n return this.webhooksGenerateSecret$Response(params).pipe(\n map((r: StrictHttpResponse<string>) => r.body as string)\n );\n }\n\n /**\n * Path part for operation webhooksEventTypes\n */\n static readonly WebhooksEventTypesPath = '/v1/webhooks/event-types';\n\n /**\n * Permissions: core.webhooks.lookups\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `webhooksEventTypes()` instead.\n *\n * This method doesn't expect any request body.\n */\n webhooksEventTypes$Response(params?: {\n }): Observable<StrictHttpResponse<WebhookEventTypesDto>> {\n\n const rb = new RequestBuilder(this.rootUrl, WebhooksService.WebhooksEventTypesPath, 'get');\n if (params) {\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<WebhookEventTypesDto>;\n })\n );\n }\n\n /**\n * Permissions: core.webhooks.lookups\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `webhooksEventTypes$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n webhooksEventTypes(params?: {\n }): Observable<WebhookEventTypesDto> {\n\n return this.webhooksEventTypes$Response(params).pipe(\n map((r: StrictHttpResponse<WebhookEventTypesDto>) => r.body as WebhookEventTypesDto)\n );\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { BaseService } from '../base-service';\nimport { ApiConfiguration } from '../api-configuration';\nimport { StrictHttpResponse } from '../strict-http-response';\nimport { RequestBuilder } from '../request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { AdjustmentDto } from '../models/adjustment-dto';\nimport { DisputeDto } from '../models/dispute-dto';\nimport { FundingFee } from '../models/funding-fee';\nimport { FundingInstructionDetails } from '../models/funding-instruction-details';\nimport { FundingInstructionsOrderBy } from '../models/funding-instructions-order-by';\nimport { FundingStatus } from '../models/funding-status';\nimport { FundingTransactionOrderBy } from '../models/funding-transaction-order-by';\nimport { OrderDirectionEnum } from '../models/order-direction-enum';\nimport { PagedDataDtoOfFundingInstruction } from '../models/paged-data-dto-of-funding-instruction';\nimport { PagedDataDtoOfFundingTransaction } from '../models/paged-data-dto-of-funding-transaction';\nimport { ProcessorEnum } from '../models/processor-enum';\n\n\n/**\n * Billing API.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class BillingService extends BaseService {\n constructor(\n config: ApiConfiguration,\n http: HttpClient\n ) {\n super(config, http);\n }\n\n /**\n * Path part for operation fundingInstructionsSearchInstructions\n */\n static readonly FundingInstructionsSearchInstructionsPath = '/v1/billing/funding-instructions';\n\n /**\n * Permissions: core.funding.search\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `fundingInstructionsSearchInstructions()` instead.\n *\n * This method doesn't expect any request body.\n */\n fundingInstructionsSearchInstructions$Response(params?: {\n MID?: string;\n DBA?: string;\n FundingStatuses?: Array<FundingStatus>;\n OrderBy?: FundingInstructionsOrderBy;\n FundedStartDate?: string;\n FundedEndDate?: string;\n Processors?: Array<ProcessorEnum>;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<StrictHttpResponse<PagedDataDtoOfFundingInstruction>> {\n\n const rb = new RequestBuilder(this.rootUrl, BillingService.FundingInstructionsSearchInstructionsPath, 'get');\n if (params) {\n rb.query('MID', params.MID, {});\n rb.query('DBA', params.DBA, {});\n rb.query('FundingStatuses', params.FundingStatuses, {\"style\":\"form\",\"explode\":true});\n rb.query('OrderBy', params.OrderBy, {});\n rb.query('FundedStartDate', params.FundedStartDate, {});\n rb.query('FundedEndDate', params.FundedEndDate, {});\n rb.query('Processors', params.Processors, {\"style\":\"form\",\"explode\":true});\n rb.query('StartDate', params.StartDate, {});\n rb.query('EndDate', params.EndDate, {});\n rb.query('OrderDirection', params.OrderDirection, {});\n rb.query('Pager.PageSize', params['Pager.PageSize'], {});\n rb.query('Pager.PageIndex', params['Pager.PageIndex'], {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<PagedDataDtoOfFundingInstruction>;\n })\n );\n }\n\n /**\n * Permissions: core.funding.search\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `fundingInstructionsSearchInstructions$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n fundingInstructionsSearchInstructions(params?: {\n MID?: string;\n DBA?: string;\n FundingStatuses?: Array<FundingStatus>;\n OrderBy?: FundingInstructionsOrderBy;\n FundedStartDate?: string;\n FundedEndDate?: string;\n Processors?: Array<ProcessorEnum>;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<PagedDataDtoOfFundingInstruction> {\n\n return this.fundingInstructionsSearchInstructions$Response(params).pipe(\n map((r: StrictHttpResponse<PagedDataDtoOfFundingInstruction>) => r.body as PagedDataDtoOfFundingInstruction)\n );\n }\n\n /**\n * Path part for operation fundingInstructionsGetInstructionDetails\n */\n static readonly FundingInstructionsGetInstructionDetailsPath = '/v1/billing/funding-instructions/{ref}';\n\n /**\n * Permissions: core.funding.get\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `fundingInstructionsGetInstructionDetails()` instead.\n *\n * This method doesn't expect any request body.\n */\n fundingInstructionsGetInstructionDetails$Response(params: {\n ref: string;\n }): Observable<StrictHttpResponse<FundingInstructionDetails>> {\n\n const rb = new RequestBuilder(this.rootUrl, BillingService.FundingInstructionsGetInstructionDetailsPath, 'get');\n if (params) {\n rb.path('ref', params.ref, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<FundingInstructionDetails>;\n })\n );\n }\n\n /**\n * Permissions: core.funding.get\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `fundingInstructionsGetInstructionDetails$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n fundingInstructionsGetInstructionDetails(params: {\n ref: string;\n }): Observable<FundingInstructionDetails> {\n\n return this.fundingInstructionsGetInstructionDetails$Response(params).pipe(\n map((r: StrictHttpResponse<FundingInstructionDetails>) => r.body as FundingInstructionDetails)\n );\n }\n\n /**\n * Path part for operation fundingInstructionsSearchFundingTransactions\n */\n static readonly FundingInstructionsSearchFundingTransactionsPath = '/v1/billing/funding-instructions/{ref}/transactions';\n\n /**\n * Permissions: core.funding.get-transactions\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `fundingInstructionsSearchFundingTransactions()` instead.\n *\n * This method doesn't expect any request body.\n */\n fundingInstructionsSearchFundingTransactions$Response(params: {\n ref: string;\n FeesOnly?: boolean;\n OrderBy?: FundingTransactionOrderBy;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<StrictHttpResponse<PagedDataDtoOfFundingTransaction>> {\n\n const rb = new RequestBuilder(this.rootUrl, BillingService.FundingInstructionsSearchFundingTransactionsPath, 'get');\n if (params) {\n rb.path('ref', params.ref, {});\n rb.query('FeesOnly', params.FeesOnly, {});\n rb.query('OrderBy', params.OrderBy, {});\n rb.query('StartDate', params.StartDate, {});\n rb.query('EndDate', params.EndDate, {});\n rb.query('OrderDirection', params.OrderDirection, {});\n rb.query('Pager.PageSize', params['Pager.PageSize'], {});\n rb.query('Pager.PageIndex', params['Pager.PageIndex'], {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<PagedDataDtoOfFundingTransaction>;\n })\n );\n }\n\n /**\n * Permissions: core.funding.get-transactions\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `fundingInstructionsSearchFundingTransactions$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n fundingInstructionsSearchFundingTransactions(params: {\n ref: string;\n FeesOnly?: boolean;\n OrderBy?: FundingTransactionOrderBy;\n StartDate?: string;\n EndDate?: string;\n OrderDirection?: OrderDirectionEnum;\n 'Pager.PageSize'?: number;\n 'Pager.PageIndex'?: number;\n }): Observable<PagedDataDtoOfFundingTransaction> {\n\n return this.fundingInstructionsSearchFundingTransactions$Response(params).pipe(\n map((r: StrictHttpResponse<PagedDataDtoOfFundingTransaction>) => r.body as PagedDataDtoOfFundingTransaction)\n );\n }\n\n /**\n * Path part for operation fundingInstructionsExportFundingTransactions\n */\n static readonly FundingInstructionsExportFundingTransactionsPath = '/v1/billing/funding-instructions/{ref}/transactions/export';\n\n /**\n * Permissions: core.funding.get-transactions-report\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `fundingInstructionsExportFundingTransactions()` instead.\n *\n * This method doesn't expect any request body.\n */\n fundingInstructionsExportFundingTransactions$Response(params: {\n ref: string;\n feesOnly?: boolean;\n }): Observable<StrictHttpResponse<Blob>> {\n\n const rb = new RequestBuilder(this.rootUrl, BillingService.FundingInstructionsExportFundingTransactionsPath, 'get');\n if (params) {\n rb.path('ref', params.ref, {});\n rb.query('feesOnly', params.feesOnly, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'blob',\n accept: 'application/octet-stream'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Blob>;\n })\n );\n }\n\n /**\n * Permissions: core.funding.get-transactions-report\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `fundingInstructionsExportFundingTransactions$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n fundingInstructionsExportFundingTransactions(params: {\n ref: string;\n feesOnly?: boolean;\n }): Observable<Blob> {\n\n return this.fundingInstructionsExportFundingTransactions$Response(params).pipe(\n map((r: StrictHttpResponse<Blob>) => r.body as Blob)\n );\n }\n\n /**\n * Path part for operation fundingInstructionsGetMidFees\n */\n static readonly FundingInstructionsGetMidFeesPath = '/v1/billing/funding-instructions/{ref}/mid-fees';\n\n /**\n * Permissions: core.funding.get-fees\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `fundingInstructionsGetMidFees()` instead.\n *\n * This method doesn't expect any request body.\n */\n fundingInstructionsGetMidFees$Response(params: {\n ref: string;\n }): Observable<StrictHttpResponse<Array<FundingFee>>> {\n\n const rb = new RequestBuilder(this.rootUrl, BillingService.FundingInstructionsGetMidFeesPath, 'get');\n if (params) {\n rb.path('ref', params.ref, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Array<FundingFee>>;\n })\n );\n }\n\n /**\n * Permissions: core.funding.get-fees\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `fundingInstructionsGetMidFees$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n fundingInstructionsGetMidFees(params: {\n ref: string;\n }): Observable<Array<FundingFee>> {\n\n return this.fundingInstructionsGetMidFees$Response(params).pipe(\n map((r: StrictHttpResponse<Array<FundingFee>>) => r.body as Array<FundingFee>)\n );\n }\n\n /**\n * Path part for operation fundingInstructionsGetAdjustments\n */\n static readonly FundingInstructionsGetAdjustmentsPath = '/v1/billing/funding-instructions/{ref}/adjustments';\n\n /**\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `fundingInstructionsGetAdjustments()` instead.\n *\n * This method doesn't expect any request body.\n */\n fundingInstructionsGetAdjustments$Response(params: {\n ref: string;\n }): Observable<StrictHttpResponse<Array<AdjustmentDto>>> {\n\n const rb = new RequestBuilder(this.rootUrl, BillingService.FundingInstructionsGetAdjustmentsPath, 'get');\n if (params) {\n rb.path('ref', params.ref, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Array<AdjustmentDto>>;\n })\n );\n }\n\n /**\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `fundingInstructionsGetAdjustments$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n fundingInstructionsGetAdjustments(params: {\n ref: string;\n }): Observable<Array<AdjustmentDto>> {\n\n return this.fundingInstructionsGetAdjustments$Response(params).pipe(\n map((r: StrictHttpResponse<Array<AdjustmentDto>>) => r.body as Array<AdjustmentDto>)\n );\n }\n\n /**\n * Path part for operation fundingInstructionsGetTransactionFees\n */\n static readonly FundingInstructionsGetTransactionFeesPath = '/v1/billing/funding-instructions/{ref}/transaction-fees';\n\n /**\n * Permissions: core.funding.get-fees\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `fundingInstructionsGetTransactionFees()` instead.\n *\n * This method doesn't expect any request body.\n */\n fundingInstructionsGetTransactionFees$Response(params: {\n ref: string;\n }): Observable<StrictHttpResponse<Array<FundingFee>>> {\n\n const rb = new RequestBuilder(this.rootUrl, BillingService.FundingInstructionsGetTransactionFeesPath, 'get');\n if (params) {\n rb.path('ref', params.ref, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Array<FundingFee>>;\n })\n );\n }\n\n /**\n * Permissions: core.funding.get-fees\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `fundingInstructionsGetTransactionFees$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n fundingInstructionsGetTransactionFees(params: {\n ref: string;\n }): Observable<Array<FundingFee>> {\n\n return this.fundingInstructionsGetTransactionFees$Response(params).pipe(\n map((r: StrictHttpResponse<Array<FundingFee>>) => r.body as Array<FundingFee>)\n );\n }\n\n /**\n * Path part for operation fundingInstructionsGetDisputes\n */\n static readonly FundingInstructionsGetDisputesPath = '/v1/billing/funding-instructions/{ref}/disputes';\n\n /**\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `fundingInstructionsGetDisputes()` instead.\n *\n * This method doesn't expect any request body.\n */\n fundingInstructionsGetDisputes$Response(params: {\n ref: string;\n }): Observable<StrictHttpResponse<Array<DisputeDto>>> {\n\n const rb = new RequestBuilder(this.rootUrl, BillingService.FundingInstructionsGetDisputesPath, 'get');\n if (params) {\n rb.path('ref', params.ref, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Array<DisputeDto>>;\n })\n );\n }\n\n /**\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `fundingInstructionsGetDisputes$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n fundingInstructionsGetDisputes(params: {\n ref: string;\n }): Observable<Array<DisputeDto>> {\n\n return this.fundingInstructionsGetDisputes$Response(params).pipe(\n map((r: StrictHttpResponse<Array<DisputeDto>>) => r.body as Array<DisputeDto>)\n );\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { BaseService } from '../base-service';\nimport { ApiConfiguration } from '../api-configuration';\nimport { StrictHttpResponse } from '../strict-http-response';\nimport { RequestBuilder } from '../request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { Month } from '../models/month';\nimport { StatementReportItem } from '../models/statement-report-item';\n\n\n/**\n * Reports API.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ReportsService extends BaseService {\n constructor(\n config: ApiConfiguration,\n http: HttpClient\n ) {\n super(config, http);\n }\n\n /**\n * Path part for operation reportTransactionReport\n */\n static readonly ReportTransactionReportPath = '/v1/billing/report/transaction-report';\n\n /**\n * Permissions: core.reports.billing\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `reportTransactionReport()` instead.\n *\n * This method doesn't expect any request body.\n */\n reportTransactionReport$Response(params?: {\n StartDate?: string;\n EndDate?: string;\n MerchantProcessorIds?: Array<number>;\n }): Observable<StrictHttpResponse<Blob>> {\n\n const rb = new RequestBuilder(this.rootUrl, ReportsService.ReportTransactionReportPath, 'get');\n if (params) {\n rb.query('StartDate', params.StartDate, {});\n rb.query('EndDate', params.EndDate, {});\n rb.query('MerchantProcessorIds', params.MerchantProcessorIds, {\"style\":\"form\",\"explode\":true});\n }\n\n return this.http.request(rb.build({\n responseType: 'blob',\n accept: 'application/octet-stream'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Blob>;\n })\n );\n }\n\n /**\n * Permissions: core.reports.billing\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `reportTransactionReport$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n reportTransactionReport(params?: {\n StartDate?: string;\n EndDate?: string;\n MerchantProcessorIds?: Array<number>;\n }): Observable<Blob> {\n\n return this.reportTransactionReport$Response(params).pipe(\n map((r: StrictHttpResponse<Blob>) => r.body as Blob)\n );\n }\n\n /**\n * Path part for operation reportFundingReport\n */\n static readonly ReportFundingReportPath = '/v1/billing/report/funding-report';\n\n /**\n * Permissions: core.reports.billing\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `reportFundingReport()` instead.\n *\n * This method doesn't expect any request body.\n */\n reportFundingReport$Response(params?: {\n StartDate?: string;\n EndDate?: string;\n MerchantProcessorIds?: Array<number>;\n }): Observable<StrictHttpResponse<Blob>> {\n\n const rb = new RequestBuilder(this.rootUrl, ReportsService.ReportFundingReportPath, 'get');\n if (params) {\n rb.query('StartDate', params.StartDate, {});\n rb.query('EndDate', params.EndDate, {});\n rb.query('MerchantProcessorIds', params.MerchantProcessorIds, {\"style\":\"form\",\"explode\":true});\n }\n\n return this.http.request(rb.build({\n responseType: 'blob',\n accept: 'application/octet-stream'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Blob>;\n })\n );\n }\n\n /**\n * Permissions: core.reports.billing\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `reportFundingReport$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n reportFundingReport(params?: {\n StartDate?: string;\n EndDate?: string;\n MerchantProcessorIds?: Array<number>;\n }): Observable<Blob> {\n\n return this.reportFundingReport$Response(params).pipe(\n map((r: StrictHttpResponse<Blob>) => r.body as Blob)\n );\n }\n\n /**\n * Path part for operation reportStatementReports\n */\n static readonly ReportStatementReportsPath = '/v1/billing/report/statement-reports/{id}';\n\n /**\n * Permissions: core.reports.billing\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `reportStatementReports()` instead.\n *\n * This method doesn't expect any request body.\n */\n reportStatementReports$Response(params: {\n id: string;\n }): Observable<StrictHttpResponse<Blob>> {\n\n const rb = new RequestBuilder(this.rootUrl, ReportsService.ReportStatementReportsPath, 'get');\n if (params) {\n rb.path('id', params.id, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'blob',\n accept: 'application/octet-stream'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Blob>;\n })\n );\n }\n\n /**\n * Permissions: core.reports.billing\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `reportStatementReports$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n reportStatementReports(params: {\n id: string;\n }): Observable<Blob> {\n\n return this.reportStatementReports$Response(params).pipe(\n map((r: StrictHttpResponse<Blob>) => r.body as Blob)\n );\n }\n\n /**\n * Path part for operation reportStatementReportsAll\n */\n static readonly ReportStatementReportsAllPath = '/v1/billing/report/statement-reports/{year}/{month}';\n\n /**\n * Permissions: core.reports.billing\n *\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `reportStatementReportsAll()` instead.\n *\n * This method doesn't expect any request body.\n */\n reportStatementReportsAll$Response(params: {\n year: number;\n month: Month;\n }): Observable<StrictHttpResponse<Array<StatementReportItem>>> {\n\n const rb = new RequestBuilder(this.rootUrl, ReportsService.ReportStatementReportsAllPath, 'get');\n if (params) {\n rb.path('year', params.year, {});\n rb.path('month', params.month, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<Array<StatementReportItem>>;\n })\n );\n }\n\n /**\n * Permissions: core.reports.billing\n *\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `reportStatementReportsAll$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n reportStatementReportsAll(params: {\n year: number;\n month: Month;\n }): Observable<Array<StatementReportItem>> {\n\n return this.reportStatementReportsAll$Response(params).pipe(\n map((r: StrictHttpResponse<Array<StatementReportItem>>) => r.body as Array<StatementReportItem>)\n );\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { ApiConfiguration, ApiConfigurationParams } from './api-configuration';\n\nimport { EventsService } from './services/events.service';\nimport { MerchantService } from './services/merchant.service';\nimport { PaymentMethodsService } from './services/payment-methods.service';\nimport { DisputesService } from './services/disputes.service';\nimport { PaymentFormService } from './services/payment-form.service';\nimport { PaymentsService } from './services/payments.service';\nimport { CloverPosService } from './services/clover-pos.service';\nimport { ClientsService } from './services/clients.service';\nimport { ClientSecretsService } from './services/client-secrets.service';\nimport { PermissionsService } from './services/permissions.service';\nimport { RolesService } from './services/roles.service';\nimport { UsersService } from './services/users.service';\nimport { WebhooksService } from './services/webhooks.service';\nimport { BillingService } from './services/billing.service';\nimport { ReportsService } from './services/reports.service';\n\n/**\n * Module that provides all services and configuration.\n */\n@NgModule({\n imports: [],\n exports: [],\n declarations: [],\n providers: [\n EventsService,\n MerchantService,\n PaymentMethodsService,\n DisputesService,\n PaymentFormService,\n PaymentsService,\n CloverPosService,\n ClientsService,\n ClientSecretsService,\n PermissionsService,\n RolesService,\n UsersService,\n WebhooksService,\n BillingService,\n ReportsService,\n ApiConfiguration\n ],\n})\nexport class ApiModule {\n static forRoot(params: ApiConfigurationParams): ModuleWithProviders<ApiModule> {\n return {\n ngModule: ApiModule,\n providers: [\n {\n provide: ApiConfiguration,\n useValue: params\n }\n ]\n }\n }\n\n constructor( \n @Optional() @SkipSelf() parentModule: ApiModule,\n @Optional() http: HttpClient\n ) {\n if (parentModule) {\n throw new Error('ApiModule is already loaded. Import in your base AppModule only.');\n }\n if (!http) {\n throw new Error('You need to import the HttpClientModule in your AppModule! \\n' +\n 'See also https://github.com/angular/angular/issues/20575');\n }\n }\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\n\n/**\n * Global configuration\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ApiConfiguration {\n rootUrl: string = 'https://test.vitupay.com';\n}\n\n/**\n * Parameters for `ApiModule.forRoot()`\n */\nexport interface ApiConfigurationParams {\n rootUrl?: string;\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { ApiConfiguration } from './api-configuration';\n\n/**\n * Base class for services\n */\n@Injectable()\nexport class BaseService {\n constructor(\n protected config: ApiConfiguration,\n protected http: HttpClient\n ) {\n }\n\n private _rootUrl: string = '';\n\n /**\n * Returns the root url for all operations in this service. If not set directly in this\n * service, will fallback to `ApiConfiguration.rootUrl`.\n */\n get rootUrl(): string {\n return this._rootUrl || this.config.rootUrl;\n }\n\n /**\n * Sets the root URL for API operations in this service.\n */\n set rootUrl(rootUrl: string) {\n this._rootUrl = rootUrl;\n }\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { HttpRequest, HttpParameterCodec, HttpParams, HttpHeaders } from '@angular/common/http';\n\n/**\n * Custom parameter codec to correctly handle the plus sign in parameter\n * values. See https://github.com/angular/angular/issues/18261\n */\nclass ParameterCodec implements HttpParameterCodec {\n encodeKey(key: string): string {\n return encodeURIComponent(key);\n }\n\n encodeValue(value: string): string {\n return encodeURIComponent(value);\n }\n\n decodeKey(key: string): string {\n return decodeURIComponent(key);\n }\n\n decodeValue(value: string): string {\n return decodeURIComponent(value);\n }\n}\nconst ParameterCodecInstance = new ParameterCodec();\n\n/**\n * Defines the options for appending a parameter\n */\ninterface ParameterOptions {\n style?: string;\n explode?: boolean;\n}\n\n/**\n * Base class for a parameter\n */\nabstract class Parameter {\n constructor(public name: string, public value: any, public options: ParameterOptions, defaultStyle: string, defaultExplode: boolean) {\n this.options = options || {};\n if (this.options.style === null || this.options.style === undefined) {\n this.options.style = defaultStyle;\n }\n if (this.options.explode === null || this.options.explode === undefined) {\n this.options.explode = defaultExplode;\n }\n }\n\n serializeValue(value: any, separator = ','): string {\n if (value === null || value === undefined) {\n return '';\n } else if (value instanceof Array) {\n return value.map(v => this.serializeValue(v).split(separator).join(encodeURIComponent(separator))).join(separator);\n } else if (typeof value === 'object') {\n const array: string[] = [];\n for (const key of Object.keys(value)) {\n let propVal = value[key];\n if (propVal !== null && propVal !== undefined) {\n propVal = this.serializeValue(propVal).split(separator).join(encodeURIComponent(separator));\n if (this.options.explode) {\n array.push(`${key}=${propVal}`);\n } else {\n array.push(key);\n array.push(propVal);\n }\n }\n }\n return array.join(separator);\n } else {\n return String(value);\n }\n }\n}\n\n/**\n * A parameter in the operation path\n */\nclass PathParameter extends Parameter {\n constructor(name: string, value: any, options: ParameterOptions) {\n super(name, value, options, 'simple', false);\n }\n\n append(path: string): string {\n let value = this.value;\n if (value === null || value === undefined) {\n value = '';\n }\n let prefix = this.options.style === 'label' ? '.' : '';\n let separator = this.options.explode ? prefix === '' ? ',' : prefix : ',';\n let alreadySerialized = false;\n if (this.options.style === 'matrix') {\n // The parameter name is just used as prefix, except in some cases...\n prefix = `;${this.name}=`;\n if (this.options.explode && typeof value === 'object') {\n prefix = ';';\n if (value instanceof Array) {\n // For arrays we have to repeat the name for each element\n value = value.map(v => `${this.name}=${this.serializeValue(v, ';')}`);\n value = value.join(';');\n alreadySerialized = true;\n } else {\n // For objects we have to put each the key / value pairs\n value = this.serializeValue(value, ';');\n alreadySerialized = true\n }\n }\n }\n value = prefix + (alreadySerialized ? value : this.serializeValue(value, separator));\n // Replace both the plain variable and the corresponding variant taking in the prefix and explode into account\n path = path.replace(`{${this.name}}`, value);\n path = path.replace(`{${prefix}${this.name}${this.options.explode ? '*' : ''}}`, value);\n return path;\n }\n\n // @ts-ignore\n serializeValue(value: any, separator = ','): string {\n var result = typeof value === 'string' ? encodeURIComponent(value) : super.serializeValue(value, separator);\n result = result.replace('%3D', '=');\n result = result.replace('%3B', ';');\n result = result.replace('%2C', ',');\n return result;\n }\n}\n\n/**\n * A parameter in the query\n */\nclass QueryParameter extends Parameter {\n constructor(name: string, value: any, options: ParameterOptions) {\n super(name, value, options, 'form', true);\n }\n\n append(params: HttpParams): HttpParams {\n if (this.value instanceof Array) {\n // Array serialization\n if (this.options.explode) {\n for (const v of this.value) {\n params = params.append(this.name, this.serializeValue(v));\n }\n } else {\n const separator = this.options.style === 'spaceDelimited'\n ? ' ' : this.options.style === 'pipeDelimited'\n ? '|' : ',';\n return params.append(this.name, this.serializeValue(this.value, separator));\n }\n } else if (this.value !== null && typeof this.value === 'object') {\n // Object serialization\n if (this.options.style === 'deepObject') {\n // Append a parameter for each key, in the form `name[key]`\n for (const key of Object.keys(this.value)) {\n const propVal = this.value[key];\n if (propVal !== null && propVal !== undefined) {\n params = params.append(`${this.name}[${key}]`, this.serializeValue(propVal));\n }\n }\n } else if (this.options.explode) {\n // Append a parameter for each key without using the parameter name\n for (const key of Object.keys(this.value)) {\n const propVal = this.value[key];\n if (propVal !== null && propVal !== undefined) {\n params = params.append(key, this.serializeValue(propVal));\n }\n }\n } else {\n // Append a single parameter whose values are a comma-separated list of key,value,key,value...\n const array: any[] = [];\n for (const key of Object.keys(this.value)) {\n const propVal = this.value[key];\n if (propVal !== null && propVal !== undefined) {\n array.push(key);\n array.push(propVal);\n }\n }\n params = params.append(this.name, this.serializeValue(array));\n }\n } else if (this.value !== null && this.value !== undefined) {\n // Plain value\n params = params.append(this.name, this.serializeValue(this.value));\n }\n return params;\n }\n}\n\n/**\n * A parameter in the HTTP request header\n */\nclass HeaderParameter extends Parameter {\n constructor(name: string, value: any, options: ParameterOptions) {\n super(name, value, options, 'simple', false);\n }\n\n append(headers: HttpHeaders): HttpHeaders {\n if (this.value !== null && this.value !== undefined) {\n if (this.value instanceof Array) {\n for (const v of this.value) {\n headers = headers.append(this.name, this.serializeValue(v));\n }\n } else {\n headers = headers.append(this.name, this.serializeValue(this.value));\n }\n }\n return headers;\n }\n}\n\n/**\n * Helper to build http requests from parameters\n */\nexport class RequestBuilder {\n\n private _path = new Map<string, PathParameter>();\n private _query = new Map<string, QueryParameter>();\n private _header = new Map<string, HeaderParameter>();\n _bodyContent: any | null;\n _bodyContentType?: string;\n\n constructor(\n public rootUrl: string,\n public operationPath: string,\n public method: string) {\n }\n\n /**\n * Sets a path parameter\n */\n path(name: string, value: any, options?: ParameterOptions): void {\n this._path.set(name, new PathParameter(name, value, options || {}));\n }\n\n /**\n * Sets a query parameter\n */\n query(name: string, value: any, options?: ParameterOptions): void {\n this._query.set(name, new QueryParameter(name, value, options || {}));\n }\n\n /**\n * Sets a header parameter\n */\n header(name: string, value: any, options?: ParameterOptions): void {\n this._header.set(name, new HeaderParameter(name, value, options || {}));\n }\n\n /**\n * Sets the body content, along with the content type\n */\n body(value: any, contentType = 'application/json'): void {\n if (value instanceof Blob) {\n this._bodyContentType = value.type;\n } else {\n this._bodyContentType = contentType;\n }\n if (this._bodyContentType === 'application/x-www-form-urlencoded' && value !== null && typeof value === 'object') {\n // Handle URL-encoded data\n const pairs: Array<[string, string]> = [];\n for (const key of Object.keys(value)) {\n let val = value[key];\n if (!(val instanceof Array)) {\n val = [val];\n }\n for (const v of val) {\n const formValue = this.formDataValue(v);\n if (formValue !== null) {\n pairs.push([key, formValue]);\n }\n }\n }\n this._bodyContent = pairs.map(p => `${encodeURIComponent(p[0])}=${encodeURIComponent(p[1])}`).join('&');\n } else if (this._bodyContentType === 'multipart/form-data') {\n // Handle multipart form data\n const formData = new FormData();\n if (value !== null && value !== undefined) {\n for (const key of Object.keys(value)) {\n const val = value[key];\n if (val instanceof Array) {\n for (const v of val) {\n const toAppend = this.formDataValue(v);\n if (toAppend !== null) {\n formData.append(key, toAppend);\n }\n }\n } else {\n const toAppend = this.formDataValue(val);\n if (toAppend !== null) {\n formData.set(key, toAppend);\n }\n }\n }\n }\n this._bodyContent = formData;\n } else {\n // The body is the plain content\n this._bodyContent = value;\n }\n }\n\n private formDataValue(value: any): any {\n if (value === null || value === undefined) {\n return null;\n }\n if (value instanceof Blob) {\n return value;\n }\n if (typeof value === 'object') {\n return JSON.stringify(value);\n }\n return String(value);\n }\n\n /**\n * Builds the request with the current set parameters\n */\n build<T = any>(options?: {\n /** Which content types to accept */\n accept?: string;\n\n /** The expected response type */\n responseType?: 'json' | 'text' | 'blob' | 'arraybuffer';\n\n /** Whether to report progress on uploads / downloads */\n reportProgress?: boolean;\n }): HttpRequest<T> {\n\n options = options || {};\n\n // Path parameters\n let path = this.operationPath;\n for (const pathParam of this._path.values()) {\n path = pathParam.append(path);\n }\n const url = this.rootUrl + path;\n\n // Query parameters\n let httpParams = new HttpParams({\n encoder: ParameterCodecInstance\n });\n for (const queryParam of this._query.values()) {\n httpParams = queryParam.append(httpParams);\n }\n\n // Header parameters\n let httpHeaders = new HttpHeaders();\n if (options.accept) {\n httpHeaders = httpHeaders.append('Accept', options.accept);\n }\n for (const headerParam of this._header.values()) {\n httpHeaders = headerParam.append(httpHeaders);\n }\n\n // Request content headers\n if (this._bodyContentType && !(this._bodyContent instanceof FormData)) {\n httpHeaders = httpHeaders.set('Content-Type', this._bodyContentType);\n }\n\n // Perform the request\n return new HttpRequest<T>(this.method.toUpperCase(), url, this._bodyContent, {\n params: httpParams,\n headers: httpHeaders,\n responseType: options.responseType,\n reportProgress: options.reportProgress\n });\n }\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { Injectable } from '@angular/core';\nimport { HttpClient, HttpResponse } from '@angular/common/http';\nimport { BaseService } from '../base-service';\nimport { ApiConfiguration } from '../api-configuration';\nimport { StrictHttpResponse } from '../strict-http-response';\nimport { RequestBuilder } from '../request-builder';\nimport { Observable } from 'rxjs';\nimport { map, filter } from 'rxjs/operators';\n\nimport { UpdateMerchantStyleDto } from '../models/update-merchant-style-dto';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MerchantStyleService extends BaseService {\n constructor(\n config: ApiConfiguration,\n http: HttpClient\n ) {\n super(config, http);\n }\n\n /**\n * Path part for operation merchantStyleMergedCreditCardHtml\n */\n static readonly MerchantStyleMergedCreditCardHtmlPath = '/api/merchant-style/merged-credit-card-html';\n\n /**\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `merchantStyleMergedCreditCardHtml()` instead.\n *\n * This method doesn't expect any request body.\n */\n merchantStyleMergedCreditCardHtml$Response(params?: {\n cssStyle?: string;\n }): Observable<StrictHttpResponse<string>> {\n\n const rb = new RequestBuilder(this.rootUrl, MerchantStyleService.MerchantStyleMergedCreditCardHtmlPath, 'post');\n if (params) {\n rb.query('cssStyle', params.cssStyle, {});\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<string>;\n })\n );\n }\n\n /**\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `merchantStyleMergedCreditCardHtml$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n merchantStyleMergedCreditCardHtml(params?: {\n cssStyle?: string;\n }): Observable<string> {\n\n return this.merchantStyleMergedCreditCardHtml$Response(params).pipe(\n map((r: StrictHttpResponse<string>) => r.body as string)\n );\n }\n\n /**\n * Path part for operation merchantStylePutCreditCardSettings\n */\n static readonly MerchantStylePutCreditCardSettingsPath = '/api/merchant-style/put-credit-card-settings';\n\n /**\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `merchantStylePutCreditCardSettings()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n merchantStylePutCreditCardSettings$Response(params: {\n body: UpdateMerchantStyleDto\n }): Observable<StrictHttpResponse<void>> {\n\n const rb = new RequestBuilder(this.rootUrl, MerchantStyleService.MerchantStylePutCreditCardSettingsPath, 'put');\n if (params) {\n rb.body(params.body, 'application/json');\n }\n\n return this.http.request(rb.build({\n responseType: 'text',\n accept: '*/*'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return (r as HttpResponse<any>).clone({ body: undefined }) as StrictHttpResponse<void>;\n })\n );\n }\n\n /**\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `merchantStylePutCreditCardSettings$Response()` instead.\n *\n * This method sends `application/json` and handles request body of type `application/json`.\n */\n merchantStylePutCreditCardSettings(params: {\n body: UpdateMerchantStyleDto\n }): Observable<void> {\n\n return this.merchantStylePutCreditCardSettings$Response(params).pipe(\n map((r: StrictHttpResponse<void>) => r.body as void)\n );\n }\n\n /**\n * Path part for operation merchantStyleGetCreditCardSettings\n */\n static readonly MerchantStyleGetCreditCardSettingsPath = '/api/merchant-style/get-credit-card-settings';\n\n /**\n * This method provides access to the full `HttpResponse`, allowing access to response headers.\n * To access only the response body, use `merchantStyleGetCreditCardSettings()` instead.\n *\n * This method doesn't expect any request body.\n */\n merchantStyleGetCreditCardSettings$Response(params?: {\n }): Observable<StrictHttpResponse<string>> {\n\n const rb = new RequestBuilder(this.rootUrl, MerchantStyleService.MerchantStyleGetCreditCardSettingsPath, 'get');\n if (params) {\n }\n\n return this.http.request(rb.build({\n responseType: 'json',\n accept: 'application/json'\n })).pipe(\n filter((r: any) => r instanceof HttpResponse),\n map((r: HttpResponse<any>) => {\n return r as StrictHttpResponse<string>;\n })\n );\n }\n\n /**\n * This method provides access to only to the response body.\n * To access the full response (for headers, for example), `merchantStyleGetCreditCardSettings$Response()` instead.\n *\n * This method doesn't expect any request body.\n */\n merchantStyleGetCreditCardSettings(params?: {\n }): Observable<string> {\n\n return this.merchantStyleGetCreditCardSettings$Response(params).pipe(\n map((r: StrictHttpResponse<string>) => r.body as string)\n );\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nimport { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { ApiConfiguration, ApiConfigurationParams } from './api-configuration';\n\nimport { MerchantStyleService } from './services/merchant-style.service';\n\n/**\n * Module that provides all services and configuration.\n */\n@NgModule({\n imports: [],\n exports: [],\n declarations: [],\n providers: [\n MerchantStyleService,\n ApiConfiguration\n ],\n})\nexport class ApiModule {\n static forRoot(params: ApiConfigurationParams): ModuleWithProviders<ApiModule> {\n return {\n ngModule: ApiModule,\n providers: [\n {\n provide: ApiConfiguration,\n useValue: params\n }\n ]\n }\n }\n\n constructor( \n @Optional() @SkipSelf() parentModule: ApiModule,\n @Optional() http: HttpClient\n ) {\n if (parentModule) {\n throw new Error('ApiModule is already loaded. Import in your base AppModule only.');\n }\n if (!http) {\n throw new Error('You need to import the HttpClientModule in your AppModule! \\n' +\n 'See also https://github.com/angular/angular/issues/20575');\n }\n }\n}\n","/**\n * @license Angular v14.1.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { ɵAnimationGroupPlayer, NoopAnimationPlayer, AUTO_STYLE, ɵPRE_STYLE, sequence, style } from '@angular/animations';\nimport * as i0 from '@angular/core';\nimport { ɵRuntimeError, Injectable } 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 */\nconst LINE_START = '\\n - ';\nfunction invalidTimingValue(exp) {\n return new ɵRuntimeError(3000 /* RuntimeErrorCode.INVALID_TIMING_VALUE */, ngDevMode && `The provided timing value \"${exp}\" is invalid.`);\n}\nfunction negativeStepValue() {\n return new ɵRuntimeError(3100 /* RuntimeErrorCode.NEGATIVE_STEP_VALUE */, ngDevMode && 'Duration values below 0 are not allowed for this animation step.');\n}\nfunction negativeDelayValue() {\n return new ɵRuntimeError(3101 /* RuntimeErrorCode.NEGATIVE_DELAY_VALUE */, ngDevMode && 'Delay values below 0 are not allowed for this animation step.');\n}\nfunction invalidStyleParams(varName) {\n return new ɵRuntimeError(3001 /* RuntimeErrorCode.INVALID_STYLE_PARAMS */, ngDevMode &&\n `Unable to resolve the local animation param ${varName} in the given list of values`);\n}\nfunction invalidParamValue(varName) {\n return new ɵRuntimeError(3003 /* RuntimeErrorCode.INVALID_PARAM_VALUE */, ngDevMode && `Please provide a value for the animation param ${varName}`);\n}\nfunction invalidNodeType(nodeType) {\n return new ɵRuntimeError(3004 /* RuntimeErrorCode.INVALID_NODE_TYPE */, ngDevMode && `Unable to resolve animation metadata node #${nodeType}`);\n}\nfunction invalidCssUnitValue(userProvidedProperty, value) {\n return new ɵRuntimeError(3005 /* RuntimeErrorCode.INVALID_CSS_UNIT_VALUE */, ngDevMode && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`);\n}\nfunction invalidTrigger() {\n return new ɵRuntimeError(3006 /* RuntimeErrorCode.INVALID_TRIGGER */, ngDevMode &&\n 'animation triggers cannot be prefixed with an `@` sign (e.g. trigger(\\'@foo\\', [...]))');\n}\nfunction invalidDefinition() {\n return new ɵRuntimeError(3007 /* RuntimeErrorCode.INVALID_DEFINITION */, ngDevMode && 'only state() and transition() definitions can sit inside of a trigger()');\n}\nfunction invalidState(metadataName, missingSubs) {\n return new ɵRuntimeError(3008 /* RuntimeErrorCode.INVALID_STATE */, ngDevMode &&\n `state(\"${metadataName}\", ...) must define default values for all the following style substitutions: ${missingSubs.join(', ')}`);\n}\nfunction invalidStyleValue(value) {\n return new ɵRuntimeError(3002 /* RuntimeErrorCode.INVALID_STYLE_VALUE */, ngDevMode && `The provided style string value ${value} is not allowed.`);\n}\nfunction invalidProperty(prop) {\n return new ɵRuntimeError(3009 /* RuntimeErrorCode.INVALID_PROPERTY */, ngDevMode &&\n `The provided animation property \"${prop}\" is not a supported CSS property for animations`);\n}\nfunction invalidParallelAnimation(prop, firstStart, firstEnd, secondStart, secondEnd) {\n return new ɵRuntimeError(3010 /* RuntimeErrorCode.INVALID_PARALLEL_ANIMATION */, ngDevMode &&\n `The CSS property \"${prop}\" that exists between the times of \"${firstStart}ms\" and \"${firstEnd}ms\" is also being animated in a parallel animation between the times of \"${secondStart}ms\" and \"${secondEnd}ms\"`);\n}\nfunction invalidKeyframes() {\n return new ɵRuntimeError(3011 /* RuntimeErrorCode.INVALID_KEYFRAMES */, ngDevMode && `keyframes() must be placed inside of a call to animate()`);\n}\nfunction invalidOffset() {\n return new ɵRuntimeError(3012 /* RuntimeErrorCode.INVALID_OFFSET */, ngDevMode && `Please ensure that all keyframe offsets are between 0 and 1`);\n}\nfunction keyframeOffsetsOutOfOrder() {\n return new ɵRuntimeError(3200 /* RuntimeErrorCode.KEYFRAME_OFFSETS_OUT_OF_ORDER */, ngDevMode && `Please ensure that all keyframe offsets are in order`);\n}\nfunction keyframesMissingOffsets() {\n return new ɵRuntimeError(3202 /* RuntimeErrorCode.KEYFRAMES_MISSING_OFFSETS */, ngDevMode && `Not all style() steps within the declared keyframes() contain offsets`);\n}\nfunction invalidStagger() {\n return new ɵRuntimeError(3013 /* RuntimeErrorCode.INVALID_STAGGER */, ngDevMode && `stagger() can only be used inside of query()`);\n}\nfunction invalidQuery(selector) {\n return new ɵRuntimeError(3014 /* RuntimeErrorCode.INVALID_QUERY */, ngDevMode &&\n `\\`query(\"${selector}\")\\` returned zero elements. (Use \\`query(\"${selector}\", { optional: true })\\` if you wish to allow this.)`);\n}\nfunction invalidExpression(expr) {\n return new ɵRuntimeError(3015 /* RuntimeErrorCode.INVALID_EXPRESSION */, ngDevMode && `The provided transition expression \"${expr}\" is not supported`);\n}\nfunction invalidTransitionAlias(alias) {\n return new ɵRuntimeError(3016 /* RuntimeErrorCode.INVALID_TRANSITION_ALIAS */, ngDevMode && `The transition alias value \"${alias}\" is not supported`);\n}\nfunction validationFailed(errors) {\n return new ɵRuntimeError(3500 /* RuntimeErrorCode.VALIDATION_FAILED */, ngDevMode && `animation validation failed:\\n${errors.map(err => err.message).join('\\n')}`);\n}\nfunction buildingFailed(errors) {\n return new ɵRuntimeError(3501 /* RuntimeErrorCode.BUILDING_FAILED */, ngDevMode && `animation building failed:\\n${errors.map(err => err.message).join('\\n')}`);\n}\nfunction triggerBuildFailed(name, errors) {\n return new ɵRuntimeError(3404 /* RuntimeErrorCode.TRIGGER_BUILD_FAILED */, ngDevMode &&\n `The animation trigger \"${name}\" has failed to build due to the following errors:\\n - ${errors.map(err => err.message).join('\\n - ')}`);\n}\nfunction animationFailed(errors) {\n return new ɵRuntimeError(3502 /* RuntimeErrorCode.ANIMATION_FAILED */, ngDevMode &&\n `Unable to animate due to the following errors:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`);\n}\nfunction registerFailed(errors) {\n return new ɵRuntimeError(3503 /* RuntimeErrorCode.REGISTRATION_FAILED */, ngDevMode &&\n `Unable to build the animation due to the following errors: ${errors.map(err => err.message).join('\\n')}`);\n}\nfunction missingOrDestroyedAnimation() {\n return new ɵRuntimeError(3300 /* RuntimeErrorCode.MISSING_OR_DESTROYED_ANIMATION */, ngDevMode && 'The requested animation doesn\\'t exist or has already been destroyed');\n}\nfunction createAnimationFailed(errors) {\n return new ɵRuntimeError(3504 /* RuntimeErrorCode.CREATE_ANIMATION_FAILED */, ngDevMode &&\n `Unable to create the animation due to the following errors:${errors.map(err => err.message).join('\\n')}`);\n}\nfunction missingPlayer(id) {\n return new ɵRuntimeError(3301 /* RuntimeErrorCode.MISSING_PLAYER */, ngDevMode && `Unable to find the timeline player referenced by ${id}`);\n}\nfunction missingTrigger(phase, name) {\n return new ɵRuntimeError(3302 /* RuntimeErrorCode.MISSING_TRIGGER */, ngDevMode &&\n `Unable to listen on the animation trigger event \"${phase}\" because the animation trigger \"${name}\" doesn\\'t exist!`);\n}\nfunction missingEvent(name) {\n return new ɵRuntimeError(3303 /* RuntimeErrorCode.MISSING_EVENT */, ngDevMode &&\n `Unable to listen on the animation trigger \"${name}\" because the provided event is undefined!`);\n}\nfunction unsupportedTriggerEvent(phase, name) {\n return new ɵRuntimeError(3400 /* RuntimeErrorCode.UNSUPPORTED_TRIGGER_EVENT */, ngDevMode &&\n `The provided animation trigger event \"${phase}\" for the animation trigger \"${name}\" is not supported!`);\n}\nfunction unregisteredTrigger(name) {\n return new ɵRuntimeError(3401 /* RuntimeErrorCode.UNREGISTERED_TRIGGER */, ngDevMode && `The provided animation trigger \"${name}\" has not been registered!`);\n}\nfunction triggerTransitionsFailed(errors) {\n return new ɵRuntimeError(3402 /* RuntimeErrorCode.TRIGGER_TRANSITIONS_FAILED */, ngDevMode &&\n `Unable to process animations due to the following failed trigger transitions\\n ${errors.map(err => err.message).join('\\n')}`);\n}\nfunction triggerParsingFailed(name, errors) {\n return new ɵRuntimeError(3403 /* RuntimeErrorCode.TRIGGER_PARSING_FAILED */, ngDevMode &&\n `Animation parsing for the ${name} trigger have failed:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`);\n}\nfunction transitionFailed(name, errors) {\n return new ɵRuntimeError(3505 /* RuntimeErrorCode.TRANSITION_FAILED */, ngDevMode && `@${name} has failed due to:\\n ${errors.map(err => err.message).join('\\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 * Set of all animatable CSS properties\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties\n */\nconst ANIMATABLE_PROP_SET = new Set([\n '-moz-outline-radius',\n '-moz-outline-radius-bottomleft',\n '-moz-outline-radius-bottomright',\n '-moz-outline-radius-topleft',\n '-moz-outline-radius-topright',\n '-ms-grid-columns',\n '-ms-grid-rows',\n '-webkit-line-clamp',\n '-webkit-text-fill-color',\n '-webkit-text-stroke',\n '-webkit-text-stroke-color',\n 'accent-color',\n 'all',\n 'backdrop-filter',\n 'background',\n 'background-color',\n 'background-position',\n 'background-size',\n 'block-size',\n 'border',\n 'border-block-end',\n 'border-block-end-color',\n 'border-block-end-width',\n 'border-block-start',\n 'border-block-start-color',\n 'border-block-start-width',\n 'border-bottom',\n 'border-bottom-color',\n 'border-bottom-left-radius',\n 'border-bottom-right-radius',\n 'border-bottom-width',\n 'border-color',\n 'border-end-end-radius',\n 'border-end-start-radius',\n 'border-image-outset',\n 'border-image-slice',\n 'border-image-width',\n 'border-inline-end',\n 'border-inline-end-color',\n 'border-inline-end-width',\n 'border-inline-start',\n 'border-inline-start-color',\n 'border-inline-start-width',\n 'border-left',\n 'border-left-color',\n 'border-left-width',\n 'border-radius',\n 'border-right',\n 'border-right-color',\n 'border-right-width',\n 'border-start-end-radius',\n 'border-start-start-radius',\n 'border-top',\n 'border-top-color',\n 'border-top-left-radius',\n 'border-top-right-radius',\n 'border-top-width',\n 'border-width',\n 'bottom',\n 'box-shadow',\n 'caret-color',\n 'clip',\n 'clip-path',\n 'color',\n 'column-count',\n 'column-gap',\n 'column-rule',\n 'column-rule-color',\n 'column-rule-width',\n 'column-width',\n 'columns',\n 'filter',\n 'flex',\n 'flex-basis',\n 'flex-grow',\n 'flex-shrink',\n 'font',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-variation-settings',\n 'font-weight',\n 'gap',\n 'grid-column-gap',\n 'grid-gap',\n 'grid-row-gap',\n 'grid-template-columns',\n 'grid-template-rows',\n 'height',\n 'inline-size',\n 'input-security',\n 'inset',\n 'inset-block',\n 'inset-block-end',\n 'inset-block-start',\n 'inset-inline',\n 'inset-inline-end',\n 'inset-inline-start',\n 'left',\n 'letter-spacing',\n 'line-clamp',\n 'line-height',\n 'margin',\n 'margin-block-end',\n 'margin-block-start',\n 'margin-bottom',\n 'margin-inline-end',\n 'margin-inline-start',\n 'margin-left',\n 'margin-right',\n 'margin-top',\n 'mask',\n 'mask-border',\n 'mask-position',\n 'mask-size',\n 'max-block-size',\n 'max-height',\n 'max-inline-size',\n 'max-lines',\n 'max-width',\n 'min-block-size',\n 'min-height',\n 'min-inline-size',\n 'min-width',\n 'object-position',\n 'offset',\n 'offset-anchor',\n 'offset-distance',\n 'offset-path',\n 'offset-position',\n 'offset-rotate',\n 'opacity',\n 'order',\n 'outline',\n 'outline-color',\n 'outline-offset',\n 'outline-width',\n 'padding',\n 'padding-block-end',\n 'padding-block-start',\n 'padding-bottom',\n 'padding-inline-end',\n 'padding-inline-start',\n 'padding-left',\n 'padding-right',\n 'padding-top',\n 'perspective',\n 'perspective-origin',\n 'right',\n 'rotate',\n 'row-gap',\n 'scale',\n 'scroll-margin',\n 'scroll-margin-block',\n 'scroll-margin-block-end',\n 'scroll-margin-block-start',\n 'scroll-margin-bottom',\n 'scroll-margin-inline',\n 'scroll-margin-inline-end',\n 'scroll-margin-inline-start',\n 'scroll-margin-left',\n 'scroll-margin-right',\n 'scroll-margin-top',\n 'scroll-padding',\n 'scroll-padding-block',\n 'scroll-padding-block-end',\n 'scroll-padding-block-start',\n 'scroll-padding-bottom',\n 'scroll-padding-inline',\n 'scroll-padding-inline-end',\n 'scroll-padding-inline-start',\n 'scroll-padding-left',\n 'scroll-padding-right',\n 'scroll-padding-top',\n 'scroll-snap-coordinate',\n 'scroll-snap-destination',\n 'scrollbar-color',\n 'shape-image-threshold',\n 'shape-margin',\n 'shape-outside',\n 'tab-size',\n 'text-decoration',\n 'text-decoration-color',\n 'text-decoration-thickness',\n 'text-emphasis',\n 'text-emphasis-color',\n 'text-indent',\n 'text-shadow',\n 'text-underline-offset',\n 'top',\n 'transform',\n 'transform-origin',\n 'translate',\n 'vertical-align',\n 'visibility',\n 'width',\n 'word-spacing',\n 'z-index',\n 'zoom',\n]);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 isBrowser() {\n return (typeof window !== 'undefined' && typeof window.document !== 'undefined');\n}\nfunction isNode() {\n // Checking only for `process` isn't enough to identify whether or not we're in a Node\n // environment, because Webpack by default will polyfill the `process`. While we can discern\n // that Webpack polyfilled it by looking at `process.browser`, it's very Webpack-specific and\n // might not be future-proof. Instead we look at the stringified version of `process` which\n // is `[object process]` in Node and `[object Object]` when polyfilled.\n return typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n}\nfunction optimizeGroupPlayer(players) {\n switch (players.length) {\n case 0:\n return new NoopAnimationPlayer();\n case 1:\n return players[0];\n default:\n return new ɵAnimationGroupPlayer(players);\n }\n}\nfunction normalizeKeyframes$1(driver, normalizer, element, keyframes, preStyles = new Map(), postStyles = new Map()) {\n const errors = [];\n const normalizedKeyframes = [];\n let previousOffset = -1;\n let previousKeyframe = null;\n keyframes.forEach(kf => {\n const offset = kf.get('offset');\n const isSameOffset = offset == previousOffset;\n const normalizedKeyframe = (isSameOffset && previousKeyframe) || new Map();\n kf.forEach((val, prop) => {\n let normalizedProp = prop;\n let normalizedValue = val;\n if (prop !== 'offset') {\n normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors);\n switch (normalizedValue) {\n case ɵPRE_STYLE:\n normalizedValue = preStyles.get(prop);\n break;\n case AUTO_STYLE:\n normalizedValue = postStyles.get(prop);\n break;\n default:\n normalizedValue =\n normalizer.normalizeStyleValue(prop, normalizedProp, normalizedValue, errors);\n break;\n }\n }\n normalizedKeyframe.set(normalizedProp, normalizedValue);\n });\n if (!isSameOffset) {\n normalizedKeyframes.push(normalizedKeyframe);\n }\n previousKeyframe = normalizedKeyframe;\n previousOffset = offset;\n });\n if (errors.length) {\n throw animationFailed(errors);\n }\n return normalizedKeyframes;\n}\nfunction listenOnPlayer(player, eventName, event, callback) {\n switch (eventName) {\n case 'start':\n player.onStart(() => callback(event && copyAnimationEvent(event, 'start', player)));\n break;\n case 'done':\n player.onDone(() => callback(event && copyAnimationEvent(event, 'done', player)));\n break;\n case 'destroy':\n player.onDestroy(() => callback(event && copyAnimationEvent(event, 'destroy', player)));\n break;\n }\n}\nfunction copyAnimationEvent(e, phaseName, player) {\n const totalTime = player.totalTime;\n const disabled = player.disabled ? true : false;\n const event = makeAnimationEvent(e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName, totalTime == undefined ? e.totalTime : totalTime, disabled);\n const data = e['_data'];\n if (data != null) {\n event['_data'] = data;\n }\n return event;\n}\nfunction makeAnimationEvent(element, triggerName, fromState, toState, phaseName = '', totalTime = 0, disabled) {\n return { element, triggerName, fromState, toState, phaseName, totalTime, disabled: !!disabled };\n}\nfunction getOrSetDefaultValue(map, key, defaultValue) {\n let value = map.get(key);\n if (!value) {\n map.set(key, value = defaultValue);\n }\n return value;\n}\nfunction parseTimelineCommand(command) {\n const separatorPos = command.indexOf(':');\n const id = command.substring(1, separatorPos);\n const action = command.slice(separatorPos + 1);\n return [id, action];\n}\nlet _contains = (elm1, elm2) => false;\nlet _query = (element, selector, multi) => {\n return [];\n};\nlet _documentElement = null;\nfunction getParentElement(element) {\n const parent = element.parentNode || element.host; // consider host to support shadow DOM\n if (parent === _documentElement) {\n return null;\n }\n return parent;\n}\n// Define utility methods for browsers and platform-server(domino) where Element\n// and utility methods exist.\nconst _isNode = isNode();\nif (_isNode || typeof Element !== 'undefined') {\n if (!isBrowser()) {\n _contains = (elm1, elm2) => elm1.contains(elm2);\n }\n else {\n // Read the document element in an IIFE that's been marked pure to avoid a top-level property\n // read that may prevent tree-shaking.\n _documentElement = /* @__PURE__ */ (() => document.documentElement)();\n _contains = (elm1, elm2) => {\n while (elm2) {\n if (elm2 === elm1) {\n return true;\n }\n elm2 = getParentElement(elm2);\n }\n return false;\n };\n }\n _query = (element, selector, multi) => {\n if (multi) {\n return Array.from(element.querySelectorAll(selector));\n }\n const elem = element.querySelector(selector);\n return elem ? [elem] : [];\n };\n}\nfunction containsVendorPrefix(prop) {\n // Webkit is the only real popular vendor prefix nowadays\n // cc: http://shouldiprefix.com/\n return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit\n}\nlet _CACHED_BODY = null;\nlet _IS_WEBKIT = false;\nfunction validateStyleProperty(prop) {\n if (!_CACHED_BODY) {\n _CACHED_BODY = getBodyNode() || {};\n _IS_WEBKIT = _CACHED_BODY.style ? ('WebkitAppearance' in _CACHED_BODY.style) : false;\n }\n let result = true;\n if (_CACHED_BODY.style && !containsVendorPrefix(prop)) {\n result = prop in _CACHED_BODY.style;\n if (!result && _IS_WEBKIT) {\n const camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.slice(1);\n result = camelProp in _CACHED_BODY.style;\n }\n }\n return result;\n}\nfunction validateWebAnimatableStyleProperty(prop) {\n return ANIMATABLE_PROP_SET.has(prop);\n}\nfunction getBodyNode() {\n if (typeof document != 'undefined') {\n return document.body;\n }\n return null;\n}\nconst containsElement = _contains;\nconst invokeQuery = _query;\nfunction hypenatePropsKeys(original) {\n const newMap = new Map();\n original.forEach((val, prop) => {\n const newProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2');\n newMap.set(newProp, val);\n });\n return newMap;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 NoopAnimationDriver {\n validateStyleProperty(prop) {\n return validateStyleProperty(prop);\n }\n matchesElement(_element, _selector) {\n // This method is deprecated and no longer in use so we return false.\n return false;\n }\n containsElement(elm1, elm2) {\n return containsElement(elm1, elm2);\n }\n getParentElement(element) {\n return getParentElement(element);\n }\n query(element, selector, multi) {\n return invokeQuery(element, selector, multi);\n }\n computeStyle(element, prop, defaultValue) {\n return defaultValue || '';\n }\n animate(element, keyframes, duration, delay, easing, previousPlayers = [], scrubberAccessRequested) {\n return new NoopAnimationPlayer(duration, delay);\n }\n}\nNoopAnimationDriver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NoopAnimationDriver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNoopAnimationDriver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NoopAnimationDriver });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NoopAnimationDriver, decorators: [{\n type: Injectable\n }] });\n/**\n * @publicApi\n */\nclass AnimationDriver {\n}\nAnimationDriver.NOOP = ( /* @__PURE__ */new NoopAnimationDriver());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 ONE_SECOND = 1000;\nconst SUBSTITUTION_EXPR_START = '{{';\nconst SUBSTITUTION_EXPR_END = '}}';\nconst ENTER_CLASSNAME = 'ng-enter';\nconst LEAVE_CLASSNAME = 'ng-leave';\nconst NG_TRIGGER_CLASSNAME = 'ng-trigger';\nconst NG_TRIGGER_SELECTOR = '.ng-trigger';\nconst NG_ANIMATING_CLASSNAME = 'ng-animating';\nconst NG_ANIMATING_SELECTOR = '.ng-animating';\nfunction resolveTimingValue(value) {\n if (typeof value == 'number')\n return value;\n const matches = value.match(/^(-?[\\.\\d]+)(m?s)/);\n if (!matches || matches.length < 2)\n return 0;\n return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n}\nfunction _convertTimeValueToMS(value, unit) {\n switch (unit) {\n case 's':\n return value * ONE_SECOND;\n default: // ms or something else\n return value;\n }\n}\nfunction resolveTiming(timings, errors, allowNegativeValues) {\n return timings.hasOwnProperty('duration') ?\n timings :\n parseTimeExpression(timings, errors, allowNegativeValues);\n}\nfunction parseTimeExpression(exp, errors, allowNegativeValues) {\n const regex = /^(-?[\\.\\d]+)(m?s)(?:\\s+(-?[\\.\\d]+)(m?s))?(?:\\s+([-a-z]+(?:\\(.+?\\))?))?$/i;\n let duration;\n let delay = 0;\n let easing = '';\n if (typeof exp === 'string') {\n const matches = exp.match(regex);\n if (matches === null) {\n errors.push(invalidTimingValue(exp));\n return { duration: 0, delay: 0, easing: '' };\n }\n duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n const delayMatch = matches[3];\n if (delayMatch != null) {\n delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]);\n }\n const easingVal = matches[5];\n if (easingVal) {\n easing = easingVal;\n }\n }\n else {\n duration = exp;\n }\n if (!allowNegativeValues) {\n let containsErrors = false;\n let startIndex = errors.length;\n if (duration < 0) {\n errors.push(negativeStepValue());\n containsErrors = true;\n }\n if (delay < 0) {\n errors.push(negativeDelayValue());\n containsErrors = true;\n }\n if (containsErrors) {\n errors.splice(startIndex, 0, invalidTimingValue(exp));\n }\n }\n return { duration, delay, easing };\n}\nfunction copyObj(obj, destination = {}) {\n Object.keys(obj).forEach(prop => {\n destination[prop] = obj[prop];\n });\n return destination;\n}\nfunction convertToMap(obj) {\n const styleMap = new Map();\n Object.keys(obj).forEach(prop => {\n const val = obj[prop];\n styleMap.set(prop, val);\n });\n return styleMap;\n}\nfunction normalizeKeyframes(keyframes) {\n if (!keyframes.length) {\n return [];\n }\n if (keyframes[0] instanceof Map) {\n return keyframes;\n }\n return keyframes.map(kf => convertToMap(kf));\n}\nfunction normalizeStyles(styles) {\n const normalizedStyles = new Map();\n if (Array.isArray(styles)) {\n styles.forEach(data => copyStyles(data, normalizedStyles));\n }\n else {\n copyStyles(styles, normalizedStyles);\n }\n return normalizedStyles;\n}\nfunction copyStyles(styles, destination = new Map(), backfill) {\n if (backfill) {\n for (let [prop, val] of backfill) {\n destination.set(prop, val);\n }\n }\n for (let [prop, val] of styles) {\n destination.set(prop, val);\n }\n return destination;\n}\nfunction getStyleAttributeString(element, key, value) {\n // Return the key-value pair string to be added to the style attribute for the\n // given CSS style key.\n if (value) {\n return key + ':' + value + ';';\n }\n else {\n return '';\n }\n}\nfunction writeStyleAttribute(element) {\n // Read the style property of the element and manually reflect it to the\n // style attribute. This is needed because Domino on platform-server doesn't\n // understand the full set of allowed CSS properties and doesn't reflect some\n // of them automatically.\n let styleAttrValue = '';\n for (let i = 0; i < element.style.length; i++) {\n const key = element.style.item(i);\n styleAttrValue += getStyleAttributeString(element, key, element.style.getPropertyValue(key));\n }\n for (const key in element.style) {\n // Skip internal Domino properties that don't need to be reflected.\n if (!element.style.hasOwnProperty(key) || key.startsWith('_')) {\n continue;\n }\n const dashKey = camelCaseToDashCase(key);\n styleAttrValue += getStyleAttributeString(element, dashKey, element.style[key]);\n }\n element.setAttribute('style', styleAttrValue);\n}\nfunction setStyles(element, styles, formerStyles) {\n if (element['style']) {\n styles.forEach((val, prop) => {\n const camelProp = dashCaseToCamelCase(prop);\n if (formerStyles && !formerStyles.has(prop)) {\n formerStyles.set(prop, element.style[camelProp]);\n }\n element.style[camelProp] = val;\n });\n // On the server set the 'style' attribute since it's not automatically reflected.\n if (isNode()) {\n writeStyleAttribute(element);\n }\n }\n}\nfunction eraseStyles(element, styles) {\n if (element['style']) {\n styles.forEach((_, prop) => {\n const camelProp = dashCaseToCamelCase(prop);\n element.style[camelProp] = '';\n });\n // On the server set the 'style' attribute since it's not automatically reflected.\n if (isNode()) {\n writeStyleAttribute(element);\n }\n }\n}\nfunction normalizeAnimationEntry(steps) {\n if (Array.isArray(steps)) {\n if (steps.length == 1)\n return steps[0];\n return sequence(steps);\n }\n return steps;\n}\nfunction validateStyleParams(value, options, errors) {\n const params = options.params || {};\n const matches = extractStyleParams(value);\n if (matches.length) {\n matches.forEach(varName => {\n if (!params.hasOwnProperty(varName)) {\n errors.push(invalidStyleParams(varName));\n }\n });\n }\n}\nconst PARAM_REGEX = new RegExp(`${SUBSTITUTION_EXPR_START}\\\\s*(.+?)\\\\s*${SUBSTITUTION_EXPR_END}`, 'g');\nfunction extractStyleParams(value) {\n let params = [];\n if (typeof value === 'string') {\n let match;\n while (match = PARAM_REGEX.exec(value)) {\n params.push(match[1]);\n }\n PARAM_REGEX.lastIndex = 0;\n }\n return params;\n}\nfunction interpolateParams(value, params, errors) {\n const original = value.toString();\n const str = original.replace(PARAM_REGEX, (_, varName) => {\n let localVal = params[varName];\n // this means that the value was never overridden by the data passed in by the user\n if (localVal == null) {\n errors.push(invalidParamValue(varName));\n localVal = '';\n }\n return localVal.toString();\n });\n // we do this to assert that numeric values stay as they are\n return str == original ? value : str;\n}\nfunction iteratorToArray(iterator) {\n const arr = [];\n let item = iterator.next();\n while (!item.done) {\n arr.push(item.value);\n item = iterator.next();\n }\n return arr;\n}\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nfunction dashCaseToCamelCase(input) {\n return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());\n}\nfunction camelCaseToDashCase(input) {\n return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\nfunction allowPreviousPlayerStylesMerge(duration, delay) {\n return duration === 0 || delay === 0;\n}\nfunction balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles) {\n if (previousStyles.size && keyframes.length) {\n let startingKeyframe = keyframes[0];\n let missingStyleProps = [];\n previousStyles.forEach((val, prop) => {\n if (!startingKeyframe.has(prop)) {\n missingStyleProps.push(prop);\n }\n startingKeyframe.set(prop, val);\n });\n if (missingStyleProps.length) {\n for (let i = 1; i < keyframes.length; i++) {\n let kf = keyframes[i];\n missingStyleProps.forEach(prop => kf.set(prop, computeStyle(element, prop)));\n }\n }\n }\n return keyframes;\n}\nfunction visitDslNode(visitor, node, context) {\n switch (node.type) {\n case 7 /* AnimationMetadataType.Trigger */:\n return visitor.visitTrigger(node, context);\n case 0 /* AnimationMetadataType.State */:\n return visitor.visitState(node, context);\n case 1 /* AnimationMetadataType.Transition */:\n return visitor.visitTransition(node, context);\n case 2 /* AnimationMetadataType.Sequence */:\n return visitor.visitSequence(node, context);\n case 3 /* AnimationMetadataType.Group */:\n return visitor.visitGroup(node, context);\n case 4 /* AnimationMetadataType.Animate */:\n return visitor.visitAnimate(node, context);\n case 5 /* AnimationMetadataType.Keyframes */:\n return visitor.visitKeyframes(node, context);\n case 6 /* AnimationMetadataType.Style */:\n return visitor.visitStyle(node, context);\n case 8 /* AnimationMetadataType.Reference */:\n return visitor.visitReference(node, context);\n case 9 /* AnimationMetadataType.AnimateChild */:\n return visitor.visitAnimateChild(node, context);\n case 10 /* AnimationMetadataType.AnimateRef */:\n return visitor.visitAnimateRef(node, context);\n case 11 /* AnimationMetadataType.Query */:\n return visitor.visitQuery(node, context);\n case 12 /* AnimationMetadataType.Stagger */:\n return visitor.visitStagger(node, context);\n default:\n throw invalidNodeType(node.type);\n }\n}\nfunction computeStyle(element, prop) {\n return window.getComputedStyle(element)[prop];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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;\nfunction createListOfWarnings(warnings) {\n const LINE_START = '\\n - ';\n return `${LINE_START}${warnings.filter(Boolean).map(warning => warning).join(LINE_START)}`;\n}\nfunction warnValidation(warnings) {\n NG_DEV_MODE && console.warn(`animation validation warnings:${createListOfWarnings(warnings)}`);\n}\nfunction warnTriggerBuild(name, warnings) {\n NG_DEV_MODE &&\n console.warn(`The animation trigger \"${name}\" has built with the following warnings:${createListOfWarnings(warnings)}`);\n}\nfunction warnRegister(warnings) {\n NG_DEV_MODE &&\n console.warn(`Animation built with the following warnings:${createListOfWarnings(warnings)}`);\n}\nfunction triggerParsingWarnings(name, warnings) {\n NG_DEV_MODE &&\n console.warn(`Animation parsing for the ${name} trigger presents the following warnings:${createListOfWarnings(warnings)}`);\n}\nfunction pushUnrecognizedPropertiesWarning(warnings, props) {\n if (props.length) {\n warnings.push(`The following provided properties are not recognized: ${props.join(', ')}`);\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 ANY_STATE = '*';\nfunction parseTransitionExpr(transitionValue, errors) {\n const expressions = [];\n if (typeof transitionValue == 'string') {\n transitionValue.split(/\\s*,\\s*/).forEach(str => parseInnerTransitionStr(str, expressions, errors));\n }\n else {\n expressions.push(transitionValue);\n }\n return expressions;\n}\nfunction parseInnerTransitionStr(eventStr, expressions, errors) {\n if (eventStr[0] == ':') {\n const result = parseAnimationAlias(eventStr, errors);\n if (typeof result == 'function') {\n expressions.push(result);\n return;\n }\n eventStr = result;\n }\n const match = eventStr.match(/^(\\*|[-\\w]+)\\s*(<?[=-]>)\\s*(\\*|[-\\w]+)$/);\n if (match == null || match.length < 4) {\n errors.push(invalidExpression(eventStr));\n return expressions;\n }\n const fromState = match[1];\n const separator = match[2];\n const toState = match[3];\n expressions.push(makeLambdaFromStates(fromState, toState));\n const isFullAnyStateExpr = fromState == ANY_STATE && toState == ANY_STATE;\n if (separator[0] == '<' && !isFullAnyStateExpr) {\n expressions.push(makeLambdaFromStates(toState, fromState));\n }\n}\nfunction parseAnimationAlias(alias, errors) {\n switch (alias) {\n case ':enter':\n return 'void => *';\n case ':leave':\n return '* => void';\n case ':increment':\n return (fromState, toState) => parseFloat(toState) > parseFloat(fromState);\n case ':decrement':\n return (fromState, toState) => parseFloat(toState) < parseFloat(fromState);\n default:\n errors.push(invalidTransitionAlias(alias));\n return '* => *';\n }\n}\n// DO NOT REFACTOR ... keep the follow set instantiations\n// with the values intact (closure compiler for some reason\n// removes follow-up lines that add the values outside of\n// the constructor...\nconst TRUE_BOOLEAN_VALUES = new Set(['true', '1']);\nconst FALSE_BOOLEAN_VALUES = new Set(['false', '0']);\nfunction makeLambdaFromStates(lhs, rhs) {\n const LHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(lhs) || FALSE_BOOLEAN_VALUES.has(lhs);\n const RHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(rhs) || FALSE_BOOLEAN_VALUES.has(rhs);\n return (fromState, toState) => {\n let lhsMatch = lhs == ANY_STATE || lhs == fromState;\n let rhsMatch = rhs == ANY_STATE || rhs == toState;\n if (!lhsMatch && LHS_MATCH_BOOLEAN && typeof fromState === 'boolean') {\n lhsMatch = fromState ? TRUE_BOOLEAN_VALUES.has(lhs) : FALSE_BOOLEAN_VALUES.has(lhs);\n }\n if (!rhsMatch && RHS_MATCH_BOOLEAN && typeof toState === 'boolean') {\n rhsMatch = toState ? TRUE_BOOLEAN_VALUES.has(rhs) : FALSE_BOOLEAN_VALUES.has(rhs);\n }\n return lhsMatch && rhsMatch;\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 SELF_TOKEN = ':self';\nconst SELF_TOKEN_REGEX = new RegExp(`\\s*${SELF_TOKEN}\\s*,?`, 'g');\n/*\n * [Validation]\n * The visitor code below will traverse the animation AST generated by the animation verb functions\n * (the output is a tree of objects) and attempt to perform a series of validations on the data. The\n * following corner-cases will be validated:\n *\n * 1. Overlap of animations\n * Given that a CSS property cannot be animated in more than one place at the same time, it's\n * important that this behavior is detected and validated. The way in which this occurs is that\n * each time a style property is examined, a string-map containing the property will be updated with\n * the start and end times for when the property is used within an animation step.\n *\n * If there are two or more parallel animations that are currently running (these are invoked by the\n * group()) on the same element then the validator will throw an error. Since the start/end timing\n * values are collected for each property then if the current animation step is animating the same\n * property and its timing values fall anywhere into the window of time that the property is\n * currently being animated within then this is what causes an error.\n *\n * 2. Timing values\n * The validator will validate to see if a timing value of `duration delay easing` or\n * `durationNumber` is valid or not.\n *\n * (note that upon validation the code below will replace the timing data with an object containing\n * {duration,delay,easing}.\n *\n * 3. Offset Validation\n * Each of the style() calls are allowed to have an offset value when placed inside of keyframes().\n * Offsets within keyframes() are considered valid when:\n *\n * - No offsets are used at all\n * - Each style() entry contains an offset value\n * - Each offset is between 0 and 1\n * - Each offset is greater to or equal than the previous one\n *\n * Otherwise an error will be thrown.\n */\nfunction buildAnimationAst(driver, metadata, errors, warnings) {\n return new AnimationAstBuilderVisitor(driver).build(metadata, errors, warnings);\n}\nconst ROOT_SELECTOR = '';\nclass AnimationAstBuilderVisitor {\n constructor(_driver) {\n this._driver = _driver;\n }\n build(metadata, errors, warnings) {\n const context = new AnimationAstBuilderContext(errors);\n this._resetContextStyleTimingState(context);\n const ast = visitDslNode(this, normalizeAnimationEntry(metadata), context);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (context.unsupportedCSSPropertiesFound.size) {\n pushUnrecognizedPropertiesWarning(warnings, [...context.unsupportedCSSPropertiesFound.keys()]);\n }\n }\n return ast;\n }\n _resetContextStyleTimingState(context) {\n context.currentQuerySelector = ROOT_SELECTOR;\n context.collectedStyles = new Map();\n context.collectedStyles.set(ROOT_SELECTOR, new Map());\n context.currentTime = 0;\n }\n visitTrigger(metadata, context) {\n let queryCount = context.queryCount = 0;\n let depCount = context.depCount = 0;\n const states = [];\n const transitions = [];\n if (metadata.name.charAt(0) == '@') {\n context.errors.push(invalidTrigger());\n }\n metadata.definitions.forEach(def => {\n this._resetContextStyleTimingState(context);\n if (def.type == 0 /* AnimationMetadataType.State */) {\n const stateDef = def;\n const name = stateDef.name;\n name.toString().split(/\\s*,\\s*/).forEach(n => {\n stateDef.name = n;\n states.push(this.visitState(stateDef, context));\n });\n stateDef.name = name;\n }\n else if (def.type == 1 /* AnimationMetadataType.Transition */) {\n const transition = this.visitTransition(def, context);\n queryCount += transition.queryCount;\n depCount += transition.depCount;\n transitions.push(transition);\n }\n else {\n context.errors.push(invalidDefinition());\n }\n });\n return {\n type: 7 /* AnimationMetadataType.Trigger */,\n name: metadata.name,\n states,\n transitions,\n queryCount,\n depCount,\n options: null\n };\n }\n visitState(metadata, context) {\n const styleAst = this.visitStyle(metadata.styles, context);\n const astParams = (metadata.options && metadata.options.params) || null;\n if (styleAst.containsDynamicStyles) {\n const missingSubs = new Set();\n const params = astParams || {};\n styleAst.styles.forEach(style => {\n if (style instanceof Map) {\n style.forEach(value => {\n extractStyleParams(value).forEach(sub => {\n if (!params.hasOwnProperty(sub)) {\n missingSubs.add(sub);\n }\n });\n });\n }\n });\n if (missingSubs.size) {\n const missingSubsArr = iteratorToArray(missingSubs.values());\n context.errors.push(invalidState(metadata.name, missingSubsArr));\n }\n }\n return {\n type: 0 /* AnimationMetadataType.State */,\n name: metadata.name,\n style: styleAst,\n options: astParams ? { params: astParams } : null\n };\n }\n visitTransition(metadata, context) {\n context.queryCount = 0;\n context.depCount = 0;\n const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n const matchers = parseTransitionExpr(metadata.expr, context.errors);\n return {\n type: 1 /* AnimationMetadataType.Transition */,\n matchers,\n animation,\n queryCount: context.queryCount,\n depCount: context.depCount,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitSequence(metadata, context) {\n return {\n type: 2 /* AnimationMetadataType.Sequence */,\n steps: metadata.steps.map(s => visitDslNode(this, s, context)),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitGroup(metadata, context) {\n const currentTime = context.currentTime;\n let furthestTime = 0;\n const steps = metadata.steps.map(step => {\n context.currentTime = currentTime;\n const innerAst = visitDslNode(this, step, context);\n furthestTime = Math.max(furthestTime, context.currentTime);\n return innerAst;\n });\n context.currentTime = furthestTime;\n return {\n type: 3 /* AnimationMetadataType.Group */,\n steps,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitAnimate(metadata, context) {\n const timingAst = constructTimingAst(metadata.timings, context.errors);\n context.currentAnimateTimings = timingAst;\n let styleAst;\n let styleMetadata = metadata.styles ? metadata.styles : style({});\n if (styleMetadata.type == 5 /* AnimationMetadataType.Keyframes */) {\n styleAst = this.visitKeyframes(styleMetadata, context);\n }\n else {\n let styleMetadata = metadata.styles;\n let isEmpty = false;\n if (!styleMetadata) {\n isEmpty = true;\n const newStyleData = {};\n if (timingAst.easing) {\n newStyleData['easing'] = timingAst.easing;\n }\n styleMetadata = style(newStyleData);\n }\n context.currentTime += timingAst.duration + timingAst.delay;\n const _styleAst = this.visitStyle(styleMetadata, context);\n _styleAst.isEmptyStep = isEmpty;\n styleAst = _styleAst;\n }\n context.currentAnimateTimings = null;\n return {\n type: 4 /* AnimationMetadataType.Animate */,\n timings: timingAst,\n style: styleAst,\n options: null\n };\n }\n visitStyle(metadata, context) {\n const ast = this._makeStyleAst(metadata, context);\n this._validateStyleAst(ast, context);\n return ast;\n }\n _makeStyleAst(metadata, context) {\n const styles = [];\n const metadataStyles = Array.isArray(metadata.styles) ? metadata.styles : [metadata.styles];\n for (let styleTuple of metadataStyles) {\n if (typeof styleTuple === 'string') {\n if (styleTuple === AUTO_STYLE) {\n styles.push(styleTuple);\n }\n else {\n context.errors.push(invalidStyleValue(styleTuple));\n }\n }\n else {\n styles.push(convertToMap(styleTuple));\n }\n }\n let containsDynamicStyles = false;\n let collectedEasing = null;\n styles.forEach(styleData => {\n if (styleData instanceof Map) {\n if (styleData.has('easing')) {\n collectedEasing = styleData.get('easing');\n styleData.delete('easing');\n }\n if (!containsDynamicStyles) {\n for (let value of styleData.values()) {\n if (value.toString().indexOf(SUBSTITUTION_EXPR_START) >= 0) {\n containsDynamicStyles = true;\n break;\n }\n }\n }\n }\n });\n return {\n type: 6 /* AnimationMetadataType.Style */,\n styles,\n easing: collectedEasing,\n offset: metadata.offset,\n containsDynamicStyles,\n options: null\n };\n }\n _validateStyleAst(ast, context) {\n const timings = context.currentAnimateTimings;\n let endTime = context.currentTime;\n let startTime = context.currentTime;\n if (timings && startTime > 0) {\n startTime -= timings.duration + timings.delay;\n }\n ast.styles.forEach(tuple => {\n if (typeof tuple === 'string')\n return;\n tuple.forEach((value, prop) => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!this._driver.validateStyleProperty(prop)) {\n tuple.delete(prop);\n context.unsupportedCSSPropertiesFound.add(prop);\n return;\n }\n }\n // This is guaranteed to have a defined Map at this querySelector location making it\n // safe to add the assertion here. It is set as a default empty map in prior methods.\n const collectedStyles = context.collectedStyles.get(context.currentQuerySelector);\n const collectedEntry = collectedStyles.get(prop);\n let updateCollectedStyle = true;\n if (collectedEntry) {\n if (startTime != endTime && startTime >= collectedEntry.startTime &&\n endTime <= collectedEntry.endTime) {\n context.errors.push(invalidParallelAnimation(prop, collectedEntry.startTime, collectedEntry.endTime, startTime, endTime));\n updateCollectedStyle = false;\n }\n // we always choose the smaller start time value since we\n // want to have a record of the entire animation window where\n // the style property is being animated in between\n startTime = collectedEntry.startTime;\n }\n if (updateCollectedStyle) {\n collectedStyles.set(prop, { startTime, endTime });\n }\n if (context.options) {\n validateStyleParams(value, context.options, context.errors);\n }\n });\n });\n }\n visitKeyframes(metadata, context) {\n const ast = { type: 5 /* AnimationMetadataType.Keyframes */, styles: [], options: null };\n if (!context.currentAnimateTimings) {\n context.errors.push(invalidKeyframes());\n return ast;\n }\n const MAX_KEYFRAME_OFFSET = 1;\n let totalKeyframesWithOffsets = 0;\n const offsets = [];\n let offsetsOutOfOrder = false;\n let keyframesOutOfRange = false;\n let previousOffset = 0;\n const keyframes = metadata.steps.map(styles => {\n const style = this._makeStyleAst(styles, context);\n let offsetVal = style.offset != null ? style.offset : consumeOffset(style.styles);\n let offset = 0;\n if (offsetVal != null) {\n totalKeyframesWithOffsets++;\n offset = style.offset = offsetVal;\n }\n keyframesOutOfRange = keyframesOutOfRange || offset < 0 || offset > 1;\n offsetsOutOfOrder = offsetsOutOfOrder || offset < previousOffset;\n previousOffset = offset;\n offsets.push(offset);\n return style;\n });\n if (keyframesOutOfRange) {\n context.errors.push(invalidOffset());\n }\n if (offsetsOutOfOrder) {\n context.errors.push(keyframeOffsetsOutOfOrder());\n }\n const length = metadata.steps.length;\n let generatedOffset = 0;\n if (totalKeyframesWithOffsets > 0 && totalKeyframesWithOffsets < length) {\n context.errors.push(keyframesMissingOffsets());\n }\n else if (totalKeyframesWithOffsets == 0) {\n generatedOffset = MAX_KEYFRAME_OFFSET / (length - 1);\n }\n const limit = length - 1;\n const currentTime = context.currentTime;\n const currentAnimateTimings = context.currentAnimateTimings;\n const animateDuration = currentAnimateTimings.duration;\n keyframes.forEach((kf, i) => {\n const offset = generatedOffset > 0 ? (i == limit ? 1 : (generatedOffset * i)) : offsets[i];\n const durationUpToThisFrame = offset * animateDuration;\n context.currentTime = currentTime + currentAnimateTimings.delay + durationUpToThisFrame;\n currentAnimateTimings.duration = durationUpToThisFrame;\n this._validateStyleAst(kf, context);\n kf.offset = offset;\n ast.styles.push(kf);\n });\n return ast;\n }\n visitReference(metadata, context) {\n return {\n type: 8 /* AnimationMetadataType.Reference */,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitAnimateChild(metadata, context) {\n context.depCount++;\n return {\n type: 9 /* AnimationMetadataType.AnimateChild */,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitAnimateRef(metadata, context) {\n return {\n type: 10 /* AnimationMetadataType.AnimateRef */,\n animation: this.visitReference(metadata.animation, context),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitQuery(metadata, context) {\n const parentSelector = context.currentQuerySelector;\n const options = (metadata.options || {});\n context.queryCount++;\n context.currentQuery = metadata;\n const [selector, includeSelf] = normalizeSelector(metadata.selector);\n context.currentQuerySelector =\n parentSelector.length ? (parentSelector + ' ' + selector) : selector;\n getOrSetDefaultValue(context.collectedStyles, context.currentQuerySelector, new Map());\n const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n context.currentQuery = null;\n context.currentQuerySelector = parentSelector;\n return {\n type: 11 /* AnimationMetadataType.Query */,\n selector,\n limit: options.limit || 0,\n optional: !!options.optional,\n includeSelf,\n animation,\n originalSelector: metadata.selector,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n visitStagger(metadata, context) {\n if (!context.currentQuery) {\n context.errors.push(invalidStagger());\n }\n const timings = metadata.timings === 'full' ?\n { duration: 0, delay: 0, easing: 'full' } :\n resolveTiming(metadata.timings, context.errors, true);\n return {\n type: 12 /* AnimationMetadataType.Stagger */,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n timings,\n options: null\n };\n }\n}\nfunction normalizeSelector(selector) {\n const hasAmpersand = selector.split(/\\s*,\\s*/).find(token => token == SELF_TOKEN) ? true : false;\n if (hasAmpersand) {\n selector = selector.replace(SELF_TOKEN_REGEX, '');\n }\n // Note: the :enter and :leave aren't normalized here since those\n // selectors are filled in at runtime during timeline building\n selector = selector.replace(/@\\*/g, NG_TRIGGER_SELECTOR)\n .replace(/@\\w+/g, match => NG_TRIGGER_SELECTOR + '-' + match.slice(1))\n .replace(/:animating/g, NG_ANIMATING_SELECTOR);\n return [selector, hasAmpersand];\n}\nfunction normalizeParams(obj) {\n return obj ? copyObj(obj) : null;\n}\nclass AnimationAstBuilderContext {\n constructor(errors) {\n this.errors = errors;\n this.queryCount = 0;\n this.depCount = 0;\n this.currentTransition = null;\n this.currentQuery = null;\n this.currentQuerySelector = null;\n this.currentAnimateTimings = null;\n this.currentTime = 0;\n this.collectedStyles = new Map();\n this.options = null;\n this.unsupportedCSSPropertiesFound = new Set();\n }\n}\nfunction consumeOffset(styles) {\n if (typeof styles == 'string')\n return null;\n let offset = null;\n if (Array.isArray(styles)) {\n styles.forEach(styleTuple => {\n if (styleTuple instanceof Map && styleTuple.has('offset')) {\n const obj = styleTuple;\n offset = parseFloat(obj.get('offset'));\n obj.delete('offset');\n }\n });\n }\n else if (styles instanceof Map && styles.has('offset')) {\n const obj = styles;\n offset = parseFloat(obj.get('offset'));\n obj.delete('offset');\n }\n return offset;\n}\nfunction constructTimingAst(value, errors) {\n if (value.hasOwnProperty('duration')) {\n return value;\n }\n if (typeof value == 'number') {\n const duration = resolveTiming(value, errors).duration;\n return makeTimingAst(duration, 0, '');\n }\n const strValue = value;\n const isDynamic = strValue.split(/\\s+/).some(v => v.charAt(0) == '{' && v.charAt(1) == '{');\n if (isDynamic) {\n const ast = makeTimingAst(0, 0, '');\n ast.dynamic = true;\n ast.strValue = strValue;\n return ast;\n }\n const timings = resolveTiming(strValue, errors);\n return makeTimingAst(timings.duration, timings.delay, timings.easing);\n}\nfunction normalizeAnimationOptions(options) {\n if (options) {\n options = copyObj(options);\n if (options['params']) {\n options['params'] = normalizeParams(options['params']);\n }\n }\n else {\n options = {};\n }\n return options;\n}\nfunction makeTimingAst(duration, delay, easing) {\n return { duration, delay, easing };\n}\n\nfunction createTimelineInstruction(element, keyframes, preStyleProps, postStyleProps, duration, delay, easing = null, subTimeline = false) {\n return {\n type: 1 /* AnimationTransitionInstructionType.TimelineAnimation */,\n element,\n keyframes,\n preStyleProps,\n postStyleProps,\n duration,\n delay,\n totalTime: duration + delay,\n easing,\n subTimeline\n };\n}\n\nclass ElementInstructionMap {\n constructor() {\n this._map = new Map();\n }\n get(element) {\n return this._map.get(element) || [];\n }\n append(element, instructions) {\n let existingInstructions = this._map.get(element);\n if (!existingInstructions) {\n this._map.set(element, existingInstructions = []);\n }\n existingInstructions.push(...instructions);\n }\n has(element) {\n return this._map.has(element);\n }\n clear() {\n this._map.clear();\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 ONE_FRAME_IN_MILLISECONDS = 1;\nconst ENTER_TOKEN = ':enter';\nconst ENTER_TOKEN_REGEX = new RegExp(ENTER_TOKEN, 'g');\nconst LEAVE_TOKEN = ':leave';\nconst LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g');\n/*\n * The code within this file aims to generate web-animations-compatible keyframes from Angular's\n * animation DSL code.\n *\n * The code below will be converted from:\n *\n * ```\n * sequence([\n * style({ opacity: 0 }),\n * animate(1000, style({ opacity: 0 }))\n * ])\n * ```\n *\n * To:\n * ```\n * keyframes = [{ opacity: 0, offset: 0 }, { opacity: 1, offset: 1 }]\n * duration = 1000\n * delay = 0\n * easing = ''\n * ```\n *\n * For this operation to cover the combination of animation verbs (style, animate, group, etc...) a\n * combination of AST traversal and merge-sort-like algorithms are used.\n *\n * [AST Traversal]\n * Each of the animation verbs, when executed, will return an string-map object representing what\n * type of action it is (style, animate, group, etc...) and the data associated with it. This means\n * that when functional composition mix of these functions is evaluated (like in the example above)\n * then it will end up producing a tree of objects representing the animation itself.\n *\n * When this animation object tree is processed by the visitor code below it will visit each of the\n * verb statements within the visitor. And during each visit it will build the context of the\n * animation keyframes by interacting with the `TimelineBuilder`.\n *\n * [TimelineBuilder]\n * This class is responsible for tracking the styles and building a series of keyframe objects for a\n * timeline between a start and end time. The builder starts off with an initial timeline and each\n * time the AST comes across a `group()`, `keyframes()` or a combination of the two within a\n * `sequence()` then it will generate a sub timeline for each step as well as a new one after\n * they are complete.\n *\n * As the AST is traversed, the timing state on each of the timelines will be incremented. If a sub\n * timeline was created (based on one of the cases above) then the parent timeline will attempt to\n * merge the styles used within the sub timelines into itself (only with group() this will happen).\n * This happens with a merge operation (much like how the merge works in mergeSort) and it will only\n * copy the most recently used styles from the sub timelines into the parent timeline. This ensures\n * that if the styles are used later on in another phase of the animation then they will be the most\n * up-to-date values.\n *\n * [How Missing Styles Are Updated]\n * Each timeline has a `backFill` property which is responsible for filling in new styles into\n * already processed keyframes if a new style shows up later within the animation sequence.\n *\n * ```\n * sequence([\n * style({ width: 0 }),\n * animate(1000, style({ width: 100 })),\n * animate(1000, style({ width: 200 })),\n * animate(1000, style({ width: 300 }))\n * animate(1000, style({ width: 400, height: 400 })) // notice how `height` doesn't exist anywhere\n * else\n * ])\n * ```\n *\n * What is happening here is that the `height` value is added later in the sequence, but is missing\n * from all previous animation steps. Therefore when a keyframe is created it would also be missing\n * from all previous keyframes up until where it is first used. For the timeline keyframe generation\n * to properly fill in the style it will place the previous value (the value from the parent\n * timeline) or a default value of `*` into the backFill map. The `copyStyles` method in util.ts\n * handles propagating that backfill map to the styles object.\n *\n * When a sub-timeline is created it will have its own backFill property. This is done so that\n * styles present within the sub-timeline do not accidentally seep into the previous/future timeline\n * keyframes\n *\n * [Validation]\n * The code in this file is not responsible for validation. That functionality happens with within\n * the `AnimationValidatorVisitor` code.\n */\nfunction buildAnimationTimelines(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles = new Map(), finalStyles = new Map(), options, subInstructions, errors = []) {\n return new AnimationTimelineBuilderVisitor().buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors);\n}\nclass AnimationTimelineBuilderVisitor {\n buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors = []) {\n subInstructions = subInstructions || new ElementInstructionMap();\n const context = new AnimationTimelineContext(driver, rootElement, subInstructions, enterClassName, leaveClassName, errors, []);\n context.options = options;\n const delay = options.delay ? resolveTimingValue(options.delay) : 0;\n context.currentTimeline.delayNextStep(delay);\n context.currentTimeline.setStyles([startingStyles], null, context.errors, options);\n visitDslNode(this, ast, context);\n // this checks to see if an actual animation happened\n const timelines = context.timelines.filter(timeline => timeline.containsAnimation());\n // note: we just want to apply the final styles for the rootElement, so we do not\n // just apply the styles to the last timeline but the last timeline which\n // element is the root one (basically `*`-styles are replaced with the actual\n // state style values only for the root element)\n if (timelines.length && finalStyles.size) {\n let lastRootTimeline;\n for (let i = timelines.length - 1; i >= 0; i--) {\n const timeline = timelines[i];\n if (timeline.element === rootElement) {\n lastRootTimeline = timeline;\n break;\n }\n }\n if (lastRootTimeline && !lastRootTimeline.allowOnlyTimelineStyles()) {\n lastRootTimeline.setStyles([finalStyles], null, context.errors, options);\n }\n }\n return timelines.length ?\n timelines.map(timeline => timeline.buildKeyframes()) :\n [createTimelineInstruction(rootElement, [], [], [], 0, delay, '', false)];\n }\n visitTrigger(ast, context) {\n // these values are not visited in this AST\n }\n visitState(ast, context) {\n // these values are not visited in this AST\n }\n visitTransition(ast, context) {\n // these values are not visited in this AST\n }\n visitAnimateChild(ast, context) {\n const elementInstructions = context.subInstructions.get(context.element);\n if (elementInstructions) {\n const innerContext = context.createSubContext(ast.options);\n const startTime = context.currentTimeline.currentTime;\n const endTime = this._visitSubInstructions(elementInstructions, innerContext, innerContext.options);\n if (startTime != endTime) {\n // we do this on the upper context because we created a sub context for\n // the sub child animations\n context.transformIntoNewTimeline(endTime);\n }\n }\n context.previousNode = ast;\n }\n visitAnimateRef(ast, context) {\n const innerContext = context.createSubContext(ast.options);\n innerContext.transformIntoNewTimeline();\n this.visitReference(ast.animation, innerContext);\n context.transformIntoNewTimeline(innerContext.currentTimeline.currentTime);\n context.previousNode = ast;\n }\n _visitSubInstructions(instructions, context, options) {\n const startTime = context.currentTimeline.currentTime;\n let furthestTime = startTime;\n // this is a special-case for when a user wants to skip a sub\n // animation from being fired entirely.\n const duration = options.duration != null ? resolveTimingValue(options.duration) : null;\n const delay = options.delay != null ? resolveTimingValue(options.delay) : null;\n if (duration !== 0) {\n instructions.forEach(instruction => {\n const instructionTimings = context.appendInstructionToTimeline(instruction, duration, delay);\n furthestTime =\n Math.max(furthestTime, instructionTimings.duration + instructionTimings.delay);\n });\n }\n return furthestTime;\n }\n visitReference(ast, context) {\n context.updateOptions(ast.options, true);\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n }\n visitSequence(ast, context) {\n const subContextCount = context.subContextCount;\n let ctx = context;\n const options = ast.options;\n if (options && (options.params || options.delay)) {\n ctx = context.createSubContext(options);\n ctx.transformIntoNewTimeline();\n if (options.delay != null) {\n if (ctx.previousNode.type == 6 /* AnimationMetadataType.Style */) {\n ctx.currentTimeline.snapshotCurrentStyles();\n ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n const delay = resolveTimingValue(options.delay);\n ctx.delayNextStep(delay);\n }\n }\n if (ast.steps.length) {\n ast.steps.forEach(s => visitDslNode(this, s, ctx));\n // this is here just in case the inner steps only contain or end with a style() call\n ctx.currentTimeline.applyStylesToKeyframe();\n // this means that some animation function within the sequence\n // ended up creating a sub timeline (which means the current\n // timeline cannot overlap with the contents of the sequence)\n if (ctx.subContextCount > subContextCount) {\n ctx.transformIntoNewTimeline();\n }\n }\n context.previousNode = ast;\n }\n visitGroup(ast, context) {\n const innerTimelines = [];\n let furthestTime = context.currentTimeline.currentTime;\n const delay = ast.options && ast.options.delay ? resolveTimingValue(ast.options.delay) : 0;\n ast.steps.forEach(s => {\n const innerContext = context.createSubContext(ast.options);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n visitDslNode(this, s, innerContext);\n furthestTime = Math.max(furthestTime, innerContext.currentTimeline.currentTime);\n innerTimelines.push(innerContext.currentTimeline);\n });\n // this operation is run after the AST loop because otherwise\n // if the parent timeline's collected styles were updated then\n // it would pass in invalid data into the new-to-be forked items\n innerTimelines.forEach(timeline => context.currentTimeline.mergeTimelineCollectedStyles(timeline));\n context.transformIntoNewTimeline(furthestTime);\n context.previousNode = ast;\n }\n _visitTiming(ast, context) {\n if (ast.dynamic) {\n const strValue = ast.strValue;\n const timingValue = context.params ? interpolateParams(strValue, context.params, context.errors) : strValue;\n return resolveTiming(timingValue, context.errors);\n }\n else {\n return { duration: ast.duration, delay: ast.delay, easing: ast.easing };\n }\n }\n visitAnimate(ast, context) {\n const timings = context.currentAnimateTimings = this._visitTiming(ast.timings, context);\n const timeline = context.currentTimeline;\n if (timings.delay) {\n context.incrementTime(timings.delay);\n timeline.snapshotCurrentStyles();\n }\n const style = ast.style;\n if (style.type == 5 /* AnimationMetadataType.Keyframes */) {\n this.visitKeyframes(style, context);\n }\n else {\n context.incrementTime(timings.duration);\n this.visitStyle(style, context);\n timeline.applyStylesToKeyframe();\n }\n context.currentAnimateTimings = null;\n context.previousNode = ast;\n }\n visitStyle(ast, context) {\n const timeline = context.currentTimeline;\n const timings = context.currentAnimateTimings;\n // this is a special case for when a style() call\n // directly follows an animate() call (but not inside of an animate() call)\n if (!timings && timeline.hasCurrentStyleProperties()) {\n timeline.forwardFrame();\n }\n const easing = (timings && timings.easing) || ast.easing;\n if (ast.isEmptyStep) {\n timeline.applyEmptyStep(easing);\n }\n else {\n timeline.setStyles(ast.styles, easing, context.errors, context.options);\n }\n context.previousNode = ast;\n }\n visitKeyframes(ast, context) {\n const currentAnimateTimings = context.currentAnimateTimings;\n const startTime = (context.currentTimeline).duration;\n const duration = currentAnimateTimings.duration;\n const innerContext = context.createSubContext();\n const innerTimeline = innerContext.currentTimeline;\n innerTimeline.easing = currentAnimateTimings.easing;\n ast.styles.forEach(step => {\n const offset = step.offset || 0;\n innerTimeline.forwardTime(offset * duration);\n innerTimeline.setStyles(step.styles, step.easing, context.errors, context.options);\n innerTimeline.applyStylesToKeyframe();\n });\n // this will ensure that the parent timeline gets all the styles from\n // the child even if the new timeline below is not used\n context.currentTimeline.mergeTimelineCollectedStyles(innerTimeline);\n // we do this because the window between this timeline and the sub timeline\n // should ensure that the styles within are exactly the same as they were before\n context.transformIntoNewTimeline(startTime + duration);\n context.previousNode = ast;\n }\n visitQuery(ast, context) {\n // in the event that the first step before this is a style step we need\n // to ensure the styles are applied before the children are animated\n const startTime = context.currentTimeline.currentTime;\n const options = (ast.options || {});\n const delay = options.delay ? resolveTimingValue(options.delay) : 0;\n if (delay &&\n (context.previousNode.type === 6 /* AnimationMetadataType.Style */ ||\n (startTime == 0 && context.currentTimeline.hasCurrentStyleProperties()))) {\n context.currentTimeline.snapshotCurrentStyles();\n context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n let furthestTime = startTime;\n const elms = context.invokeQuery(ast.selector, ast.originalSelector, ast.limit, ast.includeSelf, options.optional ? true : false, context.errors);\n context.currentQueryTotal = elms.length;\n let sameElementTimeline = null;\n elms.forEach((element, i) => {\n context.currentQueryIndex = i;\n const innerContext = context.createSubContext(ast.options, element);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n if (element === context.element) {\n sameElementTimeline = innerContext.currentTimeline;\n }\n visitDslNode(this, ast.animation, innerContext);\n // this is here just incase the inner steps only contain or end\n // with a style() call (which is here to signal that this is a preparatory\n // call to style an element before it is animated again)\n innerContext.currentTimeline.applyStylesToKeyframe();\n const endTime = innerContext.currentTimeline.currentTime;\n furthestTime = Math.max(furthestTime, endTime);\n });\n context.currentQueryIndex = 0;\n context.currentQueryTotal = 0;\n context.transformIntoNewTimeline(furthestTime);\n if (sameElementTimeline) {\n context.currentTimeline.mergeTimelineCollectedStyles(sameElementTimeline);\n context.currentTimeline.snapshotCurrentStyles();\n }\n context.previousNode = ast;\n }\n visitStagger(ast, context) {\n const parentContext = context.parentContext;\n const tl = context.currentTimeline;\n const timings = ast.timings;\n const duration = Math.abs(timings.duration);\n const maxTime = duration * (context.currentQueryTotal - 1);\n let delay = duration * context.currentQueryIndex;\n let staggerTransformer = timings.duration < 0 ? 'reverse' : timings.easing;\n switch (staggerTransformer) {\n case 'reverse':\n delay = maxTime - delay;\n break;\n case 'full':\n delay = parentContext.currentStaggerTime;\n break;\n }\n const timeline = context.currentTimeline;\n if (delay) {\n timeline.delayNextStep(delay);\n }\n const startingTime = timeline.currentTime;\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n // time = duration + delay\n // the reason why this computation is so complex is because\n // the inner timeline may either have a delay value or a stretched\n // keyframe depending on if a subtimeline is not used or is used.\n parentContext.currentStaggerTime =\n (tl.currentTime - startingTime) + (tl.startTime - parentContext.currentTimeline.startTime);\n }\n}\nconst DEFAULT_NOOP_PREVIOUS_NODE = {};\nclass AnimationTimelineContext {\n constructor(_driver, element, subInstructions, _enterClassName, _leaveClassName, errors, timelines, initialTimeline) {\n this._driver = _driver;\n this.element = element;\n this.subInstructions = subInstructions;\n this._enterClassName = _enterClassName;\n this._leaveClassName = _leaveClassName;\n this.errors = errors;\n this.timelines = timelines;\n this.parentContext = null;\n this.currentAnimateTimings = null;\n this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n this.subContextCount = 0;\n this.options = {};\n this.currentQueryIndex = 0;\n this.currentQueryTotal = 0;\n this.currentStaggerTime = 0;\n this.currentTimeline = initialTimeline || new TimelineBuilder(this._driver, element, 0);\n timelines.push(this.currentTimeline);\n }\n get params() {\n return this.options.params;\n }\n updateOptions(options, skipIfExists) {\n if (!options)\n return;\n const newOptions = options;\n let optionsToUpdate = this.options;\n // NOTE: this will get patched up when other animation methods support duration overrides\n if (newOptions.duration != null) {\n optionsToUpdate.duration = resolveTimingValue(newOptions.duration);\n }\n if (newOptions.delay != null) {\n optionsToUpdate.delay = resolveTimingValue(newOptions.delay);\n }\n const newParams = newOptions.params;\n if (newParams) {\n let paramsToUpdate = optionsToUpdate.params;\n if (!paramsToUpdate) {\n paramsToUpdate = this.options.params = {};\n }\n Object.keys(newParams).forEach(name => {\n if (!skipIfExists || !paramsToUpdate.hasOwnProperty(name)) {\n paramsToUpdate[name] = interpolateParams(newParams[name], paramsToUpdate, this.errors);\n }\n });\n }\n }\n _copyOptions() {\n const options = {};\n if (this.options) {\n const oldParams = this.options.params;\n if (oldParams) {\n const params = options['params'] = {};\n Object.keys(oldParams).forEach(name => {\n params[name] = oldParams[name];\n });\n }\n }\n return options;\n }\n createSubContext(options = null, element, newTime) {\n const target = element || this.element;\n const context = new AnimationTimelineContext(this._driver, target, this.subInstructions, this._enterClassName, this._leaveClassName, this.errors, this.timelines, this.currentTimeline.fork(target, newTime || 0));\n context.previousNode = this.previousNode;\n context.currentAnimateTimings = this.currentAnimateTimings;\n context.options = this._copyOptions();\n context.updateOptions(options);\n context.currentQueryIndex = this.currentQueryIndex;\n context.currentQueryTotal = this.currentQueryTotal;\n context.parentContext = this;\n this.subContextCount++;\n return context;\n }\n transformIntoNewTimeline(newTime) {\n this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n this.currentTimeline = this.currentTimeline.fork(this.element, newTime);\n this.timelines.push(this.currentTimeline);\n return this.currentTimeline;\n }\n appendInstructionToTimeline(instruction, duration, delay) {\n const updatedTimings = {\n duration: duration != null ? duration : instruction.duration,\n delay: this.currentTimeline.currentTime + (delay != null ? delay : 0) + instruction.delay,\n easing: ''\n };\n const builder = new SubTimelineBuilder(this._driver, instruction.element, instruction.keyframes, instruction.preStyleProps, instruction.postStyleProps, updatedTimings, instruction.stretchStartingKeyframe);\n this.timelines.push(builder);\n return updatedTimings;\n }\n incrementTime(time) {\n this.currentTimeline.forwardTime(this.currentTimeline.duration + time);\n }\n delayNextStep(delay) {\n // negative delays are not yet supported\n if (delay > 0) {\n this.currentTimeline.delayNextStep(delay);\n }\n }\n invokeQuery(selector, originalSelector, limit, includeSelf, optional, errors) {\n let results = [];\n if (includeSelf) {\n results.push(this.element);\n }\n if (selector.length > 0) { // only if :self is used then the selector can be empty\n selector = selector.replace(ENTER_TOKEN_REGEX, '.' + this._enterClassName);\n selector = selector.replace(LEAVE_TOKEN_REGEX, '.' + this._leaveClassName);\n const multi = limit != 1;\n let elements = this._driver.query(this.element, selector, multi);\n if (limit !== 0) {\n elements = limit < 0 ? elements.slice(elements.length + limit, elements.length) :\n elements.slice(0, limit);\n }\n results.push(...elements);\n }\n if (!optional && results.length == 0) {\n errors.push(invalidQuery(originalSelector));\n }\n return results;\n }\n}\nclass TimelineBuilder {\n constructor(_driver, element, startTime, _elementTimelineStylesLookup) {\n this._driver = _driver;\n this.element = element;\n this.startTime = startTime;\n this._elementTimelineStylesLookup = _elementTimelineStylesLookup;\n this.duration = 0;\n this._previousKeyframe = new Map();\n this._currentKeyframe = new Map();\n this._keyframes = new Map();\n this._styleSummary = new Map();\n this._localTimelineStyles = new Map();\n this._pendingStyles = new Map();\n this._backFill = new Map();\n this._currentEmptyStepKeyframe = null;\n if (!this._elementTimelineStylesLookup) {\n this._elementTimelineStylesLookup = new Map();\n }\n this._globalTimelineStyles = this._elementTimelineStylesLookup.get(element);\n if (!this._globalTimelineStyles) {\n this._globalTimelineStyles = this._localTimelineStyles;\n this._elementTimelineStylesLookup.set(element, this._localTimelineStyles);\n }\n this._loadKeyframe();\n }\n containsAnimation() {\n switch (this._keyframes.size) {\n case 0:\n return false;\n case 1:\n return this.hasCurrentStyleProperties();\n default:\n return true;\n }\n }\n hasCurrentStyleProperties() {\n return this._currentKeyframe.size > 0;\n }\n get currentTime() {\n return this.startTime + this.duration;\n }\n delayNextStep(delay) {\n // in the event that a style() step is placed right before a stagger()\n // and that style() step is the very first style() value in the animation\n // then we need to make a copy of the keyframe [0, copy, 1] so that the delay\n // properly applies the style() values to work with the stagger...\n const hasPreStyleStep = this._keyframes.size === 1 && this._pendingStyles.size;\n if (this.duration || hasPreStyleStep) {\n this.forwardTime(this.currentTime + delay);\n if (hasPreStyleStep) {\n this.snapshotCurrentStyles();\n }\n }\n else {\n this.startTime += delay;\n }\n }\n fork(element, currentTime) {\n this.applyStylesToKeyframe();\n return new TimelineBuilder(this._driver, element, currentTime || this.currentTime, this._elementTimelineStylesLookup);\n }\n _loadKeyframe() {\n if (this._currentKeyframe) {\n this._previousKeyframe = this._currentKeyframe;\n }\n this._currentKeyframe = this._keyframes.get(this.duration);\n if (!this._currentKeyframe) {\n this._currentKeyframe = new Map();\n this._keyframes.set(this.duration, this._currentKeyframe);\n }\n }\n forwardFrame() {\n this.duration += ONE_FRAME_IN_MILLISECONDS;\n this._loadKeyframe();\n }\n forwardTime(time) {\n this.applyStylesToKeyframe();\n this.duration = time;\n this._loadKeyframe();\n }\n _updateStyle(prop, value) {\n this._localTimelineStyles.set(prop, value);\n this._globalTimelineStyles.set(prop, value);\n this._styleSummary.set(prop, { time: this.currentTime, value });\n }\n allowOnlyTimelineStyles() {\n return this._currentEmptyStepKeyframe !== this._currentKeyframe;\n }\n applyEmptyStep(easing) {\n if (easing) {\n this._previousKeyframe.set('easing', easing);\n }\n // special case for animate(duration):\n // all missing styles are filled with a `*` value then\n // if any destination styles are filled in later on the same\n // keyframe then they will override the overridden styles\n // We use `_globalTimelineStyles` here because there may be\n // styles in previous keyframes that are not present in this timeline\n for (let [prop, value] of this._globalTimelineStyles) {\n this._backFill.set(prop, value || AUTO_STYLE);\n this._currentKeyframe.set(prop, AUTO_STYLE);\n }\n this._currentEmptyStepKeyframe = this._currentKeyframe;\n }\n setStyles(input, easing, errors, options) {\n if (easing) {\n this._previousKeyframe.set('easing', easing);\n }\n const params = (options && options.params) || {};\n const styles = flattenStyles(input, this._globalTimelineStyles);\n for (let [prop, value] of styles) {\n const val = interpolateParams(value, params, errors);\n this._pendingStyles.set(prop, val);\n if (!this._localTimelineStyles.has(prop)) {\n this._backFill.set(prop, this._globalTimelineStyles.get(prop) ?? AUTO_STYLE);\n }\n this._updateStyle(prop, val);\n }\n }\n applyStylesToKeyframe() {\n if (this._pendingStyles.size == 0)\n return;\n this._pendingStyles.forEach((val, prop) => {\n this._currentKeyframe.set(prop, val);\n });\n this._pendingStyles.clear();\n this._localTimelineStyles.forEach((val, prop) => {\n if (!this._currentKeyframe.has(prop)) {\n this._currentKeyframe.set(prop, val);\n }\n });\n }\n snapshotCurrentStyles() {\n for (let [prop, val] of this._localTimelineStyles) {\n this._pendingStyles.set(prop, val);\n this._updateStyle(prop, val);\n }\n }\n getFinalKeyframe() {\n return this._keyframes.get(this.duration);\n }\n get properties() {\n const properties = [];\n for (let prop in this._currentKeyframe) {\n properties.push(prop);\n }\n return properties;\n }\n mergeTimelineCollectedStyles(timeline) {\n timeline._styleSummary.forEach((details1, prop) => {\n const details0 = this._styleSummary.get(prop);\n if (!details0 || details1.time > details0.time) {\n this._updateStyle(prop, details1.value);\n }\n });\n }\n buildKeyframes() {\n this.applyStylesToKeyframe();\n const preStyleProps = new Set();\n const postStyleProps = new Set();\n const isEmpty = this._keyframes.size === 1 && this.duration === 0;\n let finalKeyframes = [];\n this._keyframes.forEach((keyframe, time) => {\n const finalKeyframe = copyStyles(keyframe, new Map(), this._backFill);\n finalKeyframe.forEach((value, prop) => {\n if (value === ɵPRE_STYLE) {\n preStyleProps.add(prop);\n }\n else if (value === AUTO_STYLE) {\n postStyleProps.add(prop);\n }\n });\n if (!isEmpty) {\n finalKeyframe.set('offset', time / this.duration);\n }\n finalKeyframes.push(finalKeyframe);\n });\n const preProps = preStyleProps.size ? iteratorToArray(preStyleProps.values()) : [];\n const postProps = postStyleProps.size ? iteratorToArray(postStyleProps.values()) : [];\n // special case for a 0-second animation (which is designed just to place styles onscreen)\n if (isEmpty) {\n const kf0 = finalKeyframes[0];\n const kf1 = new Map(kf0);\n kf0.set('offset', 0);\n kf1.set('offset', 1);\n finalKeyframes = [kf0, kf1];\n }\n return createTimelineInstruction(this.element, finalKeyframes, preProps, postProps, this.duration, this.startTime, this.easing, false);\n }\n}\nclass SubTimelineBuilder extends TimelineBuilder {\n constructor(driver, element, keyframes, preStyleProps, postStyleProps, timings, _stretchStartingKeyframe = false) {\n super(driver, element, timings.delay);\n this.keyframes = keyframes;\n this.preStyleProps = preStyleProps;\n this.postStyleProps = postStyleProps;\n this._stretchStartingKeyframe = _stretchStartingKeyframe;\n this.timings = { duration: timings.duration, delay: timings.delay, easing: timings.easing };\n }\n containsAnimation() {\n return this.keyframes.length > 1;\n }\n buildKeyframes() {\n let keyframes = this.keyframes;\n let { delay, duration, easing } = this.timings;\n if (this._stretchStartingKeyframe && delay) {\n const newKeyframes = [];\n const totalTime = duration + delay;\n const startingGap = delay / totalTime;\n // the original starting keyframe now starts once the delay is done\n const newFirstKeyframe = copyStyles(keyframes[0]);\n newFirstKeyframe.set('offset', 0);\n newKeyframes.push(newFirstKeyframe);\n const oldFirstKeyframe = copyStyles(keyframes[0]);\n oldFirstKeyframe.set('offset', roundOffset(startingGap));\n newKeyframes.push(oldFirstKeyframe);\n /*\n When the keyframe is stretched then it means that the delay before the animation\n starts is gone. Instead the first keyframe is placed at the start of the animation\n and it is then copied to where it starts when the original delay is over. This basically\n means nothing animates during that delay, but the styles are still rendered. For this\n to work the original offset values that exist in the original keyframes must be \"warped\"\n so that they can take the new keyframe + delay into account.\n \n delay=1000, duration=1000, keyframes = 0 .5 1\n \n turns into\n \n delay=0, duration=2000, keyframes = 0 .33 .66 1\n */\n // offsets between 1 ... n -1 are all warped by the keyframe stretch\n const limit = keyframes.length - 1;\n for (let i = 1; i <= limit; i++) {\n let kf = copyStyles(keyframes[i]);\n const oldOffset = kf.get('offset');\n const timeAtKeyframe = delay + oldOffset * duration;\n kf.set('offset', roundOffset(timeAtKeyframe / totalTime));\n newKeyframes.push(kf);\n }\n // the new starting keyframe should be added at the start\n duration = totalTime;\n delay = 0;\n easing = '';\n keyframes = newKeyframes;\n }\n return createTimelineInstruction(this.element, keyframes, this.preStyleProps, this.postStyleProps, duration, delay, easing, true);\n }\n}\nfunction roundOffset(offset, decimalPoints = 3) {\n const mult = Math.pow(10, decimalPoints - 1);\n return Math.round(offset * mult) / mult;\n}\nfunction flattenStyles(input, allStyles) {\n const styles = new Map();\n let allProperties;\n input.forEach(token => {\n if (token === '*') {\n allProperties = allProperties || allStyles.keys();\n for (let prop of allProperties) {\n styles.set(prop, AUTO_STYLE);\n }\n }\n else {\n copyStyles(token, styles);\n }\n });\n return styles;\n}\n\nclass Animation {\n constructor(_driver, input) {\n this._driver = _driver;\n const errors = [];\n const warnings = [];\n const ast = buildAnimationAst(_driver, input, errors, warnings);\n if (errors.length) {\n throw validationFailed(errors);\n }\n if (warnings.length) {\n warnValidation(warnings);\n }\n this._animationAst = ast;\n }\n buildTimelines(element, startingStyles, destinationStyles, options, subInstructions) {\n const start = Array.isArray(startingStyles) ? normalizeStyles(startingStyles) :\n startingStyles;\n const dest = Array.isArray(destinationStyles) ? normalizeStyles(destinationStyles) :\n destinationStyles;\n const errors = [];\n subInstructions = subInstructions || new ElementInstructionMap();\n const result = buildAnimationTimelines(this._driver, element, this._animationAst, ENTER_CLASSNAME, LEAVE_CLASSNAME, start, dest, options, subInstructions, errors);\n if (errors.length) {\n throw buildingFailed(errors);\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 * @publicApi\n */\nclass AnimationStyleNormalizer {\n}\n/**\n * @publicApi\n */\nclass NoopAnimationStyleNormalizer {\n normalizePropertyName(propertyName, errors) {\n return propertyName;\n }\n normalizeStyleValue(userProvidedProperty, normalizedProperty, value, errors) {\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 DIMENSIONAL_PROP_SET = new Set([\n 'width',\n 'height',\n 'minWidth',\n 'minHeight',\n 'maxWidth',\n 'maxHeight',\n 'left',\n 'top',\n 'bottom',\n 'right',\n 'fontSize',\n 'outlineWidth',\n 'outlineOffset',\n 'paddingTop',\n 'paddingLeft',\n 'paddingBottom',\n 'paddingRight',\n 'marginTop',\n 'marginLeft',\n 'marginBottom',\n 'marginRight',\n 'borderRadius',\n 'borderWidth',\n 'borderTopWidth',\n 'borderLeftWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'textIndent',\n 'perspective'\n]);\nclass WebAnimationsStyleNormalizer extends AnimationStyleNormalizer {\n normalizePropertyName(propertyName, errors) {\n return dashCaseToCamelCase(propertyName);\n }\n normalizeStyleValue(userProvidedProperty, normalizedProperty, value, errors) {\n let unit = '';\n const strVal = value.toString().trim();\n if (DIMENSIONAL_PROP_SET.has(normalizedProperty) && value !== 0 && value !== '0') {\n if (typeof value === 'number') {\n unit = 'px';\n }\n else {\n const valAndSuffixMatch = value.match(/^[+-]?[\\d\\.]+([a-z]*)$/);\n if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {\n errors.push(invalidCssUnitValue(userProvidedProperty, value));\n }\n }\n }\n return strVal + unit;\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 createTransitionInstruction(element, triggerName, fromState, toState, isRemovalTransition, fromStyles, toStyles, timelines, queriedElements, preStyleProps, postStyleProps, totalTime, errors) {\n return {\n type: 0 /* AnimationTransitionInstructionType.TransitionAnimation */,\n element,\n triggerName,\n isRemovalTransition,\n fromState,\n fromStyles,\n toState,\n toStyles,\n timelines,\n queriedElements,\n preStyleProps,\n postStyleProps,\n totalTime,\n errors\n };\n}\n\nconst EMPTY_OBJECT = {};\nclass AnimationTransitionFactory {\n constructor(_triggerName, ast, _stateStyles) {\n this._triggerName = _triggerName;\n this.ast = ast;\n this._stateStyles = _stateStyles;\n }\n match(currentState, nextState, element, params) {\n return oneOrMoreTransitionsMatch(this.ast.matchers, currentState, nextState, element, params);\n }\n buildStyles(stateName, params, errors) {\n let styler = this._stateStyles.get('*');\n if (stateName !== undefined) {\n styler = this._stateStyles.get(stateName?.toString()) || styler;\n }\n return styler ? styler.buildStyles(params, errors) : new Map();\n }\n build(driver, element, currentState, nextState, enterClassName, leaveClassName, currentOptions, nextOptions, subInstructions, skipAstBuild) {\n const errors = [];\n const transitionAnimationParams = this.ast.options && this.ast.options.params || EMPTY_OBJECT;\n const currentAnimationParams = currentOptions && currentOptions.params || EMPTY_OBJECT;\n const currentStateStyles = this.buildStyles(currentState, currentAnimationParams, errors);\n const nextAnimationParams = nextOptions && nextOptions.params || EMPTY_OBJECT;\n const nextStateStyles = this.buildStyles(nextState, nextAnimationParams, errors);\n const queriedElements = new Set();\n const preStyleMap = new Map();\n const postStyleMap = new Map();\n const isRemoval = nextState === 'void';\n const animationOptions = {\n params: applyParamDefaults(nextAnimationParams, transitionAnimationParams),\n delay: this.ast.options?.delay,\n };\n const timelines = skipAstBuild ?\n [] :\n buildAnimationTimelines(driver, element, this.ast.animation, enterClassName, leaveClassName, currentStateStyles, nextStateStyles, animationOptions, subInstructions, errors);\n let totalTime = 0;\n timelines.forEach(tl => {\n totalTime = Math.max(tl.duration + tl.delay, totalTime);\n });\n if (errors.length) {\n return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, [], [], preStyleMap, postStyleMap, totalTime, errors);\n }\n timelines.forEach(tl => {\n const elm = tl.element;\n const preProps = getOrSetDefaultValue(preStyleMap, elm, new Set());\n tl.preStyleProps.forEach(prop => preProps.add(prop));\n const postProps = getOrSetDefaultValue(postStyleMap, elm, new Set());\n tl.postStyleProps.forEach(prop => postProps.add(prop));\n if (elm !== element) {\n queriedElements.add(elm);\n }\n });\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n checkNonAnimatableInTimelines(timelines, this._triggerName, driver);\n }\n const queriedElementsList = iteratorToArray(queriedElements.values());\n return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, timelines, queriedElementsList, preStyleMap, postStyleMap, totalTime);\n }\n}\n/**\n * Checks inside a set of timelines if they try to animate a css property which is not considered\n * animatable, in that case it prints a warning on the console.\n * Besides that the function doesn't have any other effect.\n *\n * Note: this check is done here after the timelines are built instead of doing on a lower level so\n * that we can make sure that the warning appears only once per instruction (we can aggregate here\n * all the issues instead of finding them separately).\n *\n * @param timelines The built timelines for the current instruction.\n * @param triggerName The name of the trigger for the current instruction.\n * @param driver Animation driver used to perform the check.\n *\n */\nfunction checkNonAnimatableInTimelines(timelines, triggerName, driver) {\n if (!driver.validateAnimatableStyleProperty) {\n return;\n }\n const invalidNonAnimatableProps = new Set();\n timelines.forEach(({ keyframes }) => {\n const nonAnimatablePropsInitialValues = new Map();\n keyframes.forEach(keyframe => {\n for (const [prop, value] of keyframe.entries()) {\n if (!driver.validateAnimatableStyleProperty(prop)) {\n if (nonAnimatablePropsInitialValues.has(prop) && !invalidNonAnimatableProps.has(prop)) {\n const propInitialValue = nonAnimatablePropsInitialValues.get(prop);\n if (propInitialValue !== value) {\n invalidNonAnimatableProps.add(prop);\n }\n }\n else {\n nonAnimatablePropsInitialValues.set(prop, value);\n }\n }\n }\n });\n });\n if (invalidNonAnimatableProps.size > 0) {\n console.warn(`Warning: The animation trigger \"${triggerName}\" is attempting to animate the following` +\n ' not animatable properties: ' + Array.from(invalidNonAnimatableProps).join(', ') + '\\n' +\n '(to check the list of all animatable properties visit https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties)');\n }\n}\nfunction oneOrMoreTransitionsMatch(matchFns, currentState, nextState, element, params) {\n return matchFns.some(fn => fn(currentState, nextState, element, params));\n}\nfunction applyParamDefaults(userParams, defaults) {\n const result = copyObj(defaults);\n for (const key in userParams) {\n if (userParams.hasOwnProperty(key) && userParams[key] != null) {\n result[key] = userParams[key];\n }\n }\n return result;\n}\nclass AnimationStateStyles {\n constructor(styles, defaultParams, normalizer) {\n this.styles = styles;\n this.defaultParams = defaultParams;\n this.normalizer = normalizer;\n }\n buildStyles(params, errors) {\n const finalStyles = new Map();\n const combinedParams = copyObj(this.defaultParams);\n Object.keys(params).forEach(key => {\n const value = params[key];\n if (value !== null) {\n combinedParams[key] = value;\n }\n });\n this.styles.styles.forEach(value => {\n if (typeof value !== 'string') {\n value.forEach((val, prop) => {\n if (val) {\n val = interpolateParams(val, combinedParams, errors);\n }\n const normalizedProp = this.normalizer.normalizePropertyName(prop, errors);\n val = this.normalizer.normalizeStyleValue(prop, normalizedProp, val, errors);\n finalStyles.set(normalizedProp, val);\n });\n }\n });\n return finalStyles;\n }\n}\n\nfunction buildTrigger(name, ast, normalizer) {\n return new AnimationTrigger(name, ast, normalizer);\n}\nclass AnimationTrigger {\n constructor(name, ast, _normalizer) {\n this.name = name;\n this.ast = ast;\n this._normalizer = _normalizer;\n this.transitionFactories = [];\n this.states = new Map();\n ast.states.forEach(ast => {\n const defaultParams = (ast.options && ast.options.params) || {};\n this.states.set(ast.name, new AnimationStateStyles(ast.style, defaultParams, _normalizer));\n });\n balanceProperties(this.states, 'true', '1');\n balanceProperties(this.states, 'false', '0');\n ast.transitions.forEach(ast => {\n this.transitionFactories.push(new AnimationTransitionFactory(name, ast, this.states));\n });\n this.fallbackTransition = createFallbackTransition(name, this.states, this._normalizer);\n }\n get containsQueries() {\n return this.ast.queryCount > 0;\n }\n matchTransition(currentState, nextState, element, params) {\n const entry = this.transitionFactories.find(f => f.match(currentState, nextState, element, params));\n return entry || null;\n }\n matchStyles(currentState, params, errors) {\n return this.fallbackTransition.buildStyles(currentState, params, errors);\n }\n}\nfunction createFallbackTransition(triggerName, states, normalizer) {\n const matchers = [(fromState, toState) => true];\n const animation = { type: 2 /* AnimationMetadataType.Sequence */, steps: [], options: null };\n const transition = {\n type: 1 /* AnimationMetadataType.Transition */,\n animation,\n matchers,\n options: null,\n queryCount: 0,\n depCount: 0\n };\n return new AnimationTransitionFactory(triggerName, transition, states);\n}\nfunction balanceProperties(stateMap, key1, key2) {\n if (stateMap.has(key1)) {\n if (!stateMap.has(key2)) {\n stateMap.set(key2, stateMap.get(key1));\n }\n }\n else if (stateMap.has(key2)) {\n stateMap.set(key1, stateMap.get(key2));\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 EMPTY_INSTRUCTION_MAP = new ElementInstructionMap();\nclass TimelineAnimationEngine {\n constructor(bodyNode, _driver, _normalizer) {\n this.bodyNode = bodyNode;\n this._driver = _driver;\n this._normalizer = _normalizer;\n this._animations = new Map();\n this._playersById = new Map();\n this.players = [];\n }\n register(id, metadata) {\n const errors = [];\n const warnings = [];\n const ast = buildAnimationAst(this._driver, metadata, errors, warnings);\n if (errors.length) {\n throw registerFailed(errors);\n }\n else {\n if (warnings.length) {\n warnRegister(warnings);\n }\n this._animations.set(id, ast);\n }\n }\n _buildPlayer(i, preStyles, postStyles) {\n const element = i.element;\n const keyframes = normalizeKeyframes$1(this._driver, this._normalizer, element, i.keyframes, preStyles, postStyles);\n return this._driver.animate(element, keyframes, i.duration, i.delay, i.easing, [], true);\n }\n create(id, element, options = {}) {\n const errors = [];\n const ast = this._animations.get(id);\n let instructions;\n const autoStylesMap = new Map();\n if (ast) {\n instructions = buildAnimationTimelines(this._driver, element, ast, ENTER_CLASSNAME, LEAVE_CLASSNAME, new Map(), new Map(), options, EMPTY_INSTRUCTION_MAP, errors);\n instructions.forEach(inst => {\n const styles = getOrSetDefaultValue(autoStylesMap, inst.element, new Map());\n inst.postStyleProps.forEach(prop => styles.set(prop, null));\n });\n }\n else {\n errors.push(missingOrDestroyedAnimation());\n instructions = [];\n }\n if (errors.length) {\n throw createAnimationFailed(errors);\n }\n autoStylesMap.forEach((styles, element) => {\n styles.forEach((_, prop) => {\n styles.set(prop, this._driver.computeStyle(element, prop, AUTO_STYLE));\n });\n });\n const players = instructions.map(i => {\n const styles = autoStylesMap.get(i.element);\n return this._buildPlayer(i, new Map(), styles);\n });\n const player = optimizeGroupPlayer(players);\n this._playersById.set(id, player);\n player.onDestroy(() => this.destroy(id));\n this.players.push(player);\n return player;\n }\n destroy(id) {\n const player = this._getPlayer(id);\n player.destroy();\n this._playersById.delete(id);\n const index = this.players.indexOf(player);\n if (index >= 0) {\n this.players.splice(index, 1);\n }\n }\n _getPlayer(id) {\n const player = this._playersById.get(id);\n if (!player) {\n throw missingPlayer(id);\n }\n return player;\n }\n listen(id, element, eventName, callback) {\n // triggerName, fromState, toState are all ignored for timeline animations\n const baseEvent = makeAnimationEvent(element, '', '', '');\n listenOnPlayer(this._getPlayer(id), eventName, baseEvent, callback);\n return () => { };\n }\n command(id, element, command, args) {\n if (command == 'register') {\n this.register(id, args[0]);\n return;\n }\n if (command == 'create') {\n const options = (args[0] || {});\n this.create(id, element, options);\n return;\n }\n const player = this._getPlayer(id);\n switch (command) {\n case 'play':\n player.play();\n break;\n case 'pause':\n player.pause();\n break;\n case 'reset':\n player.reset();\n break;\n case 'restart':\n player.restart();\n break;\n case 'finish':\n player.finish();\n break;\n case 'init':\n player.init();\n break;\n case 'setPosition':\n player.setPosition(parseFloat(args[0]));\n break;\n case 'destroy':\n this.destroy(id);\n break;\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 QUEUED_CLASSNAME = 'ng-animate-queued';\nconst QUEUED_SELECTOR = '.ng-animate-queued';\nconst DISABLED_CLASSNAME = 'ng-animate-disabled';\nconst DISABLED_SELECTOR = '.ng-animate-disabled';\nconst STAR_CLASSNAME = 'ng-star-inserted';\nconst STAR_SELECTOR = '.ng-star-inserted';\nconst EMPTY_PLAYER_ARRAY = [];\nconst NULL_REMOVAL_STATE = {\n namespaceId: '',\n setForRemoval: false,\n setForMove: false,\n hasAnimation: false,\n removedBeforeQueried: false\n};\nconst NULL_REMOVED_QUERIED_STATE = {\n namespaceId: '',\n setForMove: false,\n setForRemoval: false,\n hasAnimation: false,\n removedBeforeQueried: true\n};\nconst REMOVAL_FLAG = '__ng_removed';\nclass StateValue {\n constructor(input, namespaceId = '') {\n this.namespaceId = namespaceId;\n const isObj = input && input.hasOwnProperty('value');\n const value = isObj ? input['value'] : input;\n this.value = normalizeTriggerValue(value);\n if (isObj) {\n const options = copyObj(input);\n delete options['value'];\n this.options = options;\n }\n else {\n this.options = {};\n }\n if (!this.options.params) {\n this.options.params = {};\n }\n }\n get params() {\n return this.options.params;\n }\n absorbOptions(options) {\n const newParams = options.params;\n if (newParams) {\n const oldParams = this.options.params;\n Object.keys(newParams).forEach(prop => {\n if (oldParams[prop] == null) {\n oldParams[prop] = newParams[prop];\n }\n });\n }\n }\n}\nconst VOID_VALUE = 'void';\nconst DEFAULT_STATE_VALUE = new StateValue(VOID_VALUE);\nclass AnimationTransitionNamespace {\n constructor(id, hostElement, _engine) {\n this.id = id;\n this.hostElement = hostElement;\n this._engine = _engine;\n this.players = [];\n this._triggers = new Map();\n this._queue = [];\n this._elementListeners = new Map();\n this._hostClassName = 'ng-tns-' + id;\n addClass(hostElement, this._hostClassName);\n }\n listen(element, name, phase, callback) {\n if (!this._triggers.has(name)) {\n throw missingTrigger(phase, name);\n }\n if (phase == null || phase.length == 0) {\n throw missingEvent(name);\n }\n if (!isTriggerEventValid(phase)) {\n throw unsupportedTriggerEvent(phase, name);\n }\n const listeners = getOrSetDefaultValue(this._elementListeners, element, []);\n const data = { name, phase, callback };\n listeners.push(data);\n const triggersWithStates = getOrSetDefaultValue(this._engine.statesByElement, element, new Map());\n if (!triggersWithStates.has(name)) {\n addClass(element, NG_TRIGGER_CLASSNAME);\n addClass(element, NG_TRIGGER_CLASSNAME + '-' + name);\n triggersWithStates.set(name, DEFAULT_STATE_VALUE);\n }\n return () => {\n // the event listener is removed AFTER the flush has occurred such\n // that leave animations callbacks can fire (otherwise if the node\n // is removed in between then the listeners would be deregistered)\n this._engine.afterFlush(() => {\n const index = listeners.indexOf(data);\n if (index >= 0) {\n listeners.splice(index, 1);\n }\n if (!this._triggers.has(name)) {\n triggersWithStates.delete(name);\n }\n });\n };\n }\n register(name, ast) {\n if (this._triggers.has(name)) {\n // throw\n return false;\n }\n else {\n this._triggers.set(name, ast);\n return true;\n }\n }\n _getTrigger(name) {\n const trigger = this._triggers.get(name);\n if (!trigger) {\n throw unregisteredTrigger(name);\n }\n return trigger;\n }\n trigger(element, triggerName, value, defaultToFallback = true) {\n const trigger = this._getTrigger(triggerName);\n const player = new TransitionAnimationPlayer(this.id, triggerName, element);\n let triggersWithStates = this._engine.statesByElement.get(element);\n if (!triggersWithStates) {\n addClass(element, NG_TRIGGER_CLASSNAME);\n addClass(element, NG_TRIGGER_CLASSNAME + '-' + triggerName);\n this._engine.statesByElement.set(element, triggersWithStates = new Map());\n }\n let fromState = triggersWithStates.get(triggerName);\n const toState = new StateValue(value, this.id);\n const isObj = value && value.hasOwnProperty('value');\n if (!isObj && fromState) {\n toState.absorbOptions(fromState.options);\n }\n triggersWithStates.set(triggerName, toState);\n if (!fromState) {\n fromState = DEFAULT_STATE_VALUE;\n }\n const isRemoval = toState.value === VOID_VALUE;\n // normally this isn't reached by here, however, if an object expression\n // is passed in then it may be a new object each time. Comparing the value\n // is important since that will stay the same despite there being a new object.\n // The removal arc here is special cased because the same element is triggered\n // twice in the event that it contains animations on the outer/inner portions\n // of the host container\n if (!isRemoval && fromState.value === toState.value) {\n // this means that despite the value not changing, some inner params\n // have changed which means that the animation final styles need to be applied\n if (!objEquals(fromState.params, toState.params)) {\n const errors = [];\n const fromStyles = trigger.matchStyles(fromState.value, fromState.params, errors);\n const toStyles = trigger.matchStyles(toState.value, toState.params, errors);\n if (errors.length) {\n this._engine.reportError(errors);\n }\n else {\n this._engine.afterFlush(() => {\n eraseStyles(element, fromStyles);\n setStyles(element, toStyles);\n });\n }\n }\n return;\n }\n const playersOnElement = getOrSetDefaultValue(this._engine.playersByElement, element, []);\n playersOnElement.forEach(player => {\n // only remove the player if it is queued on the EXACT same trigger/namespace\n // we only also deal with queued players here because if the animation has\n // started then we want to keep the player alive until the flush happens\n // (which is where the previousPlayers are passed into the new player)\n if (player.namespaceId == this.id && player.triggerName == triggerName && player.queued) {\n player.destroy();\n }\n });\n let transition = trigger.matchTransition(fromState.value, toState.value, element, toState.params);\n let isFallbackTransition = false;\n if (!transition) {\n if (!defaultToFallback)\n return;\n transition = trigger.fallbackTransition;\n isFallbackTransition = true;\n }\n this._engine.totalQueuedPlayers++;\n this._queue.push({ element, triggerName, transition, fromState, toState, player, isFallbackTransition });\n if (!isFallbackTransition) {\n addClass(element, QUEUED_CLASSNAME);\n player.onStart(() => {\n removeClass(element, QUEUED_CLASSNAME);\n });\n }\n player.onDone(() => {\n let index = this.players.indexOf(player);\n if (index >= 0) {\n this.players.splice(index, 1);\n }\n const players = this._engine.playersByElement.get(element);\n if (players) {\n let index = players.indexOf(player);\n if (index >= 0) {\n players.splice(index, 1);\n }\n }\n });\n this.players.push(player);\n playersOnElement.push(player);\n return player;\n }\n deregister(name) {\n this._triggers.delete(name);\n this._engine.statesByElement.forEach(stateMap => stateMap.delete(name));\n this._elementListeners.forEach((listeners, element) => {\n this._elementListeners.set(element, listeners.filter(entry => {\n return entry.name != name;\n }));\n });\n }\n clearElementCache(element) {\n this._engine.statesByElement.delete(element);\n this._elementListeners.delete(element);\n const elementPlayers = this._engine.playersByElement.get(element);\n if (elementPlayers) {\n elementPlayers.forEach(player => player.destroy());\n this._engine.playersByElement.delete(element);\n }\n }\n _signalRemovalForInnerTriggers(rootElement, context) {\n const elements = this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true);\n // emulate a leave animation for all inner nodes within this node.\n // If there are no animations found for any of the nodes then clear the cache\n // for the element.\n elements.forEach(elm => {\n // this means that an inner remove() operation has already kicked off\n // the animation on this element...\n if (elm[REMOVAL_FLAG])\n return;\n const namespaces = this._engine.fetchNamespacesByElement(elm);\n if (namespaces.size) {\n namespaces.forEach(ns => ns.triggerLeaveAnimation(elm, context, false, true));\n }\n else {\n this.clearElementCache(elm);\n }\n });\n // If the child elements were removed along with the parent, their animations might not\n // have completed. Clear all the elements from the cache so we don't end up with a memory leak.\n this._engine.afterFlushAnimationsDone(() => elements.forEach(elm => this.clearElementCache(elm)));\n }\n triggerLeaveAnimation(element, context, destroyAfterComplete, defaultToFallback) {\n const triggerStates = this._engine.statesByElement.get(element);\n const previousTriggersValues = new Map();\n if (triggerStates) {\n const players = [];\n triggerStates.forEach((state, triggerName) => {\n previousTriggersValues.set(triggerName, state.value);\n // this check is here in the event that an element is removed\n // twice (both on the host level and the component level)\n if (this._triggers.has(triggerName)) {\n const player = this.trigger(element, triggerName, VOID_VALUE, defaultToFallback);\n if (player) {\n players.push(player);\n }\n }\n });\n if (players.length) {\n this._engine.markElementAsRemoved(this.id, element, true, context, previousTriggersValues);\n if (destroyAfterComplete) {\n optimizeGroupPlayer(players).onDone(() => this._engine.processLeaveNode(element));\n }\n return true;\n }\n }\n return false;\n }\n prepareLeaveAnimationListeners(element) {\n const listeners = this._elementListeners.get(element);\n const elementStates = this._engine.statesByElement.get(element);\n // if this statement fails then it means that the element was picked up\n // by an earlier flush (or there are no listeners at all to track the leave).\n if (listeners && elementStates) {\n const visitedTriggers = new Set();\n listeners.forEach(listener => {\n const triggerName = listener.name;\n if (visitedTriggers.has(triggerName))\n return;\n visitedTriggers.add(triggerName);\n const trigger = this._triggers.get(triggerName);\n const transition = trigger.fallbackTransition;\n const fromState = elementStates.get(triggerName) || DEFAULT_STATE_VALUE;\n const toState = new StateValue(VOID_VALUE);\n const player = new TransitionAnimationPlayer(this.id, triggerName, element);\n this._engine.totalQueuedPlayers++;\n this._queue.push({\n element,\n triggerName,\n transition,\n fromState,\n toState,\n player,\n isFallbackTransition: true\n });\n });\n }\n }\n removeNode(element, context) {\n const engine = this._engine;\n if (element.childElementCount) {\n this._signalRemovalForInnerTriggers(element, context);\n }\n // this means that a * => VOID animation was detected and kicked off\n if (this.triggerLeaveAnimation(element, context, true))\n return;\n // find the player that is animating and make sure that the\n // removal is delayed until that player has completed\n let containsPotentialParentTransition = false;\n if (engine.totalAnimations) {\n const currentPlayers = engine.players.length ? engine.playersByQueriedElement.get(element) : [];\n // when this `if statement` does not continue forward it means that\n // a previous animation query has selected the current element and\n // is animating it. In this situation want to continue forwards and\n // allow the element to be queued up for animation later.\n if (currentPlayers && currentPlayers.length) {\n containsPotentialParentTransition = true;\n }\n else {\n let parent = element;\n while (parent = parent.parentNode) {\n const triggers = engine.statesByElement.get(parent);\n if (triggers) {\n containsPotentialParentTransition = true;\n break;\n }\n }\n }\n }\n // at this stage we know that the element will either get removed\n // during flush or will be picked up by a parent query. Either way\n // we need to fire the listeners for this element when it DOES get\n // removed (once the query parent animation is done or after flush)\n this.prepareLeaveAnimationListeners(element);\n // whether or not a parent has an animation we need to delay the deferral of the leave\n // operation until we have more information (which we do after flush() has been called)\n if (containsPotentialParentTransition) {\n engine.markElementAsRemoved(this.id, element, false, context);\n }\n else {\n const removalFlag = element[REMOVAL_FLAG];\n if (!removalFlag || removalFlag === NULL_REMOVAL_STATE) {\n // we do this after the flush has occurred such\n // that the callbacks can be fired\n engine.afterFlush(() => this.clearElementCache(element));\n engine.destroyInnerAnimations(element);\n engine._onRemovalComplete(element, context);\n }\n }\n }\n insertNode(element, parent) {\n addClass(element, this._hostClassName);\n }\n drainQueuedTransitions(microtaskId) {\n const instructions = [];\n this._queue.forEach(entry => {\n const player = entry.player;\n if (player.destroyed)\n return;\n const element = entry.element;\n const listeners = this._elementListeners.get(element);\n if (listeners) {\n listeners.forEach((listener) => {\n if (listener.name == entry.triggerName) {\n const baseEvent = makeAnimationEvent(element, entry.triggerName, entry.fromState.value, entry.toState.value);\n baseEvent['_data'] = microtaskId;\n listenOnPlayer(entry.player, listener.phase, baseEvent, listener.callback);\n }\n });\n }\n if (player.markedForDestroy) {\n this._engine.afterFlush(() => {\n // now we can destroy the element properly since the event listeners have\n // been bound to the player\n player.destroy();\n });\n }\n else {\n instructions.push(entry);\n }\n });\n this._queue = [];\n return instructions.sort((a, b) => {\n // if depCount == 0 them move to front\n // otherwise if a contains b then move back\n const d0 = a.transition.ast.depCount;\n const d1 = b.transition.ast.depCount;\n if (d0 == 0 || d1 == 0) {\n return d0 - d1;\n }\n return this._engine.driver.containsElement(a.element, b.element) ? 1 : -1;\n });\n }\n destroy(context) {\n this.players.forEach(p => p.destroy());\n this._signalRemovalForInnerTriggers(this.hostElement, context);\n }\n elementContainsData(element) {\n let containsData = false;\n if (this._elementListeners.has(element))\n containsData = true;\n containsData =\n (this._queue.find(entry => entry.element === element) ? true : false) || containsData;\n return containsData;\n }\n}\nclass TransitionAnimationEngine {\n constructor(bodyNode, driver, _normalizer) {\n this.bodyNode = bodyNode;\n this.driver = driver;\n this._normalizer = _normalizer;\n this.players = [];\n this.newHostElements = new Map();\n this.playersByElement = new Map();\n this.playersByQueriedElement = new Map();\n this.statesByElement = new Map();\n this.disabledNodes = new Set();\n this.totalAnimations = 0;\n this.totalQueuedPlayers = 0;\n this._namespaceLookup = {};\n this._namespaceList = [];\n this._flushFns = [];\n this._whenQuietFns = [];\n this.namespacesByHostElement = new Map();\n this.collectedEnterElements = [];\n this.collectedLeaveElements = [];\n // this method is designed to be overridden by the code that uses this engine\n this.onRemovalComplete = (element, context) => { };\n }\n /** @internal */\n _onRemovalComplete(element, context) {\n this.onRemovalComplete(element, context);\n }\n get queuedPlayers() {\n const players = [];\n this._namespaceList.forEach(ns => {\n ns.players.forEach(player => {\n if (player.queued) {\n players.push(player);\n }\n });\n });\n return players;\n }\n createNamespace(namespaceId, hostElement) {\n const ns = new AnimationTransitionNamespace(namespaceId, hostElement, this);\n if (this.bodyNode && this.driver.containsElement(this.bodyNode, hostElement)) {\n this._balanceNamespaceList(ns, hostElement);\n }\n else {\n // defer this later until flush during when the host element has\n // been inserted so that we know exactly where to place it in\n // the namespace list\n this.newHostElements.set(hostElement, ns);\n // given that this host element is a part of the animation code, it\n // may or may not be inserted by a parent node that is of an\n // animation renderer type. If this happens then we can still have\n // access to this item when we query for :enter nodes. If the parent\n // is a renderer then the set data-structure will normalize the entry\n this.collectEnterElement(hostElement);\n }\n return this._namespaceLookup[namespaceId] = ns;\n }\n _balanceNamespaceList(ns, hostElement) {\n const namespaceList = this._namespaceList;\n const namespacesByHostElement = this.namespacesByHostElement;\n const limit = namespaceList.length - 1;\n if (limit >= 0) {\n let found = false;\n // Find the closest ancestor with an existing namespace so we can then insert `ns` after it,\n // establishing a top-down ordering of namespaces in `this._namespaceList`.\n let ancestor = this.driver.getParentElement(hostElement);\n while (ancestor) {\n const ancestorNs = namespacesByHostElement.get(ancestor);\n if (ancestorNs) {\n // An animation namespace has been registered for this ancestor, so we insert `ns`\n // right after it to establish top-down ordering of animation namespaces.\n const index = namespaceList.indexOf(ancestorNs);\n namespaceList.splice(index + 1, 0, ns);\n found = true;\n break;\n }\n ancestor = this.driver.getParentElement(ancestor);\n }\n if (!found) {\n // No namespace exists that is an ancestor of `ns`, so `ns` is inserted at the front to\n // ensure that any existing descendants are ordered after `ns`, retaining the desired\n // top-down ordering.\n namespaceList.unshift(ns);\n }\n }\n else {\n namespaceList.push(ns);\n }\n namespacesByHostElement.set(hostElement, ns);\n return ns;\n }\n register(namespaceId, hostElement) {\n let ns = this._namespaceLookup[namespaceId];\n if (!ns) {\n ns = this.createNamespace(namespaceId, hostElement);\n }\n return ns;\n }\n registerTrigger(namespaceId, name, trigger) {\n let ns = this._namespaceLookup[namespaceId];\n if (ns && ns.register(name, trigger)) {\n this.totalAnimations++;\n }\n }\n destroy(namespaceId, context) {\n if (!namespaceId)\n return;\n const ns = this._fetchNamespace(namespaceId);\n this.afterFlush(() => {\n this.namespacesByHostElement.delete(ns.hostElement);\n delete this._namespaceLookup[namespaceId];\n const index = this._namespaceList.indexOf(ns);\n if (index >= 0) {\n this._namespaceList.splice(index, 1);\n }\n });\n this.afterFlushAnimationsDone(() => ns.destroy(context));\n }\n _fetchNamespace(id) {\n return this._namespaceLookup[id];\n }\n fetchNamespacesByElement(element) {\n // normally there should only be one namespace per element, however\n // if @triggers are placed on both the component element and then\n // its host element (within the component code) then there will be\n // two namespaces returned. We use a set here to simply deduplicate\n // the namespaces in case (for the reason described above) there are multiple triggers\n const namespaces = new Set();\n const elementStates = this.statesByElement.get(element);\n if (elementStates) {\n for (let stateValue of elementStates.values()) {\n if (stateValue.namespaceId) {\n const ns = this._fetchNamespace(stateValue.namespaceId);\n if (ns) {\n namespaces.add(ns);\n }\n }\n }\n }\n return namespaces;\n }\n trigger(namespaceId, element, name, value) {\n if (isElementNode(element)) {\n const ns = this._fetchNamespace(namespaceId);\n if (ns) {\n ns.trigger(element, name, value);\n return true;\n }\n }\n return false;\n }\n insertNode(namespaceId, element, parent, insertBefore) {\n if (!isElementNode(element))\n return;\n // special case for when an element is removed and reinserted (move operation)\n // when this occurs we do not want to use the element for deletion later\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n details.setForRemoval = false;\n details.setForMove = true;\n const index = this.collectedLeaveElements.indexOf(element);\n if (index >= 0) {\n this.collectedLeaveElements.splice(index, 1);\n }\n }\n // in the event that the namespaceId is blank then the caller\n // code does not contain any animation code in it, but it is\n // just being called so that the node is marked as being inserted\n if (namespaceId) {\n const ns = this._fetchNamespace(namespaceId);\n // This if-statement is a workaround for router issue #21947.\n // The router sometimes hits a race condition where while a route\n // is being instantiated a new navigation arrives, triggering leave\n // animation of DOM that has not been fully initialized, until this\n // is resolved, we need to handle the scenario when DOM is not in a\n // consistent state during the animation.\n if (ns) {\n ns.insertNode(element, parent);\n }\n }\n // only *directives and host elements are inserted before\n if (insertBefore) {\n this.collectEnterElement(element);\n }\n }\n collectEnterElement(element) {\n this.collectedEnterElements.push(element);\n }\n markElementAsDisabled(element, value) {\n if (value) {\n if (!this.disabledNodes.has(element)) {\n this.disabledNodes.add(element);\n addClass(element, DISABLED_CLASSNAME);\n }\n }\n else if (this.disabledNodes.has(element)) {\n this.disabledNodes.delete(element);\n removeClass(element, DISABLED_CLASSNAME);\n }\n }\n removeNode(namespaceId, element, isHostElement, context) {\n if (isElementNode(element)) {\n const ns = namespaceId ? this._fetchNamespace(namespaceId) : null;\n if (ns) {\n ns.removeNode(element, context);\n }\n else {\n this.markElementAsRemoved(namespaceId, element, false, context);\n }\n if (isHostElement) {\n const hostNS = this.namespacesByHostElement.get(element);\n if (hostNS && hostNS.id !== namespaceId) {\n hostNS.removeNode(element, context);\n }\n }\n }\n else {\n this._onRemovalComplete(element, context);\n }\n }\n markElementAsRemoved(namespaceId, element, hasAnimation, context, previousTriggersValues) {\n this.collectedLeaveElements.push(element);\n element[REMOVAL_FLAG] = {\n namespaceId,\n setForRemoval: context,\n hasAnimation,\n removedBeforeQueried: false,\n previousTriggersValues\n };\n }\n listen(namespaceId, element, name, phase, callback) {\n if (isElementNode(element)) {\n return this._fetchNamespace(namespaceId).listen(element, name, phase, callback);\n }\n return () => { };\n }\n _buildInstruction(entry, subTimelines, enterClassName, leaveClassName, skipBuildAst) {\n return entry.transition.build(this.driver, entry.element, entry.fromState.value, entry.toState.value, enterClassName, leaveClassName, entry.fromState.options, entry.toState.options, subTimelines, skipBuildAst);\n }\n destroyInnerAnimations(containerElement) {\n let elements = this.driver.query(containerElement, NG_TRIGGER_SELECTOR, true);\n elements.forEach(element => this.destroyActiveAnimationsForElement(element));\n if (this.playersByQueriedElement.size == 0)\n return;\n elements = this.driver.query(containerElement, NG_ANIMATING_SELECTOR, true);\n elements.forEach(element => this.finishActiveQueriedAnimationOnElement(element));\n }\n destroyActiveAnimationsForElement(element) {\n const players = this.playersByElement.get(element);\n if (players) {\n players.forEach(player => {\n // special case for when an element is set for destruction, but hasn't started.\n // in this situation we want to delay the destruction until the flush occurs\n // so that any event listeners attached to the player are triggered.\n if (player.queued) {\n player.markedForDestroy = true;\n }\n else {\n player.destroy();\n }\n });\n }\n }\n finishActiveQueriedAnimationOnElement(element) {\n const players = this.playersByQueriedElement.get(element);\n if (players) {\n players.forEach(player => player.finish());\n }\n }\n whenRenderingDone() {\n return new Promise(resolve => {\n if (this.players.length) {\n return optimizeGroupPlayer(this.players).onDone(() => resolve());\n }\n else {\n resolve();\n }\n });\n }\n processLeaveNode(element) {\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n // this will prevent it from removing it twice\n element[REMOVAL_FLAG] = NULL_REMOVAL_STATE;\n if (details.namespaceId) {\n this.destroyInnerAnimations(element);\n const ns = this._fetchNamespace(details.namespaceId);\n if (ns) {\n ns.clearElementCache(element);\n }\n }\n this._onRemovalComplete(element, details.setForRemoval);\n }\n if (element.classList?.contains(DISABLED_CLASSNAME)) {\n this.markElementAsDisabled(element, false);\n }\n this.driver.query(element, DISABLED_SELECTOR, true).forEach(node => {\n this.markElementAsDisabled(node, false);\n });\n }\n flush(microtaskId = -1) {\n let players = [];\n if (this.newHostElements.size) {\n this.newHostElements.forEach((ns, element) => this._balanceNamespaceList(ns, element));\n this.newHostElements.clear();\n }\n if (this.totalAnimations && this.collectedEnterElements.length) {\n for (let i = 0; i < this.collectedEnterElements.length; i++) {\n const elm = this.collectedEnterElements[i];\n addClass(elm, STAR_CLASSNAME);\n }\n }\n if (this._namespaceList.length &&\n (this.totalQueuedPlayers || this.collectedLeaveElements.length)) {\n const cleanupFns = [];\n try {\n players = this._flushAnimations(cleanupFns, microtaskId);\n }\n finally {\n for (let i = 0; i < cleanupFns.length; i++) {\n cleanupFns[i]();\n }\n }\n }\n else {\n for (let i = 0; i < this.collectedLeaveElements.length; i++) {\n const element = this.collectedLeaveElements[i];\n this.processLeaveNode(element);\n }\n }\n this.totalQueuedPlayers = 0;\n this.collectedEnterElements.length = 0;\n this.collectedLeaveElements.length = 0;\n this._flushFns.forEach(fn => fn());\n this._flushFns = [];\n if (this._whenQuietFns.length) {\n // we move these over to a variable so that\n // if any new callbacks are registered in another\n // flush they do not populate the existing set\n const quietFns = this._whenQuietFns;\n this._whenQuietFns = [];\n if (players.length) {\n optimizeGroupPlayer(players).onDone(() => {\n quietFns.forEach(fn => fn());\n });\n }\n else {\n quietFns.forEach(fn => fn());\n }\n }\n }\n reportError(errors) {\n throw triggerTransitionsFailed(errors);\n }\n _flushAnimations(cleanupFns, microtaskId) {\n const subTimelines = new ElementInstructionMap();\n const skippedPlayers = [];\n const skippedPlayersMap = new Map();\n const queuedInstructions = [];\n const queriedElements = new Map();\n const allPreStyleElements = new Map();\n const allPostStyleElements = new Map();\n const disabledElementsSet = new Set();\n this.disabledNodes.forEach(node => {\n disabledElementsSet.add(node);\n const nodesThatAreDisabled = this.driver.query(node, QUEUED_SELECTOR, true);\n for (let i = 0; i < nodesThatAreDisabled.length; i++) {\n disabledElementsSet.add(nodesThatAreDisabled[i]);\n }\n });\n const bodyNode = this.bodyNode;\n const allTriggerElements = Array.from(this.statesByElement.keys());\n const enterNodeMap = buildRootMap(allTriggerElements, this.collectedEnterElements);\n // this must occur before the instructions are built below such that\n // the :enter queries match the elements (since the timeline queries\n // are fired during instruction building).\n const enterNodeMapIds = new Map();\n let i = 0;\n enterNodeMap.forEach((nodes, root) => {\n const className = ENTER_CLASSNAME + i++;\n enterNodeMapIds.set(root, className);\n nodes.forEach(node => addClass(node, className));\n });\n const allLeaveNodes = [];\n const mergedLeaveNodes = new Set();\n const leaveNodesWithoutAnimations = new Set();\n for (let i = 0; i < this.collectedLeaveElements.length; i++) {\n const element = this.collectedLeaveElements[i];\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n allLeaveNodes.push(element);\n mergedLeaveNodes.add(element);\n if (details.hasAnimation) {\n this.driver.query(element, STAR_SELECTOR, true).forEach(elm => mergedLeaveNodes.add(elm));\n }\n else {\n leaveNodesWithoutAnimations.add(element);\n }\n }\n }\n const leaveNodeMapIds = new Map();\n const leaveNodeMap = buildRootMap(allTriggerElements, Array.from(mergedLeaveNodes));\n leaveNodeMap.forEach((nodes, root) => {\n const className = LEAVE_CLASSNAME + i++;\n leaveNodeMapIds.set(root, className);\n nodes.forEach(node => addClass(node, className));\n });\n cleanupFns.push(() => {\n enterNodeMap.forEach((nodes, root) => {\n const className = enterNodeMapIds.get(root);\n nodes.forEach(node => removeClass(node, className));\n });\n leaveNodeMap.forEach((nodes, root) => {\n const className = leaveNodeMapIds.get(root);\n nodes.forEach(node => removeClass(node, className));\n });\n allLeaveNodes.forEach(element => {\n this.processLeaveNode(element);\n });\n });\n const allPlayers = [];\n const erroneousTransitions = [];\n for (let i = this._namespaceList.length - 1; i >= 0; i--) {\n const ns = this._namespaceList[i];\n ns.drainQueuedTransitions(microtaskId).forEach(entry => {\n const player = entry.player;\n const element = entry.element;\n allPlayers.push(player);\n if (this.collectedEnterElements.length) {\n const details = element[REMOVAL_FLAG];\n // animations for move operations (elements being removed and reinserted,\n // e.g. when the order of an *ngFor list changes) are currently not supported\n if (details && details.setForMove) {\n if (details.previousTriggersValues &&\n details.previousTriggersValues.has(entry.triggerName)) {\n const previousValue = details.previousTriggersValues.get(entry.triggerName);\n // we need to restore the previous trigger value since the element has\n // only been moved and hasn't actually left the DOM\n const triggersWithStates = this.statesByElement.get(entry.element);\n if (triggersWithStates && triggersWithStates.has(entry.triggerName)) {\n const state = triggersWithStates.get(entry.triggerName);\n state.value = previousValue;\n triggersWithStates.set(entry.triggerName, state);\n }\n }\n player.destroy();\n return;\n }\n }\n const nodeIsOrphaned = !bodyNode || !this.driver.containsElement(bodyNode, element);\n const leaveClassName = leaveNodeMapIds.get(element);\n const enterClassName = enterNodeMapIds.get(element);\n const instruction = this._buildInstruction(entry, subTimelines, enterClassName, leaveClassName, nodeIsOrphaned);\n if (instruction.errors && instruction.errors.length) {\n erroneousTransitions.push(instruction);\n return;\n }\n // even though the element may not be in the DOM, it may still\n // be added at a later point (due to the mechanics of content\n // projection and/or dynamic component insertion) therefore it's\n // important to still style the element.\n if (nodeIsOrphaned) {\n player.onStart(() => eraseStyles(element, instruction.fromStyles));\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n skippedPlayers.push(player);\n return;\n }\n // if an unmatched transition is queued and ready to go\n // then it SHOULD NOT render an animation and cancel the\n // previously running animations.\n if (entry.isFallbackTransition) {\n player.onStart(() => eraseStyles(element, instruction.fromStyles));\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n skippedPlayers.push(player);\n return;\n }\n // this means that if a parent animation uses this animation as a sub-trigger\n // then it will instruct the timeline builder not to add a player delay, but\n // instead stretch the first keyframe gap until the animation starts. This is\n // important in order to prevent extra initialization styles from being\n // required by the user for the animation.\n const timelines = [];\n instruction.timelines.forEach(tl => {\n tl.stretchStartingKeyframe = true;\n if (!this.disabledNodes.has(tl.element)) {\n timelines.push(tl);\n }\n });\n instruction.timelines = timelines;\n subTimelines.append(element, instruction.timelines);\n const tuple = { instruction, player, element };\n queuedInstructions.push(tuple);\n instruction.queriedElements.forEach(element => getOrSetDefaultValue(queriedElements, element, []).push(player));\n instruction.preStyleProps.forEach((stringMap, element) => {\n if (stringMap.size) {\n let setVal = allPreStyleElements.get(element);\n if (!setVal) {\n allPreStyleElements.set(element, setVal = new Set());\n }\n stringMap.forEach((_, prop) => setVal.add(prop));\n }\n });\n instruction.postStyleProps.forEach((stringMap, element) => {\n let setVal = allPostStyleElements.get(element);\n if (!setVal) {\n allPostStyleElements.set(element, setVal = new Set());\n }\n stringMap.forEach((_, prop) => setVal.add(prop));\n });\n });\n }\n if (erroneousTransitions.length) {\n const errors = [];\n erroneousTransitions.forEach(instruction => {\n errors.push(transitionFailed(instruction.triggerName, instruction.errors));\n });\n allPlayers.forEach(player => player.destroy());\n this.reportError(errors);\n }\n const allPreviousPlayersMap = new Map();\n // this map tells us which element in the DOM tree is contained by\n // which animation. Further down this map will get populated once\n // the players are built and in doing so we can use it to efficiently\n // figure out if a sub player is skipped due to a parent player having priority.\n const animationElementMap = new Map();\n queuedInstructions.forEach(entry => {\n const element = entry.element;\n if (subTimelines.has(element)) {\n animationElementMap.set(element, element);\n this._beforeAnimationBuild(entry.player.namespaceId, entry.instruction, allPreviousPlayersMap);\n }\n });\n skippedPlayers.forEach(player => {\n const element = player.element;\n const previousPlayers = this._getPreviousPlayers(element, false, player.namespaceId, player.triggerName, null);\n previousPlayers.forEach(prevPlayer => {\n getOrSetDefaultValue(allPreviousPlayersMap, element, []).push(prevPlayer);\n prevPlayer.destroy();\n });\n });\n // this is a special case for nodes that will be removed either by\n // having their own leave animations or by being queried in a container\n // that will be removed once a parent animation is complete. The idea\n // here is that * styles must be identical to ! styles because of\n // backwards compatibility (* is also filled in by default in many places).\n // Otherwise * styles will return an empty value or \"auto\" since the element\n // passed to getComputedStyle will not be visible (since * === destination)\n const replaceNodes = allLeaveNodes.filter(node => {\n return replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements);\n });\n // POST STAGE: fill the * styles\n const postStylesMap = new Map();\n const allLeaveQueriedNodes = cloakAndComputeStyles(postStylesMap, this.driver, leaveNodesWithoutAnimations, allPostStyleElements, AUTO_STYLE);\n allLeaveQueriedNodes.forEach(node => {\n if (replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements)) {\n replaceNodes.push(node);\n }\n });\n // PRE STAGE: fill the ! styles\n const preStylesMap = new Map();\n enterNodeMap.forEach((nodes, root) => {\n cloakAndComputeStyles(preStylesMap, this.driver, new Set(nodes), allPreStyleElements, ɵPRE_STYLE);\n });\n replaceNodes.forEach(node => {\n const post = postStylesMap.get(node);\n const pre = preStylesMap.get(node);\n postStylesMap.set(node, new Map([...Array.from(post?.entries() ?? []), ...Array.from(pre?.entries() ?? [])]));\n });\n const rootPlayers = [];\n const subPlayers = [];\n const NO_PARENT_ANIMATION_ELEMENT_DETECTED = {};\n queuedInstructions.forEach(entry => {\n const { element, player, instruction } = entry;\n // this means that it was never consumed by a parent animation which\n // means that it is independent and therefore should be set for animation\n if (subTimelines.has(element)) {\n if (disabledElementsSet.has(element)) {\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n player.disabled = true;\n player.overrideTotalTime(instruction.totalTime);\n skippedPlayers.push(player);\n return;\n }\n // this will flow up the DOM and query the map to figure out\n // if a parent animation has priority over it. In the situation\n // that a parent is detected then it will cancel the loop. If\n // nothing is detected, or it takes a few hops to find a parent,\n // then it will fill in the missing nodes and signal them as having\n // a detected parent (or a NO_PARENT value via a special constant).\n let parentWithAnimation = NO_PARENT_ANIMATION_ELEMENT_DETECTED;\n if (animationElementMap.size > 1) {\n let elm = element;\n const parentsToAdd = [];\n while (elm = elm.parentNode) {\n const detectedParent = animationElementMap.get(elm);\n if (detectedParent) {\n parentWithAnimation = detectedParent;\n break;\n }\n parentsToAdd.push(elm);\n }\n parentsToAdd.forEach(parent => animationElementMap.set(parent, parentWithAnimation));\n }\n const innerPlayer = this._buildAnimation(player.namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap);\n player.setRealPlayer(innerPlayer);\n if (parentWithAnimation === NO_PARENT_ANIMATION_ELEMENT_DETECTED) {\n rootPlayers.push(player);\n }\n else {\n const parentPlayers = this.playersByElement.get(parentWithAnimation);\n if (parentPlayers && parentPlayers.length) {\n player.parentPlayer = optimizeGroupPlayer(parentPlayers);\n }\n skippedPlayers.push(player);\n }\n }\n else {\n eraseStyles(element, instruction.fromStyles);\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n // there still might be a ancestor player animating this\n // element therefore we will still add it as a sub player\n // even if its animation may be disabled\n subPlayers.push(player);\n if (disabledElementsSet.has(element)) {\n skippedPlayers.push(player);\n }\n }\n });\n // find all of the sub players' corresponding inner animation players\n subPlayers.forEach(player => {\n // even if no players are found for a sub animation it\n // will still complete itself after the next tick since it's Noop\n const playersForElement = skippedPlayersMap.get(player.element);\n if (playersForElement && playersForElement.length) {\n const innerPlayer = optimizeGroupPlayer(playersForElement);\n player.setRealPlayer(innerPlayer);\n }\n });\n // the reason why we don't actually play the animation is\n // because all that a skipped player is designed to do is to\n // fire the start/done transition callback events\n skippedPlayers.forEach(player => {\n if (player.parentPlayer) {\n player.syncPlayerEvents(player.parentPlayer);\n }\n else {\n player.destroy();\n }\n });\n // run through all of the queued removals and see if they\n // were picked up by a query. If not then perform the removal\n // operation right away unless a parent animation is ongoing.\n for (let i = 0; i < allLeaveNodes.length; i++) {\n const element = allLeaveNodes[i];\n const details = element[REMOVAL_FLAG];\n removeClass(element, LEAVE_CLASSNAME);\n // this means the element has a removal animation that is being\n // taken care of and therefore the inner elements will hang around\n // until that animation is over (or the parent queried animation)\n if (details && details.hasAnimation)\n continue;\n let players = [];\n // if this element is queried or if it contains queried children\n // then we want for the element not to be removed from the page\n // until the queried animations have finished\n if (queriedElements.size) {\n let queriedPlayerResults = queriedElements.get(element);\n if (queriedPlayerResults && queriedPlayerResults.length) {\n players.push(...queriedPlayerResults);\n }\n let queriedInnerElements = this.driver.query(element, NG_ANIMATING_SELECTOR, true);\n for (let j = 0; j < queriedInnerElements.length; j++) {\n let queriedPlayers = queriedElements.get(queriedInnerElements[j]);\n if (queriedPlayers && queriedPlayers.length) {\n players.push(...queriedPlayers);\n }\n }\n }\n const activePlayers = players.filter(p => !p.destroyed);\n if (activePlayers.length) {\n removeNodesAfterAnimationDone(this, element, activePlayers);\n }\n else {\n this.processLeaveNode(element);\n }\n }\n // this is required so the cleanup method doesn't remove them\n allLeaveNodes.length = 0;\n rootPlayers.forEach(player => {\n this.players.push(player);\n player.onDone(() => {\n player.destroy();\n const index = this.players.indexOf(player);\n this.players.splice(index, 1);\n });\n player.play();\n });\n return rootPlayers;\n }\n elementContainsData(namespaceId, element) {\n let containsData = false;\n const details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval)\n containsData = true;\n if (this.playersByElement.has(element))\n containsData = true;\n if (this.playersByQueriedElement.has(element))\n containsData = true;\n if (this.statesByElement.has(element))\n containsData = true;\n return this._fetchNamespace(namespaceId).elementContainsData(element) || containsData;\n }\n afterFlush(callback) {\n this._flushFns.push(callback);\n }\n afterFlushAnimationsDone(callback) {\n this._whenQuietFns.push(callback);\n }\n _getPreviousPlayers(element, isQueriedElement, namespaceId, triggerName, toStateValue) {\n let players = [];\n if (isQueriedElement) {\n const queriedElementPlayers = this.playersByQueriedElement.get(element);\n if (queriedElementPlayers) {\n players = queriedElementPlayers;\n }\n }\n else {\n const elementPlayers = this.playersByElement.get(element);\n if (elementPlayers) {\n const isRemovalAnimation = !toStateValue || toStateValue == VOID_VALUE;\n elementPlayers.forEach(player => {\n if (player.queued)\n return;\n if (!isRemovalAnimation && player.triggerName != triggerName)\n return;\n players.push(player);\n });\n }\n }\n if (namespaceId || triggerName) {\n players = players.filter(player => {\n if (namespaceId && namespaceId != player.namespaceId)\n return false;\n if (triggerName && triggerName != player.triggerName)\n return false;\n return true;\n });\n }\n return players;\n }\n _beforeAnimationBuild(namespaceId, instruction, allPreviousPlayersMap) {\n const triggerName = instruction.triggerName;\n const rootElement = instruction.element;\n // when a removal animation occurs, ALL previous players are collected\n // and destroyed (even if they are outside of the current namespace)\n const targetNameSpaceId = instruction.isRemovalTransition ? undefined : namespaceId;\n const targetTriggerName = instruction.isRemovalTransition ? undefined : triggerName;\n for (const timelineInstruction of instruction.timelines) {\n const element = timelineInstruction.element;\n const isQueriedElement = element !== rootElement;\n const players = getOrSetDefaultValue(allPreviousPlayersMap, element, []);\n const previousPlayers = this._getPreviousPlayers(element, isQueriedElement, targetNameSpaceId, targetTriggerName, instruction.toState);\n previousPlayers.forEach(player => {\n const realPlayer = player.getRealPlayer();\n if (realPlayer.beforeDestroy) {\n realPlayer.beforeDestroy();\n }\n player.destroy();\n players.push(player);\n });\n }\n // this needs to be done so that the PRE/POST styles can be\n // computed properly without interfering with the previous animation\n eraseStyles(rootElement, instruction.fromStyles);\n }\n _buildAnimation(namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap) {\n const triggerName = instruction.triggerName;\n const rootElement = instruction.element;\n // we first run this so that the previous animation player\n // data can be passed into the successive animation players\n const allQueriedPlayers = [];\n const allConsumedElements = new Set();\n const allSubElements = new Set();\n const allNewPlayers = instruction.timelines.map(timelineInstruction => {\n const element = timelineInstruction.element;\n allConsumedElements.add(element);\n // FIXME (matsko): make sure to-be-removed animations are removed properly\n const details = element[REMOVAL_FLAG];\n if (details && details.removedBeforeQueried)\n return new NoopAnimationPlayer(timelineInstruction.duration, timelineInstruction.delay);\n const isQueriedElement = element !== rootElement;\n const previousPlayers = flattenGroupPlayers((allPreviousPlayersMap.get(element) || EMPTY_PLAYER_ARRAY)\n .map(p => p.getRealPlayer()))\n .filter(p => {\n // the `element` is not apart of the AnimationPlayer definition, but\n // Mock/WebAnimations\n // use the element within their implementation. This will be added in Angular5 to\n // AnimationPlayer\n const pp = p;\n return pp.element ? pp.element === element : false;\n });\n const preStyles = preStylesMap.get(element);\n const postStyles = postStylesMap.get(element);\n const keyframes = normalizeKeyframes$1(this.driver, this._normalizer, element, timelineInstruction.keyframes, preStyles, postStyles);\n const player = this._buildPlayer(timelineInstruction, keyframes, previousPlayers);\n // this means that this particular player belongs to a sub trigger. It is\n // important that we match this player up with the corresponding (@trigger.listener)\n if (timelineInstruction.subTimeline && skippedPlayersMap) {\n allSubElements.add(element);\n }\n if (isQueriedElement) {\n const wrappedPlayer = new TransitionAnimationPlayer(namespaceId, triggerName, element);\n wrappedPlayer.setRealPlayer(player);\n allQueriedPlayers.push(wrappedPlayer);\n }\n return player;\n });\n allQueriedPlayers.forEach(player => {\n getOrSetDefaultValue(this.playersByQueriedElement, player.element, []).push(player);\n player.onDone(() => deleteOrUnsetInMap(this.playersByQueriedElement, player.element, player));\n });\n allConsumedElements.forEach(element => addClass(element, NG_ANIMATING_CLASSNAME));\n const player = optimizeGroupPlayer(allNewPlayers);\n player.onDestroy(() => {\n allConsumedElements.forEach(element => removeClass(element, NG_ANIMATING_CLASSNAME));\n setStyles(rootElement, instruction.toStyles);\n });\n // this basically makes all of the callbacks for sub element animations\n // be dependent on the upper players for when they finish\n allSubElements.forEach(element => {\n getOrSetDefaultValue(skippedPlayersMap, element, []).push(player);\n });\n return player;\n }\n _buildPlayer(instruction, keyframes, previousPlayers) {\n if (keyframes.length > 0) {\n return this.driver.animate(instruction.element, keyframes, instruction.duration, instruction.delay, instruction.easing, previousPlayers);\n }\n // special case for when an empty transition|definition is provided\n // ... there is no point in rendering an empty animation\n return new NoopAnimationPlayer(instruction.duration, instruction.delay);\n }\n}\nclass TransitionAnimationPlayer {\n constructor(namespaceId, triggerName, element) {\n this.namespaceId = namespaceId;\n this.triggerName = triggerName;\n this.element = element;\n this._player = new NoopAnimationPlayer();\n this._containsRealPlayer = false;\n this._queuedCallbacks = new Map();\n this.destroyed = false;\n this.markedForDestroy = false;\n this.disabled = false;\n this.queued = true;\n this.totalTime = 0;\n }\n setRealPlayer(player) {\n if (this._containsRealPlayer)\n return;\n this._player = player;\n this._queuedCallbacks.forEach((callbacks, phase) => {\n callbacks.forEach(callback => listenOnPlayer(player, phase, undefined, callback));\n });\n this._queuedCallbacks.clear();\n this._containsRealPlayer = true;\n this.overrideTotalTime(player.totalTime);\n this.queued = false;\n }\n getRealPlayer() {\n return this._player;\n }\n overrideTotalTime(totalTime) {\n this.totalTime = totalTime;\n }\n syncPlayerEvents(player) {\n const p = this._player;\n if (p.triggerCallback) {\n player.onStart(() => p.triggerCallback('start'));\n }\n player.onDone(() => this.finish());\n player.onDestroy(() => this.destroy());\n }\n _queueEvent(name, callback) {\n getOrSetDefaultValue(this._queuedCallbacks, name, []).push(callback);\n }\n onDone(fn) {\n if (this.queued) {\n this._queueEvent('done', fn);\n }\n this._player.onDone(fn);\n }\n onStart(fn) {\n if (this.queued) {\n this._queueEvent('start', fn);\n }\n this._player.onStart(fn);\n }\n onDestroy(fn) {\n if (this.queued) {\n this._queueEvent('destroy', fn);\n }\n this._player.onDestroy(fn);\n }\n init() {\n this._player.init();\n }\n hasStarted() {\n return this.queued ? false : this._player.hasStarted();\n }\n play() {\n !this.queued && this._player.play();\n }\n pause() {\n !this.queued && this._player.pause();\n }\n restart() {\n !this.queued && this._player.restart();\n }\n finish() {\n this._player.finish();\n }\n destroy() {\n this.destroyed = true;\n this._player.destroy();\n }\n reset() {\n !this.queued && this._player.reset();\n }\n setPosition(p) {\n if (!this.queued) {\n this._player.setPosition(p);\n }\n }\n getPosition() {\n return this.queued ? 0 : this._player.getPosition();\n }\n /** @internal */\n triggerCallback(phaseName) {\n const p = this._player;\n if (p.triggerCallback) {\n p.triggerCallback(phaseName);\n }\n }\n}\nfunction deleteOrUnsetInMap(map, key, value) {\n let currentValues = map.get(key);\n if (currentValues) {\n if (currentValues.length) {\n const index = currentValues.indexOf(value);\n currentValues.splice(index, 1);\n }\n if (currentValues.length == 0) {\n map.delete(key);\n }\n }\n return currentValues;\n}\nfunction normalizeTriggerValue(value) {\n // we use `!= null` here because it's the most simple\n // way to test against a \"falsy\" value without mixing\n // in empty strings or a zero value. DO NOT OPTIMIZE.\n return value != null ? value : null;\n}\nfunction isElementNode(node) {\n return node && node['nodeType'] === 1;\n}\nfunction isTriggerEventValid(eventName) {\n return eventName == 'start' || eventName == 'done';\n}\nfunction cloakElement(element, value) {\n const oldValue = element.style.display;\n element.style.display = value != null ? value : 'none';\n return oldValue;\n}\nfunction cloakAndComputeStyles(valuesMap, driver, elements, elementPropsMap, defaultStyle) {\n const cloakVals = [];\n elements.forEach(element => cloakVals.push(cloakElement(element)));\n const failedElements = [];\n elementPropsMap.forEach((props, element) => {\n const styles = new Map();\n props.forEach(prop => {\n const value = driver.computeStyle(element, prop, defaultStyle);\n styles.set(prop, value);\n // there is no easy way to detect this because a sub element could be removed\n // by a parent animation element being detached.\n if (!value || value.length == 0) {\n element[REMOVAL_FLAG] = NULL_REMOVED_QUERIED_STATE;\n failedElements.push(element);\n }\n });\n valuesMap.set(element, styles);\n });\n // we use a index variable here since Set.forEach(a, i) does not return\n // an index value for the closure (but instead just the value)\n let i = 0;\n elements.forEach(element => cloakElement(element, cloakVals[i++]));\n return failedElements;\n}\n/*\nSince the Angular renderer code will return a collection of inserted\nnodes in all areas of a DOM tree, it's up to this algorithm to figure\nout which nodes are roots for each animation @trigger.\n\nBy placing each inserted node into a Set and traversing upwards, it\nis possible to find the @trigger elements and well any direct *star\ninsertion nodes, if a @trigger root is found then the enter element\nis placed into the Map[@trigger] spot.\n */\nfunction buildRootMap(roots, nodes) {\n const rootMap = new Map();\n roots.forEach(root => rootMap.set(root, []));\n if (nodes.length == 0)\n return rootMap;\n const NULL_NODE = 1;\n const nodeSet = new Set(nodes);\n const localRootMap = new Map();\n function getRoot(node) {\n if (!node)\n return NULL_NODE;\n let root = localRootMap.get(node);\n if (root)\n return root;\n const parent = node.parentNode;\n if (rootMap.has(parent)) { // ngIf inside @trigger\n root = parent;\n }\n else if (nodeSet.has(parent)) { // ngIf inside ngIf\n root = NULL_NODE;\n }\n else { // recurse upwards\n root = getRoot(parent);\n }\n localRootMap.set(node, root);\n return root;\n }\n nodes.forEach(node => {\n const root = getRoot(node);\n if (root !== NULL_NODE) {\n rootMap.get(root).push(node);\n }\n });\n return rootMap;\n}\nfunction addClass(element, className) {\n element.classList?.add(className);\n}\nfunction removeClass(element, className) {\n element.classList?.remove(className);\n}\nfunction removeNodesAfterAnimationDone(engine, element, players) {\n optimizeGroupPlayer(players).onDone(() => engine.processLeaveNode(element));\n}\nfunction flattenGroupPlayers(players) {\n const finalPlayers = [];\n _flattenGroupPlayersRecur(players, finalPlayers);\n return finalPlayers;\n}\nfunction _flattenGroupPlayersRecur(players, finalPlayers) {\n for (let i = 0; i < players.length; i++) {\n const player = players[i];\n if (player instanceof ɵAnimationGroupPlayer) {\n _flattenGroupPlayersRecur(player.players, finalPlayers);\n }\n else {\n finalPlayers.push(player);\n }\n }\n}\nfunction objEquals(a, b) {\n const k1 = Object.keys(a);\n const k2 = Object.keys(b);\n if (k1.length != k2.length)\n return false;\n for (let i = 0; i < k1.length; i++) {\n const prop = k1[i];\n if (!b.hasOwnProperty(prop) || a[prop] !== b[prop])\n return false;\n }\n return true;\n}\nfunction replacePostStylesAsPre(element, allPreStyleElements, allPostStyleElements) {\n const postEntry = allPostStyleElements.get(element);\n if (!postEntry)\n return false;\n let preEntry = allPreStyleElements.get(element);\n if (preEntry) {\n postEntry.forEach(data => preEntry.add(data));\n }\n else {\n allPreStyleElements.set(element, postEntry);\n }\n allPostStyleElements.delete(element);\n return true;\n}\n\nclass AnimationEngine {\n constructor(bodyNode, _driver, _normalizer) {\n this.bodyNode = bodyNode;\n this._driver = _driver;\n this._normalizer = _normalizer;\n this._triggerCache = {};\n // this method is designed to be overridden by the code that uses this engine\n this.onRemovalComplete = (element, context) => { };\n this._transitionEngine = new TransitionAnimationEngine(bodyNode, _driver, _normalizer);\n this._timelineEngine = new TimelineAnimationEngine(bodyNode, _driver, _normalizer);\n this._transitionEngine.onRemovalComplete = (element, context) => this.onRemovalComplete(element, context);\n }\n registerTrigger(componentId, namespaceId, hostElement, name, metadata) {\n const cacheKey = componentId + '-' + name;\n let trigger = this._triggerCache[cacheKey];\n if (!trigger) {\n const errors = [];\n const warnings = [];\n const ast = buildAnimationAst(this._driver, metadata, errors, warnings);\n if (errors.length) {\n throw triggerBuildFailed(name, errors);\n }\n if (warnings.length) {\n warnTriggerBuild(name, warnings);\n }\n trigger = buildTrigger(name, ast, this._normalizer);\n this._triggerCache[cacheKey] = trigger;\n }\n this._transitionEngine.registerTrigger(namespaceId, name, trigger);\n }\n register(namespaceId, hostElement) {\n this._transitionEngine.register(namespaceId, hostElement);\n }\n destroy(namespaceId, context) {\n this._transitionEngine.destroy(namespaceId, context);\n }\n onInsert(namespaceId, element, parent, insertBefore) {\n this._transitionEngine.insertNode(namespaceId, element, parent, insertBefore);\n }\n onRemove(namespaceId, element, context, isHostElement) {\n this._transitionEngine.removeNode(namespaceId, element, isHostElement || false, context);\n }\n disableAnimations(element, disable) {\n this._transitionEngine.markElementAsDisabled(element, disable);\n }\n process(namespaceId, element, property, value) {\n if (property.charAt(0) == '@') {\n const [id, action] = parseTimelineCommand(property);\n const args = value;\n this._timelineEngine.command(id, element, action, args);\n }\n else {\n this._transitionEngine.trigger(namespaceId, element, property, value);\n }\n }\n listen(namespaceId, element, eventName, eventPhase, callback) {\n // @@listen\n if (eventName.charAt(0) == '@') {\n const [id, action] = parseTimelineCommand(eventName);\n return this._timelineEngine.listen(id, element, action, callback);\n }\n return this._transitionEngine.listen(namespaceId, element, eventName, eventPhase, callback);\n }\n flush(microtaskId = -1) {\n this._transitionEngine.flush(microtaskId);\n }\n get players() {\n return this._transitionEngine.players\n .concat(this._timelineEngine.players);\n }\n whenRenderingDone() {\n return this._transitionEngine.whenRenderingDone();\n }\n}\n\n/**\n * Returns an instance of `SpecialCasedStyles` if and when any special (non animateable) styles are\n * detected.\n *\n * In CSS there exist properties that cannot be animated within a keyframe animation\n * (whether it be via CSS keyframes or web-animations) and the animation implementation\n * will ignore them. This function is designed to detect those special cased styles and\n * return a container that will be executed at the start and end of the animation.\n *\n * @returns an instance of `SpecialCasedStyles` if any special styles are detected otherwise `null`\n */\nfunction packageNonAnimatableStyles(element, styles) {\n let startStyles = null;\n let endStyles = null;\n if (Array.isArray(styles) && styles.length) {\n startStyles = filterNonAnimatableStyles(styles[0]);\n if (styles.length > 1) {\n endStyles = filterNonAnimatableStyles(styles[styles.length - 1]);\n }\n }\n else if (styles instanceof Map) {\n startStyles = filterNonAnimatableStyles(styles);\n }\n return (startStyles || endStyles) ? new SpecialCasedStyles(element, startStyles, endStyles) :\n null;\n}\n/**\n * Designed to be executed during a keyframe-based animation to apply any special-cased styles.\n *\n * When started (when the `start()` method is run) then the provided `startStyles`\n * will be applied. When finished (when the `finish()` method is called) the\n * `endStyles` will be applied as well any any starting styles. Finally when\n * `destroy()` is called then all styles will be removed.\n */\nclass SpecialCasedStyles {\n constructor(_element, _startStyles, _endStyles) {\n this._element = _element;\n this._startStyles = _startStyles;\n this._endStyles = _endStyles;\n this._state = 0 /* SpecialCasedStylesState.Pending */;\n let initialStyles = SpecialCasedStyles.initialStylesByElement.get(_element);\n if (!initialStyles) {\n SpecialCasedStyles.initialStylesByElement.set(_element, initialStyles = new Map());\n }\n this._initialStyles = initialStyles;\n }\n start() {\n if (this._state < 1 /* SpecialCasedStylesState.Started */) {\n if (this._startStyles) {\n setStyles(this._element, this._startStyles, this._initialStyles);\n }\n this._state = 1 /* SpecialCasedStylesState.Started */;\n }\n }\n finish() {\n this.start();\n if (this._state < 2 /* SpecialCasedStylesState.Finished */) {\n setStyles(this._element, this._initialStyles);\n if (this._endStyles) {\n setStyles(this._element, this._endStyles);\n this._endStyles = null;\n }\n this._state = 1 /* SpecialCasedStylesState.Started */;\n }\n }\n destroy() {\n this.finish();\n if (this._state < 3 /* SpecialCasedStylesState.Destroyed */) {\n SpecialCasedStyles.initialStylesByElement.delete(this._element);\n if (this._startStyles) {\n eraseStyles(this._element, this._startStyles);\n this._endStyles = null;\n }\n if (this._endStyles) {\n eraseStyles(this._element, this._endStyles);\n this._endStyles = null;\n }\n setStyles(this._element, this._initialStyles);\n this._state = 3 /* SpecialCasedStylesState.Destroyed */;\n }\n }\n}\nSpecialCasedStyles.initialStylesByElement = ( /* @__PURE__ */new WeakMap());\nfunction filterNonAnimatableStyles(styles) {\n let result = null;\n styles.forEach((val, prop) => {\n if (isNonAnimatableStyle(prop)) {\n result = result || new Map();\n result.set(prop, val);\n }\n });\n return result;\n}\nfunction isNonAnimatableStyle(prop) {\n return prop === 'display' || prop === 'position';\n}\n\nclass WebAnimationsPlayer {\n constructor(element, keyframes, options, _specialStyles) {\n this.element = element;\n this.keyframes = keyframes;\n this.options = options;\n this._specialStyles = _specialStyles;\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._initialized = false;\n this._finished = false;\n this._started = false;\n this._destroyed = false;\n // the following original fns are persistent copies of the _onStartFns and _onDoneFns\n // and are used to reset the fns to their original values upon reset()\n // (since the _onStartFns and _onDoneFns get deleted after they are called)\n this._originalOnDoneFns = [];\n this._originalOnStartFns = [];\n this.time = 0;\n this.parentPlayer = null;\n this.currentSnapshot = new Map();\n this._duration = options['duration'];\n this._delay = options['delay'] || 0;\n this.time = this._duration + this._delay;\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n init() {\n this._buildPlayer();\n this._preparePlayerBeforeStart();\n }\n _buildPlayer() {\n if (this._initialized)\n return;\n this._initialized = true;\n const keyframes = this.keyframes;\n this.domPlayer =\n this._triggerWebAnimation(this.element, keyframes, this.options);\n this._finalKeyframe = keyframes.length ? keyframes[keyframes.length - 1] : new Map();\n this.domPlayer.addEventListener('finish', () => this._onFinish());\n }\n _preparePlayerBeforeStart() {\n // this is required so that the player doesn't start to animate right away\n if (this._delay) {\n this._resetDomPlayerState();\n }\n else {\n this.domPlayer.pause();\n }\n }\n _convertKeyframesToObject(keyframes) {\n const kfs = [];\n keyframes.forEach(frame => {\n kfs.push(Object.fromEntries(frame));\n });\n return kfs;\n }\n /** @internal */\n _triggerWebAnimation(element, keyframes, options) {\n // jscompiler doesn't seem to know animate is a native property because it's not fully\n // supported yet across common browsers (we polyfill it for Edge/Safari) [CL #143630929]\n return element['animate'](this._convertKeyframesToObject(keyframes), options);\n }\n onStart(fn) {\n this._originalOnStartFns.push(fn);\n this._onStartFns.push(fn);\n }\n onDone(fn) {\n this._originalOnDoneFns.push(fn);\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n play() {\n this._buildPlayer();\n if (!this.hasStarted()) {\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n this._started = true;\n if (this._specialStyles) {\n this._specialStyles.start();\n }\n }\n this.domPlayer.play();\n }\n pause() {\n this.init();\n this.domPlayer.pause();\n }\n finish() {\n this.init();\n if (this._specialStyles) {\n this._specialStyles.finish();\n }\n this._onFinish();\n this.domPlayer.finish();\n }\n reset() {\n this._resetDomPlayerState();\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n this._onStartFns = this._originalOnStartFns;\n this._onDoneFns = this._originalOnDoneFns;\n }\n _resetDomPlayerState() {\n if (this.domPlayer) {\n this.domPlayer.cancel();\n }\n }\n restart() {\n this.reset();\n this.play();\n }\n hasStarted() {\n return this._started;\n }\n destroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n this._resetDomPlayerState();\n this._onFinish();\n if (this._specialStyles) {\n this._specialStyles.destroy();\n }\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n setPosition(p) {\n if (this.domPlayer === undefined) {\n this.init();\n }\n this.domPlayer.currentTime = p * this.time;\n }\n getPosition() {\n return this.domPlayer.currentTime / this.time;\n }\n get totalTime() {\n return this._delay + this._duration;\n }\n beforeDestroy() {\n const styles = new Map();\n if (this.hasStarted()) {\n // note: this code is invoked only when the `play` function was called prior to this\n // (thus `hasStarted` returns true), this implies that the code that initializes\n // `_finalKeyframe` has also been executed and the non-null assertion can be safely used here\n const finalKeyframe = this._finalKeyframe;\n finalKeyframe.forEach((val, prop) => {\n if (prop !== 'offset') {\n styles.set(prop, this._finished ? val : computeStyle(this.element, prop));\n }\n });\n }\n this.currentSnapshot = styles;\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName === 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(fn => fn());\n methods.length = 0;\n }\n}\n\nclass WebAnimationsDriver {\n validateStyleProperty(prop) {\n // Perform actual validation in dev mode only, in prod mode this check is a noop.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n return validateStyleProperty(prop);\n }\n return true;\n }\n validateAnimatableStyleProperty(prop) {\n // Perform actual validation in dev mode only, in prod mode this check is a noop.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const cssProp = camelCaseToDashCase(prop);\n return validateWebAnimatableStyleProperty(cssProp);\n }\n return true;\n }\n matchesElement(_element, _selector) {\n // This method is deprecated and no longer in use so we return false.\n return false;\n }\n containsElement(elm1, elm2) {\n return containsElement(elm1, elm2);\n }\n getParentElement(element) {\n return getParentElement(element);\n }\n query(element, selector, multi) {\n return invokeQuery(element, selector, multi);\n }\n computeStyle(element, prop, defaultValue) {\n return window.getComputedStyle(element)[prop];\n }\n animate(element, keyframes, duration, delay, easing, previousPlayers = []) {\n const fill = delay == 0 ? 'both' : 'forwards';\n const playerOptions = { duration, delay, fill };\n // we check for this to avoid having a null|undefined value be present\n // for the easing (which results in an error for certain browsers #9752)\n if (easing) {\n playerOptions['easing'] = easing;\n }\n const previousStyles = new Map();\n const previousWebAnimationPlayers = previousPlayers.filter(player => player instanceof WebAnimationsPlayer);\n if (allowPreviousPlayerStylesMerge(duration, delay)) {\n previousWebAnimationPlayers.forEach(player => {\n player.currentSnapshot.forEach((val, prop) => previousStyles.set(prop, val));\n });\n }\n let _keyframes = normalizeKeyframes(keyframes).map(styles => copyStyles(styles));\n _keyframes = balancePreviousStylesIntoKeyframes(element, _keyframes, previousStyles);\n const specialStyles = packageNonAnimatableStyles(element, _keyframes);\n return new WebAnimationsPlayer(element, _keyframes, playerOptions, specialStyles);\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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 { AnimationDriver, Animation as ɵAnimation, AnimationEngine as ɵAnimationEngine, AnimationStyleNormalizer as ɵAnimationStyleNormalizer, NoopAnimationDriver as ɵNoopAnimationDriver, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer, WebAnimationsDriver as ɵWebAnimationsDriver, WebAnimationsPlayer as ɵWebAnimationsPlayer, WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer, allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge, containsElement as ɵcontainsElement, getParentElement as ɵgetParentElement, invokeQuery as ɵinvokeQuery, normalizeKeyframes as ɵnormalizeKeyframes, validateStyleProperty as ɵvalidateStyleProperty };\n","/**\n * @license Angular v14.1.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { ViewEncapsulation, Injectable, Inject, RendererFactory2, NgZone, ANIMATION_MODULE_TYPE, NgModule } from '@angular/core';\nexport { ANIMATION_MODULE_TYPE } from '@angular/core';\nimport { ɵDomRendererFactory2, BrowserModule } from '@angular/platform-browser';\nimport { AnimationBuilder, sequence, AnimationFactory } from '@angular/animations';\nimport * as i1 from '@angular/animations/browser';\nimport { ɵAnimationEngine, ɵWebAnimationsStyleNormalizer, ɵAnimationStyleNormalizer, AnimationDriver, ɵWebAnimationsDriver, ɵNoopAnimationDriver } from '@angular/animations/browser';\nimport { DOCUMENT } from '@angular/common';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 BrowserAnimationBuilder extends AnimationBuilder {\n constructor(rootRenderer, doc) {\n super();\n this._nextAnimationId = 0;\n const typeData = { id: '0', encapsulation: ViewEncapsulation.None, styles: [], data: { animation: [] } };\n this._renderer = rootRenderer.createRenderer(doc.body, typeData);\n }\n build(animation) {\n const id = this._nextAnimationId.toString();\n this._nextAnimationId++;\n const entry = Array.isArray(animation) ? sequence(animation) : animation;\n issueAnimationCommand(this._renderer, null, id, 'register', [entry]);\n return new BrowserAnimationFactory(id, this._renderer);\n }\n}\nBrowserAnimationBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserAnimationBuilder, deps: [{ token: i0.RendererFactory2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nBrowserAnimationBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserAnimationBuilder });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserAnimationBuilder, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\nclass BrowserAnimationFactory extends AnimationFactory {\n constructor(_id, _renderer) {\n super();\n this._id = _id;\n this._renderer = _renderer;\n }\n create(element, options) {\n return new RendererAnimationPlayer(this._id, element, options || {}, this._renderer);\n }\n}\nclass RendererAnimationPlayer {\n constructor(id, element, options, _renderer) {\n this.id = id;\n this.element = element;\n this._renderer = _renderer;\n this.parentPlayer = null;\n this._started = false;\n this.totalTime = 0;\n this._command('create', options);\n }\n _listen(eventName, callback) {\n return this._renderer.listen(this.element, `@@${this.id}:${eventName}`, callback);\n }\n _command(command, ...args) {\n return issueAnimationCommand(this._renderer, this.element, this.id, command, args);\n }\n onDone(fn) {\n this._listen('done', fn);\n }\n onStart(fn) {\n this._listen('start', fn);\n }\n onDestroy(fn) {\n this._listen('destroy', fn);\n }\n init() {\n this._command('init');\n }\n hasStarted() {\n return this._started;\n }\n play() {\n this._command('play');\n this._started = true;\n }\n pause() {\n this._command('pause');\n }\n restart() {\n this._command('restart');\n }\n finish() {\n this._command('finish');\n }\n destroy() {\n this._command('destroy');\n }\n reset() {\n this._command('reset');\n this._started = false;\n }\n setPosition(p) {\n this._command('setPosition', p);\n }\n getPosition() {\n return this._renderer.engine.players[+this.id]?.getPosition() ?? 0;\n }\n}\nfunction issueAnimationCommand(renderer, element, id, command, args) {\n return renderer.setProperty(element, `@@${id}:${command}`, args);\n}\n\nconst ANIMATION_PREFIX = '@';\nconst DISABLE_ANIMATIONS_FLAG = '@.disabled';\nclass AnimationRendererFactory {\n constructor(delegate, engine, _zone) {\n this.delegate = delegate;\n this.engine = engine;\n this._zone = _zone;\n this._currentId = 0;\n this._microtaskId = 1;\n this._animationCallbacksBuffer = [];\n this._rendererCache = new Map();\n this._cdRecurDepth = 0;\n this.promise = Promise.resolve(0);\n engine.onRemovalComplete = (element, delegate) => {\n // Note: if a component element has a leave animation, and a host leave animation,\n // the view engine will call `removeChild` for the parent\n // component renderer as well as for the child component renderer.\n // Therefore, we need to check if we already removed the element.\n const parentNode = delegate?.parentNode(element);\n if (parentNode) {\n delegate.removeChild(parentNode, element);\n }\n };\n }\n createRenderer(hostElement, type) {\n const EMPTY_NAMESPACE_ID = '';\n // cache the delegates to find out which cached delegate can\n // be used by which cached renderer\n const delegate = this.delegate.createRenderer(hostElement, type);\n if (!hostElement || !type || !type.data || !type.data['animation']) {\n let renderer = this._rendererCache.get(delegate);\n if (!renderer) {\n renderer = new BaseAnimationRenderer(EMPTY_NAMESPACE_ID, delegate, this.engine);\n // only cache this result when the base renderer is used\n this._rendererCache.set(delegate, renderer);\n }\n return renderer;\n }\n const componentId = type.id;\n const namespaceId = type.id + '-' + this._currentId;\n this._currentId++;\n this.engine.register(namespaceId, hostElement);\n const registerTrigger = (trigger) => {\n if (Array.isArray(trigger)) {\n trigger.forEach(registerTrigger);\n }\n else {\n this.engine.registerTrigger(componentId, namespaceId, hostElement, trigger.name, trigger);\n }\n };\n const animationTriggers = type.data['animation'];\n animationTriggers.forEach(registerTrigger);\n return new AnimationRenderer(this, namespaceId, delegate, this.engine);\n }\n begin() {\n this._cdRecurDepth++;\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n }\n _scheduleCountTask() {\n // always use promise to schedule microtask instead of use Zone\n this.promise.then(() => {\n this._microtaskId++;\n });\n }\n /** @internal */\n scheduleListenerCallback(count, fn, data) {\n if (count >= 0 && count < this._microtaskId) {\n this._zone.run(() => fn(data));\n return;\n }\n if (this._animationCallbacksBuffer.length == 0) {\n Promise.resolve(null).then(() => {\n this._zone.run(() => {\n this._animationCallbacksBuffer.forEach(tuple => {\n const [fn, data] = tuple;\n fn(data);\n });\n this._animationCallbacksBuffer = [];\n });\n });\n }\n this._animationCallbacksBuffer.push([fn, data]);\n }\n end() {\n this._cdRecurDepth--;\n // this is to prevent animations from running twice when an inner\n // component does CD when a parent component instead has inserted it\n if (this._cdRecurDepth == 0) {\n this._zone.runOutsideAngular(() => {\n this._scheduleCountTask();\n this.engine.flush(this._microtaskId);\n });\n }\n if (this.delegate.end) {\n this.delegate.end();\n }\n }\n whenRenderingDone() {\n return this.engine.whenRenderingDone();\n }\n}\nAnimationRendererFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: AnimationRendererFactory, deps: [{ token: i0.RendererFactory2 }, { token: i1.ɵAnimationEngine }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });\nAnimationRendererFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: AnimationRendererFactory });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: AnimationRendererFactory, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.RendererFactory2 }, { type: i1.ɵAnimationEngine }, { type: i0.NgZone }]; } });\nclass BaseAnimationRenderer {\n constructor(namespaceId, delegate, engine) {\n this.namespaceId = namespaceId;\n this.delegate = delegate;\n this.engine = engine;\n this.destroyNode = this.delegate.destroyNode ? (n) => delegate.destroyNode(n) : null;\n }\n get data() {\n return this.delegate.data;\n }\n destroy() {\n this.engine.destroy(this.namespaceId, this.delegate);\n this.delegate.destroy();\n }\n createElement(name, namespace) {\n return this.delegate.createElement(name, namespace);\n }\n createComment(value) {\n return this.delegate.createComment(value);\n }\n createText(value) {\n return this.delegate.createText(value);\n }\n appendChild(parent, newChild) {\n this.delegate.appendChild(parent, newChild);\n this.engine.onInsert(this.namespaceId, newChild, parent, false);\n }\n insertBefore(parent, newChild, refChild, isMove = true) {\n this.delegate.insertBefore(parent, newChild, refChild);\n // If `isMove` true than we should animate this insert.\n this.engine.onInsert(this.namespaceId, newChild, parent, isMove);\n }\n removeChild(parent, oldChild, isHostElement) {\n this.engine.onRemove(this.namespaceId, oldChild, this.delegate, isHostElement);\n }\n selectRootElement(selectorOrNode, preserveContent) {\n return this.delegate.selectRootElement(selectorOrNode, preserveContent);\n }\n parentNode(node) {\n return this.delegate.parentNode(node);\n }\n nextSibling(node) {\n return this.delegate.nextSibling(node);\n }\n setAttribute(el, name, value, namespace) {\n this.delegate.setAttribute(el, name, value, namespace);\n }\n removeAttribute(el, name, namespace) {\n this.delegate.removeAttribute(el, name, namespace);\n }\n addClass(el, name) {\n this.delegate.addClass(el, name);\n }\n removeClass(el, name) {\n this.delegate.removeClass(el, name);\n }\n setStyle(el, style, value, flags) {\n this.delegate.setStyle(el, style, value, flags);\n }\n removeStyle(el, style, flags) {\n this.delegate.removeStyle(el, style, flags);\n }\n setProperty(el, name, value) {\n if (name.charAt(0) == ANIMATION_PREFIX && name == DISABLE_ANIMATIONS_FLAG) {\n this.disableAnimations(el, !!value);\n }\n else {\n this.delegate.setProperty(el, name, value);\n }\n }\n setValue(node, value) {\n this.delegate.setValue(node, value);\n }\n listen(target, eventName, callback) {\n return this.delegate.listen(target, eventName, callback);\n }\n disableAnimations(element, value) {\n this.engine.disableAnimations(element, value);\n }\n}\nclass AnimationRenderer extends BaseAnimationRenderer {\n constructor(factory, namespaceId, delegate, engine) {\n super(namespaceId, delegate, engine);\n this.factory = factory;\n this.namespaceId = namespaceId;\n }\n setProperty(el, name, value) {\n if (name.charAt(0) == ANIMATION_PREFIX) {\n if (name.charAt(1) == '.' && name == DISABLE_ANIMATIONS_FLAG) {\n value = value === undefined ? true : !!value;\n this.disableAnimations(el, value);\n }\n else {\n this.engine.process(this.namespaceId, el, name.slice(1), value);\n }\n }\n else {\n this.delegate.setProperty(el, name, value);\n }\n }\n listen(target, eventName, callback) {\n if (eventName.charAt(0) == ANIMATION_PREFIX) {\n const element = resolveElementFromTarget(target);\n let name = eventName.slice(1);\n let phase = '';\n // @listener.phase is for trigger animation callbacks\n // @@listener is for animation builder callbacks\n if (name.charAt(0) != ANIMATION_PREFIX) {\n [name, phase] = parseTriggerCallbackName(name);\n }\n return this.engine.listen(this.namespaceId, element, name, phase, event => {\n const countId = event['_data'] || -1;\n this.factory.scheduleListenerCallback(countId, callback, event);\n });\n }\n return this.delegate.listen(target, eventName, callback);\n }\n}\nfunction resolveElementFromTarget(target) {\n switch (target) {\n case 'body':\n return document.body;\n case 'document':\n return document;\n case 'window':\n return window;\n default:\n return target;\n }\n}\nfunction parseTriggerCallbackName(triggerName) {\n const dotIndex = triggerName.indexOf('.');\n const trigger = triggerName.substring(0, dotIndex);\n const phase = triggerName.slice(dotIndex + 1);\n return [trigger, phase];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 InjectableAnimationEngine extends ɵAnimationEngine {\n // The `ApplicationRef` is injected here explicitly to force the dependency ordering.\n // Since the `ApplicationRef` should be created earlier before the `AnimationEngine`, they\n // both have `ngOnDestroy` hooks and `flush()` must be called after all views are destroyed.\n constructor(doc, driver, normalizer, appRef) {\n super(doc.body, driver, normalizer);\n }\n ngOnDestroy() {\n this.flush();\n }\n}\nInjectableAnimationEngine.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: InjectableAnimationEngine, deps: [{ token: DOCUMENT }, { token: i1.AnimationDriver }, { token: i1.ɵAnimationStyleNormalizer }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable });\nInjectableAnimationEngine.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: InjectableAnimationEngine });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: InjectableAnimationEngine, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i1.AnimationDriver }, { type: i1.ɵAnimationStyleNormalizer }, { type: i0.ApplicationRef }]; } });\nfunction instantiateDefaultStyleNormalizer() {\n return new ɵWebAnimationsStyleNormalizer();\n}\nfunction instantiateRendererFactory(renderer, engine, zone) {\n return new AnimationRendererFactory(renderer, engine, zone);\n}\nconst SHARED_ANIMATION_PROVIDERS = [\n { provide: AnimationBuilder, useClass: BrowserAnimationBuilder },\n { provide: ɵAnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer },\n { provide: ɵAnimationEngine, useClass: InjectableAnimationEngine }, {\n provide: RendererFactory2,\n useFactory: instantiateRendererFactory,\n deps: [ɵDomRendererFactory2, ɵAnimationEngine, NgZone]\n }\n];\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserModule.\n */\nconst BROWSER_ANIMATIONS_PROVIDERS = [\n { provide: AnimationDriver, useFactory: () => new ɵWebAnimationsDriver() },\n { provide: ANIMATION_MODULE_TYPE, useValue: 'BrowserAnimations' }, ...SHARED_ANIMATION_PROVIDERS\n];\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserTestingModule.\n */\nconst BROWSER_NOOP_ANIMATIONS_PROVIDERS = [\n { provide: AnimationDriver, useClass: ɵNoopAnimationDriver },\n { provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations' }, ...SHARED_ANIMATION_PROVIDERS\n];\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 `BrowserModule` with additional [dependency-injection providers](guide/glossary#provider)\n * for use with animations. See [Animations](guide/animations).\n * @publicApi\n */\nclass BrowserAnimationsModule {\n /**\n * Configures the module based on the specified object.\n *\n * @param config Object used to configure the behavior of the `BrowserAnimationsModule`.\n * @see `BrowserAnimationsModuleConfig`\n *\n * @usageNotes\n * When registering the `BrowserAnimationsModule`, you can use the `withConfig`\n * function as follows:\n * ```\n * @NgModule({\n * imports: [BrowserAnimationsModule.withConfig(config)]\n * })\n * class MyNgModule {}\n * ```\n */\n static withConfig(config) {\n return {\n ngModule: BrowserAnimationsModule,\n providers: config.disableAnimations ? BROWSER_NOOP_ANIMATIONS_PROVIDERS :\n BROWSER_ANIMATIONS_PROVIDERS\n };\n }\n}\nBrowserAnimationsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nBrowserAnimationsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserAnimationsModule, exports: [BrowserModule] });\nBrowserAnimationsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserAnimationsModule, providers: BROWSER_ANIMATIONS_PROVIDERS, imports: [BrowserModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserAnimationsModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [BrowserModule],\n providers: BROWSER_ANIMATIONS_PROVIDERS,\n }]\n }] });\n/**\n * Returns the set of [dependency-injection providers](guide/glossary#provider)\n * to enable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * @usageNotes\n *\n * The function is useful when you want to enable animations in an application\n * bootstrapped using the `bootstrapApplication` function. In this scenario there\n * is no need to import the `BrowserAnimationsModule` NgModule at all, just add\n * providers returned by this function to the `providers` list as show below.\n *\n * ```typescript\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideAnimations()\n * ]\n * });\n * ```\n *\n * @publicApi\n * @developerPreview\n */\nfunction provideAnimations() {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideAnimations` call results in app code.\n return [...BROWSER_ANIMATIONS_PROVIDERS];\n}\n/**\n * A null player that must be imported to allow disabling of animations.\n * @publicApi\n */\nclass NoopAnimationsModule {\n}\nNoopAnimationsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NoopAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nNoopAnimationsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: NoopAnimationsModule, exports: [BrowserModule] });\nNoopAnimationsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NoopAnimationsModule, providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS, imports: [BrowserModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NoopAnimationsModule, decorators: [{\n type: NgModule,\n args: [{\n exports: [BrowserModule],\n providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS,\n }]\n }] });\n/**\n * Returns the set of [dependency-injection providers](guide/glossary#provider)\n * to disable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * @usageNotes\n *\n * The function is useful when you want to bootstrap an application using\n * the `bootstrapApplication` function, but you need to disable animations\n * (for example, when running tests).\n *\n * ```typescript\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideNoopAnimations()\n * ]\n * });\n * ```\n *\n * @publicApi\n * @developerPreview\n */\nfunction provideNoopAnimations() {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideNoopAnimations` call results in app code.\n return [...BROWSER_NOOP_ANIMATIONS_PROVIDERS];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 { BrowserAnimationsModule, NoopAnimationsModule, provideAnimations, provideNoopAnimations, AnimationRenderer as ɵAnimationRenderer, AnimationRendererFactory as ɵAnimationRendererFactory, BrowserAnimationBuilder as ɵBrowserAnimationBuilder, BrowserAnimationFactory as ɵBrowserAnimationFactory, InjectableAnimationEngine as ɵInjectableAnimationEngine };\n","import * as i0 from '@angular/core';\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { MatCommonModule } from '@angular/material/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 */\nclass MatDivider {\n constructor() {\n this._vertical = false;\n this._inset = false;\n }\n /** Whether the divider is vertically aligned. */\n get vertical() {\n return this._vertical;\n }\n set vertical(value) {\n this._vertical = coerceBooleanProperty(value);\n }\n /** Whether the divider is an inset divider. */\n get inset() {\n return this._inset;\n }\n set inset(value) {\n this._inset = coerceBooleanProperty(value);\n }\n}\nMatDivider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDivider, deps: [], target: i0.ɵɵFactoryTarget.Component });\nMatDivider.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"14.0.1\", type: MatDivider, selector: \"mat-divider\", inputs: { vertical: \"vertical\", inset: \"inset\" }, host: { attributes: { \"role\": \"separator\" }, properties: { \"attr.aria-orientation\": \"vertical ? \\\"vertical\\\" : \\\"horizontal\\\"\", \"class.mat-divider-vertical\": \"vertical\", \"class.mat-divider-horizontal\": \"!vertical\", \"class.mat-divider-inset\": \"inset\" }, classAttribute: \"mat-divider\" }, ngImport: i0, template: '', isInline: true, styles: [\".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDivider, decorators: [{\n type: Component,\n args: [{ selector: 'mat-divider', host: {\n 'role': 'separator',\n '[attr.aria-orientation]': 'vertical ? \"vertical\" : \"horizontal\"',\n '[class.mat-divider-vertical]': 'vertical',\n '[class.mat-divider-horizontal]': '!vertical',\n '[class.mat-divider-inset]': 'inset',\n 'class': 'mat-divider',\n }, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}\"] }]\n }], propDecorators: { vertical: [{\n type: Input\n }], inset: [{\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 */\nclass MatDividerModule {\n}\nMatDividerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDividerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nMatDividerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDividerModule, declarations: [MatDivider], imports: [MatCommonModule], exports: [MatDivider, MatCommonModule] });\nMatDividerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDividerModule, imports: [MatCommonModule, MatCommonModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.1\", ngImport: i0, type: MatDividerModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [MatCommonModule],\n exports: [MatDivider, MatCommonModule],\n declarations: [MatDivider],\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 * Generated bundle index. Do not edit.\n */\n\nexport { MatDivider, MatDividerModule };\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\n\nimport { MatInputModule } from \"@angular/material/input\";\nimport { MatButtonModule } from \"@angular/material/button\";\nimport { MatButtonToggleModule } from \"@angular/material/button-toggle\";\nimport { MatTableModule } from \"@angular/material/table\";\nimport { MatSelectModule } from \"@angular/material/select\";\nimport { MatDialogModule } from \"@angular/material/dialog\";\nimport { MatCheckboxModule } from \"@angular/material/checkbox\";\nimport { MatIconModule } from \"@angular/material/icon\";\nimport { MatSortModule } from \"@angular/material/sort\";\nimport { MatTabsModule } from \"@angular/material/tabs\";\n\nimport { MatFormFieldDefaultOptions, MatFormFieldModule, MAT_FORM_FIELD_DEFAULT_OPTIONS } from \"@angular/material/form-field\";\nimport { MatDividerModule } from \"@angular/material/divider\";\nimport { MatMenuModule } from \"@angular/material/menu\";\nimport { MatRippleModule } from \"@angular/material/core\";\nimport { MatTreeModule } from \"@angular/material/tree\";\n\nconst matFormFieldDefaultOptions: MatFormFieldDefaultOptions = {\n appearance: \"outline\"\n};\n\nconst materialModules = [\n MatInputModule,\n MatFormFieldModule,\n MatCheckboxModule,\n MatButtonModule,\n MatButtonToggleModule,\n MatTableModule,\n MatSelectModule,\n MatIconModule,\n MatDialogModule,\n MatSortModule,\n MatTabsModule,\n MatDividerModule,\n MatMenuModule,\n MatRippleModule,\n MatTreeModule\n];\n\n@NgModule({\n imports: [\n ...materialModules\n ],\n exports: [\n ...materialModules\n ]\n})\nexport class MaterialModule {\n\n static forRoot(): ModuleWithProviders<MaterialModule> {\n return {\n ngModule: MaterialModule,\n providers: [\n {\n provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,\n useValue: matFormFieldDefaultOptions\n }\n ]\n };\n }\n\n}\n","/* tslint:disable */\n/* eslint-disable */\nexport enum PaymentMethodType {\n Card = 'Card',\n ACH = 'ACH',\n PayPal = 'PayPal'\n}\n","export enum ModalActionType {\n CONFIRM,\n CANCEL\n}\n\nexport class ModalAction {\n constructor(public action: ModalActionType, public params?: any) {}\n}\n","<div class=\"outer-container\" (mousedown)=\"onMouseDown()\">\n\n <div mat-dialog-title>\n <div>Create Refund</div>\n <i class=\"fal fa-times global-dialog-close-button\" (mousedown)=\"onCancel($event)\"></i>\n </div>\n\n <div mat-dialog-content class=\"content\">\n\n <div class=\"first-row\">\n\n <div>\n <div class=\"label\">Payer Name</div>\n <lib-text-common class=\"variable-text\">{{ refundTransaction?.payer?.fullName | uppercase }}</lib-text-common>\n </div>\n\n <div>\n <div class=\"label\">Refund Limit</div>\n <lib-text-common class=\"variable-text\">{{ amountAvailable | vituCurrencyUsd }}</lib-text-common>\n </div>\n\n <div>\n <div *ngIf=\"serviceFeeAmountAvailable > 0\">\n <div class=\"label\">Service Fee Refund Limit</div>\n <lib-text-common class=\"variable-text\">{{ serviceFeeAmountAvailable | vituCurrencyUsd }}</lib-text-common>\n </div>\n </div>\n\n </div>\n\n <div class=\"second-row\">\n\n <div>\n <div class=\"label\">Card</div>\n <lib-text-common class=\"variable-text\">{{ refundTransaction?.card?.cardBrand | uppercase }}</lib-text-common>\n </div>\n\n <div>\n <div class=\"label\">Card Number</div>\n <lib-text-common class=\"variable-text\">{{ refundTransaction?.card?.first6 }}XXX{{ refundTransaction?.card?.last4 }}</lib-text-common>\n </div>\n\n <div>\n <div class=\"label\">Card Expiration</div>\n <lib-text-common class=\"variable-text\">{{ refundTransaction?.card?.expirationDate }}</lib-text-common>\n </div>\n\n </div>\n\n <form class=\"form\" [formGroup]=\"refundForm\" [libVituForm]=\"refundForm\" (libVituFormSubmit)=\"onSubmit()\">\n\n <div class=\"refund-inputs-container\">\n\n <div class=\"form-fields-container form-fields-container-first-line\">\n\n <div class=\"refund-amount\">\n <lib-vitu-form-field-input\n #refundAmountInputFieldComponent\n [formGroup]=\"refundForm\"\n formFieldName=\"refundAmount\"\n label=\"Refund Amount\"\n type=\"twoDigitDecimalAllowZeroNotNegative\"\n prefix=\"$\"\n [errorOverrides]=\"[{'refundLimitExceeded': limitExceeded }, {'refundAtLeastOneInvalid': amountRequired}]\"\n (blurred)=\"markAsUntouched()\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"refund-toggle-group\">\n <mat-button-toggle-group [(value)]=\"refundToggleValue\" class=\"main-amount\">\n <mat-button-toggle [value]=\"RefundToggleValue.None\" (mousedown)=\"setRefundToggleValue(RefundToggleValue.None, $event)\">None</mat-button-toggle>\n <mat-button-toggle [value]=\"RefundToggleValue.Custom\" (mousedown)=\"setRefundToggleValue(RefundToggleValue.Custom, $event)\">Custom</mat-button-toggle>\n <mat-button-toggle [value]=\"RefundToggleValue.All\" (mousedown)=\"setRefundToggleValue(RefundToggleValue.All, $event)\">All</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n\n </div>\n\n <div *ngIf=\"serviceFeeAmountAvailable > 0\">\n\n <div *ngIf=\"!isPayPal\" class=\"form-fields-container\">\n\n <div class=\"refund-amount\">\n <lib-vitu-form-field-input\n #serviceFeeRefundAmountInputFieldComponent\n [formGroup]=\"refundForm\"\n formFieldName=\"serviceFeeRefundAmount\"\n label=\"Service Fee Refund Amount\"\n type=\"twoDigitDecimalAllowZeroNotNegative\"\n prefix=\"$\"\n [errorOverrides]=\"[{'refundLimitExceeded': serviceFeeLimitExceeded }, {'refundAtLeastOneInvalid': amountRequired} ]\"\n (blurred)=\"markAsUntouched()\">\n </lib-vitu-form-field-input>\n </div>\n\n <div class=\"refund-toggle-group\">\n <mat-button-toggle-group [(value)]=\"serviceFeeRefundToggleValue\">\n <mat-button-toggle [value]=\"RefundToggleValue.None\" (mousedown)=\"setServiceFeeRefundToggleValue(RefundToggleValue.None, $event)\">None</mat-button-toggle>\n <mat-button-toggle [value]=\"RefundToggleValue.Custom\" (mousedown)=\"setServiceFeeRefundToggleValue(RefundToggleValue.Custom, $event)\">Custom</mat-button-toggle>\n <mat-button-toggle [value]=\"RefundToggleValue.All\" (mousedown)=\"setServiceFeeRefundToggleValue(RefundToggleValue.All, $event)\">All</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n\n </div>\n\n <div *ngIf=\"isPayPal\" class=\"form-fields-container-paypal\">\n The service fee will be refunded with this transaction. The amount of service fee refunded depends on the amount of the refund.\n </div>\n\n </div>\n\n <div>\n <lib-vitu-form-field-input\n [formGroup]=\"refundForm\"\n formFieldName=\"refundDescription\"\n label=\"Refund Description\"\n [maxlength]=\"refundDescriptionMaxLength\">\n </lib-vitu-form-field-input>\n </div>\n\n </div>\n\n <div class=\"error-message-container\">\n <lib-modal-error-message *ngIf=\"data?.errorMessageSubject | async as errorMessage\" [message]=\"errorMessage\">\n </lib-modal-error-message>\n </div>\n\n <lib-vitu-form-buttons>\n\n <lib-vitu-form-abort-button\n (onAbort)=\"onCancel()\"\n [isModal]=\"true\">\n </lib-vitu-form-abort-button>\n \n <lib-vitu-form-submit-button\n label=\"Submit\"\n [neverDisable]=\"true\">\n </lib-vitu-form-submit-button>\n \n </lib-vitu-form-buttons>\n\n </form>\n\n </div>\n\n</div>\n","import { Component, Inject, QueryList, ViewChild, ViewChildren } from \"@angular/core\";\nimport { AbstractControl, UntypedFormBuilder, UntypedFormGroup } from \"@angular/forms\";\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\nimport { MatFormField } from \"@angular/material/form-field\";\nimport { PaymentDetails } from \"@merchant_api/models/payment-details\";\nimport { PaymentMethodType } from \"@merchant_api/models/payment-method-type\";\nimport { Refund } from \"@merchant_api/models/refund\";\nimport { Transaction } from \"@merchant_api/models/transaction\";\nimport { TransactionStatus } from \"@merchant_api/models/transaction-status\";\nimport { TransactionType } from \"@merchant_api/models/transaction-type\";\nimport { Subject } from \"rxjs\";\nimport { ActionButtonKind, VituFormFieldInputComponent, VituNumberFormatCurrencyPipe } from \"shared-lib\";\nimport { ModalAction, ModalActionType } from \"../modal-action\";\n\nenum RefundToggleValue {\n None,\n Custom,\n All\n}\n\n@Component({\n selector: \"app-refund-payment-modal\",\n templateUrl: \"./refund-payment-modal.component.html\",\n styleUrls: [\"./refund-payment-modal.component.less\"],\n providers: [\n VituNumberFormatCurrencyPipe\n ]\n})\nexport class RefundPaymentModalComponent {\n\n refundForm: UntypedFormGroup;\n\n RefundToggleValue = RefundToggleValue;\n\n @ViewChild(\"refundAmountInputFieldComponent\") refundAmountInputFieldComponent: VituFormFieldInputComponent;\n @ViewChild(\"serviceFeeRefundAmountInputFieldComponent\") serviceFeeRefundAmountInputFieldComponent: VituFormFieldInputComponent;\n\n setRefundToggleValue(value: RefundToggleValue, event: any) {\n this.refundToggleValue = value;\n event.preventDefault();\n }\n\n setServiceFeeRefundToggleValue(value: RefundToggleValue, event: any) {\n this.serviceFeeRefundToggleValue = value;\n event.preventDefault();\n }\n\n get refundToggleValue() {\n return this._refundToggleValue;\n }\n set refundToggleValue(value: RefundToggleValue) {\n this._refundToggleValue = value;\n let refundAmount: string = null;\n const control = this.refundForm.get(\"refundAmount\");\n control.markAsUntouched();\n switch (value) {\n case RefundToggleValue.None:\n {\n refundAmount = this.currencyPipe.transform(0, \"showZero\");\n break;\n }\n case RefundToggleValue.Custom:\n {\n refundAmount = \"\";\n break;\n }\n case RefundToggleValue.All:\n {\n refundAmount = this.currencyPipe.transform(this.amountAvailable, \"showZero\");\n break;\n }\n }\n if (this.refundAmountInputFieldComponent) {\n this.refundAmountInputFieldComponent.focus();\n }\n control.setValue(refundAmount);\n control.updateValueAndValidity();\n }\n _refundToggleValue: RefundToggleValue;\n\n get serviceFeeRefundToggleValue() {\n return this._serviceFeeRefundToggleValue;\n }\n set serviceFeeRefundToggleValue(value: RefundToggleValue) {\n this._serviceFeeRefundToggleValue = value;\n let refundAmount: string = null;\n const control = this.refundForm.get(\"serviceFeeRefundAmount\");\n control.markAsUntouched();\n switch (value) {\n case RefundToggleValue.None:\n {\n refundAmount = this.currencyPipe.transform(0, \"showZero\");\n break;\n }\n case RefundToggleValue.Custom:\n {\n refundAmount = \"\";\n break;\n }\n case RefundToggleValue.All:\n {\n refundAmount = this.currencyPipe.transform(this.serviceFeeAmountAvailable, \"showZero\");\n break;\n }\n }\n if (this.serviceFeeRefundAmountInputFieldComponent) {\n this.serviceFeeRefundAmountInputFieldComponent.focus();\n }\n control.setValue(refundAmount);\n this.refundForm.updateValueAndValidity();\n }\n _serviceFeeRefundToggleValue: RefundToggleValue;\n\n get formControls() {\n return this.refundForm && this.refundForm.controls;\n }\n\n constructor(\n private fb: UntypedFormBuilder,\n public dialogRef: MatDialogRef<RefundPaymentModalComponent>,\n @Inject(MAT_DIALOG_DATA) public data: {\n refundData: { payment: PaymentDetails; amount: number; serviceFeeAmount: number|null };\n errorMessageSubject: Subject<string>;\n modalActionSubject: Subject<any>;\n },\n private currencyPipe: VituNumberFormatCurrencyPipe\n ) {\n this.refundForm = this.fb.group({\n refundAmount: [null, [this.refundAtLeastOneAmountValidator.bind(this), this.refundAmountValidator.bind(this)]],\n refundDescription: [null, []],\n serviceFeeRefundAmount:\n [null, [this.refundAtLeastOneAmountValidator.bind(this), this.serviceFeeRefundAmountValidator.bind(this)]],\n });\n\n this.refundToggleValue = RefundToggleValue.Custom;\n this.serviceFeeRefundToggleValue = RefundToggleValue.Custom;\n\n this.data.refundData.payment.transactions.forEach((transaction: Transaction) => {\n if ((transaction.status === TransactionStatus.Success) || (transaction.status === TransactionStatus.Funded)) {\n if ((transaction.type === TransactionType.Sale) || (transaction.type === TransactionType.Capture)) {\n this.refundTransaction = transaction;\n }\n }\n });\n this.amountAvailable = data.refundData.amount;\n this.serviceFeeAmountAvailable = data.refundData.serviceFeeAmount;\n\n if (!(this.serviceFeeAmountAvailable > 0)) {\n this.refundForm.get(\"serviceFeeRefundAmount\").disable();\n }\n\n this.isPayPal = this.refundTransaction?.paymentMethod === PaymentMethodType.PayPal;\n }\n\n get limitExceeded() {\n return `Limit is $${this.currencyPipe.transform(this.amountAvailable, \"showZero\")}`;\n }\n\n get serviceFeeLimitExceeded() {\n return `Limit is $${this.currencyPipe.transform(this.serviceFeeAmountAvailable, \"showZero\")}`;\n }\n\n get amountRequired() {\n return (this.serviceFeeAmountAvailable > 0) ? \"At least one amount required\" : \"Valid amount is required\";\n }\n\n markAsUntouched() {\n if (this.refundForm) {\n // Shows validation issues only on form Submit\n // which looks better due to cross dependence of\n // the two amount fields.\n this.refundForm.get(\"refundAmount\")?.markAsUntouched();\n this.refundForm.get(\"refundAmount\")?.updateValueAndValidity();\n this.refundForm.get(\"serviceFeeRefundAmount\")?.markAsUntouched();\n this.refundForm.get(\"serviceFeeRefundAmount\")?.updateValueAndValidity();\n }\n }\n\n @ViewChildren(MatFormField) formFields: QueryList<MatFormField>;\n\n refundTransaction: Transaction;\n amountAvailable: number = null;\n serviceFeeAmountAvailable: number = null;\n isPayPal = false;\n\n readonly refundDescriptionMaxLength = 100;\n\n ActionButtonKind = ActionButtonKind;\n PaymentMethodType = PaymentMethodType;\n\n onMouseDown() {\n this.data.errorMessageSubject.next(\"\");\n }\n\n onCancel(event?: any) {\n if (event) {\n event.preventDefault();\n }\n this.data.modalActionSubject.next(new ModalAction(ModalActionType.CANCEL));\n }\n\n onSubmit() {\n if (this.refundTransaction) {\n const token = this.refundTransaction.paymentToken;\n const refund = {\n amount: 0,\n description: this.refundForm.value.refundDescription,\n serviceFeeAmount: null\n } as Refund;\n const refundAmount = parseFloat(this.refundForm.value.refundAmount);\n if (refundAmount > 0) {\n refund.amount = refundAmount;\n }\n if (this.serviceFeeAmountAvailable > 0) {\n const serviceFeeRefundAmount = parseFloat(this.refundForm.value.serviceFeeRefundAmount);\n if (serviceFeeRefundAmount > 0) {\n refund.serviceFeeAmount = serviceFeeRefundAmount;\n }\n }\n this.data.modalActionSubject.next(new ModalAction(ModalActionType.CONFIRM, { token, refund }));\n }\n }\n\n private refundAtLeastOneAmountValidator(control: AbstractControl) {\n\n let atLeastOne = false;\n\n const refundAmount = this.refundForm?.get(\"refundAmount\");\n if (refundAmount) {\n const refundAmountValue = parseFloat(refundAmount.value);\n if (refundAmountValue > 0) {\n atLeastOne = true;\n }\n }\n\n const serviceFeeRefundAmount = this.refundForm?.get(\"serviceFeeRefundAmount\");\n if (serviceFeeRefundAmount) {\n const serviceFeeRefundAmountValue = parseFloat(serviceFeeRefundAmount.value);\n if (serviceFeeRefundAmountValue > 0) {\n atLeastOne = true;\n }\n }\n\n if (!atLeastOne) {\n return { refundAtLeastOneInvalid: { valid: false } };\n }\n\n return null;\n }\n\n private refundAmountValidator(control: AbstractControl) {\n if (parseFloat(control.value) > this.amountAvailable) {\n return { refundLimitExceeded: { valid: false } };\n }\n return null;\n }\n\n private serviceFeeRefundAmountValidator(control: AbstractControl) {\n if (parseFloat(control.value) > this.serviceFeeAmountAvailable) {\n return { refundLimitExceeded: { valid: false } };\n }\n return null;\n }\n\n}\n","import { Environment } from \"shared-lib\";\n\nexport const environment: Environment = {\n isDevelopment: false,\n descriptor: \"stage\",\n portalApiRootUrl: \"https://stage.vitupay.com\",\n coreApiRootUrl: \"https://api.stage.vitupay.com\",\n authRootUrl: \"https://auth.stage.vitupay.com\",\n stackDriverErrorReporting: {\n projectId: \"vitupay-oos-stage2\",\n key: \"AIzaSyBaJzZd-zuX6Z_K8Y9d8k9o0cYBBVuPK30\",\n appName: \"merchant\"\n }\n};\n","import { BrowserModule } from \"@angular/platform-browser\";\nimport { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { HttpClientModule } from \"@angular/common/http\";\nimport { BrowserAnimationsModule } from \"@angular/platform-browser/animations\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { MaterialModule } from \"./material.module\";\n\nimport { TransactionsTableComponent } from \"./transactions-table/transactions-table.component\";\nimport { TransactionsTableCellContentComponent } from \"./transactions-table/transactions-table-cell-content/transactions-table-cell-content.component\"; // eslint-disable-line max-len\nimport { SafePipe } from \"./safe.pipe\";\nimport { RefundPaymentModalComponent } from \"./refund-payment-modal/refund-payment-modal.component\";\n\nimport { environment } from \"@merchant_environments/environment\";\n\nimport {\n ActionButtonModule,\n DashboardCommonModule,\n MultiStageExpansionPanelModule,\n TableBaseModule,\n StopPropagationModule,\n BusyIndicatorModule,\n GlobalSpinnerModule,\n ConfirmationModalModule,\n VituFormModule,\n VituFormFieldModule,\n ModalErrorMessageModule,\n ErrorHandlerModule,\n DateTimeModule,\n StatusChipModule,\n PagerModule,\n VituToastModule,\n TextModule,\n TitleBarModule,\n FiltersBaseModule,\n VituTooltipModule,\n UserStatusIconModule,\n FundingItemStatusChipModule,\n TransactionStatusChipModule,\n BinaryStatusIconModule,\n Environment,\n VituInputModule,\n SpaceBetweenCapsModule,\n VituNumberFormatModule,\n CopyToClipboardButtonModule,\n SwitchArrayModule,\n PermissionsSwitchArrayModule,\n GroupedSwitchArrayModule,\n VituSlideToggleModule,\n VituSelectModule,\n VituDateModule,\n VituTimeModule\n} from \"shared-lib\";\n\nconst exportableModules = [\n CommonModule,\n BrowserModule,\n BrowserAnimationsModule,\n FormsModule,\n ReactiveFormsModule,\n HttpClientModule,\n DashboardCommonModule,\n BusyIndicatorModule,\n GlobalSpinnerModule,\n MultiStageExpansionPanelModule,\n TableBaseModule,\n ActionButtonModule,\n StopPropagationModule,\n ConfirmationModalModule,\n VituFormModule,\n VituFormFieldModule,\n ModalErrorMessageModule,\n ErrorHandlerModule,\n DateTimeModule,\n StatusChipModule,\n PagerModule,\n VituToastModule,\n TextModule,\n TitleBarModule,\n FiltersBaseModule,\n VituTooltipModule,\n UserStatusIconModule,\n FundingItemStatusChipModule,\n TransactionStatusChipModule,\n BinaryStatusIconModule,\n VituInputModule,\n SpaceBetweenCapsModule,\n VituNumberFormatModule,\n CopyToClipboardButtonModule,\n SwitchArrayModule,\n PermissionsSwitchArrayModule,\n GroupedSwitchArrayModule,\n VituSlideToggleModule,\n VituSelectModule,\n VituDateModule,\n VituTimeModule\n];\n\nconst exportableDomEntities = [\n TransactionsTableComponent,\n SafePipe,\n RefundPaymentModalComponent,\n TransactionsTableCellContentComponent\n];\n\n@NgModule({\n imports: [\n MaterialModule.forRoot(),\n ...exportableModules,\n ],\n declarations: [\n ...exportableDomEntities,\n ],\n exports: [\n MaterialModule,\n ...exportableModules,\n ...exportableDomEntities,\n ],\n providers: [\n { provide: Environment, useValue: environment }\n ]\n})\nexport class SharedModule {}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, createEffect, ofType } from \"@ngrx/effects\";\nimport { switchMap, catchError } from \"rxjs/operators\";\nimport { of } from \"rxjs\";\nimport {\n GetMerchantSucceedAction,\n GetMerchantAction,\n ActionTypes\n} from \"./merchant.actions\";\nimport { MerchantService } from \"@merchant_api/services/merchant.service\";\nimport { GetMerchantFailAction } from \"@merchant_app/storage/merchant/merchant.actions\";\n\n@Injectable()\nexport class MerchantEffects {\n constructor(\n private actions: Actions,\n private merchantService: MerchantService\n ) {}\n\n get = createEffect(() => this.actions.pipe(\n ofType<GetMerchantAction>(ActionTypes.GetMerchant),\n switchMap(() => this.getMerchant().pipe(\n switchMap(result => of(new GetMerchantSucceedAction(result))),\n catchError((error) => of(new GetMerchantFailAction(error)))\n ))\n ));\n\n getMerchant() {\n return this.merchantService.merchantGet();\n }\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { ROUTER_NAVIGATED, RouterNavigationAction } from \"@ngrx/router-store\";\nimport {\n ActionTypes,\n FilterTransactionsAction,\n SortTransactionsAction,\n PageChangedTransactionsAction,\n ExportTransactionsToCsvAction,\n ExportTransactionsToCsvSucceedAction,\n ExportTransactionsToCsvFailAction,\n GetTransactionsAction,\n GetTransactionsSucceedAction,\n GetTransactionsFailAction,\n} from \"./transactions.actions\";\nimport { filter as filterOperator, switchMap, withLatestFrom, tap, catchError } from \"rxjs/operators\";\nimport { of } from \"rxjs\";\nimport { PaymentsService } from \"@merchant_api/services/payments.service\";\nimport { IStore } from \"../store\";\nimport { Store } from \"@ngrx/store\";\nimport { LocalTimePoint } from \"shared-lib\";\nimport { Filter, Sorting } from \"./transactions.state\";\nimport { getTransactionsState } from \"./transactions.selectors\";\n\n@Injectable()\nexport class TransactionsEffects {\n\n constructor(\n private actions: Actions,\n private paymentsService: PaymentsService,\n private store: Store<IStore>,\n ) { }\n\n initTransactionsPage = createEffect(() =>\n this.actions.pipe(\n ofType(ROUTER_NAVIGATED),\n filterOperator((action: RouterNavigationAction) => new RegExp(/dashboard\\/transactions$/).test(action.payload.routerState.url)),\n switchMap(() =>\n [ new GetTransactionsAction(1) ]\n )\n )\n );\n\n filterList = createEffect(() =>\n this.actions.pipe(\n ofType<FilterTransactionsAction>(ActionTypes.FilterTransactions),\n switchMap(action => of(new GetTransactionsAction(1, action.filter)))\n ),\n );\n\n sortList = createEffect(() =>\n this.actions.pipe(\n ofType<SortTransactionsAction>(ActionTypes.SortTransactions),\n switchMap(action => of(new GetTransactionsAction(1, undefined, action.sorting)))\n ),\n );\n\n pageChanged = createEffect(() =>\n this.actions.pipe(\n ofType<PageChangedTransactionsAction>(ActionTypes.PageChangedTransactions),\n switchMap(action => of(new GetTransactionsAction(action.page)))\n ),\n );\n\n getTransactions = createEffect(() =>\n this.actions.pipe(\n ofType<GetTransactionsAction>(ActionTypes.GetTransactions),\n withLatestFrom(this.store.select(getTransactionsState)),\n switchMap(([action, state]) => {\n\n const filter = action.filter ? action.filter : state.filter;\n const sorting = action.sorting ? action.sorting : state.sorting;\n const params = this.getParams(sorting, filter, state.pager.pageSize, action.page);\n\n const stateExtensions = {\n filter,\n sorting\n };\n\n return this.paymentsService.transactionsSearch(params).pipe(\n switchMap((response) =>\n of(new GetTransactionsSucceedAction(response, state.pager.pageSize, action.page, stateExtensions))),\n catchError((error) => of(new GetTransactionsFailAction(error)))\n );\n })\n ),\n );\n\n exportToCsv = createEffect(() =>\n this.actions.pipe(\n ofType<ExportTransactionsToCsvAction>(ActionTypes.ExportTransactionsToCsv),\n withLatestFrom(this.store.select(getTransactionsState)),\n switchMap(([_, state]) => {\n\n const params = this.getParams(state.sorting, state.filter, state.pager.pageSize, state.pager.page);\n\n return this.paymentsService.transactionsExport(params).pipe(\n tap(response => window.location.href = response.url),\n switchMap((response) =>\n of(new ExportTransactionsToCsvSucceedAction(response))),\n catchError((error) =>\n of(new ExportTransactionsToCsvFailAction(error)))\n );\n })\n ),\n );\n\n private getParams(sorting: Sorting, filter: Filter, pageSize: number, page: number): any {\n\n const retVal: any = {\n ...(sorting.orderDirection ? {OrderBy: sorting.orderBy, OrderDirection: sorting.orderDirection} : {}),\n ...{\n TransactionId: filter.transactionId,\n Amount: filter.amount,\n AuthCode: filter.authCode,\n First6: filter.first6,\n Last4: filter.last4,\n PayerName: filter.payerName,\n CardBrands: filter.cardBrands,\n Statuses: filter.statuses,\n Gateways: filter.gateways,\n TID: filter.tid,\n MID: filter.mid,\n DigitalWallets: filter.digitalWallets,\n Types: filter.types,\n Token: filter.token\n },\n StartDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDateInterval?.from),\n EndDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDateInterval?.to),\n SettlementStartDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDateSettledInterval?.from),\n SettlementEndDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDateSettledInterval?.to),\n \"Pager.PageSize\": pageSize,\n \"Pager.PageIndex\": page\n };\n\n if (typeof filter.isServiceFee === \"string\") {\n retVal.IsServiceFee = filter.isServiceFee === \"Yes\";\n }\n\n return retVal;\n }\n\n}\n","import { Action } from \"@ngrx/store\";\n\nexport enum ActionTypes {\n NoOp = \"[Generic] NoOp\",\n}\nexport class GenericNoOpAction implements Action {\n\n constructor() { }\n\n readonly type = ActionTypes.NoOp;\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { ROUTER_NAVIGATED, RouterNavigationAction } from \"@ngrx/router-store\";\nimport { map, filter, switchMap, catchError, mergeMap, tap } from \"rxjs/operators\";\nimport { of } from \"rxjs\";\nimport * as TransactionActions from \"./transaction.actions\";\nimport { PaymentsService } from \"@merchant_api/services/payments.service\";\nimport { GetPaymentDetailAction } from \"../payment/payment.actions\";\nimport { GcpStorageResource } from \"@merchant_api/models/gcp-storage-resource\";\nimport { GenericNoOpAction } from \"../generic.actions\";\nimport { PageLoadFailAction } from \"../router/router.actions\";\n\n@Injectable()\nexport class TransactionEffects {\n\n constructor(\n private actions: Actions,\n private paymentsService: PaymentsService\n ) {}\n\n initTransactionDetailPage = createEffect(() => this.actions.pipe(\n ofType(ROUTER_NAVIGATED),\n filter((action: RouterNavigationAction) => new RegExp(/dashboard\\/transactions\\/.*/).test(action.payload.routerState.url)),\n map((action: any) => {\n const rS = action.payload.routerState;\n const token = rS.root.firstChild.firstChild.params.id;\n return TransactionActions.GetTransactionDetailAction({ token, getRelations: true });\n }),\n ));\n\n getTransaction = createEffect(() => this.actions.pipe(\n ofType(TransactionActions.GetTransactionDetailAction),\n switchMap(({ token, getRelations }) =>\n this.paymentsService.transactionsGet({ token })\n .pipe(\n mergeMap(record => of(TransactionActions.GetTransactionDetailSucceedAction({ record, getRelations }))),\n catchError((error) => of(TransactionActions.GetTransactionDetailFailAction(error)))\n )\n )\n ));\n\n getTransactionSucceed = createEffect(() => this.actions.pipe(\n ofType(TransactionActions.GetTransactionDetailSucceedAction),\n switchMap(action => (action.getRelations\n ? of(new GetPaymentDetailAction(action.record.paymentToken, action.getRelations))\n : of(new GenericNoOpAction()))),\n ));\n\n getTransactionFail = createEffect(() => this.actions.pipe(\n ofType(TransactionActions.GetTransactionDetailFailAction),\n switchMap(() => of(PageLoadFailAction()))\n ));\n\n downloadReceipt = createEffect(() => this.actions.pipe(\n ofType(TransactionActions.DownloadReceiptAction),\n switchMap(({ transaction }) => this.paymentsService.transactionsReceipt({ token: transaction.token }).pipe(\n catchError(() => of(null as GcpStorageResource)),\n )),\n map(response => response?.url),\n filter(url => !!url),\n tap(url => { window.open(url, \"_self\"); }),\n ), { dispatch: false });\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport {\n ActionTypes,\n FilterPaymentsAction,\n SortPaymentsAction,\n PageChangedPaymentsAction,\n ExportPaymentsToCsvAction,\n ExportPaymentsToCsvSucceedAction,\n GetPaymentsAction,\n GetPaymentsSucceedAction,\n ExportPaymentsToCsvFailAction,\n GetPaymentsFailAction,\n} from \"./payments.actions\";\nimport { switchMap, withLatestFrom, tap, catchError, filter as filterOperator } from \"rxjs/operators\";\nimport { of } from \"rxjs\";\nimport { PaymentsService } from \"@merchant_api/services/payments.service\";\nimport { IStore } from \"../store\";\nimport { Store } from \"@ngrx/store\";\nimport { LocalTimePoint } from \"shared-lib\";\nimport { Filter, Sorting } from \"./payments.state\";\nimport { getPaymentsState } from \"./payments.selectors\";\nimport { RouterNavigationAction, ROUTER_NAVIGATED } from \"@ngrx/router-store\";\n\n@Injectable()\nexport class PaymentsEffects {\n\n constructor(\n private actions: Actions,\n private paymentsService: PaymentsService,\n private store: Store<IStore>,\n ) { }\n\n initPaymentsPage = createEffect(() =>\n this.actions.pipe(\n ofType(ROUTER_NAVIGATED),\n filterOperator((action: RouterNavigationAction) => new RegExp(/dashboard\\/payments$/).test(action.payload.routerState.url)),\n switchMap(() =>\n [ new GetPaymentsAction(1) ]\n )\n )\n );\n\n filterList = createEffect(() =>\n this.actions.pipe(\n ofType<FilterPaymentsAction>(ActionTypes.FilterPayments),\n switchMap(action => of(new GetPaymentsAction(1, action.filter)))\n ),\n );\n\n sortList = createEffect(() =>\n this.actions.pipe(\n ofType<SortPaymentsAction>(ActionTypes.SortPayments),\n switchMap(action => of(new GetPaymentsAction(1, undefined, action.sorting)))\n ),\n );\n\n pageChanged = createEffect(() =>\n this.actions.pipe(\n ofType<PageChangedPaymentsAction>(ActionTypes.PageChangedPayments),\n switchMap(action => of(new GetPaymentsAction(action.page)))\n ),\n );\n\n getPayments = createEffect(() =>\n this.actions.pipe(\n ofType<GetPaymentsAction>(ActionTypes.GetPayments),\n withLatestFrom(this.store.select(getPaymentsState)),\n switchMap(([action, state]) => {\n\n const filter = action.filter ? action.filter : state.filter;\n const sorting = action.sorting ? action.sorting : state.sorting;\n const params = this.getParams(sorting, filter, state.pager.pageSize, action.page);\n\n const stateExtensions = {\n filter,\n sorting\n };\n\n return this.paymentsService.paymentsSearch(params).pipe(\n switchMap((response) =>\n of(new GetPaymentsSucceedAction(response, state.pager.pageSize, action.page, stateExtensions))),\n catchError((error) => of(new GetPaymentsFailAction(error)))\n );\n })\n ),\n );\n\n exportToCsv = createEffect(() =>\n this.actions.pipe(\n ofType<ExportPaymentsToCsvAction>(ActionTypes.ExportPaymentsToCsv),\n withLatestFrom(this.store.select(getPaymentsState)),\n switchMap(([_, state]) => {\n\n const params = this.getParams(state.sorting, state.filter, state.pager.pageSize, state.pager.page);\n\n return this.paymentsService.paymentsExport(params).pipe(\n tap(response => window.location.href = response.url),\n switchMap((response) =>\n of(new ExportPaymentsToCsvSucceedAction(response))),\n catchError((error) =>\n of(new ExportPaymentsToCsvFailAction(error)))\n );\n })\n ),\n );\n\n private getParams(sorting: Sorting, filter: Filter, pageSize: number, page: number): any {\n\n return {\n ...(sorting.orderDirection ? {OrderBy: sorting.orderBy, OrderDirection: sorting.orderDirection} : {}),\n ...{\n Amount: filter.amount,\n First6: filter.first6,\n Last4: filter.last4,\n PayerName: filter.payerName,\n CardBrands: filter.cardBrands,\n DisputeTypes: filter.disputeTypes,\n Token: filter.token,\n Statuses: filter.statuses,\n Gateways: filter.gateways,\n TID: filter.tid,\n MID: filter.mid,\n DigitalWallets: filter.digitalWallets\n },\n StartDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDateInterval?.from),\n EndDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDateInterval?.to),\n SettlementStartDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDateSettledInterval?.from),\n SettlementEndDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDateSettledInterval?.to),\n \"Pager.PageSize\": pageSize,\n \"Pager.PageIndex\": page\n };\n }\n\n}\n","import { Action } from \"@ngrx/store\";\nimport { TransactionDetails } from \"@merchant_api/models/transaction-details\";\n\nexport enum ActionTypes {\n GetTransactionSiblingsDetail = \"[Transaction Siblings] GetTransactionSiblingsDetail\",\n GetTransactionSiblingsDetailSucceed = \"[Transaction Siblings] GetTransactionSiblingsDetailSucceed\",\n GetTransactionSiblingsDetailFail = \"[Transaction Siblings] GetTransactionSiblingsDetailFail\"\n}\n\nexport class GetTransactionSiblingsDetailAction implements Action {\n\n constructor(public tokens: string[]) { }\n\n readonly type = ActionTypes.GetTransactionSiblingsDetail;\n}\n\nexport class GetTransactionSiblingsDetailSucceedAction implements Action {\n\n constructor(public record: TransactionDetails[]) { }\n\n readonly type = ActionTypes.GetTransactionSiblingsDetailSucceed;\n}\n\nexport class GetTransactionSiblingsDetailFailAction implements Action {\n\n constructor(public error: any) { }\n\n readonly type = ActionTypes.GetTransactionSiblingsDetailFail;\n}\n","import { Action } from \"@ngrx/store\";\nimport { NextPaymentAction } from \"@merchant_api/models/next-payment-action\";\n\nexport enum ActionTypes {\n GetNextPaymentActions = \"[NextPaymentActions] GetNextPaymentActions\",\n GetNextPaymentActionsSucceed = \"[NextPaymentActions] GetNextPaymentActionsSucceed\",\n GetNextPaymentActionsFail = \"[NextPaymentActions] GetNextPaymentActionsFail\"\n}\n\nexport class GetNextPaymentActionsAction implements Action {\n\n constructor(\n public token: string\n ) { }\n\n readonly type = ActionTypes.GetNextPaymentActions;\n}\n\nexport class GetNextPaymentActionsSucceedAction implements Action {\n\n constructor(\n public record: Array<NextPaymentAction>\n ) {}\n\n readonly type = ActionTypes.GetNextPaymentActionsSucceed;\n}\n\nexport class GetNextPaymentActionsFailAction implements Action {\n\n constructor(\n public error: any\n ) {}\n\n readonly type = ActionTypes.GetNextPaymentActionsFail;\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { switchMap, catchError, mergeMap } from \"rxjs/operators\";\nimport { of, Subject } from \"rxjs\";\nimport {\n GetPaymentDetailAction,\n ActionTypes,\n GetPaymentDetailSucceedAction,\n CapturePaymentTransactionAction,\n VoidPaymentTransactionAction,\n RefundPaymentTransactionAction,\n GetPaymentFeesAction,\n GetPaymentFeesSucceedAction,\n GetPaymentDetailFailAction,\n GetPaymentFeesFailAction\n} from \"./payment.actions\";\nimport { PaymentsService } from \"@merchant_api/services/payments.service\";\nimport { NavigateAction } from \"../router/router.actions\";\nimport { GetTransactionSiblingsDetailAction } from \"../transaction-siblings/transaction-siblings.actions\";\nimport { MatDialog } from \"@angular/material/dialog\";\nimport { RefundPaymentModalComponent } from \"@merchant_app/shared/refund-payment-modal/refund-payment-modal.component\";\nimport { GetNextPaymentActionsAction } from \"../next-payment-actions/next-payment-actions.actions\";\nimport { GenericNoOpAction } from \"../generic.actions\";\nimport { ModalAction, ModalActionType } from \"@merchant_app/shared/modal-action\";\nimport { GetTransactionDetailAction } from \"../transaction/transaction.actions\";\nimport { TransactionResult } from \"@merchant_api/models/transaction-result\";\nimport { GlobalSpinnerService, VituToastService, VituToastTone } from \"shared-lib\";\n\n@Injectable()\nexport class PaymentEffects {\n\n constructor(\n private actions: Actions,\n private paymentsService: PaymentsService,\n private toast: VituToastService,\n private dialog: MatDialog,\n private globalSpinner: GlobalSpinnerService\n ) { }\n\n getPayment = createEffect(() => this.actions.pipe(\n ofType<GetPaymentDetailAction>(ActionTypes.GetPaymentDetail),\n switchMap(action => this.paymentsService.paymentsGet({ token: action.token })\n .pipe(\n mergeMap(result => of(new GetPaymentDetailSucceedAction(result, action.getRelations))),\n catchError((error) => of(new GetPaymentDetailFailAction(error)))\n ))\n ));\n\n getPaymentSucceed = createEffect(() => this.actions.pipe(\n ofType<GetPaymentDetailSucceedAction>(ActionTypes.GetPaymentDetailSucceed),\n switchMap(action => [\n (action.getRelations)\n ? new GetTransactionSiblingsDetailAction(action.record.transactions.map(transaction => transaction.token))\n : new GenericNoOpAction(),\n new GetNextPaymentActionsAction(action.record.token),\n new GetPaymentFeesAction(action.record.token)\n ])\n ));\n\n refundPaymentTransaction = createEffect((): any => this.actions.pipe(\n ofType<RefundPaymentTransactionAction>(ActionTypes.RefundPaymentTransaction),\n switchMap(refundAction => {\n const errorMessageSubject = new Subject<string>();\n const modalActionSubject = new Subject<ModalAction>();\n\n const dialogRef = this.dialog\n .open(RefundPaymentModalComponent, {\n width: \"700px\",\n data: {\n refundData: refundAction.refund,\n modalActionSubject,\n errorMessageSubject\n },\n disableClose: true\n });\n return modalActionSubject.pipe(\n switchMap(({action, params}: ModalAction) => {\n switch (action) {\n case ModalActionType.CANCEL:\n {\n dialogRef.close();\n return of();\n }\n case ModalActionType.CONFIRM:\n {\n return this.globalSpinner.apply(\n this.paymentsService.paymentsRefund(\n {\n token: params.token,\n body: params.refund\n })\n .pipe(\n switchMap((record: TransactionResult) => {\n dialogRef.close();\n return of(GetTransactionDetailAction(\n { token: record.token, getRelations: true }));\n }),\n catchError(error => {\n errorMessageSubject.next(error instanceof Error ? error.message : error);\n return of();\n }),\n )\n );\n }\n }\n })\n );\n })\n ), { dispatch: true });\n\n // capturePaymentTransaction = createEffect(() => this.actions.pipe(\n // ofType<CapturePaymentTransactionAction>(ActionTypes.CapturePaymentTransaction),\n // switchMap(action => this.paymentsService.authorizationsCapture({ id: action.token, body: action.paymentTransaction })\n // .pipe(\n // mergeMap(response => {\n\n // this.toast.open(\"Payment updated successfully.\", VituToastTone.Positive);\n // return of(NavigateAction({ payload: { path: [`/dashboard/transactions/${response.token}`] } }));\n // })\n // ))\n // ));\n\n getPaymentFees = createEffect(() => this.actions.pipe(\n ofType<GetPaymentFeesAction>(ActionTypes.GetPaymentFees),\n switchMap(action => this.paymentsService.paymentsFees({ token: action.token })\n .pipe(\n mergeMap(result => of(new GetPaymentFeesSucceedAction(result))),\n catchError((error) => of(new GetPaymentFeesFailAction(error)))\n ))\n ));\n\n}\n","import { Action } from \"@ngrx/store\";\nimport { UserDto } from \"@merchant_api/models/user-dto\";\n\nexport enum ActionTypes {\n GetUsers = \"[Users] GetUsers\",\n GetUsersSucceed = \"[Users] GetUsersSucceed\",\n GetUsersFail = \"[Users] GetUsersFail\"\n}\n\nexport class GetUsersAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.GetUsers;\n}\n\nexport class GetUsersSucceedAction implements Action {\n\n constructor(public users: Array<UserDto>) {}\n\n readonly type = ActionTypes.GetUsersSucceed;\n}\n\nexport class GetUsersFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetUsersFail;\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { ROUTER_NAVIGATED, RouterNavigatedAction } from \"@ngrx/router-store\";\nimport { catchError, filter, map, switchMap } from \"rxjs/operators\";\nimport { UsersService } from \"@merchant_api/services/users.service\";\nimport { MatDialog } from \"@angular/material/dialog\";\nimport { RolesService } from \"@merchant_api/services/roles.service\";\nimport { ActionTypes, GetUsersAction, GetUsersFailAction, GetUsersSucceedAction } from \"./users.actions\";\nimport { throwError, of } from \"rxjs\";\nimport { PagerLargeSinglePageSize } from \"../common\";\n\n@Injectable()\nexport class UsersEffects {\n\n constructor(\n private actions$: Actions,\n private usersService: UsersService,\n private dialog: MatDialog,\n private rolesService: RolesService,\n ) {}\n\n initUsersPage$ = createEffect(() =>\n this.actions$.pipe(\n ofType(ROUTER_NAVIGATED),\n filter((action: RouterNavigatedAction) => action.payload.routerState.url.startsWith(\"/dashboard/users\")),\n map(() => new GetUsersAction())\n )\n );\n\n getUsers$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetUsersAction>(ActionTypes.GetUsers),\n switchMap(() =>\n this.usersService.usersSearch({ \"Pager.PageSize\": PagerLargeSinglePageSize }).pipe(\n switchMap((users) => of(new GetUsersSucceedAction(users))),\n catchError((error) => of(new GetUsersFailAction(error)))\n )\n )\n ),\n );\n\n}\n","export const PagerLargeSinglePageSize = 100;\n","import { Injectable } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { Location } from \"@angular/common\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { tap, map } from \"rxjs/operators\";\nimport { NavigateAction, GoBackAction, GoForwardAction, PageLoadFailAction } from \"./router.actions\";\nimport { ErrorUiService } from \"shared-lib\";\n\n@Injectable()\nexport class RouterEffects {\n\n constructor(\n private actions: Actions,\n private router: Router,\n private location: Location,\n private errorUi: ErrorUiService\n ) {}\n\n navigate = createEffect(() => this.actions.pipe(\n ofType(NavigateAction),\n map(action => action.payload),\n tap(routeInfo => {\n\n const { path, query, extras } = routeInfo;\n this.router.navigate(path, { queryParams: query, ...extras });\n }),\n ), { dispatch: false });\n\n navigateBack = createEffect(() => this.actions.pipe(\n ofType(GoBackAction),\n tap(() => { this.location.back(); }),\n ), { dispatch: false });\n\n navigateForward = createEffect(() => this.actions.pipe(\n ofType(GoForwardAction),\n tap(() => { this.location.forward(); }),\n ), { dispatch: false });\n\n pageLoadFail = createEffect(() => this.actions.pipe(\n ofType(PageLoadFailAction),\n tap(() => {\n this.errorUi.dismissAll();\n this.router.navigate([\"/page-unavailable\"]);\n })\n ), { dispatch: false });\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport {\n ActionTypes,\n GetTransactionSiblingsDetailAction,\n GetTransactionSiblingsDetailFailAction,\n GetTransactionSiblingsDetailSucceedAction\n} from \"./transaction-siblings.actions\";\nimport { switchMap, catchError, mergeMap } from \"rxjs/operators\";\nimport { throwError, of, Observable, forkJoin } from \"rxjs\";\nimport { PaymentsService } from \"@merchant_api/services/payments.service\";\nimport { TransactionDetails } from \"@merchant_api/models/transaction-details\";\n\n@Injectable()\nexport class TransactionSiblingsEffects {\n\n constructor(\n private actions: Actions,\n private paymentsService: PaymentsService\n ) {}\n\n getTransactionSiblings = createEffect(() => this.actions.pipe(\n ofType<GetTransactionSiblingsDetailAction>(ActionTypes.GetTransactionSiblingsDetail),\n switchMap((action: GetTransactionSiblingsDetailAction) => {\n\n const transactionQueries: Observable<TransactionDetails>[] = [];\n action.tokens.forEach((transactionSibling) => {\n transactionQueries.push(this.paymentsService.transactionsGet({ token: transactionSibling }));\n });\n\n return forkJoin(transactionQueries).pipe(\n mergeMap(result => of(new GetTransactionSiblingsDetailSucceedAction(result))),\n catchError((error) => of(new GetTransactionSiblingsDetailFailAction(error)))\n );\n })\n ));\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { MatDialog } from \"@angular/material/dialog\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { forkJoin, Observable, of } from \"rxjs\";\nimport { catchError, filter, map, mergeMap, switchMap, take } from \"rxjs/operators\";\nimport { UsersService } from \"@merchant_api/services/users.service\";\nimport { RolesService } from \"@merchant_api/services/roles.service\";\nimport { NavigateAction, PageLoadFailAction } from \"../router/router.actions\";\nimport { GetCurrentUserAction, GetCurrentUserSucceedAction } from \"../current-user/current-user.actions\";\nimport { ConfirmationModalComponent, ConfirmationModalData, VituToastService, VituToastTone } from \"shared-lib\";\nimport { ActionTypes, CreateUserAction, DeleteUserAction, GetNewUserAction, GetUserAction, GetUserFailAction, GetUserSucceedAction,\n ResetUserPasswordAction, UpdateUserAction } from \"./user.actions\";\nimport { ActionTypes as CurrentUserActionTypes } from \"../current-user/current-user.actions\";\nimport { UserDetailsDto } from \"@merchant_api/models/user-details-dto\";\nimport { Store } from \"@ngrx/store\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { GlobalSpinnerService } from \"shared-lib\";\n\n@Injectable()\nexport class UserEffects {\n\n constructor(\n private actions$: Actions,\n private usersService: UsersService,\n private rolesService: RolesService,\n private dialog: MatDialog,\n private toast: VituToastService,\n private globalSpinner: GlobalSpinnerService,\n private store: Store<IStore>\n ) {}\n\n getUser$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetUserAction>(ActionTypes.GetUser),\n switchMap(action =>\n forkJoin({\n user: this.usersService.usersGet({ id: action.id }),\n roleList: this.rolesService.rolesSearch(),\n }).pipe(\n mergeMap(({ user, roleList }) => of(new GetUserSucceedAction(user, roleList))),\n catchError((error) => of(new GetUserFailAction(error)))\n )\n )\n ),\n );\n\n getNewUser$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetNewUserAction>(ActionTypes.GetNewUser),\n switchMap(() =>\n this.rolesService.rolesSearch().pipe(\n switchMap((roleList) => {\n const newUser: UserDetailsDto = {\n email: \"\",\n firstName: \"\",\n id: \"\",\n isLockedOut: false,\n lastName: \"\",\n roleIds: []\n };\n return of(new GetUserSucceedAction(newUser, roleList));\n }),\n catchError((error) => of(new GetUserFailAction(error)))\n )\n )\n )\n );\n\n getUserFail = createEffect(() =>\n this.actions$.pipe(\n ofType<GetUserFailAction>(ActionTypes.GetUserFail),\n switchMap(() => of(PageLoadFailAction()))\n )\n );\n\n updateUser$ = createEffect(() => this.actions$.pipe(\n ofType<UpdateUserAction>(ActionTypes.UpdateUser),\n switchMap(({ user }) =>\n this.globalSpinner.apply(this.usersService.usersPut({ id: user.id, body: user }).pipe(\n this.waitOnGetCurrentUser.bind(this),\n switchMap(() => of(NavigateAction({ payload: { path: [\"/dashboard/users\"] } })))\n ))\n )\n ));\n\n deleteUser$ = createEffect(() =>\n this.actions$.pipe(\n ofType<DeleteUserAction>(ActionTypes.DeleteUser),\n switchMap(({ userId }) => this.dialog.open(ConfirmationModalComponent, {\n data: {\n title: \"Delete User\",\n subtitle: \"Are you sure you want to permanently delete this user record?\",\n confirmButtonText: \"Delete\"\n } as ConfirmationModalData\n }).afterClosed().pipe(\n map((deleteConfirmed: boolean) => ({ userId, deleteConfirmed })),\n )),\n filter(({ deleteConfirmed }) => deleteConfirmed),\n switchMap(({ userId }) =>\n this.globalSpinner.apply(\n this.usersService.usersDelete({ id: userId }).pipe(\n switchMap(() => of(NavigateAction({ payload: { path: [\"/dashboard/users\"] } })))\n )\n )\n )\n )\n );\n\n resetUserPassword$ = createEffect(() => this.actions$.pipe(\n ofType<ResetUserPasswordAction>(ActionTypes.ResetUserPassword),\n switchMap(({ userId }) => this.dialog.open(ConfirmationModalComponent, {\n data: {\n title: \"Reset Password\",\n subtitle: \"Are you sure you want to reset this user password?\",\n confirmButtonText: \"Reset\"\n } as ConfirmationModalData\n }).afterClosed().pipe(\n map((resetConfirmed: boolean) => ({ userId, resetConfirmed })),\n )),\n filter(({ resetConfirmed }) => resetConfirmed),\n switchMap(({ userId }) =>\n this.globalSpinner.apply(\n this.usersService.usersResetPassword({ id: userId, body: { returnUrl: window.location.origin } }).pipe(\n map(() => {\n this.toast.open(\"We have sent an email with password reset instructions to user email\", VituToastTone.Positive);\n })\n )\n )\n )\n ), { dispatch: false });\n\n createUser$ = createEffect(() => this.actions$.pipe(\n ofType<CreateUserAction>(ActionTypes.CreateUser),\n switchMap(({ user }) =>\n this.globalSpinner.apply(\n this.usersService.usersPost({ body: user }).pipe(\n switchMap(() => of(NavigateAction({ payload: { path: [\"/dashboard/users\"] } })))\n )\n )\n )\n ));\n\n private waitOnGetCurrentUser<T>(source: Observable<T>) {\n // AC_todo : Need to improve this:\n // Inefficient => Only needs called if role being altered is for current user\n return source.pipe(\n map(() => {\n this.store.dispatch(new GetCurrentUserAction());\n return 1;\n }),\n switchMap(() => this.actions$.pipe(\n ofType<GetCurrentUserSucceedAction>(CurrentUserActionTypes.GetCurrentUserSucceed),\n take(1))\n )\n );\n }\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { switchMap, catchError, mergeMap } from \"rxjs/operators\";\nimport { throwError, of } from \"rxjs\";\nimport { PaymentsService } from \"@merchant_api/services/payments.service\";\nimport { ActionTypes, GetNextPaymentActionsAction, GetNextPaymentActionsFailAction,\n GetNextPaymentActionsSucceedAction } from \"./next-payment-actions.actions\";\n\n@Injectable()\nexport class NextPaymentActionsEffects {\n\n constructor(\n private actions: Actions,\n private paymentsService: PaymentsService\n ) { }\n\n getNextPaymentActions = createEffect(() => this.actions.pipe(\n ofType<GetNextPaymentActionsAction>(ActionTypes.GetNextPaymentActions),\n switchMap(action => this.paymentsService.paymentsGetNextPaymentActions({ token: action.token })\n .pipe(\n mergeMap(result => of(new GetNextPaymentActionsSucceedAction(result))),\n catchError((error) => of(new GetNextPaymentActionsFailAction(error)))\n ))\n ));\n\n}\n","import { ErrorHandler, Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { from, Observable, of } from \"rxjs\";\nimport { catchError, filter, switchMap } from \"rxjs/operators\";\nimport { ActionTypes, AddDetailsToCurrentUserAction, GetCurrentUserAction, GetCurrentUserSucceedAction } from \"./current-user.actions\";\nimport { PermissionsService } from \"@merchant_api/services/permissions.service\";\nimport { CurrentUserDto } from \"./current-user.state\";\nimport { Router } from \"@angular/router\";\nimport { AuthService, VituHttpErrorForbidden, GlobalErrorHandler, PermissionUtils, ErrorUiService } from \"shared-lib\";\nimport { UsersService } from \"@merchant_api/services/users.service\";\n\n@Injectable()\nexport class CurrentUserEffects {\n\n constructor(\n private actions: Actions,\n private authService: AuthService,\n private permissionsService: PermissionsService,\n private usersService: UsersService,\n private router: Router,\n private errorHandler: ErrorHandler,\n private errorUi: ErrorUiService\n ) {}\n\n getCurrentUser = createEffect(() => this.actions.pipe(\n ofType<GetCurrentUserAction>(ActionTypes.GetCurrentUser),\n switchMap(() => from(this.authService.loadUserProfile())\n .pipe(\n switchMap((userProfile: any): Observable<any> =>\n this.permissionsService.permissionsSearchForCurrentUser().pipe(\n switchMap(currentUserPermissions => {\n\n const currentUserDto: CurrentUserDto = {\n id: userProfile?.info?.sub,\n permissions: currentUserPermissions && currentUserPermissions.map(\n currentUserPermission => currentUserPermission.name),\n name: \"\",\n email: \"\",\n defaultRoute: \"\"\n };\n currentUserDto.defaultRoute = this.getDefaultRoute(currentUserDto.permissions);\n (this.errorHandler as GlobalErrorHandler).currentUser = currentUserDto;\n\n return of(new GetCurrentUserSucceedAction(currentUserDto));\n }),\n catchError(error => {\n\n if (error instanceof VituHttpErrorForbidden) {\n this.router.navigateByUrl(\"/forbidden\");\n }\n\n return of();\n }),\n )\n )\n )\n )\n ));\n\n getCurrentUserSucceed$ = createEffect(() =>\n\n this.actions.pipe(\n ofType<GetCurrentUserSucceedAction>(ActionTypes.GetCurrentUserSucceed),\n filter(action => PermissionUtils.hasPermissions(action.record.permissions, [\"core.users.get\"])),\n switchMap(action =>\n this.usersService.usersGet({ id: action.record.id }).pipe(\n switchMap((userDetailsDto) => of(new AddDetailsToCurrentUserAction(userDetailsDto)))\n )\n )\n ),\n );\n\n private getDefaultRoute(currentPermissions: string[]): string {\n\n let defaultRoute = \"/dashboard/help\";\n\n if(this.currentUserHasPermissions(currentPermissions, [\"core.payments.search\"])) {\n defaultRoute = \"/dashboard/payments\";\n }\n else if(this.currentUserHasPermissions(currentPermissions, [\"core.transactions.search\"])) {\n defaultRoute = \"/dashboard/transactions\";\n }\n else if(this.currentUserHasPermissions(currentPermissions, [\"core.users.search\"])) {\n defaultRoute = \"/dashboard/users\";\n }\n else if(this.currentUserHasPermissions(currentPermissions, [\"core.roles.search\"])) {\n defaultRoute = \"/dashboard/roles\";\n }\n else if(this.currentUserHasPermissions(currentPermissions, [\"core.reports.billing\"])) {\n defaultRoute = \"/dashboard/reports\";\n }\n else if(this.currentUserHasPermissions(currentPermissions, [\"core.merchants.get-tids\"])) {\n defaultRoute = \"/dashboard/configurations\";\n }\n else if(this.currentUserHasPermissions(currentPermissions, [\"core.funding.search\"])) {\n defaultRoute = \"/dashboard/funding\";\n }\n else if(this.currentUserHasPermissions(currentPermissions, [\"core.clients.search\"])) {\n defaultRoute = \"/dashboard/developer/clients\";\n }\n else if(this.currentUserHasPermissions(currentPermissions, [\"core.webhooks.search\"])) {\n defaultRoute = \"/dashboard/developer/webhooks/configure\";\n }\n\n if (this.errorUi) {\n this.errorUi.defaultRoute = defaultRoute;\n }\n\n return defaultRoute;\n }\n\n private currentUserHasPermissions(currentPermissions: string[], requiredPermissions: string[]): boolean {\n\n return PermissionUtils.hasPermissions(currentPermissions, requiredPermissions);\n }\n\n}\n","import * as E from \"linq\";\nimport { Injectable } from \"@angular/core\";\nimport { Actions, createEffect, ofType, ROOT_EFFECTS_INIT } from \"@ngrx/effects\";\nimport { map, filter, mergeMap, debounceTime, switchMap } from \"rxjs/operators\";\nimport { fromEvent, merge, of } from \"rxjs\";\nimport { AuthService } from \"shared-lib\";\n\n@Injectable()\nexport class AppEffects {\n constructor(\n private actions: Actions,\n private authService: AuthService\n ) { }\n\n private inactivityInterval = 15 * 60 * 1000;\n\n inactivity$ = createEffect(() =>\n this.actions.pipe(\n ofType(ROOT_EFFECTS_INIT),\n mergeMap(() => {\n\n const events = [\n \"mousemove\",\n \"keydown\",\n \"DOMMouseScroll\",\n \"mousewheel\",\n \"mousedown\",\n \"touchstart\",\n ];\n\n const events$ = E.from(events)\n .select(e => fromEvent(document, e))\n .toArray();\n\n const kickstartInactivityWatcher = of(null);\n\n const allEvents$ = merge(\n kickstartInactivityWatcher,\n ...events$\n );\n\n return allEvents$.pipe(\n debounceTime(this.inactivityInterval),\n switchMap(() => this.authService.validateToken()),\n filter(i => i),\n map(() => this.authService.logout()),\n );\n }),\n )\n , { dispatch: false });\n\n // Handles incoming signals from another open browser tab (which this user\n // was also logged in to), to also log the user out from this tab.\n logoutFromOtherTabs$ = createEffect(() =>\n this.actions.pipe(\n ofType(ROOT_EFFECTS_INIT),\n mergeMap(() =>\n fromEvent<StorageEvent>(window, \"storage\").pipe(\n filter(event => event.key === \"DO_LOGOUT\"),\n map(() => this.authService.logout())\n )\n )\n )\n , { dispatch: false });\n\n}\n","import { Action } from \"@ngrx/store\";\nimport { RoleDto } from \"@merchant_api/models/role-dto\";\n\nexport enum ActionTypes {\n GetRoles = \"[Roles] GetRoles\",\n GetRolesSucceed = \"[Roles] GetRolesSucceed\",\n GetRolesFail = \"[Roles] GetRolesFail\"\n}\n\nexport class GetRolesAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.GetRoles;\n}\n\nexport class GetRolesSucceedAction implements Action {\n\n constructor(public roles: Array<RoleDto>) {}\n\n readonly type = ActionTypes.GetRolesSucceed;\n}\n\nexport class GetRolesFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetRolesFail;\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { ROUTER_NAVIGATED, RouterNavigatedAction } from \"@ngrx/router-store\";\nimport { catchError, filter, map, switchMap } from \"rxjs/operators\";\nimport { ActionTypes, GetRolesAction, GetRolesFailAction, GetRolesSucceedAction } from \"./roles.actions\";\nimport { of } from \"rxjs\";\nimport { RolesService } from \"@merchant_api/services/roles.service\";\n\n@Injectable()\nexport class RolesEffects {\n\n constructor(\n private actions$: Actions,\n private rolesService: RolesService\n ) {}\n\n initRolesPage$ = createEffect(() =>\n this.actions$.pipe(\n ofType(ROUTER_NAVIGATED),\n filter((action: RouterNavigatedAction) => action.payload.routerState.url.startsWith(\"/dashboard/roles\")),\n map(() => new GetRolesAction())\n )\n );\n\n getRoles$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetRolesAction>(ActionTypes.GetRoles),\n switchMap(() =>\n this.rolesService.rolesSearch().pipe(\n switchMap((roles) => of(new GetRolesSucceedAction(roles))),\n catchError((error) => of(new GetRolesFailAction(error)))\n )\n )\n ),\n );\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { MatDialog } from \"@angular/material/dialog\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { forkJoin, Observable, of } from \"rxjs\";\nimport { catchError, filter, map, mergeMap, switchMap, take } from \"rxjs/operators\";\nimport { RolesService } from \"@merchant_api/services/roles.service\";\nimport { NavigateAction, PageLoadFailAction } from \"../router/router.actions\";\nimport { GetCurrentUserAction, GetCurrentUserSucceedAction } from \"../current-user/current-user.actions\";\nimport { ConfirmationModalComponent, ConfirmationModalData,\n VituCommonErrorEntityIdMustBeNumber } from \"shared-lib\";\nimport { ActionTypes, CreateRoleAction, DeleteRoleAction, GetNewRoleAction, GetRoleAction,\n GetRoleFailAction, GetRoleSucceedAction, UpdateRoleAction } from \"./role.actions\";\nimport { ActionTypes as CurrentUserActionTypes } from \"../current-user/current-user.actions\";\nimport { Store } from \"@ngrx/store\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { GlobalSpinnerService } from \"shared-lib\";\nimport { PermissionsService } from \"@merchant_api/services/permissions.service\";\nimport { RoleDetailsDto } from \"@merchant_api/models/role-details-dto\";\n\n@Injectable()\nexport class RoleEffects {\n\n constructor(\n private actions$: Actions,\n private rolesService: RolesService,\n private permissionsService: PermissionsService,\n private dialog: MatDialog,\n private globalSpinner: GlobalSpinnerService,\n private store: Store<IStore>\n ) {}\n\n getRole$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetRoleAction>(ActionTypes.GetRole),\n switchMap(action => {\n if (isNaN(action.id)) {\n return of(new GetRoleFailAction(new VituCommonErrorEntityIdMustBeNumber()));\n }\n return forkJoin({\n role: this.rolesService.rolesGet({ id: action.id }),\n permissionList: this.permissionsService.permissionsSearch(),\n }).pipe(\n mergeMap(({ role, permissionList }) => of(new GetRoleSucceedAction(role, permissionList))),\n catchError((error) => of(new GetRoleFailAction(error)))\n );\n })\n ),\n );\n\n getNewRole$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetNewRoleAction>(ActionTypes.GetNewRole),\n switchMap(() =>\n this.permissionsService.permissionsSearch().pipe(\n switchMap((permissionList) => {\n const newRole: RoleDetailsDto = {\n name: \"\",\n permissionIds: []\n };\n return of(new GetRoleSucceedAction(newRole, permissionList));\n }),\n catchError((error) => of(new GetRoleFailAction(error)))\n )\n ),\n ),\n );\n\n getRoleFail = createEffect(() =>\n this.actions$.pipe(\n ofType<GetRoleFailAction>(ActionTypes.GetRoleFail),\n switchMap(() => of(PageLoadFailAction()))\n )\n );\n\n updateRole$ = createEffect(() => this.actions$.pipe(\n ofType<UpdateRoleAction>(ActionTypes.UpdateRole),\n switchMap(({ role }) =>\n this.globalSpinner.apply(this.rolesService.rolesPut({ id: role.id, body: role }).pipe(\n this.waitOnGetCurrentUser.bind(this),\n switchMap(() => of(NavigateAction({ payload: { path: [\"/dashboard/roles\"] } })))\n ))\n )\n ));\n\n deleteRole$ = createEffect(() =>\n this.actions$.pipe(\n ofType<DeleteRoleAction>(ActionTypes.DeleteRole),\n switchMap(({ role }) => this.dialog.open(ConfirmationModalComponent, {\n data: {\n title: \"Delete Role\",\n subtitle: \"Are you sure you want to permanently delete this role?\",\n confirmButtonText: \"Delete\"\n } as ConfirmationModalData\n }).afterClosed().pipe(\n map((deleteConfirmed: boolean) => ({ role, deleteConfirmed })),\n )),\n filter(({ deleteConfirmed }) => deleteConfirmed),\n switchMap(({ role }) =>\n this.globalSpinner.apply(\n this.rolesService.rolesDelete({\n id: role.id,\n concurrencyToken: role.concurrencyToken,\n }).pipe(\n this.waitOnGetCurrentUser.bind(this),\n switchMap(() => of(NavigateAction({ payload: { path: [\"/dashboard/roles\"] } })))\n )\n )\n )\n )\n );\n\n createRole$ = createEffect(() => this.actions$.pipe(\n ofType<CreateRoleAction>(ActionTypes.CreateRole),\n switchMap(({ role }) =>\n this.globalSpinner.apply(\n this.rolesService.rolesPost({ body: role }).pipe(\n this.waitOnGetCurrentUser.bind(this),\n switchMap(() => of(NavigateAction({ payload: { path: [\"/dashboard/roles\"] } })))\n )\n )\n )\n ));\n\n private waitOnGetCurrentUser<T>(source: Observable<T>) {\n // AC_todo : Need to improve this:\n // Inefficient => Only needs called if role being altered is for current user\n return source.pipe(\n map(() => {\n this.store.dispatch(new GetCurrentUserAction());\n return 1;\n }),\n switchMap(() => this.actions$.pipe(\n ofType<GetCurrentUserSucceedAction>(CurrentUserActionTypes.GetCurrentUserSucceed),\n take(1))\n )\n );\n }\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { ROUTER_NAVIGATED, RouterNavigatedAction } from \"@ngrx/router-store\";\nimport { catchError, filter, map, switchMap } from \"rxjs/operators\";\nimport { of } from \"rxjs\";\nimport {\n ActionTypes,\n GenerateWebhooksSecretFailAction,\n GenerateWebhooksSecretSucceedAction,\n GetWebhooksAction,\n GetWebhooksFailAction,\n GetWebhooksSucceedAction\n} from \"./webhooks.actions\";\nimport { WebhooksService } from \"@merchant_api/services/webhooks.service\";\nimport { VituToastService, VituToastTone } from \"shared-lib\";\n\n@Injectable()\nexport class WebhooksEffects {\n\n constructor(\n private actions$: Actions,\n private webhooksService: WebhooksService,\n private toast: VituToastService\n ) {}\n\n initWebhooksPage$ = createEffect(() =>\n this.actions$.pipe(\n ofType(ROUTER_NAVIGATED),\n filter((action: RouterNavigatedAction) => action.payload.routerState.url.startsWith(\"/dashboard/developer/webhooks/configure\")),\n map(() => new GetWebhooksAction())\n )\n );\n\n getWebhooks$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetWebhooksAction>(ActionTypes.GetWebhooks),\n switchMap(() =>\n this.webhooksService.webhooksSearch().pipe(\n switchMap((webhooks) => of(new GetWebhooksSucceedAction(webhooks.items))),\n catchError((error) => of(new GetWebhooksFailAction(error)))\n )\n )\n ),\n );\n\n generateWebhooksSecret$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetWebhooksAction>(ActionTypes.GenerateWebhooksSecret),\n switchMap(() =>\n this.webhooksService.webhooksGenerateSecret().pipe(\n switchMap((secret) => {\n this.toast.open(\"Generate secret success.\", VituToastTone.Positive);\n return of(new GenerateWebhooksSecretSucceedAction(secret));\n }),\n catchError((error) => {\n this.toast.open(\"Generate secret failed.\", VituToastTone.Negative);\n return of(new GenerateWebhooksSecretFailAction(error));\n })\n )\n )\n ),\n );\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { MatDialog } from \"@angular/material/dialog\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { forkJoin, of } from \"rxjs\";\nimport { catchError, filter, map, mergeMap, switchMap, tap } from \"rxjs/operators\";\nimport { NavigateAction, PageLoadFailAction } from \"../router/router.actions\";\nimport { ConfirmationModalComponent, ConfirmationModalData,\n VituCommonErrorEntityIdMustBeNumber } from \"shared-lib\";\nimport {\n ActionTypes,\n CreateWebhookAction,\n DeleteWebhookAction,\n GetNewWebhookAction,\n GetWebhookAction,\n GetWebhookFailAction,\n GetWebhookLookupsAction,\n GetWebhookLookupsSucceedAction,\n GetWebhookSucceedAction,\n ToggleWebhookAction,\n ToggleWebhookFailAction,\n ToggleWebhookSucceedAction,\n UpdateWebhookAction\n} from \"./webhook.actions\";\nimport { GlobalSpinnerService } from \"shared-lib\";\nimport { WebhooksService } from \"@merchant_api/services/webhooks.service\";\nimport { WebhookDto } from \"@merchant_api/models/webhook-dto\";\n\n@Injectable()\nexport class WebhookEffects {\n\n constructor(\n private actions$: Actions,\n private webhooksService: WebhooksService,\n private dialog: MatDialog,\n private globalSpinner: GlobalSpinnerService\n ) {}\n\n getWebhook$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetWebhookAction>(ActionTypes.GetWebhook),\n switchMap(action => {\n if (isNaN(action.id)) {\n return of(new GetWebhookFailAction(new VituCommonErrorEntityIdMustBeNumber()));\n }\n return forkJoin({\n webhook: this.webhooksService.webhooksGet({ id: action.id }),\n lookups: this.webhooksService.webhooksEventTypes()\n }).pipe(\n mergeMap(({ webhook, lookups }) => of(new GetWebhookSucceedAction(webhook, lookups))),\n catchError((error) => of(new GetWebhookFailAction(error)))\n );\n }\n ),\n ),\n );\n\n getNewWebhook$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetNewWebhookAction>(ActionTypes.GetNewWebhook),\n switchMap(() =>\n this.webhooksService.webhooksEventTypes().pipe(\n switchMap((lookups) => {\n const newWebhook: WebhookDto = {\n eventTypes: [],\n isActive: true,\n url: \"\"\n };\n return of(new GetWebhookSucceedAction(newWebhook, lookups));\n }),\n catchError((error) => of(new GetWebhookFailAction(error)))\n )\n ),\n ),\n );\n\n getWebhookFail = createEffect(() =>\n this.actions$.pipe(\n ofType<GetWebhookFailAction>(ActionTypes.GetWebhookFail),\n switchMap(() => of(PageLoadFailAction()))\n )\n );\n\n updateWebhook$ = createEffect(() => this.actions$.pipe(\n ofType<UpdateWebhookAction>(ActionTypes.UpdateWebhook),\n switchMap(({ id, webhook }) =>\n this.globalSpinner.apply(\n this.webhooksService.webhooksPut({ id, body: webhook }).pipe(\n switchMap(() => of(NavigateAction({ payload: { path: [\"/dashboard/developer/webhooks/configure\"] } })))\n )\n )\n )\n ));\n\n deleteWebhook$ = createEffect(() =>\n this.actions$.pipe(\n ofType<DeleteWebhookAction>(ActionTypes.DeleteWebhook),\n switchMap(({ id }) => this.dialog.open(ConfirmationModalComponent, {\n data: {\n title: \"Delete Webhook\",\n subtitle: \"Are you sure you want to permanently delete this webhook?\",\n confirmButtonText: \"Delete\"\n } as ConfirmationModalData\n }).afterClosed().pipe(\n map((deleteConfirmed: boolean) => ({ id, deleteConfirmed })),\n )),\n filter(({ deleteConfirmed }) => deleteConfirmed),\n switchMap(({ id }) =>\n this.globalSpinner.apply(\n this.webhooksService.webhooksDelete({ id }).pipe(\n switchMap(() => of(NavigateAction({ payload: { path: [\"/dashboard/developer/webhooks/configure\"] } })))\n )\n )\n )\n )\n );\n\n createWebhook$ = createEffect(() => this.actions$.pipe(\n ofType<CreateWebhookAction>(ActionTypes.CreateWebhook),\n switchMap(({ webhook }) =>\n this.globalSpinner.apply(\n this.webhooksService.webhooksPost({ body: webhook }).pipe(\n switchMap(() => of(NavigateAction({ payload: { path: [\"/dashboard/developer/webhooks/configure\"] } })))\n )\n )\n )\n ));\n\n toggleWebhook$ = createEffect(() => this.actions$.pipe(\n ofType<ToggleWebhookAction>(ActionTypes.ToggleWebhook),\n switchMap(({ id, webhook, undo }) =>\n this.webhooksService.webhooksPut({ id, body: webhook }).pipe(\n switchMap(() => of(new ToggleWebhookSucceedAction(id))),\n catchError((error) => of(new ToggleWebhookFailAction(id, error, undo)))\n )\n )\n ));\n\n toggleWebhookFail$ = createEffect(() => this.actions$.pipe(\n ofType<ToggleWebhookFailAction>(ActionTypes.ToggleWebhookFail),\n tap(({ undo }) => undo())\n ), { dispatch: false });\n\n getWebhookLookups$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetWebhookLookupsAction>(ActionTypes.GetWebhookLookups),\n switchMap(() =>\n this.webhooksService.webhooksEventTypes().pipe(\n switchMap((lookups) => of(new GetWebhookLookupsSucceedAction(lookups)))\n )\n )\n ));\n\n}\n","import { Action } from \"@ngrx/store\";\nimport { Month } from \"@merchant_api/models/month\";\nimport { StatementReportItem } from \"@merchant_api/models/statement-report-item\";\n\nexport enum ActionTypes {\n ResetStatements = \"[Statements] ResetStatements\",\n GetStatements = \"[Statements] GetStatements\",\n GetStatementsSucceed = \"[Statements] GetStatementsSucceed\",\n GetStatementsFail = \"[Statements] GetStatementsFail\"\n}\n\nexport class ResetStatementsAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.ResetStatements;\n}\n\nexport class GetStatementsAction implements Action {\n\n constructor(public month: Month, public year: number, public merchantId: number) {}\n\n readonly type = ActionTypes.GetStatements;\n}\n\nexport class GetStatementsSucceedAction implements Action {\n\n constructor(public statements: Array<StatementReportItem>) {}\n\n readonly type = ActionTypes.GetStatementsSucceed;\n}\n\nexport class GetStatementsFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetStatementsFail;\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getStatementsState = (store: IStore) => store.statements;\n\nexport const getStatements = createSelector(\n getStatementsState,\n statementsState => statementsState.record,\n);\n\nexport const getStatementsLoading = createSelector(\n getStatementsState,\n statementsState => statementsState.loading,\n);\n","import { ModalAction, ModalActionType } from \"../modal-action\";\n\nexport interface DownloadReportParams {\n batchId?: string;\n merchantProcessorIds?: undefined;\n startDate?: undefined;\n endDate?: undefined;\n statementId?: string;\n merchantId?: number;\n}\n\nexport class DownloadReportModalAction extends ModalAction {\n constructor(public action: ModalActionType, public params?: DownloadReportParams) {\n super(action, params);\n }\n}\n","import { createSelector } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\n\nexport const getMidsState = (store: IStore) => store.mids;\n\nexport const getMids = createSelector(\n getMidsState,\n merchantsState => merchantsState.record,\n);\n\nexport const getMidsLoading = createSelector(\n getMidsState,\n merchantsState => merchantsState.loading,\n);\n\nexport const getMidsError = createSelector(\n getMidsState,\n merchantsState => merchantsState.error,\n);\n","import { Action } from \"@ngrx/store\";\nimport { MerchantProcessorDto } from \"@merchant_api/models/merchant-processor-dto\";\n\nexport enum ActionTypes {\n ResetMids = \"[MIDS] ResetMids\",\n GetMids = \"[MIDS] GetMids\",\n GetMidsSucceed = \"[MIDS] GetMidsSucceed\",\n GetMidsFail = \"[MIDS] GetMidsFail\"\n}\n\nexport class ResetMidsAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.ResetMids;\n}\n\nexport class GetMidsAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.GetMids;\n}\n\nexport class GetMidsSucceedAction implements Action {\n\n constructor(public mids: Array<MerchantProcessorDto>) {}\n\n readonly type = ActionTypes.GetMidsSucceed;\n}\n\nexport class GetMidsFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetMidsFail;\n}\n","<div class=\"outer-container\" (mousedown)=\"onMouseDown()\">\n\n <div mat-dialog-title>\n <div>Download Report</div>\n <i class=\"fal fa-times global-dialog-close-button\" (mousedown)=\"onCancel($event)\"></i>\n </div>\n\n <div mat-dialog-content class=\"content\">\n\n <div class=\"first-row\">\n\n <div>\n <div class=\"label\">Report Type</div>\n <div class=\"variable-text\">{{ reportType }}</div>\n </div>\n\n </div>\n\n <form class=\"form\" [formGroup]=\"reportForm\" [libVituForm]=\"reportForm\" (libVituFormSubmit)=\"onSubmit()\">\n\n <div class=\"form-fields-container\">\n\n <ng-container [ngSwitch]=\"data.reportType\">\n\n <ng-container *ngSwitchCase=\"ReportType.STATEMENT\">\n\n <div class=\"form-double-input\">\n\n <lib-vitu-form-field-select\n class=\"form-input\"\n id=\"yearField\"\n [formGroup]=\"reportForm\"\n formFieldName=\"yearField\"\n label=\"Year\"\n [options]=\"years\"\n (selectionChanged)=\"onYearChanged()\">\n </lib-vitu-form-field-select>\n\n <lib-vitu-form-field-select\n class=\"form-input\"\n id=\"monthField\"\n [formGroup]=\"reportForm\"\n formFieldName=\"monthField\"\n label=\"Month\"\n [options]=\"optionsForMonths\"\n optionLabelKey=\"label\"\n optionValueKey=\"value\"\n (selectionChanged)=\"onMonthChanged()\">\n </lib-vitu-form-field-select>\n\n </div>\n\n <lib-vitu-form-field-select\n class=\"form-input\"\n id=\"statementField\"\n [formGroup]=\"reportForm\"\n formFieldName=\"statementField\"\n label=\"Statement\"\n labelEmpty=\"No Statements\"\n [labelEmptyCondition]=\"noStatements\"\n [options]=\"statements\"\n optionLabelKey=\"description\"\n optionValueKey=\"id\">\n </lib-vitu-form-field-select>\n\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n\n <lib-vitu-form-field-date\n class=\"form-input\"\n id=\"dateRangeField\"\n [formGroup]=\"reportForm\"\n formFieldName=\"dateRangeField\"\n label=\"Date Range\"\n restrictFuture\n readonly>\n </lib-vitu-form-field-date>\n\n <lib-vitu-form-field-select\n class=\"form-input\"\n id=\"midField\"\n [formGroup]=\"reportForm\"\n formFieldName=\"midField\"\n multiple\n label=\"MID(s)\"\n labelEmpty=\"No MIDs\"\n [labelEmptyCondition]=\"noMids\"\n [options]=\"mids\"\n optionLabelKey=\"mid\"\n optionValueKey=\"id\">\n </lib-vitu-form-field-select>\n\n </ng-container>\n\n </ng-container>\n\n </div>\n\n <lib-modal-error-message *ngIf=\"data?.errorMessageSubject | async as errorMessage\" [message]=\"errorMessage\">\n </lib-modal-error-message>\n\n <lib-vitu-form-buttons>\n\n <lib-vitu-form-abort-button\n (onAbort)=\"onCancel()\"\n [isModal]=\"true\">\n </lib-vitu-form-abort-button>\n \n <lib-vitu-form-submit-button\n label=\"Download\"\n [neverDisable]=\"true\">\n </lib-vitu-form-submit-button>\n \n </lib-vitu-form-buttons>\n\n </form>\n </div>\n\n</div>\n","import { GetStatementsAction, ResetStatementsAction } from \"@merchant_app/storage/statements/statements.actions\";\nimport { getStatements, getStatementsLoading } from \"@merchant_app/storage/statements/statements.selectors\";\nimport { IStore } from \"@merchant_app/storage/store\";\nimport { OnDestroy, OnInit } from \"@angular/core\";\nimport { Component, Inject } from \"@angular/core\";\nimport { UntypedFormBuilder, UntypedFormControl, Validators } from \"@angular/forms\";\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\nimport { Store } from \"@ngrx/store\";\nimport { Month } from \"@merchant_api/models/month\";\nimport { StatementReportItem } from \"@merchant_api/models/statement-report-item\";\nimport { Subject, Subscription } from \"rxjs\";\nimport { ActionButtonKind, LocalTimePoint } from \"shared-lib\";\nimport { ModalActionType } from \"../modal-action\";\nimport { DownloadReportModalAction, DownloadReportParams } from \"./download-report-modal-action\";\nimport { ReportType } from \"./report-type\";\nimport { MerchantProcessorDto } from \"@merchant_api/models/merchant-processor-dto\";\nimport { getMids, getMidsLoading } from \"@merchant_app/storage/mids/mids.selectors\";\nimport { GetMidsAction, ResetMidsAction } from \"@merchant_app/storage/mids/mids.actions\";\n\n@Component({\n selector: \"app-download-report-modal\",\n templateUrl: \"./download-report-modal.component.html\",\n styleUrls: [\"./download-report-modal.component.less\"]\n})\nexport class DownloadReportModalComponent implements OnInit, OnDestroy {\n\n get formControls() {\n return this.reportForm && this.reportForm.controls;\n }\n\n constructor(\n private fb: UntypedFormBuilder,\n private store: Store<IStore>,\n public dialogRef: MatDialogRef<DownloadReportModalComponent>,\n @Inject(MAT_DIALOG_DATA) public data: {\n reportType: ReportType;\n errorMessageSubject: Subject<string>;\n modalActionSubject: Subject<DownloadReportModalAction>;\n }\n ) {\n this.calculateMaxMonthAndYear();\n }\n\n ReportType = ReportType;\n LocalTimePoint = LocalTimePoint;\n\n mids$ = this.store.select(getMids);\n midsLoading$ = this.store.select(getMidsLoading);\n\n mids: MerchantProcessorDto[] = [];\n midsLoading = false;\n\n statements$ = this.store.select(getStatements);\n statementsLoading$ = this.store.select(getStatementsLoading);\n\n statements: Array<StatementReportItem> = [];\n statementsLoading = false;\n\n private subscriptions = new Subscription();\n\n private readonly localTimePoint = new LocalTimePoint();\n private maxMonth: number = null;\n private maxYear: number = null;\n\n get months(): Array<string> {\n let retVal = [\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"];\n if (this.hasYear) {\n const year = this.reportForm.get(\"yearField\").value;\n if (year === this.maxYear) {\n retVal = retVal.slice(0, this.maxMonth);\n }\n }\n return retVal;\n }\n\n get years(): Array<number> {\n let retVal = [];\n const minYear = 2021;\n let yearToAdd = this.maxYear;\n\n do {\n retVal.push(yearToAdd);\n } while (yearToAdd-- > minYear);\n\n if (this.hasMonth) {\n const month = this.reportForm.get(\"monthField\").value;\n if (month > this.maxMonth) {\n retVal = retVal.slice(1);\n }\n }\n return retVal;\n }\n\n ActionButtonKind = ActionButtonKind;\n\n reportForm = this.fb.group({\n idField: [{value:null, disabled: true}, [Validators.required]],\n dateSingleField: [{value:null, disabled: true}, [Validators.required]],\n dateRangeField: [{value:null, disabled: true}, [Validators.required]],\n midField: [{value:null, disabled: true}, /*this.reportType === ReportType.RECONCILIATION ? [Validators.required] :*/ []],\n statementField: [{value:null, disabled: true}, [Validators.required]],\n monthField: [{value:null, disabled: true}, [Validators.required]],\n yearField: [{value:null, disabled: true}, [Validators.required]]\n });\n\n get reportType(): string {\n return (this.data.reportType === ReportType.STATEMENT ? this.data.reportType : this.data.reportType + \" Report\");\n }\n\n getFormControl(name: string): UntypedFormControl {\n return this.formControls[name] as UntypedFormControl;\n }\n\n get optionsForMonths() {\n return this.months.map((month, index) => ({label: month, value: index + 1}));\n }\n\n ngOnInit() {\n this.disableFormFieldsForOtherReportTypes();\n\n switch (this.data.reportType) {\n case ReportType.TRANSACTIONS:\n case ReportType.FUNDING: {\n this.subscriptions.add(this.mids$.subscribe((mids: MerchantProcessorDto[]) => {\n this.mids = mids;\n }));\n this.subscriptions.add(this.midsLoading$.subscribe((midsLoading: boolean) => {\n this.midsLoading = midsLoading;\n }));\n this.resetMidField();\n this.store.dispatch(new GetMidsAction());\n break;\n }\n case ReportType.STATEMENT: {\n this.subscriptions.add(this.statements$.subscribe((statements: Array<StatementReportItem>) => {\n this.statements = statements;\n }));\n this.subscriptions.add(this.statementsLoading$.subscribe((statementsLoading: boolean) => {\n this.statementsLoading = statementsLoading;\n }));\n this.resetStatementField();\n break;\n }\n }\n }\n\n ngOnDestroy() {\n this.subscriptions.unsubscribe();\n }\n\n onMonthChanged() {\n switch (this.data.reportType) {\n case ReportType.STATEMENT: {\n this.getStatementsIfRequired();\n break;\n }\n }\n }\n\n onYearChanged() {\n switch (this.data.reportType) {\n case ReportType.STATEMENT: {\n this.getStatementsIfRequired();\n break;\n }\n }\n }\n\n get hasMonth(): boolean {\n const monthField = this.reportForm.get(\"monthField\");\n return (monthField && (monthField.value !== null));\n }\n\n get hasYear(): boolean {\n const yearField = this.reportForm.get(\"yearField\");\n return (yearField && (yearField.value !== null));\n }\n\n get noStatements(): boolean {\n return (!this.statementsLoading) && !(this.statements?.length);\n }\n\n get noMids(): boolean {\n return (!this.midsLoading) && !(this.mids?.length);\n }\n\n onMouseDown() {\n this.data.errorMessageSubject.next(\"\");\n }\n\n onCancel(event?: any) {\n if (event) {\n event.preventDefault();\n }\n this.data.modalActionSubject.next(new DownloadReportModalAction(ModalActionType.CANCEL));\n }\n\n onSubmit() {\n\n const params: DownloadReportParams = {};\n\n switch (this.data.reportType) {\n case ReportType.TRANSACTIONS:\n case ReportType.FUNDING: {\n params.merchantProcessorIds = this.getSubmitValueForField(\"midField\");\n const dateRange = this.getSubmitValueForField(\"dateRangeField\");\n if (dateRange) {\n params.startDate = dateRange.from;\n params.endDate = dateRange.to;\n }\n break;\n }\n case ReportType.STATEMENT: {\n params.statementId = this.getSubmitValueForField(\"statementField\");\n break;\n }\n }\n\n this.data.modalActionSubject.next(new DownloadReportModalAction(ModalActionType.CONFIRM, params));\n }\n\n private getSubmitValueForField(fieldName: string): any {\n const fieldValue = this.reportForm.get(fieldName).value;\n return (fieldValue ? fieldValue : undefined);\n }\n\n private disableFormFieldsForOtherReportTypes() {\n switch (this.data.reportType) {\n case ReportType.TRANSACTIONS: {\n this.reportForm.get(\"dateRangeField\").enable();\n break;\n }\n case ReportType.FUNDING: {\n this.reportForm.get(\"dateRangeField\").enable();\n break;\n }\n case ReportType.STATEMENT: {\n this.reportForm.get(\"monthField\").enable();\n this.reportForm.get(\"yearField\").enable();\n this.reportForm.get(\"statementField\").enable();\n break;\n }\n }\n }\n\n private resetStatementField(): void {\n this.reportForm.get(\"statementField\").setValue(null); // Workaround Angular issue\n this.store.dispatch(new ResetStatementsAction());\n }\n\n private resetMidField(): void {\n this.reportForm.get(\"midField\").setValue(null); // Workaround Angular issue\n this.store.dispatch(new ResetMidsAction());\n }\n\n private calculateMaxMonthAndYear(): void {\n const date = this.localTimePoint.asNgbDate;\n let month = date.month;\n let year = date.year;\n // manual calculation of previous month => accurate\n month -= 1;\n if (month <= 0) {\n month = 12;\n year -= 1;\n }\n this.maxMonth = month;\n this.maxYear = year;\n }\n\n private getStatementsIfRequired(): void {\n if (this.hasMonth && this.hasYear) {\n this.resetStatementField();\n const month = this.getMonthForMonthVal(this.reportForm.get(\"monthField\").value);\n const year = this.reportForm.get(\"yearField\").value;\n const merchantId = this.getSubmitValueForField(\"midField\");\n this.store.dispatch(new GetStatementsAction(month as Month, year, merchantId));\n }\n }\n\n private getMonthForMonthVal(monthVal: number): string {\n const months = Array.from({length: 12}, (_item, i) => new Date(0, i).toLocaleString(\"en-US\", {month: \"long\"}));\n return months[monthVal - 1];\n }\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { switchMap, catchError, tap, map, filter } from \"rxjs/operators\";\nimport { Observable, of, Subject, throwError } from \"rxjs\";\nimport {\n ActionTypes\n} from \"./report.actions\";\nimport { DownloadReportAction } from \"./report.actions\";\nimport { DownloadReportModalComponent } from \"@merchant_app/shared/download-report-modal/download-report-modal.component\";\nimport { MatDialog } from \"@angular/material/dialog\";\nimport { ModalActionType } from \"@merchant_app/shared/modal-action\";\nimport { GlobalSpinnerService, LocalTimePoint } from \"shared-lib\";\nimport { StrictHttpResponse } from \"@merchant_api/strict-http-response\";\nimport { DownloadReportModalAction } from \"@merchant_app/shared/download-report-modal/download-report-modal-action\";\nimport { ReportType } from \"@merchant_app/shared/download-report-modal/report-type\";\nimport { ReportsService } from \"@merchant_api/services/reports.service\";\n\n@Injectable()\nexport class ReportEffects {\n\n constructor(\n private actions: Actions,\n private dialog: MatDialog,\n private reportsService: ReportsService,\n private globalSpinner: GlobalSpinnerService\n ) { }\n\n downloadReport = createEffect(() => this.actions.pipe(\n ofType<DownloadReportAction>(ActionTypes.DownloadReport),\n switchMap(downloadReportAction => {\n const errorMessageSubject = new Subject<string>();\n const modalActionSubject = new Subject<DownloadReportModalAction>();\n\n const dialogRef = this.dialog\n .open(DownloadReportModalComponent, {\n width: \"400px\",\n data: {\n reportType: downloadReportAction.reportType,\n modalActionSubject,\n errorMessageSubject\n },\n disableClose: true,\n autoFocus: false\n });\n\n return modalActionSubject.pipe(\n switchMap(({action, params}: DownloadReportModalAction) => {\n switch (action) {\n case ModalActionType.CANCEL:\n {\n return of(true);\n }\n case ModalActionType.CONFIRM:\n {\n let reportRequest: Observable<any> = throwError(new Error(\"Bad Report Type.\"));\n\n switch (downloadReportAction.reportType) {\n case ReportType.TRANSACTIONS:\n {\n reportRequest = this.reportsService.reportTransactionReport$Response(\n {\n MerchantProcessorIds: params.merchantProcessorIds,\n StartDate: LocalTimePoint.convertLocalValueToUtcValue(params.startDate),\n EndDate: LocalTimePoint.convertLocalValueToUtcValue(params.endDate)\n });\n break;\n }\n case ReportType.STATEMENT:\n {\n reportRequest = this.reportsService.reportStatementReports$Response(\n {\n id: params.statementId\n });\n break;\n }\n case ReportType.FUNDING:\n {\n reportRequest = this.reportsService.reportFundingReport$Response(\n {\n MerchantProcessorIds: params.merchantProcessorIds,\n StartDate: LocalTimePoint.convertLocalValueToUtcValue(params.startDate),\n EndDate: LocalTimePoint.convertLocalValueToUtcValue(params.endDate)\n });\n break;\n }\n }\n return this.globalSpinner.apply(reportRequest.pipe(\n map((response: any) => {\n const fileName = this.getDownloadFileName(response);\n this.openFile(fileName, response);\n return true;\n }),\n catchError(error => {\n // This will catch errors from both request failure & file opening failure\n errorMessageSubject.next(error instanceof Error ? error.message : error);\n return of(false);\n })\n ));\n\n }\n }\n }),\n filter((doClose: boolean) => doClose),\n tap(() => dialogRef.close())\n );\n })\n ), { dispatch: false });\n\n private getDownloadFileName(response: StrictHttpResponse<Blob>): string {\n let fileName = null;\n\n try {\n const contentDisposition = response.headers.get(\"content-disposition\");\n const regEx = /filename=[\\\"]?([^\\\"]+?)[\\\"]?;/;\n const fileNameMatches = contentDisposition.match(regEx);\n if (Array.isArray(fileNameMatches) && (fileNameMatches.length === 2)) {\n fileName = fileNameMatches[1];\n }\n if (!fileName) {\n throw new Error();\n }\n }\n catch (error) {\n throw new Error(\"Unable to download file.\");\n }\n\n return fileName;\n }\n\n private openFile(fileName: string, response: StrictHttpResponse<Blob>): void {\n\n try {\n const blob = new Blob([response.body], { type: \"application/octet-stream\" });\n const fileUrl = URL.createObjectURL(blob);\n const tempAnchorElement: HTMLAnchorElement = document.createElement(\"a\") as HTMLAnchorElement;\n tempAnchorElement.href = fileUrl;\n tempAnchorElement.download = fileName;\n document.body.appendChild(tempAnchorElement);\n tempAnchorElement.click();\n document.body.removeChild(tempAnchorElement);\n URL.revokeObjectURL(fileUrl);\n }\n catch (error) {\n throw new Error(\"Unable to open file.\");\n }\n\n }\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { catchError, switchMap } from \"rxjs/operators\";\nimport { ActionTypes, GetStatementsAction, GetStatementsSucceedAction } from \"./statements.actions\";\nimport { of } from \"rxjs\";\nimport { ReportsService } from \"@merchant_api/services/reports.service\";\n\n@Injectable()\nexport class StatementsEffects {\n\n constructor(\n private actions$: Actions,\n private reportsService: ReportsService,\n ) {}\n\n getStatements$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetStatementsAction>(ActionTypes.GetStatements),\n switchMap((action: GetStatementsAction) => this.reportsService.reportStatementReportsAll(\n {\n year: action.year,\n month: action.month,\n }\n ).pipe(\n catchError(() => of([])),\n switchMap((statements) => of(new GetStatementsSucceedAction(statements)))\n ))\n )\n );\n\n}\n","import { Action } from \"@ngrx/store\";\nimport { ClientDto } from \"@merchant_api/models/client-dto\";\n\nexport enum ActionTypes {\n GetClients = \"[Clients] GetClients\",\n GetClientsSucceed = \"[Clients] GetClientsSucceed\",\n GetClientsFail = \"[Clients] GetClientsFail\",\n}\n\nexport class GetClientsAction implements Action {\n\n constructor() {}\n\n readonly type = ActionTypes.GetClients;\n}\n\nexport class GetClientsSucceedAction implements Action {\n\n constructor(public clients: Array<ClientDto>) {}\n\n readonly type = ActionTypes.GetClientsSucceed;\n}\n\nexport class GetClientsFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetClientsFail;\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { ROUTER_NAVIGATED, RouterNavigatedAction } from \"@ngrx/router-store\";\nimport { catchError, filter, map, switchMap } from \"rxjs/operators\";\nimport { of } from \"rxjs\";\nimport {\n ActionTypes,\n GetClientsAction,\n GetClientsFailAction,\n GetClientsSucceedAction\n} from \"./clients.actions\";\nimport { ClientsService } from \"@merchant_api/services/clients.service\";\n\n@Injectable()\nexport class ClientsEffects {\n\n constructor(\n private actions$: Actions,\n private clientsService: ClientsService\n ) {}\n\n initClientsPage$ = createEffect(() =>\n this.actions$.pipe(\n ofType(ROUTER_NAVIGATED),\n filter((action: RouterNavigatedAction) => /\\/dashboard\\/developer\\/clients/g.test(action.payload.routerState.url) &&\n !(/\\/dashboard\\/clients\\//g.test(action.payload.routerState.url))),\n map(() => new GetClientsAction())\n )\n );\n\n getClients$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetClientsAction>(ActionTypes.GetClients),\n switchMap(() =>\n this.clientsService.clientsSearch().pipe(\n switchMap((clients) => of(new GetClientsSucceedAction(clients))),\n catchError((error) => of(new GetClientsFailAction(error)))\n )\n )\n ),\n );\n\n}\n","export enum ModalActionType {\n CONFIRM,\n CANCEL\n}\n\nexport class ModalAction {\n constructor(public action: ModalActionType, public params?: any) {}\n}\n","import { ModalAction, ModalActionType } from \"@admin_app/shared/modal-action\";\n\nexport interface CreateClientSecretParams {\n clientId?: number;\n description?: string;\n localExpirationDate?: null | string;\n hashType?: string;\n type?: string;\n value?: string;\n}\n\nexport class CreateClientSecretModalAction extends ModalAction {\n constructor(public action: ModalActionType, public params?: CreateClientSecretParams) {\n super(action, params);\n }\n}\n","<div class=\"outer-container\" (mousedown)=\"onMouseDown()\">\n\n <div mat-dialog-title>\n <div>Create Client Secret</div>\n <i class=\"fal fa-times global-dialog-close-button\" (mousedown)=\"onCancel($event)\"></i>\n </div>\n\n <div mat-dialog-content class=\"content\">\n\n <form class=\"form\" [formGroup]=\"createClientSecretForm\" [libVituForm]=\"createClientSecretForm\" (libVituFormSubmit)=\"onSubmit()\">\n\n <div class=\"form-fields-container\">\n\n <lib-vitu-form-field-select\n id=\"type\"\n [formGroup]=\"createClientSecretForm\"\n formFieldName=\"type\"\n label=\"Secret Type\"\n [options]=\"data.lookups.secretTypes\"\n optionLabelKey=\"name\"\n optionValueKey=\"id\">\n </lib-vitu-form-field-select>\n\n <lib-vitu-form-field-input\n id=\"value\"\n [formGroup]=\"createClientSecretForm\"\n formFieldName=\"value\"\n label=\"Secret Value\"\n showButton=\"swap_horiz\"\n (handleButton)=\"generateSecret()\">\n </lib-vitu-form-field-input>\n\n <lib-vitu-form-field-select\n id=\"hashType\"\n [formGroup]=\"createClientSecretForm\"\n formFieldName=\"hashType\"\n label=\"Hash Type\"\n [options]=\"data.lookups.hashTypes\"\n optionLabelKey=\"name\"\n optionValueKey=\"id\">\n </lib-vitu-form-field-select>\n\n <lib-vitu-form-field-date\n id=\"localExpirationDate\"\n [formGroup]=\"createClientSecretForm\"\n formFieldName=\"localExpirationDate\"\n label=\"Expiration Date\"\n singleDateMode\n readonly>\n </lib-vitu-form-field-date>\n\n <lib-vitu-form-field-input\n id=\"description\"\n [formGroup]=\"createClientSecretForm\"\n formFieldName=\"description\"\n label=\"Description\">\n </lib-vitu-form-field-input>\n\n </div>\n\n <lib-modal-error-message *ngIf=\"data?.errorMessageSubject | async as errorMessage\" [message]=\"errorMessage\">\n </lib-modal-error-message>\n \n <lib-vitu-form-buttons>\n\n <lib-vitu-form-abort-button\n (onAbort)=\"onCancel()\"\n [isModal]=\"true\">\n </lib-vitu-form-abort-button>\n \n <lib-vitu-form-submit-button\n label=\"Create\"\n [neverDisable]=\"true\">\n </lib-vitu-form-submit-button>\n \n </lib-vitu-form-buttons>\n\n </form>\n </div>\n\n</div>\n","import { ModalActionType } from \"@admin_app/shared/modal-action\";\nimport { OnDestroy } from \"@angular/core\";\nimport { Component, Inject, QueryList, ViewChildren } from \"@angular/core\";\nimport { UntypedFormBuilder, UntypedFormControl, Validators } from \"@angular/forms\";\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\nimport { MatFormField } from \"@angular/material/form-field\";\nimport { Subject, Subscription } from \"rxjs\";\nimport { ActionButtonKind, LocalTimePoint } from \"shared-lib\";\nimport { CreateClientSecretModalAction, CreateClientSecretParams } from \"./create-client-secret-modal-action\";\nimport { ClientSecretLookupsDto } from \"@merchant_api/models/client-secret-lookups-dto\";\nimport { ClientDetailsDto } from \"@merchant_api/models/client-details-dto\";\n\n@Component({\n selector: \"app-create-client-secret-modal\",\n templateUrl: \"./create-client-secret-modal.component.html\",\n styleUrls: [\"./create-client-secret-modal.component.less\"]\n})\nexport class CreateClientSecretModalComponent implements OnDestroy {\n\n LocalTimePoint = LocalTimePoint;\n\n get formControls() {\n return this.createClientSecretForm && this.createClientSecretForm.controls;\n }\n\n constructor(\n private fb: UntypedFormBuilder,\n public dialogRef: MatDialogRef<CreateClientSecretModalComponent>,\n @Inject(MAT_DIALOG_DATA) public data: {\n lookups: ClientSecretLookupsDto;\n client: ClientDetailsDto;\n errorMessageSubject: Subject<string>;\n modalActionSubject: Subject<CreateClientSecretModalAction>;\n }\n ) {\n }\n\n private subscriptions = new Subscription();\n\n @ViewChildren(MatFormField) formFields: QueryList<MatFormField>;\n\n ActionButtonKind = ActionButtonKind;\n\n createClientSecretForm = this.fb.group({\n clientId: [this.data.client.id],\n type: [null, [Validators.required]],\n value: [null, [Validators.required]],\n hashType: [null, [Validators.required]],\n localExpirationDate: [null, []],\n description: [null, [Validators.required]]\n });\n\n getFormControl(name: string): UntypedFormControl {\n return this.formControls[name] as UntypedFormControl;\n }\n\n ngOnDestroy() {\n this.subscriptions.unsubscribe();\n }\n\n onMouseDown() {\n this.data.errorMessageSubject.next(\"\");\n }\n\n onCancel(event?: any) {\n if (event) {\n event.preventDefault();\n }\n this.data.modalActionSubject.next(new CreateClientSecretModalAction(ModalActionType.CANCEL));\n }\n\n onSubmit() {\n const params = this.createClientSecretForm.value as CreateClientSecretParams;\n this.data.modalActionSubject.next(new CreateClientSecretModalAction(ModalActionType.CONFIRM, params));\n }\n\n generateSecret() {\n\n const secretValue = \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, c => {\n\n /* eslint-disable no-bitwise */\n const r = Math.random() * 16 | 0;\n const v = (c == \"x\") ? r : (r & 0x3 | 0x8);\n /* eslint-enable no-bitwise */\n return v.toString(16);\n });\n\n this.createClientSecretForm.controls.value.setValue(secretValue);\n }\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { MatDialog } from \"@angular/material/dialog\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { forkJoin, of, Subject } from \"rxjs\";\nimport { catchError, filter, map, mergeMap, switchMap, withLatestFrom } from \"rxjs/operators\";\nimport { NavigateAction, PageLoadFailAction } from \"../router/router.actions\";\nimport { ConfirmationModalComponent, ConfirmationModalData,\n LocalTimePoint, VituCommonErrorEntityIdMustBeNumber } from \"shared-lib\";\nimport {\n ActionTypes,\n AddClientSecretAction,\n CreateClientAction,\n DeleteClientAction,\n DeleteClientSecretAction,\n GetClientAction,\n GetClientFailAction,\n GetClientSucceedAction,\n GetNewClientAction,\n UpdateClientAction\n} from \"./client.actions\";\nimport { GlobalSpinnerService } from \"shared-lib\";\nimport { ClientsService } from \"@merchant_api/services/clients.service\";\nimport { RolesService } from \"@merchant_api/services/roles.service\";\nimport { ClientSecretsService } from \"@merchant_api/services/client-secrets.service\";\nimport { Store } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\nimport { getClientState } from \"./client.selectors\";\nimport { GetClientSecretsAction } from \"../client-secrets/client-secrets.actions\";\nimport { ClientDetailsDto } from \"@merchant_api/models/client-details-dto\";\nimport { CreateClientSecretModalComponent } from \"@merchant_app/shared/create-client-secret-modal/create-client-secret-modal.component\";\nimport { CreateClientSecretModalAction } from \"@merchant_app/shared/create-client-secret-modal/create-client-secret-modal-action\";\nimport { ModalActionType } from \"@merchant_app/shared/modal-action\";\n\n@Injectable()\nexport class ClientEffects {\n\n constructor(\n private actions$: Actions,\n private clientsService: ClientsService,\n private clientSecretService: ClientSecretsService,\n private rolesService: RolesService,\n private dialog: MatDialog,\n private globalSpinner: GlobalSpinnerService,\n private store: Store<IStore>\n ) {}\n\n getClient$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetClientAction>(ActionTypes.GetClient),\n switchMap(action => {\n if (isNaN(action.id)) {\n return of(new GetClientFailAction(new VituCommonErrorEntityIdMustBeNumber()));\n }\n return forkJoin({\n client: this.clientsService.clientsGet({ id: action.id }),\n roles: this.rolesService.rolesSearch(),\n lookups: this.clientSecretService.clientSecretsLookups()\n }).pipe(\n mergeMap(({ client, roles, lookups }) =>\n of(new GetClientSucceedAction(client, roles, lookups))),\n catchError((error) => of(new GetClientFailAction(error)))\n );\n })\n ),\n );\n\n getNewClient$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetNewClientAction>(ActionTypes.GetNewClient),\n switchMap(() =>\n forkJoin({\n roles: this.rolesService.rolesSearch(),\n lookups: this.clientSecretService.clientSecretsLookups()\n }).pipe(\n mergeMap(({ roles, lookups }) =>\n {\n const client: ClientDetailsDto = {\n name: \"\",\n roleIds: []\n };\n return of(new GetClientSucceedAction(client, roles, lookups));\n }\n ),\n catchError((error) => of(new GetClientFailAction(error)))\n )\n )\n )\n );\n\n getClientFail = createEffect(() =>\n this.actions$.pipe(\n ofType<GetClientFailAction>(ActionTypes.GetClientFail),\n switchMap(() => of(PageLoadFailAction()))\n )\n );\n\n updateClient$ = createEffect(() => this.actions$.pipe(\n ofType<UpdateClientAction>(ActionTypes.UpdateClient),\n switchMap(({ id, client }) =>\n this.globalSpinner.apply(\n this.clientsService.clientsPut({ id, body: client }).pipe(\n switchMap(() => of(NavigateAction({ payload: { path: [\"/dashboard/developer/clients\"] } })))\n )\n )\n )\n ));\n\n deleteClient$ = createEffect(() =>\n this.actions$.pipe(\n ofType<DeleteClientAction>(ActionTypes.DeleteClient),\n switchMap(({ id }) => this.dialog.open(ConfirmationModalComponent, {\n data: {\n title: \"Delete Client\",\n subtitle: \"Are you sure you want to permanently delete this client?\",\n confirmButtonText: \"Delete\"\n } as ConfirmationModalData\n }).afterClosed().pipe(\n map((deleteConfirmed: boolean) => ({ id, deleteConfirmed })),\n )),\n filter(({ deleteConfirmed }) => deleteConfirmed),\n switchMap(({ id }) =>\n this.globalSpinner.apply(\n this.clientsService.clientsDelete({ id }).pipe(\n switchMap(() => of(NavigateAction({ payload: { path: [\"/dashboard/developer/clients\"] } })))\n )\n )\n )\n )\n );\n\n createClient$ = createEffect(() => this.actions$.pipe(\n ofType<CreateClientAction>(ActionTypes.CreateClient),\n switchMap(({ client }) =>\n this.globalSpinner.apply(\n this.clientsService.clientsPost({ body: client }).pipe(\n switchMap(() => of(NavigateAction({ payload: { path: [\"/dashboard/developer/clients\"] } })))\n )\n )\n )\n ));\n\n addClientSecret$ = createEffect((): any => this.actions$.pipe(\n ofType<AddClientSecretAction>(ActionTypes.AddClientSecret),\n withLatestFrom(this.store.select(getClientState)),\n switchMap(([_, state]) => {\n\n const errorMessageSubject = new Subject<string>();\n const modalActionSubject = new Subject<CreateClientSecretModalAction>();\n\n const dialogRef = this.dialog\n .open(CreateClientSecretModalComponent, {\n width: \"500px\",\n data: {\n lookups: state.lookups,\n client: state.client,\n modalActionSubject,\n errorMessageSubject\n },\n disableClose: true,\n autoFocus: false\n });\n return modalActionSubject.pipe(\n switchMap(({action, params}: CreateClientSecretModalAction) => {\n switch (action) {\n case ModalActionType.CANCEL:\n {\n dialogRef.close();\n return of();\n }\n case ModalActionType.CONFIRM:\n {\n const body: any = { ...params };\n body.expirationUtc =\n LocalTimePoint.convertLocalValueToUtcValue(body.localExpirationDate?.to);\n delete body.localExpirationDate;\n return this.globalSpinner.apply(this.clientSecretService.clientSecretsPost({ body })\n .pipe(\n switchMap(() => {\n dialogRef.close();\n return of(new GetClientSecretsAction(state.client.id));\n }),\n catchError(error => {\n errorMessageSubject.next(error instanceof Error ? error.message : error);\n return of();\n })\n )\n );\n }\n }\n })\n );\n })\n ));\n\n deleteClientSecret$ = createEffect(() =>\n this.actions$.pipe(\n ofType<DeleteClientSecretAction>(ActionTypes.DeleteClientSecret),\n\n switchMap(({ secretId }) => this.dialog.open(ConfirmationModalComponent, {\n data: {\n title: \"Delete Secret\",\n subtitle: \"Are you sure you want to permanently delete this client secret?\",\n confirmButtonText: \"Delete\"\n } as ConfirmationModalData\n }).afterClosed().pipe(\n map((deleteConfirmed: boolean) => ({ secretId, deleteConfirmed })),\n )),\n filter(({ deleteConfirmed }) => deleteConfirmed),\n switchMap(({ secretId }) =>\n this.globalSpinner.apply(\n this.clientSecretService.clientSecretsDelete({\n id: secretId,\n }).pipe(\n withLatestFrom(this.store.select(getClientState)),\n map(([, state]) => new GetClientSecretsAction(state.client.id))\n )\n )\n )\n ),\n );\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { catchError, switchMap } from \"rxjs/operators\";\nimport { of } from \"rxjs\";\nimport {\n ActionTypes,\n GetClientSecretsAction,\n GetClientSecretsFailAction,\n GetClientSecretsSucceedAction\n} from \"./client-secrets.actions\";\nimport { ClientSecretsService } from \"@merchant_api/services/client-secrets.service\";\n\n@Injectable()\nexport class ClientSecretsEffects {\n\n constructor(\n private actions$: Actions,\n private clientSecretService: ClientSecretsService\n ) {}\n\n getClientSecrets$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetClientSecretsAction>(ActionTypes.GetClientSecrets),\n switchMap((action) =>\n this.clientSecretService.clientSecretsSearch({ ClientId: action.clientId }).pipe(\n switchMap((clientSecrets) => of(new GetClientSecretsSucceedAction(clientSecrets))),\n catchError((error) => of(new GetClientSecretsFailAction(error)))\n )\n )\n ),\n );\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { catchError, switchMap, withLatestFrom } from \"rxjs/operators\";\nimport { ActionTypes, GetTidsAction, GetTidsFailAction, GetTidsSucceedAction, PageChangedTidsAction } from \"./tids.actions\";\nimport { of } from \"rxjs\";\nimport { MerchantService } from \"@merchant_api/services/merchant.service\";\nimport { getTidsState } from \"./tids.selectors\";\nimport { Store } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\nimport { PagedDataDtoOfTidResult } from \"@merchant_api/models/paged-data-dto-of-tid-result\";\n\n@Injectable()\nexport class TidsEffects {\n\n constructor(\n private actions$: Actions,\n private merchantService: MerchantService,\n private store: Store<IStore>\n ) {}\n\n pageChanged = createEffect(() =>\n this.actions$.pipe(\n ofType<PageChangedTidsAction>(ActionTypes.PageChangedTids),\n switchMap(action => of(new GetTidsAction(action.page)))\n ),\n );\n\n getTids = createEffect(() =>\n this.actions$.pipe(\n ofType<GetTidsAction>(ActionTypes.GetTids),\n withLatestFrom(this.store.select(getTidsState)),\n switchMap(([action, state]) => {\n\n const pageSize = action.pageSize ? action.pageSize : state.pager.pageSize;\n const params = this.getParams(pageSize, action.page);\n\n return this.merchantService.merchantGetTids(params).pipe(\n switchMap((response) =>\n of(new GetTidsSucceedAction(\n response,\n pageSize,\n action.page)\n )\n ),\n catchError((error) => of(new GetTidsFailAction(error)))\n );\n })\n ),\n );\n\n private getParams(pageSize: number, page: number): any {\n\n return {\n \"Pager.PageSize\": pageSize,\n \"Pager.PageIndex\": page\n };\n }\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { catchError, switchMap } from \"rxjs/operators\";\nimport { ActionTypes, GetMidsAction, GetMidsFailAction, GetMidsSucceedAction } from \"./mids.actions\";\nimport { of } from \"rxjs\";\nimport { MerchantService } from \"@merchant_api/services/merchant.service\";\n\n@Injectable()\nexport class MidsEffects {\n\n constructor(\n private actions$: Actions,\n private merchantService: MerchantService\n ) {}\n\n getMids$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetMidsAction>(ActionTypes.GetMids),\n switchMap((action) =>\n this.merchantService.merchantGetMids({ \"Pager.PageSize\": 100 }).pipe(\n switchMap((mids) => of(new GetMidsSucceedAction(mids))),\n catchError((error) => of(new GetMidsFailAction(error)))\n ))\n )\n );\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { ROUTER_NAVIGATED, RouterNavigatedAction } from \"@ngrx/router-store\";\nimport { catchError, filter as filterOperator, map, switchMap, withLatestFrom } from \"rxjs/operators\";\nimport { of } from \"rxjs\";\nimport {\n ActionTypes,\n FilterFundingAction,\n GetFundingAction,\n GetFundingFailAction,\n GetFundingSucceedAction,\n PageChangedFundingAction,\n SortFundingAction\n} from \"./funding.actions\";\nimport { BillingService } from \"@merchant_api/services/billing.service\";\nimport { getFundingState } from \"./funding.selectors\";\nimport { Filter, Sorting } from \"./funding.state\";\nimport { Store } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\nimport { LocalTimePoint } from \"shared-lib\";\nimport { PagedDataDtoOfFundingInstruction } from \"@merchant_api/models/paged-data-dto-of-funding-instruction\";\n\n@Injectable()\nexport class FundingEffects {\n\n constructor(\n private actions$: Actions,\n private billingService: BillingService,\n private store: Store<IStore>\n ) {}\n\n initFundingPage$ = createEffect(() =>\n this.actions$.pipe(\n ofType(ROUTER_NAVIGATED),\n filterOperator((action: RouterNavigatedAction) => action.payload.routerState.url.startsWith(\"/dashboard/funding\")),\n map(() => new GetFundingAction(1))\n )\n );\n\n sort = createEffect(() =>\n this.actions$.pipe(\n ofType<SortFundingAction>(ActionTypes.SortFunding),\n switchMap(action => of(new GetFundingAction(1, undefined, undefined, action.sorting)))\n ),\n );\n\n filter = createEffect(() =>\n this.actions$.pipe(\n ofType<FilterFundingAction>(ActionTypes.FilterFunding),\n switchMap(action => of(new GetFundingAction(1, undefined, action.filter)))\n ),\n );\n\n pageChanged = createEffect(() =>\n this.actions$.pipe(\n ofType<PageChangedFundingAction>(ActionTypes.PageChangedFunding),\n switchMap(action => of(new GetFundingAction(action.page)))\n ),\n );\n\n getFunding = createEffect(() =>\n this.actions$.pipe(\n ofType<GetFundingAction>(ActionTypes.GetFunding),\n withLatestFrom(this.store.select(getFundingState)),\n switchMap(([action, state]) => {\n\n const filter = action.filter ? action.filter : state.filter;\n const sorting = action.sorting ? action.sorting : state.sorting;\n const pageSize = action.pageSize ? action.pageSize : state.pager.pageSize;\n const params = this.getParams(sorting, filter, pageSize, action.page);\n\n const stateExtensions = {\n filter,\n sorting\n };\n\n return this.billingService.fundingInstructionsSearchInstructions(params).pipe(\n switchMap((response) =>\n of(new GetFundingSucceedAction(\n response,\n pageSize,\n action.page,\n stateExtensions)\n )\n ),\n catchError((error) =>\n of(new GetFundingFailAction(error))\n )\n );\n })\n )\n );\n\n private getParams(sorting: Sorting, filter: Filter, pageSize: number, page: number): any {\n\n return {\n ...(sorting.orderDirection ? {OrderBy: sorting.orderBy, OrderDirection: sorting.orderDirection} : {}),\n ...{\n MID: filter.mid,\n DBA: filter.dba,\n FundingStatuses: filter.fundingStatuses,\n Processors: filter.processors\n },\n StartDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDateInterval?.from),\n EndDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDateInterval?.to),\n FundedStartDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localFundedDateInterval?.from),\n FundedEndDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localFundedDateInterval?.to),\n \"Pager.PageSize\": pageSize,\n \"Pager.PageIndex\": page\n };\n }\n\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { catchError, switchMap, withLatestFrom, tap } from \"rxjs/operators\";\nimport { of } from \"rxjs\";\n\nimport { BillingService } from \"@merchant_api/services/billing.service\";\nimport { Store } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\nimport {\n ActionTypes,\n ExportTransactionsToCsvAction,\n ExportTransactionsToCsvFailAction,\n ExportTransactionsToCsvSucceedAction,\n FilterFundingItemTransactionsAction,\n GetFundingItemAction,\n GetFundingItemFailAction,\n GetFundingItemMidFeesAction,\n GetFundingItemMidFeesFailAction,\n GetFundingItemMidFeesSucceedAction,\n GetFundingItemAdjustmentsAction,\n GetFundingItemAdjustmentsFailAction,\n GetFundingItemAdjustmentsSucceedAction,\n GetFundingItemSucceedAction,\n GetFundingItemTransactionsAction,\n GetFundingItemTransactionsFailAction,\n GetFundingItemTransactionsSucceedAction,\n PageChangedFundingItemTransactionsAction,\n SortFundingItemTransactionsAction\n} from \"./funding-item.actions\";\nimport { VituToastService, VituToastTone } from \"shared-lib\";\nimport { getFundingItemState } from \"./funding-item.selectors\";\nimport { PagedDataDtoOfFundingTransaction } from \"@merchant_api/models/paged-data-dto-of-funding-transaction\";\nimport { TransactionsFilter, TransactionsSorting } from \"./funding-item.state\";\nimport { StrictHttpResponse } from \"@merchant_api/strict-http-response\";\nimport { PageLoadFailAction } from \"../router/router.actions\";\n\n@Injectable()\nexport class FundingItemEffects {\n\n constructor(\n private actions$: Actions,\n private billingService: BillingService,\n private store: Store<IStore>,\n private toast: VituToastService\n ) {}\n\n getFundingItem$ = createEffect(() =>\n\n this.actions$.pipe(\n ofType<GetFundingItemAction>(ActionTypes.GetFundingItem),\n switchMap(action =>\n this.billingService.fundingInstructionsGetInstructionDetails({ ref: action.ref }).pipe(\n switchMap(fundingItem => of(new GetFundingItemSucceedAction(fundingItem))),\n catchError((error) => of(new GetFundingItemFailAction(error)))\n )\n )\n )\n );\n\n getFundingItemSucceed$ = createEffect(() =>\n\n this.actions$.pipe(\n ofType<GetFundingItemSucceedAction>(ActionTypes.GetFundingItemSucceed),\n switchMap(action =>\n [\n new GetFundingItemTransactionsAction(action.fundingItem.ref, 1),\n new GetFundingItemMidFeesAction(action.fundingItem.ref),\n new GetFundingItemAdjustmentsAction(action.fundingItem.ref)\n ]\n )\n ),\n );\n\n getFundingItemFail = createEffect(() =>\n this.actions$.pipe(\n ofType<GetFundingItemFailAction>(ActionTypes.GetFundingItemFail),\n switchMap(() => of(PageLoadFailAction()))\n )\n );\n\n getFundingItemTransactions = createEffect(() =>\n this.actions$.pipe(\n ofType<GetFundingItemTransactionsAction>(ActionTypes.GetFundingItemTransactions),\n withLatestFrom(this.store.select(getFundingItemState)),\n switchMap(([action, state]) => {\n\n const filter = action.filter ? action.filter : state.transactionsFilter;\n const sorting = action.sorting ? action.sorting : state.transactionsSorting;\n const pageSize = action.pageSize ? action.pageSize : state.transactionsPager.pageSize;\n const params = this.getParams(action.ref, sorting, filter, pageSize, action.page);\n\n const stateExtensions = {\n filter,\n sorting\n };\n\n return this.billingService.fundingInstructionsSearchFundingTransactions(params).pipe(\n switchMap((response) =>\n of(new GetFundingItemTransactionsSucceedAction(\n response,\n pageSize,\n action.page,\n stateExtensions)\n )\n ),\n catchError((error) =>\n of(new GetFundingItemTransactionsFailAction(error)))\n );\n })\n )\n );\n\n pageChangedFundingItemTransactions = createEffect(() =>\n this.actions$.pipe(\n ofType<PageChangedFundingItemTransactionsAction>(ActionTypes.PageChangedFundingItemTransactions),\n switchMap(action => of(new GetFundingItemTransactionsAction(action.ref, action.page)))\n ),\n );\n\n sortFundingItemTransactions = createEffect(() =>\n this.actions$.pipe(\n ofType<SortFundingItemTransactionsAction>(ActionTypes.SortFundingItemTransactions),\n switchMap(action => of(new GetFundingItemTransactionsAction(action.ref, 1, undefined, action.sorting)))\n ),\n );\n\n filterFundingItemTransactions = createEffect(() =>\n this.actions$.pipe(\n ofType<FilterFundingItemTransactionsAction>(ActionTypes.FilterFundingItemTransactions),\n switchMap(action => of(new GetFundingItemTransactionsAction(action.ref, 1, undefined, undefined, action.filter)))\n ),\n );\n\n exportTransactionsToCsv = createEffect(() =>\n this.actions$.pipe(\n ofType<ExportTransactionsToCsvAction>(ActionTypes.ExportTransactionsToCsv),\n withLatestFrom(this.store.select(getFundingItemState)),\n switchMap(([action, state]) => {\n\n const params = this.getExportParams(\n action.ref,\n state.transactionsSorting,\n state.transactionsFilter,\n state.transactionsPager.pageSize,\n state.transactionsPager.page);\n\n return this.billingService.fundingInstructionsExportFundingTransactions$Response(params).pipe(\n switchMap((response) =>\n of(new ExportTransactionsToCsvSucceedAction(response))),\n catchError((error) =>\n of(new ExportTransactionsToCsvFailAction(error)))\n );}\n )\n )\n );\n\n exportTransactionsToCsvSucceed = createEffect(() =>\n this.actions$.pipe(\n ofType<ExportTransactionsToCsvSucceedAction>(ActionTypes.ExportTransactionsToCsvSucceed),\n tap((action) => {\n try {\n const fileName = this.getDownloadFileName(action.response);\n this.openFile(fileName, action.response);\n }\n catch (error) {\n this.toast.open(\"Unable to export file.\", VituToastTone.Negative);\n }\n })\n ),{ dispatch: false }\n );\n\n getFundingItemMidFees = createEffect(() =>\n this.actions$.pipe(\n ofType<GetFundingItemMidFeesAction>(ActionTypes.GetFundingItemMidFees),\n switchMap((action) =>\n this.billingService.fundingInstructionsGetMidFees({ref: action.ref}).pipe(\n switchMap((response) =>\n of(new GetFundingItemMidFeesSucceedAction(response))),\n catchError((error) =>\n of(new GetFundingItemMidFeesFailAction(error)))\n )\n )\n )\n );\n\n getFundingItemAdjustments = createEffect(() =>\n this.actions$.pipe(\n ofType<GetFundingItemAdjustmentsAction>(ActionTypes.GetFundingItemAdjustments),\n switchMap((action) =>\n this.billingService.fundingInstructionsGetAdjustments({ref: action.ref}).pipe(\n switchMap((response) =>\n of(new GetFundingItemAdjustmentsSucceedAction(response))),\n catchError((error) =>\n of(new GetFundingItemAdjustmentsFailAction(error)))\n ))\n )\n );\n\n private getExportParams(ref: string, sorting: TransactionsSorting, filter: TransactionsFilter, pageSize: number, page: number): any {\n\n const retVal: any = {\n ref\n };\n\n if (typeof filter.localFeesOnly === \"string\") {\n retVal.feesOnly = filter.localFeesOnly === \"Yes\";\n }\n\n return retVal;\n }\n\n private getParams(ref: string, sorting: TransactionsSorting, filter: TransactionsFilter, pageSize: number, page: number): any {\n\n const retVal: any = {\n ref,\n ...(sorting.orderDirection ? {OrderBy: sorting.orderBy, OrderDirection: sorting.orderDirection} : {}),\n// ...{ filter params },\n // StartDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDateInterval?.from),\n // EndDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDateInterval?.to),\n \"Pager.PageSize\": pageSize,\n \"Pager.PageIndex\": page\n };\n\n if (typeof filter.localFeesOnly === \"string\") {\n retVal.FeesOnly = filter.localFeesOnly === \"Yes\";\n }\n\n return retVal;\n }\n\n private getDownloadFileName(response: StrictHttpResponse<Blob>): string {\n let fileName = null;\n\n try {\n const contentDisposition = response.headers.get(\"content-disposition\");\n const regEx = /filename=[\\\"]?([^\\\"]+?)[\\\"]?;/;\n const fileNameMatches = contentDisposition.match(regEx);\n if (Array.isArray(fileNameMatches) && (fileNameMatches.length === 2)) {\n fileName = fileNameMatches[1];\n }\n if (!fileName) {\n throw new Error();\n }\n }\n catch (error) {\n throw new Error(\"Unable to download file.\");\n }\n\n return fileName;\n }\n\n private openFile(fileName: string, response: StrictHttpResponse<Blob>): void {\n\n try {\n const blob = new Blob([response.body], { type: \"application/octet-stream\" });\n const fileUrl = URL.createObjectURL(blob);\n const tempAnchorElement: HTMLAnchorElement = document.createElement(\"a\") as HTMLAnchorElement;\n tempAnchorElement.href = fileUrl;\n tempAnchorElement.download = fileName;\n document.body.appendChild(tempAnchorElement);\n tempAnchorElement.click();\n document.body.removeChild(tempAnchorElement);\n URL.revokeObjectURL(fileUrl);\n }\n catch (error) {\n throw new Error(\"Unable to open file.\");\n }\n\n }\n\n}\n","import { EventDetailsDto } from \"@merchant_api/models/event-details-dto\";\nimport { Action } from \"@ngrx/store\";\n\nexport enum ActionTypes {\n GetEvent = \"[Event] GetEvent\",\n GetEventSucceed = \"[Event] GetEventSucceed\",\n GetEventFail = \"[Event] GetEventFail\"\n}\n\nexport class GetEventAction implements Action {\n\n constructor(public token: string) {}\n\n readonly type = ActionTypes.GetEvent;\n}\n\nexport class GetEventSucceedAction implements Action {\n\n constructor(public response: EventDetailsDto) {}\n\n readonly type = ActionTypes.GetEventSucceed;\n}\n\nexport class GetEventFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetEventFail;\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { switchMap, catchError, filter } from \"rxjs/operators\";\nimport { of } from \"rxjs\";\nimport { EventsService } from \"@merchant_api/services/events.service\";\nimport {\n ActionTypes,\n GetEventAction,\n GetEventFailAction,\n GetEventSucceedAction\n} from \"./event.actions\";\nimport { GetEventDeliveriesAction, ResetEventDeliveriesAction } from \"../event-deliveries/event-deliveries.actions\";\nimport { RouterNavigationAction, ROUTER_NAVIGATED } from \"@ngrx/router-store\";\nimport { PageLoadFailAction } from \"../router/router.actions\";\n\n@Injectable()\nexport class EventEffects {\n\n constructor(\n private actions: Actions,\n private eventsService: EventsService\n ) { }\n\n initEventPage = createEffect(() =>\n this.actions.pipe(\n ofType(ROUTER_NAVIGATED),\n filter((action: RouterNavigationAction) =>\n new RegExp(/dashboard\\/developer\\/webhooks\\/event-history\\/.+$/).test(action.payload.routerState.url)),\n switchMap((action: any) => {\n const rS = action.payload.routerState;\n const token = rS.root.firstChild.firstChild.params.id;\n return [new ResetEventDeliveriesAction(), new GetEventAction(token)];\n })\n )\n );\n\n getEvent = createEffect(() =>\n this.actions.pipe(\n ofType<GetEventAction>(ActionTypes.GetEvent),\n switchMap((action) =>\n this.eventsService.eventsGet({ token: action.token }).pipe(\n switchMap((response) => of(new GetEventSucceedAction(response))),\n catchError((error) => of(new GetEventFailAction(error)))\n )\n )\n ),\n );\n\n getEventSucceed = createEffect(() => this.actions.pipe(\n ofType<GetEventSucceedAction>(ActionTypes.GetEventSucceed),\n switchMap(action => [\n new GetEventDeliveriesAction(action.response.token, 1)\n ])\n ));\n\n getEventFail = createEffect(() =>\n this.actions.pipe(\n ofType<GetEventFailAction>(ActionTypes.GetEventFail),\n switchMap(() => of(PageLoadFailAction()))\n )\n );\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { ROUTER_NAVIGATED, RouterNavigationAction } from \"@ngrx/router-store\";\nimport { filter as filterOperator, switchMap, withLatestFrom, catchError } from \"rxjs/operators\";\nimport { of } from \"rxjs\";\nimport { IStore } from \"../store\";\nimport { Store } from \"@ngrx/store\";\nimport {\n LocalTimePoint} from \"shared-lib\";\nimport { Filter, Sorting } from \"./events.state\";\nimport { getEventsState } from \"./events.selectors\";\nimport {\n ActionTypes,\n PageChangedEventsAction,\n FilterEventsAction,\n GetEventsAction,\n GetEventsSucceedAction,\n SortEventsAction,\n GetEventsFailAction\n\n} from \"./events.actions\";\nimport { GetWebhookLookupsAction } from \"../webhook/webhook.actions\";\nimport { EventsService } from \"@merchant_api/services/events.service\";\n\n@Injectable()\nexport class EventsEffects {\n\n constructor(\n private actions: Actions,\n private eventsService: EventsService,\n private store: Store<IStore>\n ) { }\n\n initEventDeliveriesPage = createEffect(() =>\n this.actions.pipe(\n ofType(ROUTER_NAVIGATED),\n filterOperator((action: RouterNavigationAction) =>\n new RegExp(/dashboard\\/developer\\/webhooks\\/event-history$/).test(action.payload.routerState.url)),\n switchMap(() =>\n [new GetEventsAction(1), new GetWebhookLookupsAction()]\n )\n )\n );\n\n filterList = createEffect(() =>\n this.actions.pipe(\n ofType<FilterEventsAction>(ActionTypes.FilterEvents),\n switchMap(action => of(new GetEventsAction(1, action.filter)))\n ),\n );\n\n sortList = createEffect(() =>\n this.actions.pipe(\n ofType<SortEventsAction>(ActionTypes.SortEvents),\n switchMap(action => of(new GetEventsAction(1, undefined, action.sorting)))\n ),\n );\n\n pageChanged = createEffect(() =>\n this.actions.pipe(\n ofType<PageChangedEventsAction>(ActionTypes.PageChangedEvents),\n switchMap(action => of(new GetEventsAction(action.page)))\n ),\n );\n\n getEvents = createEffect(() =>\n this.actions.pipe(\n ofType<GetEventsAction>(ActionTypes.GetEvents),\n withLatestFrom(this.store.select(getEventsState)),\n switchMap(([action, state]) => {\n\n const filter = action.filter ? action.filter : state.filter;\n const sorting = action.sorting ? action.sorting : state.sorting;\n const params = this.getParams(sorting, filter, state.pager.pageSize, action.page);\n\n const stateExtensions = {\n filter,\n sorting\n };\n\n return this.eventsService.eventsSearch(params).pipe(\n switchMap((response) =>\n of(new GetEventsSucceedAction(response, state.pager.pageSize, action.page, stateExtensions))),\n catchError((error) =>\n of(new GetEventsFailAction(error)))\n );\n })\n ),\n );\n\n private getParams(sorting: Sorting, filter: Filter, pageSize: number, page: number): any {\n\n return {\n ...(sorting.orderDirection ? {OrderBy: sorting.orderBy, OrderDirection: sorting.orderDirection} : {}),\n ...{\n EventTypes: filter.eventTypes,\n Mid: filter.mid,\n Tid: filter.tid,\n FundingInstructionRef: filter.fundingInstructionRef,\n TransactionId: filter.transactionId\n },\n StartDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDateInterval?.from),\n EndDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDateInterval?.to),\n \"Pager.PageSize\": pageSize,\n \"Pager.PageIndex\": page\n };\n }\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { switchMap, catchError, map, filter as filterOperator } from \"rxjs/operators\";\nimport { of } from \"rxjs\";\nimport { EventsService } from \"@merchant_api/services/events.service\";\nimport {\n ActionTypes,\n ResendEventDeliveryAction\n} from \"./event-delivery.actions\";\nimport { GenericNoOpAction } from \"../generic.actions\";\nimport { MatDialog } from \"@angular/material/dialog\";\nimport {\n VituToastService,\n VituToastTone,\n GlobalSpinnerService,\n ErrorUiService,\n ConfirmationModalComponent,\n ConfirmationModalData,\n ErrorUi\n} from \"shared-lib\";\nimport { GetEventDeliveriesAction } from \"../event-deliveries/event-deliveries.actions\";\n\n@Injectable()\nexport class EventDeliveryEffects {\n\n constructor(\n private actions: Actions,\n private eventsService: EventsService,\n private dialog: MatDialog,\n private toast: VituToastService,\n private globalSpinner: GlobalSpinnerService,\n private errorUi: ErrorUiService\n ) { }\n\n resend = createEffect(() =>\n this.actions.pipe(\n ofType<ResendEventDeliveryAction>(ActionTypes.ResendEventDelivery),\n switchMap(({ token, eventDeliveryId, isDelivered }) => this.dialog.open(ConfirmationModalComponent, {\n width: \"700px\",\n data: {\n title: \"Resend Event\",\n subtitle: (isDelivered\n ? \"This event has already been delivered. Are you sure you want to resend it?\"\n : \"Are you sure you want to resend this event?\"),\n confirmButtonText: \"Resend\"\n } as ConfirmationModalData\n }).afterClosed().pipe(\n map((confirmed: boolean) => ({ token, eventDeliveryId, confirmed })),\n )),\n filterOperator(({ confirmed }) => confirmed),\n switchMap(({ token, eventDeliveryId }) =>\n this.errorUi.disable(\n this.globalSpinner.apply(\n this.eventsService.eventDeliveriesSend({ id: eventDeliveryId, token }).pipe(\n switchMap(() => {\n this.toast.open(`Event redelivery triggered.`, VituToastTone.Positive);\n return of(new GetEventDeliveriesAction(token, 1));\n }),\n catchError(() => {\n this.toast.open(`Event redelivery failed.`, VituToastTone.Negative);\n return of(new GenericNoOpAction());\n })\n )\n )\n )\n )\n ),\n );\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { switchMap, withLatestFrom, catchError } from \"rxjs/operators\";\nimport { of } from \"rxjs\";\nimport { IStore } from \"../store\";\nimport { Store } from \"@ngrx/store\";\nimport {\n LocalTimePoint\n} from \"shared-lib\";\nimport { Filter, Sorting } from \"./event-deliveries.state\";\nimport { getEventDeliveriesState } from \"./event-deliveries.selectors\";\nimport {\n ActionTypes,\n PageChangedEventDeliveriesAction,\n FilterEventDeliveriesAction,\n GetEventDeliveriesAction,\n GetEventDeliveriesSucceedAction,\n SortEventDeliveriesAction,\n GetEventDeliveriesFailAction\n\n} from \"./event-deliveries.actions\";\nimport { EventsService } from \"@merchant_api/services/events.service\";\n\n@Injectable()\nexport class EventDeliveriesEffects {\n\n constructor(\n private actions: Actions,\n private eventsService: EventsService,\n private store: Store<IStore>\n ) { }\n/*\n filterList = createEffect(() =>\n this.actions.pipe(\n ofType<FilterEventDeliveriesAction>(ActionTypes.FilterEventDeliveries),\n switchMap(action => of(new GetEventDeliveriesAction(action.token, 1, action.filter)))\n ),\n );\n*/\n sortList = createEffect(() =>\n this.actions.pipe(\n ofType<SortEventDeliveriesAction>(ActionTypes.SortEventDeliveries),\n switchMap(action => of(new GetEventDeliveriesAction(action.token, 1, undefined, action.sorting)))\n ),\n );\n\n pageChanged = createEffect(() =>\n this.actions.pipe(\n ofType<PageChangedEventDeliveriesAction>(ActionTypes.PageChangedEventDeliveries),\n switchMap(action => of(new GetEventDeliveriesAction(action.token, action.page)))\n ),\n );\n\n getEventDeliveries = createEffect(() =>\n this.actions.pipe(\n ofType<GetEventDeliveriesAction>(ActionTypes.GetEventDeliveries),\n withLatestFrom(this.store.select(getEventDeliveriesState)),\n switchMap(([action, state]) => {\n\n const filter = action.filter ? action.filter : state.filter;\n const sorting = action.sorting ? action.sorting : state.sorting;\n const params = this.getParams(action.token, sorting, filter, state.pager.pageSize, action.page);\n\n const stateExtensions = {\n filter,\n sorting\n };\n\n return this.eventsService.eventDeliveriesSearch(params).pipe(\n switchMap((response) =>\n of(new GetEventDeliveriesSucceedAction(response, state.pager.pageSize, action.page, stateExtensions))),\n catchError((error) =>\n of(new GetEventDeliveriesFailAction(error)))\n );\n })\n ),\n );\n\n private getParams(token: string, sorting: Sorting, filter: Filter, pageSize: number, page: number): any {\n\n return {\n token,\n ...(sorting.orderDirection ? {OrderBy: sorting.orderBy, OrderDirection: sorting.orderDirection} : {}),\n// ...{ filter params },\n StartDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDateInterval?.from),\n EndDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDateInterval?.to),\n \"Pager.PageSize\": pageSize,\n \"Pager.PageIndex\": page\n };\n }\n\n}\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { ROUTER_NAVIGATED, RouterNavigatedAction } from \"@ngrx/router-store\";\nimport { catchError, filter as fitlerOp, map, switchMap, withLatestFrom } from \"rxjs/operators\";\nimport { ActionTypes, FilterDisputesAction, GetDisputesAction, GetDisputesFailAction,\n GetDisputesSucceedAction, PageChangedDisputesAction, SortDisputesAction } from \"./disputes.actions\";\nimport { of } from \"rxjs\";\nimport { DisputesService } from \"@merchant_api/services/disputes.service\";\nimport { Filter, Sorting } from \"./disputes.state\";\nimport { LocalTimePoint } from \"shared-lib\";\nimport { Store } from \"@ngrx/store\";\nimport { IStore } from \"../store\";\nimport { getDisputesState } from \"./disputes.selectors\";\n\n@Injectable()\nexport class DisputesEffects {\n\n constructor(\n private actions$: Actions,\n private disputesService: DisputesService,\n private store: Store<IStore>\n ) {}\n\n initDisputesPage$ = createEffect(() =>\n this.actions$.pipe(\n ofType(ROUTER_NAVIGATED),\n fitlerOp((action: RouterNavigatedAction) => /\\/dashboard\\/disputes/g.test(action.payload.routerState.url) &&\n !(/\\/dashboard\\/disputes\\//g.test(action.payload.routerState.url))),\n map(() => new GetDisputesAction(1))\n )\n );\n\n sort$ = createEffect(() =>\n this.actions$.pipe(\n ofType<SortDisputesAction>(ActionTypes.SortDisputes),\n switchMap(action => of(new GetDisputesAction(1, undefined, undefined, action.sorting)))\n ),\n );\n\n filter$ = createEffect(() =>\n this.actions$.pipe(\n ofType<FilterDisputesAction>(ActionTypes.FilterDisputes),\n switchMap(action => of(new GetDisputesAction(1, undefined, action.filter)))\n ),\n );\n\n pageChanged$ = createEffect(() =>\n this.actions$.pipe(\n ofType<PageChangedDisputesAction>(ActionTypes.PageChangedDisputes),\n switchMap(action => of(new GetDisputesAction(action.page)))\n ),\n );\n\n getDisputes$ = createEffect(() =>\n this.actions$.pipe(\n ofType<GetDisputesAction>(ActionTypes.GetDisputes),\n withLatestFrom(this.store.select(getDisputesState)),\n switchMap(([action, state]) => {\n\n const filter = action.filter ? action.filter : state.filter;\n const sorting = action.sorting ? action.sorting : state.sorting;\n const pageSize = action.pageSize ? action.pageSize : state.pager.pageSize;\n const params = this.getParams(sorting, filter, pageSize, action.page);\n\n const stateExtensions = {\n filter,\n sorting\n };\n\n return this.disputesService.disputesSearch(params).pipe(\n switchMap((response) =>\n of(new GetDisputesSucceedAction(\n response,\n pageSize,\n action.page,\n stateExtensions)\n )\n ),\n catchError((error) =>\n of(new GetDisputesFailAction(error))\n )\n );\n })\n )\n );\n\n private getParams(sorting: Sorting, filter: Filter, pageSize: number, page: number): any {\n\n return {\n ...(sorting.orderDirection ? {OrderBy: sorting.orderBy, OrderDirection: sorting.orderDirection} : {}),\n ...{\n CaseNumber: filter.caseNumber,\n Mid: filter.mid,\n Processor: filter.processor,\n DisputeType: filter.disputeType,\n DisputeAmount: filter.disputeAmount,\n DisputeOutcome: filter.disputeOutcome,\n PaymentToken: filter.paymentToken,\n PublicTransactionId: filter.publicTransactionId\n },\n StartDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDueDateInterval?.from),\n EndDate: LocalTimePoint.convertLocalValueToUtcValue(filter.localDueDateInterval?.to),\n RaiseDateStartUtc: LocalTimePoint.convertLocalValueToUtcValue(filter.localRaiseDateInterval?.from),\n RaiseDateEndUtc: LocalTimePoint.convertLocalValueToUtcValue(filter.localRaiseDateInterval?.to),\n StatusDateStartUtc: LocalTimePoint.convertLocalValueToUtcValue(filter.localStatusDateInterval?.from),\n StatusDateEndUtc: LocalTimePoint.convertLocalValueToUtcValue(filter.localStatusDateInterval?.to),\n \"Pager.PageSize\": pageSize,\n \"Pager.PageIndex\": page\n };\n }\n\n}\n","import { DisputeDto } from \"@merchant_api/models/dispute-dto\";\nimport { Action } from \"@ngrx/store\";\n\nexport enum ActionTypes {\n GetDispute = \"[DISPUTE] GetDispute\",\n GetDisputeSucceed = \"[DISPUTE] GetDisputeSucceed\",\n GetDisputeFail = \"[DISPUTE] GetDisputeFail\"\n}\n\nexport class GetDisputeAction implements Action {\n\n constructor(public token: string) {}\n\n readonly type = ActionTypes.GetDispute;\n}\n\nexport class GetDisputeSucceedAction implements Action {\n\n constructor(public response: DisputeDto) {}\n\n readonly type = ActionTypes.GetDisputeSucceed;\n}\n\nexport class GetDisputeFailAction implements Action {\n\n constructor(public error: any) {}\n\n readonly type = ActionTypes.GetDisputeFail;\n}\n","import { MerchantEffects } from \"./merchant/merchant.effects\";\nimport { TransactionsEffects } from \"./transactions/transactions.effects\";\nimport { TransactionEffects } from \"./transaction/transaction.effects\";\nimport { PaymentsEffects } from \"./payments/payments.effects\";\nimport { PaymentEffects } from \"./payment/payment.effects\";\nimport { UsersEffects } from \"./users/users.effects\";\nimport { RouterEffects } from \"./router/router.effects\";\nimport { TransactionSiblingsEffects } from \"./transaction-siblings/transaction-siblings.effects\";\nimport { UserEffects } from \"./user/user.effects\";\nimport { NextPaymentActionsEffects } from \"./next-payment-actions/next-payment-actions.effects\";\nimport { CurrentUserEffects } from \"./current-user/current-user.effects\";\nimport { AppEffects } from \"./app/app.effects\";\nimport { RolesEffects } from \"./roles/roles.effects\";\nimport { RoleEffects } from \"./role/role.effects\";\nimport { WebhooksEffects } from \"./webhooks/webhooks.effects\";\nimport { WebhookEffects } from \"./webhook/webhook.effects\";\nimport { ReportEffects } from \"./report/report.effects\";\nimport { StatementsEffects } from \"./statements/statements.effects\";\nimport { ClientsEffects } from \"./clients/clients.effects\";\nimport { ClientEffects } from \"./client/client.effects\";\nimport { ClientSecretsEffects } from \"./client-secrets/client-secrets.effects\";\nimport { TidsEffects } from \"./tids/tids.effects\";\nimport { MidsEffects } from \"./mids/mids.effects\";\nimport { FundingEffects } from \"./funding/funding.effects\";\nimport { FundingItemEffects } from \"./funding-item/funding-item.effects\";\nimport { EventEffects } from \"./event/event.effects\";\nimport { EventsEffects } from \"./events/events.effects\";\nimport { EventDeliveryEffects } from \"./event-delivery/event-delivery.effects\";\nimport { EventDeliveriesEffects } from \"./event-deliveries/event-deliveries.effects\";\nimport { DisputesEffects } from \"./disputes/disputes.effects\";\nimport { DisputeEffects } from \"./dispute/dispute.effects\";\n\nexport const EffectsConfiguration = [\n AppEffects,\n MerchantEffects,\n TransactionsEffects,\n TransactionEffects,\n TransactionSiblingsEffects,\n WebhookEffects,\n WebhooksEffects,\n PaymentsEffects,\n PaymentEffects,\n NextPaymentActionsEffects,\n UserEffects,\n UsersEffects,\n RouterEffects,\n RoleEffects,\n RolesEffects,\n ClientsEffects,\n ClientEffects,\n CurrentUserEffects,\n ReportEffects,\n StatementsEffects,\n ClientSecretsEffects,\n TidsEffects,\n MidsEffects,\n FundingEffects,\n FundingItemEffects,\n EventEffects,\n EventsEffects,\n EventDeliveryEffects,\n EventDeliveriesEffects,\n DisputesEffects,\n DisputeEffects\n];\n","import { Injectable } from \"@angular/core\";\nimport { Actions, ofType, createEffect } from \"@ngrx/effects\";\nimport { switchMap, catchError, filter } from \"rxjs/operators\";\nimport { of } from \"rxjs\";\nimport { DisputesService } from \"@merchant_api/services/disputes.service\";\nimport {\n ActionTypes,\n GetDisputeAction,\n GetDisputeFailAction,\n GetDisputeSucceedAction\n} from \"./dispute.actions\";\nimport { RouterNavigationAction, ROUTER_NAVIGATED } from \"@ngrx/router-store\";\nimport { PageLoadFailAction } from \"../router/router.actions\";\n\n@Injectable()\nexport class DisputeEffects {\n\n constructor(\n private actions: Actions,\n private disputesService: DisputesService\n ) { }\n\n initDisputePage = createEffect(() =>\n this.actions.pipe(\n ofType(ROUTER_NAVIGATED),\n filter((action: RouterNavigationAction) =>\n new RegExp(/dashboard\\/disputes\\/.+$/).test(action.payload.routerState.url)),\n switchMap((action: any) => {\n const rS = action.payload.routerState;\n const token = rS.root.firstChild.firstChild.params.id;\n return [new GetDisputeAction(token)];\n })\n )\n );\n\n getDispute = createEffect(() =>\n this.actions.pipe(\n ofType<GetDisputeAction>(ActionTypes.GetDispute),\n switchMap((action) =>\n this.disputesService.disputesGet({ token: action.token }).pipe(\n switchMap((response) => of(new GetDisputeSucceedAction(response))),\n catchError((error) => of(new GetDisputeFailAction(error)))\n )\n )\n ),\n );\n\n getDisputeFail = createEffect(() =>\n this.actions.pipe(\n ofType<GetDisputeFailAction>(ActionTypes.GetDisputeFail),\n switchMap(() => of(PageLoadFailAction()))\n )\n );\n\n}\n","import { OrganizationDto } from \"@merchant_api/models/organization-dto\";\n\nexport class MerchantState {\n loading = false;\n error = null;\n merchant?: OrganizationDto;\n}\n\n","/* tslint:disable */\n/* eslint-disable */\nexport enum OrderDirectionEnum {\n Asc = 'Asc',\n Desc = 'Desc'\n}\n","import { OrderDirectionEnum } from \"@merchant_api/models/order-direction-enum\";\nimport { TransactionOrderBy } from \"@merchant_api/models/transaction-order-by\";\nimport { CardBrandEnum } from \"@merchant_api/models/card-brand-enum\";\nimport { TransactionType } from \"@merchant_api/models/transaction-type\";\nimport { TransactionStatus } from \"@merchant_api/models/transaction-status\";\nimport { getInitialLocalFilterDateRangeLastTwoWeeks, DateRange, Pager, FilterBase, createFilter } from \"shared-lib\";\nimport { GatewayEnum } from \"@merchant_api/models/gateway-enum\";\nimport { Transaction } from \"@merchant_api/models/transaction\";\nimport { DigitalWalletEnum } from \"@merchant_api/models/digital-wallet-enum\";\n\nexport class Sorting {\n orderBy: null | TransactionOrderBy = TransactionOrderBy.DateAndTime;\n orderDirection: null | OrderDirectionEnum = OrderDirectionEnum.Desc;\n}\n\nexport class Filter extends FilterBase<Filter> {\n // NOTE: Must set all params to null or undefined or a specific value (required for undo)\n\n // localDateInterval is relative to the local time zone (eg. see LocalTimePoint.timeZone)\n // (API endpoints require UTC time so this value will be shifted at send)\n localDateInterval: DateRange = getInitialLocalFilterDateRangeLastTwoWeeks();\n localDateSettledInterval: DateRange = undefined;\n transactionId: string = undefined;\n amount: number = undefined;\n authCode: string = undefined;\n first6: string = undefined;\n last4: string = undefined;\n payerName: string = undefined;\n cardBrands: Array<CardBrandEnum> = undefined;\n types: Array<TransactionType> = undefined;\n statuses: Array<TransactionStatus> = undefined;\n gateways: Array<GatewayEnum> = undefined;\n tid: string = undefined;\n mid: string = undefined;\n isServiceFee: boolean = undefined;\n digitalWallets: Array<DigitalWalletEnum> = undefined;\n token: string = undefined;\n}\n\nexport class TransactionsState {\n loading = false;\n error = null;\n exportLoading = false;\n exportError = null;\n rows: Transaction[];\n sorting = new Sorting();\n pager = new Pager();\n filter = createFilter(Filter);\n}\n","import { TransactionState } from \"./transaction.state\";\nimport * as TransactionActions from \"./transaction.actions\";\nimport { createReducer, on } from \"@ngrx/store\";\n\nexport const TransactionReducer = createReducer(\n new TransactionState(),\n on(TransactionActions.GetTransactionDetailAction, (state) => ({\n ...state,\n loading: true,\n })),\n on(TransactionActions.GetTransactionDetailSucceedAction, (state, { record }) => ({\n ...state,\n loading: false,\n record,\n error: null\n })),\n on(TransactionActions.GetTransactionDetailFailAction, (state, { error }) => ({\n ...state,\n loading: false,\n error,\n })),\n on(TransactionActions.UpdateTransactionDetailAction, (state, { record }) => ({\n ...state,\n loading: false,\n record,\n }))\n);\n","import { TransactionDetails } from \"@merchant_api/models/transaction-details\";\n\nexport class TransactionState {\n loading = false;\n error = null;\n record: TransactionDetails = {};\n}\n","import { TransactionDetails } from \"@merchant_api/models/transaction-details\";\n\nexport class TransactionSiblingsState {\n loading = false;\n error = null;\n record: Array<TransactionDetails> = [];\n}\n","import { OrderDirectionEnum } from \"@merchant_api/models/order-direction-enum\";\nimport { PaymentOrderBy } from \"@merchant_api/models/payment-order-by\";\nimport { DisputeTypeEnum } from \"@merchant_api/models/dispute-type-enum\";\nimport { CardBrandEnum } from \"@merchant_api/models/card-brand-enum\";\nimport { getInitialLocalFilterDateRangeLastTwoWeeks, DateRange, Pager, createFilter, FilterBase } from \"shared-lib\";\nimport { GatewayEnum } from \"@merchant_api/models/gateway-enum\";\nimport { PaymentStatus } from \"@merchant_api/models/payment-status\";\nimport { Payment } from \"@merchant_api/models/payment\";\nimport { DigitalWalletEnum } from \"@merchant_api/models/digital-wallet-enum\";\n\nexport class Sorting {\n orderBy: null | PaymentOrderBy = PaymentOrderBy.DateAndTime;\n orderDirection: null | OrderDirectionEnum = OrderDirectionEnum.Desc;\n}\n\nexport class Filter extends FilterBase<Filter> {\n // NOTE: Must set all params to null or undefined or a specific value (required for undo)\n\n // localDateInterval is relative to the local time zone (eg. see LocalTimePoint.timeZone)\n // (API endpoints require UTC time so this value will be shifted at send)\n localDateInterval: DateRange = getInitialLocalFilterDateRangeLastTwoWeeks();\n localDateSettledInterval: DateRange = undefined;\n amount: number = undefined;\n first6: string = undefined;\n last4: string = undefined;\n payerName: string = undefined;\n cardBrands: Array<CardBrandEnum> = undefined;\n disputeTypes: Array<DisputeTypeEnum> = undefined;\n token: string = undefined;\n statuses: Array<PaymentStatus> = undefined;\n gateways: Array<GatewayEnum> = undefined;\n tid: string = undefined;\n mid: string = undefined;\n digitalWallets: Array<DigitalWalletEnum> = undefined;\n}\n\nexport class PaymentsState {\n loading = false;\n error = null;\n exportLoading = false;\n exportError = null;\n rows: Payment[];\n filter = createFilter(Filter);\n pager = new Pager();\n sorting = new Sorting();\n}\n","import { PaymentDetails } from \"@merchant_api/models/payment-details\";\nimport { TransactionFeesResult } from \"@merchant_api/models/transaction-fees-result\";\n\nexport class PaymentState {\n loading = false;\n error = null;\n record: PaymentDetails = {};\n feesLoading = false;\n feesError = null;\n fees: TransactionFeesResult = {};\n}\n","import { RoleDto } from \"@merchant_api/models/role-dto\";\nimport { UserDetailsDto } from \"@merchant_api/models/user-details-dto\";\n\nexport class UserState {\n loading = false;\n error = null;\n user: UserDetailsDto = null;\n roleList: RoleDto[] = null;\n}\n","import { UserDto } from \"@merchant_api/models/user-dto\";\n\nexport class UsersState {\n loading = false;\n error = null;\n record: Array<UserDto> = [];\n}\n","import { NextPaymentAction } from \"@merchant_api/models/next-payment-action\";\n\nexport class NextPaymentActionsState {\n loading = false;\n error = null;\n record: Array<NextPaymentAction> = [];\n}\n","export class CurrentUserDto {\n id = \"\";\n name = \"\";\n permissions = [];\n email = \"\";\n defaultRoute = \"\";\n}\n\nexport class CurrentUserState {\n loading = false;\n error = null;\n record: CurrentUserDto = null;\n}\n","import { PermissionDto } from \"@merchant_api/models/permission-dto\";\nimport { RoleDetailsDto } from \"@merchant_api/models/role-details-dto\";\n\nexport class RoleState {\n loading = false;\n error = null;\n role: RoleDetailsDto = null;\n permissionList: PermissionDto[] = null;\n}\n","import { RoleDto } from \"@merchant_api/models/role-dto\";\n\nexport class RolesState {\n loading = false;\n error = null;\n record: Array<RoleDto> = [];\n}\n","import { WebhookDto } from \"@merchant_api/models/webhook-dto\";\n\nexport class WebhooksState {\n loading = false;\n error = null;\n record: Array<WebhookDto> = [];\n secret = null;\n secretLoading = false;\n secretError = null;\n}\n","import { WebhookDto } from \"@merchant_api/models/webhook-dto\";\nimport { WebhookEventTypesDto } from \"@merchant_api/models/webhook-event-types-dto\";\n\nexport class WebhookState {\n loading = false;\n error = null;\n webhook: WebhookDto = null;\n lookups: WebhookEventTypesDto = null;\n toggleWebhooksLoading: Array<number> = [];\n toggleWebhookError = null;\n}\n","export class ReportState {\n loading = false;\n record: any = {};\n}\n","import { StatementReportItem } from \"@merchant_api/models/statement-report-item\";\n\nexport class StatementsState {\n loading = false;\n error = null;\n record: Array<StatementReportItem> = [];\n}\n","import { ClientDto } from \"@merchant_api/models/client-dto\";\n\nexport class ClientsState {\n loading = false;\n error = null;\n record: Array<ClientDto> = [];\n}\n","import { ClientDetailsDto } from \"@merchant_api/models/client-details-dto\";\nimport { ClientSecretLookupsDto } from \"@merchant_api/models/client-secret-lookups-dto\";\nimport { RoleDto } from \"@merchant_api/models/role-dto\";\n\nexport class ClientState {\n loading = false;\n error = null;\n client: ClientDetailsDto = null;\n lookups: ClientSecretLookupsDto = null;\n roles: Array<RoleDto> = [];\n}\n","import { ClientSecretDto } from \"@merchant_api/models/client-secret-dto\";\n\nexport class ClientSecretsState {\n loading = false;\n error = null;\n record: Array<ClientSecretDto> = [];\n}\n","import { TidResult } from \"@merchant_api/models/tid-result\";\nimport { Pager } from \"shared-lib\";\n\nexport class TidsState {\n loading = false;\n error = null;\n record: Array<TidResult> = [];\n pager = new Pager();\n}\n","import { MerchantProcessorDto } from \"@merchant_api/models/merchant-processor-dto\";\n\nexport class MidsState {\n loading = false;\n error = null;\n record: Array<MerchantProcessorDto> = [];\n}\n","import { OrderDirectionEnum } from \"@merchant_api/models/order-direction-enum\";\nimport { createFilter, DateRange, FilterBase, getInitialLocalFilterDateRangeLastTwoWeeks, Pager } from \"shared-lib\";\nimport { FundingStatus } from \"@merchant_api/models/funding-status\";\nimport { FundingInstructionsOrderBy } from \"@merchant_api/models/funding-instructions-order-by\";\nimport { FundingInstruction } from \"@merchant_api/models/funding-instruction\";\nimport { ProcessorEnum } from \"@merchant_api/models/processor-enum\";\n\nexport class Sorting {\n orderBy: null | FundingInstructionsOrderBy;\n orderDirection: null | OrderDirectionEnum = OrderDirectionEnum.Desc;\n}\n\nexport class Filter extends FilterBase<Filter> {\n // NOTE: Must set all params to null or undefined or a specific value (required for undo)\n\n // localDateInterval is relative to the local time zone (eg. see LocalTimePoint.timeZone)\n // (API endpoints require UTC time so this value will be shifted at send)\n localDateInterval: DateRange = getInitialLocalFilterDateRangeLastTwoWeeks();\n startDate: string = undefined;\n endDate: string = undefined;\n\n localFundedDateInterval: DateRange = undefined;\n\n merchantId: number = undefined;\n mid: string = undefined;\n dba: string = undefined;\n fundingStatuses: Array<FundingStatus> = Object.values(FundingStatus).filter(fundingStatus => fundingStatus !== FundingStatus.NoFunding);\n processors: Array<ProcessorEnum> = undefined;\n}\n\nexport class FundingState {\n loading = false;\n record: Array<FundingInstruction>;\n error: Error = null;\n sorting = new Sorting();\n pager = new Pager();\n filter = createFilter(Filter);\n}\n","import { AdjustmentDto } from \"@merchant_api/models/adjustment-dto\";\nimport { FundingFee } from \"@merchant_api/models/funding-fee\";\nimport { FundingInstructionDetails } from \"@merchant_api/models/funding-instruction-details\";\nimport { FundingTransaction } from \"@merchant_api/models/funding-transaction\";\nimport { FundingTransactionOrderBy } from \"@merchant_api/models/funding-transaction-order-by\";\nimport { OrderDirectionEnum } from \"@merchant_api/models/order-direction-enum\";\nimport { createFilter, DateRange, FilterBase, getInitialLocalFilterDateRangeLastTwoWeeks, Pager } from \"shared-lib\";\n\nexport class TransactionsSorting {\n orderBy: null | FundingTransactionOrderBy;\n orderDirection: null | OrderDirectionEnum = OrderDirectionEnum.Desc;\n}\n\nexport class TransactionsFilter extends FilterBase<TransactionsFilter> {\n // NOTE: Must set all params to null or undefined or a specific value (required for undo)\n\n localFeesOnly: string = undefined;\n}\n\nexport class FundingItemState {\n loading = false;\n record: FundingInstructionDetails = null;\n error = null;\n transactionsPager = new Pager();\n transactions: Array<FundingTransaction> = [];\n transactionsLoading = false;\n transactionsError: Error = null;\n transactionsSorting = new TransactionsSorting();\n transactionsFilter = createFilter(TransactionsFilter);\n exportLoading = false;\n exportError = null;\n midFees: Array<FundingFee> = [];\n midFeesLoading = false;\n midFeesError: Error = null;\n adjustments: Array<AdjustmentDto> = [];\n adjustmentsLoading = false;\n adjustmentsError: Error = null;\n}\n","import { EventDetailsDto } from \"@merchant_api/models/event-details-dto\";\n\nexport class EventState {\n loading = false;\n error = null;\n record: EventDetailsDto = null;\n}\n","import { EventOrderByEnum } from \"@merchant_api/models/event-order-by-enum\";\nimport { EventsDto } from \"@merchant_api/models/events-dto\";\nimport { OrderDirectionEnum } from \"@merchant_api/models/order-direction-enum\";\nimport { getInitialLocalFilterDateRangeLastTwoWeeks, DateRange, Pager, FilterBase, createFilter } from \"shared-lib\";\n\nexport class Sorting {\n orderBy: null | EventOrderByEnum = EventOrderByEnum.CreatedUtc;\n orderDirection: null | OrderDirectionEnum = OrderDirectionEnum.Desc;\n}\n\nexport class Filter extends FilterBase<Filter> {\n // NOTE: Must set all params to null or undefined or a specific value (required for undo)\n\n // localDateInterval is relative to the local time zone (eg. see LocalTimePoint.timeZone)\n // (API endpoints require UTC time so this value will be shifted at send)\n localDateInterval?: DateRange = getInitialLocalFilterDateRangeLastTwoWeeks();\n startDate?: string = undefined;\n endDate?: string = undefined;\n\n eventTypes?: Array<string> = undefined;\n mid?: string = undefined;\n tid?: string = undefined;\n fundingInstructionRef?: string = undefined;\n transactionId?: string = undefined;\n}\n\nexport class EventsState {\n loading = false;\n error: Error = null;\n rows: Array<EventsDto> = [];\n sorting = new Sorting();\n pager = new Pager();\n filter = createFilter(Filter);\n}\n","\nexport class EventDeliveryState {\n loading = false;\n error = null;\n record: any = null;\n}\n","/* tslint:disable */\n/* eslint-disable */\nexport enum EventDeliveryOrderByEnum {\n Id = 'Id',\n CreatedUtc = 'CreatedUtc',\n Status = 'Status'\n}\n","import { OrderDirectionEnum } from \"@merchant_api/models/order-direction-enum\";\nimport { EventDeliveryDto } from \"@merchant_api/models/event-delivery-dto\";\nimport { getInitialLocalFilterDateRangeLastTwoWeeks, DateRange, Pager, FilterBase, createFilter } from \"shared-lib\";\nimport { EventDeliveryOrderByEnum } from \"@merchant_api/models/event-delivery-order-by-enum\";\n\nexport class Sorting {\n orderBy: null | EventDeliveryOrderByEnum = EventDeliveryOrderByEnum.CreatedUtc;\n orderDirection: null | OrderDirectionEnum = OrderDirectionEnum.Desc;\n}\n\nexport class Filter extends FilterBase<Filter> {\n // NOTE: Must set all params to null or undefined or a specific value (required for undo)\n\n // localDateInterval is relative to the local time zone (eg. see LocalTimePoint.timeZone)\n // (API endpoints require UTC time so this value will be shifted at send)\n localDateInterval?: DateRange = getInitialLocalFilterDateRangeLastTwoWeeks();\n startDate?: string = undefined;\n endDate?: string = undefined;\n\n eventTypes: Array<string> = undefined;\n}\n\nexport class EventDeliveriesState {\n loading = false;\n error: Error = null;\n rows: Array<EventDeliveryDto> = [];\n sorting = new Sorting();\n pager = new Pager();\n filter = createFilter(Filter);\n}\n","import { DisputeDto } from \"@merchant_api/models/dispute-dto\";\nimport { DisputeOrderBy } from \"@merchant_api/models/dispute-order-by\";\nimport { DisputeTypeEnum } from \"@merchant_api/models/dispute-type-enum\";\nimport { OrderDirectionEnum } from \"@merchant_api/models/order-direction-enum\";\nimport { ProcessorEnum } from \"@merchant_api/models/processor-enum\";\nimport { createFilter, DateRange, FilterBase, Pager } from \"shared-lib\";\n\nexport class Sorting {\n orderBy: null | DisputeOrderBy;\n orderDirection: null | OrderDirectionEnum = OrderDirectionEnum.Desc;\n}\n\nexport class Filter extends FilterBase<Filter> {\n // NOTE: Must set all params to null or undefined or a specific value (required for undo)\n\n caseNumber: string = undefined;\n mid: string = undefined;\n processor: ProcessorEnum = undefined;\n disputeType: DisputeTypeEnum = undefined;\n disputeAmount: number = undefined;\n disputeOutcome: string = undefined;\n localRaiseDateInterval: DateRange = undefined;\n localStatusDateInterval: DateRange = undefined;\n localDueDateInterval: DateRange = undefined;\n paymentToken: string = undefined;\n publicTransactionId: string = undefined;\n}\n\nexport class DisputesState {\n loading = false;\n error = null;\n record: Array<DisputeDto> = [];\n pager = new Pager();\n sorting = new Sorting();\n filter = createFilter(Filter);\n}\n","import { DisputeDto } from \"@merchant_api/models/dispute-dto\";\n\nexport class DisputeState {\n loading = false;\n error = null;\n record: DisputeDto = null;\n}\n","import { RootStoreConfig } from \"@ngrx/store\";\nimport { IStore } from \"./store\";\n\nimport { RouterReducer } from \"./router/router.reducers\";\n\nimport { MerchantState } from \"./merchant/merchant.state\";\nimport { MerchantReducer } from \"./merchant/merchant.reducers\";\nimport { TransactionsState } from \"./transactions/transactions.state\";\nimport { TransactionsReducer } from \"./transactions/transactions.reducers\";\n\nimport { TransactionState } from \"./transaction/transaction.state\";\nimport { TransactionReducer } from \"./transaction/transaction.reducers\";\n\nimport { TransactionSiblingsState } from \"./transaction-siblings/transaction-siblings.state\";\nimport { TransactionSiblingsReducer } from \"./transaction-siblings/transaction-siblings.reducers\";\n\nimport { PaymentsState } from \"./payments/payments.state\";\nimport { PaymentsReducer } from \"./payments/payments.reducers\";\n\nimport { PaymentState } from \"./payment/payment.state\";\nimport { PaymentReducer } from \"./payment/payment.reducers\";\n\nimport { UserState } from \"./user/user.state\";\nimport { UserReducer } from \"./user/user.reducer\";\nimport { UsersReducer } from \"./users/users.reducers\";\n\nimport { NextPaymentActionsReducer } from \"./next-payment-actions/next-payment-actions.reducers\";\nimport { NextPaymentActionsState } from \"./next-payment-actions/next-payment-actions.state\";\nimport { CurrentUserReducer } from \"./current-user/current-user.reducer\";\nimport { CurrentUserState } from \"./current-user/current-user.state\";\nimport { UsersState } from \"./users/users.state\";\nimport { RoleReducer } from \"./role/role.reducer\";\nimport { RolesReducer } from \"./roles/roles.reducers\";\nimport { RoleState } from \"./role/role.state\";\nimport { RolesState } from \"./roles/roles.state\";\nimport { WebhooksState } from \"./webhooks/webhooks.state\";\nimport { WebhooksReducer } from \"./webhooks/webhooks.reducers\";\nimport { WebhookReducer } from \"./webhook/webhook.reducer\";\nimport { WebhookState } from \"./webhook/webhook.state\";\nimport { ReportReducer } from \"./report/report.reducers\";\nimport { ReportState } from \"./report/report.state\";\nimport { StatementsState } from \"./statements/statements.state\";\nimport { StatementsReducer } from \"./statements/statements.reducers\";\nimport { ClientsReducer } from \"./clients/clients.reducers\";\nimport { ClientsState } from \"./clients/clients.state\";\nimport { ClientState } from \"./client/client.state\";\nimport { ClientReducer } from \"./client/client.reducer\";\nimport { ClientSecretsState } from \"./client-secrets/client-secrets.state\";\nimport { ClientSecretsReducer } from \"./client-secrets/client-secrets.reducers\";\nimport { TidsReducer } from \"./tids/tids.reducers\";\nimport { TidsState } from \"./tids/tids.state\";\nimport { MidsReducer } from \"./mids/mids.reducers\";\nimport { MidsState } from \"./mids/mids.state\";\nimport { FundingReducer } from \"./funding/funding.reducers\";\nimport { FundingState } from \"./funding/funding.state\";\nimport { FundingItemState } from \"./funding-item/funding-item.state\";\nimport { FundingItemReducer } from \"./funding-item/funding-item.reducers\";\nimport { EventReducer } from \"./event/event.reducers\";\nimport { EventsReducer } from \"./events/events.reducers\";\nimport { EventDeliveryReducer } from \"./event-delivery/event-delivery.reducers\";\nimport { EventDeliveriesReducer } from \"./event-deliveries/event-deliveries.reducers\";\nimport { EventState } from \"./event/event.state\";\nimport { EventsState } from \"./events/events.state\";\nimport { EventDeliveryState } from \"./event-delivery/event-delivery.state\";\nimport { EventDeliveriesState } from \"./event-deliveries/event-deliveries.state\";\nimport { DisputesState } from \"./disputes/disputes.state\";\nimport { DisputesReducer } from \"./disputes/disputes.reducers\";\nimport { DisputeState } from \"./dispute/dispute.state\";\nimport { DisputeReducer } from \"./dispute/dispute.reducers\";\n\nexport const ReducerMap: { [key in keyof IStore]: (state: any, action: any) => any } = {\n router: RouterReducer,\n merchant: MerchantReducer,\n transactions: TransactionsReducer,\n transaction: TransactionReducer,\n transactionSiblings: TransactionSiblingsReducer,\n webhook: WebhookReducer,\n webhooks: WebhooksReducer,\n payments: PaymentsReducer,\n payment: PaymentReducer,\n nextPaymentActions: NextPaymentActionsReducer,\n user: UserReducer,\n users: UsersReducer,\n role: RoleReducer,\n roles: RolesReducer,\n clients: ClientsReducer,\n client: ClientReducer,\n currentUser: CurrentUserReducer,\n report: ReportReducer,\n statements: StatementsReducer,\n clientSecrets: ClientSecretsReducer,\n tids: TidsReducer,\n mids: MidsReducer,\n funding: FundingReducer,\n fundingItem: FundingItemReducer,\n event: EventReducer,\n events: EventsReducer,\n eventDelivery: EventDeliveryReducer,\n eventDeliveries: EventDeliveriesReducer,\n disputes: DisputesReducer,\n dispute: DisputeReducer\n};\n\nexport const ReducerConfiguration: RootStoreConfig<IStore> = {\n runtimeChecks: {\n strictStateImmutability: false,\n strictActionImmutability: false,\n strictActionSerializability: false,\n strictStateSerializability: false,\n }\n};\n\n// for unit tests\nexport const GetInitialState = (): IStore => (\n {\n router: {\n state: {\n url: \"\",\n queryParams: {},\n params: {},\n routerPathSegments: [],\n routerPath: \"\",\n },\n navigationId: 0,\n },\n merchant: new MerchantState(),\n transactions: new TransactionsState(),\n transaction: new TransactionState(),\n transactionSiblings: new TransactionSiblingsState(),\n webhook: new WebhookState(),\n webhooks: new WebhooksState(),\n payments: new PaymentsState(),\n payment: new PaymentState(),\n nextPaymentActions: new NextPaymentActionsState(),\n user: new UserState(),\n users: new UsersState(),\n role: new RoleState(),\n roles: new RolesState(),\n clients: new ClientsState(),\n client: new ClientState(),\n currentUser: new CurrentUserState(),\n report: new ReportState(),\n statements: new StatementsState(),\n clientSecrets: new ClientSecretsState(),\n tids: new TidsState(),\n mids: new MidsState(),\n funding: new FundingState(),\n fundingItem: new FundingItemState(),\n event: new EventState(),\n events: new EventsState(),\n eventDelivery: new EventDeliveryState(),\n eventDeliveries: new EventDeliveriesState(),\n disputes: new DisputesState(),\n dispute: new DisputeState()\n }\n);\n","import { MerchantState } from \"./merchant.state\";\nimport { ActionTypes } from \"./merchant.actions\";\n\nexport const MerchantReducer = (\n state: MerchantState = new MerchantState(),\n action: any\n): MerchantState => {\n\n switch (action.type) {\n\n case ActionTypes.GetMerchantSucceed: {\n\n return {\n ...state,\n loading: false,\n merchant: action.merchant,\n };\n }\n\n case ActionTypes.GetMerchantFail: {\n\n return {\n ...state,\n loading: false,\n error: action.error\n };\n }\n\n case ActionTypes.GetMerchant: {\n\n return {\n ...state,\n loading: true,\n };\n }\n\n default:\n return state;\n }\n};\n","import { TransactionsState } from \"./transactions.state\";\nimport {\n ActionTypes,\n} from \"./transactions.actions\";\n\nexport const TransactionsReducer = (state: TransactionsState = new TransactionsState(), action: any): TransactionsState => {\n\n switch (action.type) {\n\n case ActionTypes.FilterTransactions:\n case ActionTypes.SortTransactions:\n case ActionTypes.PageChangedTransactions:\n case ActionTypes.GetTransactions: {\n return {\n ...state,\n loading: true\n };\n }\n\n case ActionTypes.GetTransactionsSucceed: {\n const morePagesMode = (action.response.totalPages == null);\n return {\n ...state,\n rows: action.response.items,\n pager: {\n pageSize: action.pageSize,\n page: action.page,\n pageCount: morePagesMode ? action.response.morePages : action.response.totalPages,\n morePagesMode\n },\n loading: false,\n error: null,\n ...action.stateExtensions\n };\n }\n\n case ActionTypes.GetTransactionsFail: {\n return {\n ...state,\n loading: false,\n error: action.error,\n rows: []\n };\n }\n\n case ActionTypes.ExportTransactionsToCsv: {\n return {\n ...state,\n exportLoading: true\n };\n }\n\n case ActionTypes.ExportTransactionsToCsvSucceed: {\n return {\n ...state,\n ...action.resource,\n exportLoading: false,\n exportError: null\n };\n }\n\n case ActionTypes.ExportTransactionsToCsvFail: {\n return {\n ...state,\n exportLoading: false,\n exportError: action.error\n };\n }\n\n default: {\n return state;\n }\n\n }\n\n};\n","import { TransactionSiblingsState } from \"./transaction-siblings.state\";\nimport { ActionTypes } from \"./transaction-siblings.actions\";\n\nexport const TransactionSiblingsReducer = (\n state: TransactionSiblingsState = new TransactionSiblingsState(),\n action: any,\n ): TransactionSiblingsState => {\n\n switch (action.type) {\n\n case ActionTypes.GetTransactionSiblingsDetail: {\n\n return {\n ...state,\n loading: true,\n record: []\n };\n }\n\n case ActionTypes.GetTransactionSiblingsDetailSucceed: {\n\n return {\n ...state,\n loading: false,\n record: action.record,\n error: null\n };\n }\n\n case ActionTypes.GetTransactionSiblingsDetailFail: {\n\n return {\n ...state,\n loading: false,\n error: action.error\n };\n }\n\n default:\n return state;\n }\n };\n","import { WebhookState } from \"./webhook.state\";\nimport { ActionTypes } from \"./webhook.actions\";\n\nexport const WebhookReducer = (\n state: WebhookState = new WebhookState(),\n action: any\n ): WebhookState => {\n\n switch (action.type) {\n\n case ActionTypes.GetWebhook:\n case ActionTypes.GetNewWebhook: {\n return {\n ...state,\n webhook: null,\n lookups: null,\n loading: true\n };\n }\n\n case ActionTypes.GetWebhookSucceed: {\n return {\n ...state,\n webhook: action.webhook,\n lookups: action.lookups,\n loading: false,\n error: null\n };\n }\n\n case ActionTypes.GetWebhookFail: {\n return {\n ...state,\n error: action.error,\n loading: false\n };\n }\n\n case ActionTypes.ToggleWebhook: {\n state.toggleWebhooksLoading.push(action.id);\n return state;\n }\n\n case ActionTypes.ToggleWebhookSucceed: {\n state.toggleWebhooksLoading = state.toggleWebhooksLoading.filter((id) => (id !== action.id));\n return {\n ...state,\n toggleWebhookError: null\n };\n\n }\n\n case ActionTypes.ToggleWebhookFail: {\n state.toggleWebhooksLoading = state.toggleWebhooksLoading.filter((id) => (id !== action.id));\n return {\n ...state,\n toggleWebhookError: action.error\n };\n }\n\n case ActionTypes.GetWebhookLookupsSucceed: {\n return {\n ...state,\n lookups: action.lookups\n };\n }\n\n default: {\n return state;\n }\n }\n\n};\n","import { WebhooksState } from \"./webhooks.state\";\nimport { ActionTypes } from \"./webhooks.actions\";\n\nexport const WebhooksReducer = (\n state: WebhooksState = new WebhooksState(),\n action: any,\n ): WebhooksState => {\n\n switch (action.type) {\n\n case ActionTypes.GetWebhooks: {\n return {\n ...state,\n loading: true\n };\n }\n\n case ActionTypes.GetWebhooksSucceed: {\n return {\n ...state,\n record: action.webhooks,\n loading: false,\n error: null\n };\n }\n\n case ActionTypes.GetWebhooksFail: {\n return {\n ...state,\n loading: false,\n error: action.error,\n record: []\n };\n }\n\n case ActionTypes.GenerateWebhooksSecret: {\n return {\n ...state,\n secretLoading: true\n };\n }\n\n case ActionTypes.GenerateWebhooksSecretSucceed: {\n return {\n ...state,\n secret: action.secret,\n secretLoading: false,\n secretError: null\n };\n }\n\n case ActionTypes.GenerateWebhooksSecretFail: {\n return {\n ...state,\n secretLoading: false,\n secretError: action.error\n };\n }\n\n case ActionTypes.ResetWebhooksSecret: {\n return {\n ...state,\n secret: null,\n secretLoading: false,\n secretError: null\n };\n }\n\n default: {\n return state;\n }\n }\n\n};\n","import { PaymentsState } from \"./payments.state\";\nimport {\n ActionTypes,\n} from \"./payments.actions\";\n\nexport const PaymentsReducer = (state: PaymentsState = new PaymentsState(), action: any): PaymentsState => {\n\n switch (action.type) {\n\n case ActionTypes.FilterPayments:\n case ActionTypes.SortPayments:\n case ActionTypes.PageChangedPayments:\n case ActionTypes.GetPayments: {\n return {\n ...state,\n loading: true\n };\n }\n\n case ActionTypes.GetPaymentsSucceed: {\n const morePagesMode = (action.response.totalPages == null);\n return {\n ...state,\n rows: action.response.items,\n pager: {\n pageSize: action.pageSize,\n page: action.page,\n pageCount: morePagesMode ? action.response.morePages : action.response.totalPages,\n morePagesMode\n },\n loading: false,\n error: null,\n ...action.stateExtensions\n };\n }\n\n case ActionTypes.GetPaymentsFail: {\n return {\n ...state,\n loading: false,\n error: action.error,\n rows: []\n };\n }\n\n case ActionTypes.ExportPaymentsToCsv: {\n return {\n ...state,\n exportLoading: true\n };\n }\n\n case ActionTypes.ExportPaymentsToCsvSucceed: {\n return {\n ...state,\n ...action.resource,\n exportLoading: false,\n exportError: null\n };\n }\n\n case ActionTypes.ExportPaymentsToCsvFail: {\n return {\n ...state,\n exportError: action.error,\n exportLoading: false\n };\n }\n\n default: {\n return state;\n }\n\n }\n\n};\n","import { ActionTypes } from \"./payment.actions\";\nimport { PaymentState } from \"./payment.state\";\n\nexport const PaymentReducer = (\n state: PaymentState = new PaymentState(),\n action: any,\n): PaymentState => {\n\n switch (action.type) {\n\n case ActionTypes.GetPaymentDetail: {\n\n return {\n ...state,\n loading: true\n };\n }\n\n case ActionTypes.GetPaymentDetailSucceed: {\n\n return {\n ...state,\n loading: false,\n record: action.record,\n error: null\n };\n }\n\n case ActionTypes.GetPaymentDetailFail: {\n\n return {\n ...state,\n loading: false,\n error: action.error,\n record: {}\n };\n }\n\n case ActionTypes.GetPaymentFees: {\n\n return {\n ...state,\n feesLoading: true\n };\n }\n\n case ActionTypes.GetPaymentFeesSucceed: {\n\n return {\n ...state,\n feesLoading: false,\n fees: action.fees,\n feesError: null\n };\n }\n\n case ActionTypes.GetPaymentFeesFail: {\n\n return {\n ...state,\n feesLoading: false,\n feesError: action.error,\n fees: {}\n };\n }\n\n default:\n return state;\n }\n};\n","import { ActionTypes } from \"./next-payment-actions.actions\";\nimport { NextPaymentActionsState } from \"./next-payment-actions.state\";\n\nexport const NextPaymentActionsReducer = (\n state: NextPaymentActionsState = new NextPaymentActionsState(),\n action: any,\n): NextPaymentActionsState => {\n\n switch (action.type) {\n\n case ActionTypes.GetNextPaymentActions: {\n\n return {\n ...state,\n loading: true,\n record: []\n };\n }\n\n case ActionTypes.GetNextPaymentActionsSucceed: {\n\n return {\n ...state,\n loading: false,\n record: action.record,\n error: null\n };\n }\n\n case ActionTypes.GetNextPaymentActionsFail: {\n\n return {\n ...state,\n loading: false,\n error: action.error\n };\n }\n\n default:\n return state;\n }\n};\n","import { UserState } from \"./user.state\";\nimport { ActionTypes } from \"./user.actions\";\n\nexport const UserReducer = (\n state: UserState = new UserState(),\n action: any,\n ): UserState => {\n\n switch (action.type) {\n\n case ActionTypes.GetUser:\n case ActionTypes.GetNewUser: {\n return {\n ...state,\n user: null,\n roleList: null,\n loading: true\n };\n }\n\n case ActionTypes.GetUserSucceed: {\n return {\n ...state,\n user: action.user,\n roleList: action.roleList,\n loading: false,\n error: null\n };\n }\n\n case ActionTypes.GetUserFail: {\n return {\n ...state,\n error: action.error,\n loading: false\n };\n }\n\n default: {\n return state;\n }\n }\n\n};\n","import { UsersState } from \"./users.state\";\nimport { ActionTypes } from \"./users.actions\";\n\nexport const UsersReducer = (\n state: UsersState = new UsersState(),\n action: any,\n ): UsersState => {\n\n switch (action.type) {\n\n case ActionTypes.GetUsers: {\n return {\n ...state,\n loading: true\n };\n }\n\n case ActionTypes.GetUsersSucceed: {\n return {\n ...state,\n record: action.users,\n loading: false,\n error: null\n };\n }\n\n case ActionTypes.GetUsersFail: {\n return {\n ...state,\n loading: false,\n error: action.error,\n record: []\n };\n }\n\n default: {\n return state;\n }\n }\n\n};\n","import { RoleState } from \"./role.state\";\nimport { ActionTypes } from \"./role.actions\";\n\nexport const RoleReducer = (\n state: RoleState = new RoleState(),\n action: any,\n ): RoleState => {\n\n switch (action.type) {\n\n case ActionTypes.GetRole:\n case ActionTypes.GetNewRole: {\n return {\n ...state,\n role: null,\n permissionList: null,\n loading: true\n };\n }\n\n case ActionTypes.GetRoleSucceed: {\n return {\n ...state,\n role: action.role,\n permissionList: action.permissionList,\n loading: false,\n error: null\n };\n }\n\n case ActionTypes.GetRoleFail: {\n return {\n ...state,\n error: action.error,\n loading: false\n };\n }\n\n default: {\n return state;\n }\n }\n\n};\n","import { RolesState } from \"./roles.state\";\nimport { ActionTypes } from \"./roles.actions\";\n\nexport const RolesReducer = (\n state: RolesState = new RolesState(),\n action: any,\n ): RolesState => {\n\n switch (action.type) {\n\n case ActionTypes.GetRoles: {\n return {\n ...state,\n loading: true\n };\n }\n\n case ActionTypes.GetRolesSucceed: {\n return {\n ...state,\n record: action.roles,\n loading: false,\n error: null\n };\n }\n\n case ActionTypes.GetRolesFail: {\n return {\n ...state,\n loading: false,\n error: action.error,\n record: []\n };\n }\n\n default: {\n return state;\n }\n }\n\n};\n","import { ClientsState } from \"./clients.state\";\nimport { ActionTypes } from \"./clients.actions\";\n\nexport const ClientsReducer = (\n state: ClientsState = new ClientsState(),\n action: any,\n ): ClientsState => {\n\n switch (action.type) {\n\n case ActionTypes.GetClients: {\n return {\n ...state,\n loading: true\n };\n }\n\n case ActionTypes.GetClientsSucceed: {\n return {\n ...state,\n record: action.clients,\n loading: false,\n error: null\n };\n }\n\n case ActionTypes.GetClientsFail: {\n return {\n ...state,\n loading: false,\n error: action.error,\n record: []\n };\n }\n\n default: {\n return state;\n }\n }\n\n};\n","import { ClientState } from \"./client.state\";\nimport { ActionTypes } from \"./client.actions\";\n\nexport const ClientReducer = (\n state: ClientState = new ClientState(),\n action: any\n ): ClientState => {\n\n switch (action.type) {\n\n case ActionTypes.GetClient:\n case ActionTypes.GetNewClient: {\n return {\n ...state,\n client: null,\n lookups: null,\n roles: null,\n loading: true\n };\n }\n\n case ActionTypes.GetClientSucceed: {\n return {\n ...state,\n client: action.client,\n roles: action.roles,\n lookups: action.lookups,\n loading: false,\n error: null\n };\n }\n\n case ActionTypes.GetClientFail: {\n return {\n ...state,\n error: action.error,\n loading: false\n };\n }\n\n default: {\n return state;\n }\n }\n\n};\n","import { ActionTypes } from \"./current-user.actions\";\nimport { CurrentUserState } from \"./current-user.state\";\n\nexport const CurrentUserReducer = (\n state: CurrentUserState = new CurrentUserState(),\n action: any,\n): CurrentUserState => {\n\n switch (action.type) {\n\n case ActionTypes.GetCurrentUser: {\n\n return {\n ...state,\n loading: true\n };\n }\n\n case ActionTypes.GetCurrentUserSucceed: {\n\n return {\n ...state,\n loading: false,\n record: action.record,\n error: null\n };\n }\n\n case ActionTypes.GetCurrentUserFail: {\n\n return {\n ...state,\n loading: false,\n error: action.error\n };\n }\n\n case ActionTypes.AddDetailsToCurrentUser: {\n\n state.record.name = `${action.userDetailsDto.firstName} ${action.userDetailsDto.lastName}`;\n state.record.email = action.userDetailsDto.email;\n\n return {\n ...state,\n };\n }\n\n default:\n return state;\n }\n};\n\n","import { ReportState } from \"./report.state\";\n\nexport const ReportReducer = (\n state: ReportState = new ReportState(),\n action: any,\n): ReportState => {\n\n switch (action.type) {\n default:\n return state;\n }\n};\n","import { StatementsState } from \"./statements.state\";\nimport { ActionTypes } from \"./statements.actions\";\n\nexport const StatementsReducer = (\n state: StatementsState = new StatementsState(),\n action: any,\n ): StatementsState => {\n\n switch (action.type) {\n\n case ActionTypes.ResetStatements: {\n return {\n ...state,\n loading: false,\n record: [],\n error: null\n };\n }\n\n case ActionTypes.GetStatements: {\n return {\n ...state,\n loading: true\n };\n }\n\n case ActionTypes.GetStatementsSucceed: {\n return {\n ...state,\n record: action.statements,\n loading: false,\n error: null\n };\n }\n\n case ActionTypes.GetStatementsFail: {\n return {\n ...state,\n loading: false,\n error: action.error\n };\n }\n\n default: {\n return state;\n }\n }\n\n};\n","import { ActionTypes } from \"./client-secrets.actions\";\nimport { ClientSecretsState } from \"./client-secrets.state\";\n\nexport const ClientSecretsReducer = (\n state: ClientSecretsState = new ClientSecretsState(),\n action: any,\n ): ClientSecretsState => {\n\n switch (action.type) {\n\n case ActionTypes.ResetClientSecrets: {\n return {\n ...state,\n loading: false,\n record: [],\n error: null\n };\n }\n\n case ActionTypes.GetClientSecrets: {\n return {\n ...state,\n loading: true\n };\n }\n\n case ActionTypes.GetClientSecretsSucceed: {\n return {\n ...state,\n record: action.clientSecrets,\n loading: false,\n error: null\n };\n }\n\n case ActionTypes.GetClientSecretsFail: {\n return {\n ...state,\n loading: false,\n error: action.error,\n record: []\n };\n }\n\n default: {\n return state;\n }\n }\n\n};\n","import { TidsState } from \"./tids.state\";\nimport { ActionTypes } from \"./tids.actions\";\n\nexport const TidsReducer = (\n state: TidsState = new TidsState(),\n action: any,\n ): TidsState => {\n\n switch (action.type) {\n\n case ActionTypes.ResetTids: {\n return {\n ...state,\n loading: false,\n record: [],\n error: null\n };\n }\n\n case ActionTypes.GetTids: {\n return {\n ...state,\n loading: true\n };\n }\n\n case ActionTypes.GetTidsSucceed: {\n const morePagesMode = (action.response.totalPages == null);\n return {\n ...state,\n record: action.response.items,\n pager: {\n pageSize: action.pageSize,\n page: action.page,\n pageCount: morePagesMode ? action.response.morePages : action.response.totalPages,\n morePagesMode\n },\n loading: false,\n error: null\n };\n }\n\n case ActionTypes.GetTidsFail: {\n return {\n ...state,\n loading: false,\n error: action.error,\n record: []\n };\n }\n\n default: {\n return state;\n }\n }\n\n};\n","import { MidsState } from \"./mids.state\";\nimport { ActionTypes } from \"./mids.actions\";\n\nexport const MidsReducer = (\n state: MidsState = new MidsState(),\n action: any,\n ): MidsState => {\n\n switch (action.type) {\n\n case ActionTypes.ResetMids: {\n return {\n ...state,\n loading: false,\n record: [],\n error: null\n };\n }\n\n case ActionTypes.GetMids: {\n return {\n ...state,\n loading: true\n };\n }\n\n case ActionTypes.GetMidsSucceed: {\n return {\n ...state,\n record: action.mids,\n loading: false,\n error: null\n };\n }\n\n case ActionTypes.GetMidsFail: {\n return {\n ...state,\n loading: false,\n error: action.error\n };\n }\n\n default: {\n return state;\n }\n }\n\n};\n","import { FundingState } from \"./funding.state\";\nimport { ActionTypes } from \"./funding.actions\";\n\nexport const FundingReducer = (\n state: FundingState = new FundingState(),\n action: any,\n ): FundingState => {\n\n switch (action.type) {\n\n case ActionTypes.GetFunding: {\n return {\n ...state,\n loading: true\n };\n }\n\n case ActionTypes.GetFundingSucceed: {\n const morePagesMode = (action.response.totalPages == null);\n const retVal = {\n ...state,\n record: action.response.items,\n pager: {\n pageSize: action.pageSize,\n page: action.page,\n pageCount: morePagesMode ? action.response.morePages : action.response.totalPages,\n morePagesMode\n },\n loading: false,\n error: null,\n ...action.stateExtensions\n };\n return retVal;\n }\n\n case ActionTypes.GetFundingFail: {\n return {\n ...state,\n loading: false,\n error: action.error,\n record: []\n };\n }\n\n case ActionTypes.SortFunding: {\n return {\n ...state,\n loading: true,\n sorting: action.sorting\n };\n }\n\n case ActionTypes.FilterFunding: {\n return {\n ...state,\n loading: true,\n filter: action.filter\n };\n }\n\n default: {\n return state;\n }\n }\n\n};\n","import { FundingItemState } from \"./funding-item.state\";\nimport { ActionTypes } from \"./funding-item.actions\";\n\nexport const FundingItemReducer = (\n state: FundingItemState = new FundingItemState(),\n action: any,\n ): FundingItemState => {\n\n switch (action.type) {\n\n case ActionTypes.ResetFundingItem: {\n return new FundingItemState();\n }\n\n case ActionTypes.GetFundingItem: {\n return {\n ...state,\n record: null,\n loading: true\n };\n }\n\n case ActionTypes.GetFundingItemSucceed: {\n return {\n ...state,\n record: action.fundingItem,\n error: null,\n loading: false\n };\n }\n\n case ActionTypes.GetFundingItemFail: {\n return {\n ...state,\n error: action.error,\n loading: false\n };\n }\n\n case ActionTypes.GetFundingItemTransactions: {\n return {\n ...state,\n transactionsLoading: true\n };\n }\n\n case ActionTypes.GetFundingItemTransactionsSucceed: {\n const morePagesMode = (action.response.totalPages == null);\n const retVal = {\n ...state,\n transactions: action.response.items,\n transactionsPager: {\n pageSize: action.pageSize,\n page: action.page,\n pageCount: morePagesMode ? action.response.morePages : action.response.totalPages,\n morePagesMode\n },\n transactionsLoading: false,\n ...action.stateExtensions\n };\n return retVal;\n }\n\n case ActionTypes.GetFundingItemTransactionsFail: {\n return {\n ...state,\n transactions: [],\n transactionsLoading: false,\n transactionsError: action.error\n };\n }\n\n case ActionTypes.SortFundingItemTransactions: {\n return {\n ...state,\n transactionsLoading: true,\n transactionsSorting: action.sorting\n };\n }\n\n case ActionTypes.FilterFundingItemTransactions: {\n return {\n ...state,\n transactionsLoading: true,\n transactionsFilter: action.filter\n };\n }\n\n case ActionTypes.ExportTransactionsToCsv: {\n return {\n ...state,\n exportLoading: true\n };\n }\n\n case ActionTypes.ExportTransactionsToCsvSucceed: {\n return {\n ...state,\n ...action.resource,\n exportLoading: false,\n exportError: null\n };\n }\n\n case ActionTypes.ExportTransactionsToCsvFail: {\n return {\n ...state,\n exportLoading: false,\n exportError: action.error\n };\n }\n\n case ActionTypes.GetFundingItemMidFees: {\n return {\n ...state,\n midFeesLoading: true\n };\n }\n\n case ActionTypes.GetFundingItemMidFeesSucceed: {\n return {\n ...state,\n midFees: action.response,\n midFeesError: null,\n midFeesLoading: false\n };\n }\n\n case ActionTypes.GetFundingItemMidFeesFail: {\n return {\n ...state,\n midFees: null,\n midFeesError: action.error,\n midFeesLoading: false\n };\n }\n\n case ActionTypes.GetFundingItemAdjustments: {\n return {\n ...state,\n adjustmentsLoading: true\n };\n }\n\n case ActionTypes.GetFundingItemAdjustmentsSucceed: {\n return {\n ...state,\n adjustments: action.response,\n adjustmentsError: null,\n adjustmentsLoading: false\n };\n }\n\n case ActionTypes.GetFundingItemAdjustmentsFail: {\n return {\n ...state,\n adjustments: null,\n adjustmentsError: action.error,\n adjustmentsLoading: false\n };\n }\n\n default: {\n return state;\n }\n }\n\n};\n","import { EventState } from \"./event.state\";\nimport {\n ActionTypes,\n} from \"./event.actions\";\n\nexport const EventReducer = (state: EventState = new EventState(), action: any): EventState => {\n\n switch (action.type) {\n\n case ActionTypes.GetEvent: {\n return {\n ...state,\n record: null,\n loading: true\n };\n }\n\n case ActionTypes.GetEventSucceed: {\n return {\n ...state,\n record: action.response,\n loading: false,\n error: null\n };\n }\n\n case ActionTypes.GetEventFail: {\n return {\n ...state,\n loading: false,\n error: action.error\n };\n }\n\n default: {\n return state;\n }\n\n }\n\n};\n","import { EventsState } from \"./events.state\";\nimport {\n ActionTypes,\n} from \"./events.actions\";\n\nexport const EventsReducer = (state: EventsState = new EventsState(), action: any): EventsState => {\n\n switch (action.type) {\n\n case ActionTypes.FilterEvents:\n case ActionTypes.SortEvents:\n case ActionTypes.PageChangedEvents:\n case ActionTypes.GetEvents: {\n return {\n ...state,\n loading: true\n };\n }\n\n case ActionTypes.GetEventsSucceed: {\n return {\n ...state,\n rows: action.response.items,\n pager: {\n pageSize: action.pageSize,\n page: action.page,\n pageCount: action.response.pages,\n morePagesMode: true\n },\n loading: false,\n error: null,\n ...action.stateExtensions\n };\n }\n\n case ActionTypes.GetEventsFail: {\n return {\n ...state,\n rows: [],\n loading: false,\n error: action.error\n };\n }\n\n default: {\n return state;\n }\n\n }\n\n};\n","import { EventDeliveryState } from \"./event-delivery.state\";\nimport {\n ActionTypes,\n} from \"./event-delivery.actions\";\n\nexport const EventDeliveryReducer = (state: EventDeliveryState = new EventDeliveryState(), action: any): EventDeliveryState => {\n\n switch (action.type) {\n\n case ActionTypes.GetEventDelivery: {\n return {\n ...state,\n record: null,\n loading: true\n };\n }\n\n case ActionTypes.GetEventDeliverySucceed: {\n return {\n ...state,\n record: action.response,\n loading: false,\n error: null\n };\n }\n\n case ActionTypes.GetEventDeliveryFail: {\n return {\n ...state,\n loading: false,\n error: action.error\n };\n }\n\n default: {\n return state;\n }\n\n }\n\n};\n","import { EventDeliveriesState } from \"./event-deliveries.state\";\nimport {\n ActionTypes,\n} from \"./event-deliveries.actions\";\n\nexport const EventDeliveriesReducer = (state: EventDeliveriesState = new EventDeliveriesState(), action: any): EventDeliveriesState => {\n\n switch (action.type) {\n\n case ActionTypes.ResetEventDeliveries: {\n return {\n ...state,\n loading: false,\n rows: []\n };\n }\n\n case ActionTypes.FilterEventDeliveries:\n case ActionTypes.SortEventDeliveries:\n case ActionTypes.PageChangedEventDeliveries:\n case ActionTypes.GetEventDeliveries: {\n return {\n ...state,\n loading: true\n };\n }\n\n case ActionTypes.GetEventDeliveriesSucceed: {\n return {\n ...state,\n rows: action.response.items,\n pager: {\n pageSize: action.pageSize,\n page: action.page,\n pageCount: action.response.pages,\n morePagesMode: true\n },\n loading: false,\n error: null,\n ...action.stateExtensions\n };\n }\n\n case ActionTypes.GetEventDeliveriesFail: {\n return {\n ...state,\n rows: [],\n loading: false,\n error: action.error\n };\n }\n\n default: {\n return state;\n }\n\n }\n\n};\n","import { DisputesState } from \"./disputes.state\";\nimport { ActionTypes } from \"./disputes.actions\";\n\nexport const DisputesReducer = (\n state: DisputesState = new DisputesState(),\n action: any,\n ): DisputesState => {\n\n switch (action.type) {\n\n case ActionTypes.GetDisputes: {\n return {\n ...state,\n loading: true\n };\n }\n\n case ActionTypes.GetDisputesSucceed: {\n const morePagesMode = (action.response.totalPages == null);\n return {\n ...state,\n record: action.response.items,\n pager: {\n pageSize: action.pageSize,\n page: action.page,\n pageCount: morePagesMode ? action.response.morePages : action.response.totalPages,\n morePagesMode\n },\n loading: false,\n error: null,\n ...action.stateExtensions\n };\n }\n\n case ActionTypes.GetDisputesFail: {\n return {\n ...state,\n loading: false,\n error: action.error,\n record: []\n };\n }\n\n case ActionTypes.SortDisputes: {\n return {\n ...state,\n loading: true,\n sorting: action.sorting\n };\n }\n\n case ActionTypes.FilterDisputes: {\n return {\n ...state,\n loading: true,\n filter: action.filter\n };\n }\n\n default: {\n return state;\n }\n }\n\n};\n","import { DisputeState } from \"./dispute.state\";\nimport {\n ActionTypes,\n} from \"./dispute.actions\";\n\nexport const DisputeReducer = (state: DisputeState = new DisputeState(), action: any): DisputeState => {\n\n switch (action.type) {\n\n case ActionTypes.GetDispute: {\n return {\n ...state,\n record: null,\n loading: true\n };\n }\n\n case ActionTypes.GetDisputeSucceed: {\n return {\n ...state,\n record: action.response,\n loading: false,\n error: null\n };\n }\n\n case ActionTypes.GetDisputeFail: {\n return {\n ...state,\n loading: false,\n error: action.error\n };\n }\n\n default: {\n return state;\n }\n\n }\n\n};\n","import { Component } from \"@angular/core\";\n\n@Component({\n selector: \"app-root\",\n templateUrl: \"./app.component.html\",\n styleUrls: [\"./app.component.less\"],\n})\nexport class AppComponent {}\n","<router-outlet></router-outlet>\n<lib-global-spinner></lib-global-spinner>\n\n<!--\n mat-icon can show text in components if they aren't loaded.\n Dirty solution here to force a pre-load by loading a single one.\n (Another solution would be to self-host the Material Icons font\n instead of getting it from CDN link.)\n-->\n<div style=\"position: absolute; top: -10000px; left: -10000px;\">\n <mat-icon>close</mat-icon>\n</div>\n","import { AuthConfig } from \"angular-oauth2-oidc\";\nimport { environment } from \"@merchant_environments/environment\";\nimport { GetCurrentUrl } from \"shared-lib\";\n\nexport const authConfig: AuthConfig = {\n issuer: environment.authRootUrl,\n redirectUri: GetCurrentUrl(),\n clientId: \"portaljs\",\n responseType: \"code\",\n showDebugInformation: environment.isDevelopment,\n scope: \"profile offline_access core-api.merchant.public portal.merchant.public\",\n};\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { DashboardComponent } from \"./dashboard.component\";\nimport { DashboardCommonModule } from \"shared-lib\";\nimport { RouterModule } from \"@angular/router\";\n\n@NgModule({\n declarations: [\n DashboardComponent\n ],\n imports: [\n CommonModule,\n DashboardCommonModule,\n RouterModule\n ],\n exports: [\n DashboardComponent\n ]\n})\nexport class DashboardModule { }\n","/* eslint-disable max-len */\nimport { NgModule, APP_INITIALIZER } from \"@angular/core\";\nimport { StoreModule } from \"@ngrx/store\";\nimport { StoreDevtoolsModule } from \"@ngrx/store-devtools\";\nimport { EffectsModule } from \"@ngrx/effects\";\nimport { StoreRouterConnectingModule } from \"@ngrx/router-store\";\nimport { AuthConfig, OAuthModule } from \"angular-oauth2-oidc\";\n\nimport { AppRoutingModule } from \"./app-routing.module\";\n\nimport { ApiModule as CoreApiModule } from \"@merchant_api/api.module\";\nimport { ApiModule as PortalApiModule } from \"@Portal/VituPayApi/api.module\";\n\nimport { SharedModule } from \"./shared/shared.module\";\n\nimport { environment } from \"@merchant_environments/environment\";\nimport { EffectsConfiguration } from \"./storage/effects-configuration\";\nimport { ReducerConfiguration, ReducerMap } from \"./storage/reducer-configuration\";\n\nimport { AppComponent } from \"./app.component\";\nimport { TransactionsComponent } from \"./pages/transactions/transactions.component\";\n\nimport { TransactionLogComponent } from \"./pages/transactions/transaction-log/transaction-log.component\";\nimport { TransactionComponent } from \"./pages/transaction/transaction.component\";\nimport { TransactionDetailComponent } from \"./pages/transaction/transaction-detail/transaction-detail.component\";\nimport { UsersComponent } from \"./pages/users/users.component\";\nimport { UserLogComponent } from \"./pages/users/user-log/user-log.component\";\n\nimport {\n TransactionLogFiltersComponent\n} from \"./pages/transactions/transaction-log/transaction-log-filters/transaction-log-filters.component\";\nimport {\n DisputesTableCellContentComponent\n} from \"./pages/transaction/transaction-detail/disputes-table-cell-content/disputes-table-cell-content.component\";\nimport { UserComponent } from \"./pages/user/user.component\";\nimport { UserDetailsComponent } from \"./pages/user/user-details/user-details.component\";\nimport { UsersTableCellContentComponent } from \"./pages/users/user-log/users-table-cell-content/users-table-cell-content.component\";\nimport {\n FeesTableCellContentComponent\n} from \"./pages/transaction/transaction-detail/fees-table-cell-content/fees-table-cell-content.component\";\nimport { ForbiddenComponent } from \"./pages/forbidden/forbidden.component\";\nimport { PageUnavailableComponent } from \"./pages/page-unavailable/page-unavailable.component\";\nimport { RolesComponent } from \"./pages/roles/roles.component\";\nimport { RoleLogComponent } from \"./pages/roles/role-log/role-log.component\";\nimport { RolesTableCellContentComponent } from \"./pages/roles/role-log/roles-table-cell-content/roles-table-cell-content.component\";\nimport { RoleDetailsComponent } from \"./pages/role/role-details/role-details.component\";\nimport { RoleComponent } from \"./pages/role/role.component\";\nimport { WebhooksComponent } from \"./pages/webhooks/webhooks.component\";\nimport { WebhookLogComponent } from \"./pages/webhooks/webhook-log/webhook-log.component\";\nimport {\n WebhooksTableCellContentComponent\n} from \"./pages/webhooks/webhook-log/webhooks-table-cell-content/webhooks-table-cell-content.component\";\nimport { WebhookComponent } from \"./pages/webhook/webhook.component\";\nimport { WebhookDetailsComponent } from \"./pages/webhook/webhook-details/webhook-details.component\";\nimport { ReportsLogComponent } from \"./pages/reports/reports-log/reports-log.component\";\nimport {\n ReportsTableCellContentComponent\n} from \"./pages/reports/reports-log/reports-table-cell-content/reports-table-cell-content.component\";\nimport { ReportsComponent } from \"./pages/reports/reports.component\";\nimport { DownloadReportModalComponent } from \"./shared/download-report-modal/download-report-modal.component\";\nimport { ClientsComponent } from \"./pages/clients/clients.component\";\nimport { ClientLogComponent } from \"./pages/clients/client-log/client-log.component\";\nimport {\n ClientsTableCellContentComponent\n} from \"./pages/clients/client-log/clients-table-cell-content/clients-table-cell-content.component\";\nimport { ClientDetailsComponent } from \"./pages/client/client-details/client-details.component\";\nimport { ClientComponent } from \"./pages/client/client.component\";\nimport {\n ClientSecretsTableCellContentComponent\n} from \"./pages/client/client-details/client-secrets-table-cell-content/client-secrets-table-cell-content.component\";\nimport { CreateClientSecretModalComponent } from \"./shared/create-client-secret-modal/create-client-secret-modal.component\";\nimport { authConfig } from \"./auth-config\";\nimport { AuthService } from \"shared-lib\";\nimport { DashboardModule } from \"./pages/dashboard/dashboard.module\";\nimport { ConfigurationLogComponent } from \"./pages/configurations/configuration-log/configuration-log.component\";\nimport {\n ConfigurationsTableCellContentComponent\n} from \"./pages/configurations/configuration-log/configurations-table-cell-content/configurations-table-cell-content.component\";\nimport { ConfigurationsComponent } from \"./pages/configurations/configurations.component\";\nimport { FundingComponent } from \"./pages/funding/funding.component\";\nimport { FundingLogComponent } from \"./pages/funding/funding-log/funding-log.component\";\nimport {\n FundingTableCellContentComponent\n} from \"./pages/funding/funding-log/funding-table-cell-content/funding-table-cell-content.component\";\nimport { FundingLogFiltersComponent } from \"./pages/funding/funding-log/funding-log-filters/funding-log-filters.component\";\nimport { FundingItemComponent } from \"./pages/funding-item/funding-item.component\";\nimport { FundingItemDetailsComponent } from \"./pages/funding-item/funding-item-details/funding-item-details.component\";\nimport {\n FundingItemTransactionFiltersComponent\n} from \"./pages/funding-item/funding-item-details/funding-item-transaction-filters/funding-item-transaction-filters.component\";\nimport {\n FundingItemTransactionsTableCellContentComponent\n} from \"./pages/funding-item/funding-item-details/funding-item-transactions-table-cell-content/funding-item-transactions-table-cell-content.component\";\nimport {\n FundingItemMidFeesTableCellContentComponent\n} from \"./pages/funding-item/funding-item-details/funding-item-mid-fees-table-cell-content/funding-item-mid-fees-table-cell-content.component\";\nimport {\n FundingItemSettlementTableCellContentComponent\n} from \"./pages/funding-item/funding-item-details/funding-item-settlement-table-cell-content/funding-item-settlement-table-cell-content.component\";\nimport { HelpComponent } from \"./pages/help/help.component\";\nimport { HelpDetailsComponent } from \"./pages/help/help-details/help-details.component\";\nimport { EventComponent } from \"./pages/event/event.component\";\nimport { EventDetailsComponent } from \"./pages/event/event-details/event-details.component\";\nimport { EventDeliveriesTableCellContentComponent } from \"./pages/event/event-details/event-deliveries-table-cell-content/event-deliveries-table-cell-content.component\";\nimport { EventHistoryComponent } from \"./pages/event-history/event-history.component\";\nimport { EventHistoryLogComponent } from \"./pages/event-history/event-history-log/event-history-log.component\";\nimport { EventHistoryTableCellContentComponent } from \"./pages/event-history/event-history-log/event-history-table-cell-content/event-history-table-cell-content.component\";\nimport { EventHistoryLogFiltersComponent } from \"./pages/event-history/event-history-log/event-history-log-filters/event-history-log-filters.component\";\nimport {\n FundingItemAdjustmentsTableCellContentComponent\n} from \"./pages/funding-item/funding-item-details/funding-item-adjustments-table-cell-content/funding-item-adjustments-table-cell-content.component\";\nimport {\n DisputesLogComponent\n} from \"./pages/disputes/disputes-log/disputes-log.component\";\nimport {\n DisputesComponent\n} from \"./pages/disputes/disputes.component\";\nimport { DisputesLogFiltersComponent } from \"./pages/disputes/disputes-log/disputes-log-filters/disputes-log-filters.component\";\nimport { DisputeComponent } from \"./pages/dispute/dispute.component\";\nimport { DisputeDetailsComponent } from \"./pages/dispute/dispute-details/dispute-details.component\";\nimport { PaymentsComponent } from \"./pages/payments/payments.component\";\nimport { PaymentLogComponent } from \"./pages/payments/payment-log/payment-log.component\";\nimport { GroupTransactionsTableCellContentComponent } from \"./pages/payments/payment-log/group-transactions-table-cell-content/group-transactions-table-cell-content.component\";\nimport { GroupTransactionLogFiltersComponent } from \"./pages/payments/payment-log/group-transaction-log-filters/group-transaction-log-filters.component\";\n\n\n@NgModule({\n declarations: [\n AppComponent,\n PaymentsComponent,\n PaymentLogComponent,\n GroupTransactionsTableCellContentComponent,\n GroupTransactionLogFiltersComponent,\n TransactionsComponent,\n TransactionLogComponent,\n TransactionComponent,\n TransactionDetailComponent,\n DisputesTableCellContentComponent,\n FeesTableCellContentComponent,\n WebhooksComponent,\n WebhookLogComponent,\n WebhooksTableCellContentComponent,\n WebhookComponent,\n WebhookDetailsComponent,\n UsersComponent,\n UserLogComponent,\n UsersTableCellContentComponent,\n RolesComponent,\n RoleLogComponent,\n RolesTableCellContentComponent,\n ClientComponent,\n ClientDetailsComponent,\n ClientsComponent,\n ClientLogComponent,\n ClientsTableCellContentComponent,\n TransactionLogFiltersComponent,\n UserComponent,\n UserDetailsComponent,\n RoleComponent,\n RoleDetailsComponent,\n ForbiddenComponent,\n PageUnavailableComponent,\n ReportsComponent,\n ReportsLogComponent,\n ReportsTableCellContentComponent,\n DownloadReportModalComponent,\n ClientSecretsTableCellContentComponent,\n CreateClientSecretModalComponent,\n ConfigurationsComponent,\n ConfigurationLogComponent,\n ConfigurationsTableCellContentComponent,\n FundingComponent,\n FundingLogComponent,\n FundingTableCellContentComponent,\n FundingLogFiltersComponent,\n FundingItemComponent,\n FundingItemDetailsComponent,\n FundingItemTransactionsTableCellContentComponent,\n FundingItemMidFeesTableCellContentComponent,\n FundingItemSettlementTableCellContentComponent,\n FundingItemAdjustmentsTableCellContentComponent,\n FundingItemTransactionFiltersComponent,\n HelpComponent,\n HelpDetailsComponent,\n EventComponent,\n EventDetailsComponent,\n EventDeliveriesTableCellContentComponent,\n EventHistoryComponent,\n EventHistoryLogComponent,\n EventHistoryTableCellContentComponent,\n EventHistoryLogFiltersComponent,\n DisputesLogFiltersComponent,\n DisputesLogComponent,\n DisputesComponent,\n DisputeDetailsComponent,\n DisputeComponent\n ],\n imports: [\n SharedModule,\n AppRoutingModule,\n StoreModule.forRoot(ReducerMap, ReducerConfiguration),\n EffectsModule.forRoot(EffectsConfiguration),\n StoreDevtoolsModule.instrument({\n maxAge: 25,\n logOnly: !environment.isDevelopment,\n }),\n // TODO: Can we delete the following line as StoreRouterConnectingModule\n // is also included without the custom serializer below?\n // (Can we delete CustomRouterSerializer if its not giving us anything)\n// StoreRouterConnectingModule.forRoot({ serializer: CustomRouterSerializer }),\n CoreApiModule.forRoot({ rootUrl: environment.coreApiRootUrl }),\n PortalApiModule.forRoot({ rootUrl: environment.portalApiRootUrl }),\n StoreRouterConnectingModule.forRoot(),\n OAuthModule.forRoot({\n resourceServer: {\n allowedUrls: [environment.coreApiRootUrl, environment.portalApiRootUrl],\n sendAccessToken: true,\n },\n }),\n DashboardModule\n ],\n providers: [\n {\n provide: APP_INITIALIZER,\n useFactory: (authService: AuthService) => async () => {\n await authService.configure();\n return authService.validateToken().then((result) => {\n if (result) {\n // Only enable token refreshing if we have valid token\n authService.initTokenRefreshListener();\n return null;\n }\n\n return new Promise(() => {}); // return unresolvable promise to prevent applcation bootstrap\n });\n },\n deps: [AuthService],\n multi: true,\n },\n { provide: AuthConfig, useValue: authConfig }\n ],\n bootstrap: [AppComponent],\n})\nexport class AppModule {}\n","\nimport { enableProdMode } from \"@angular/core\";\nimport { platformBrowserDynamic } from \"@angular/platform-browser-dynamic\";\n\nimport { AppModule } from \"./app/app.module\";\nimport { environment } from \"./environments/environment\";\n\n// Ensure zone.js is loaded prior to bootstrap\nimport \"zone.js/dist/zone.min.js\";\n\nif (!environment.isDevelopment) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n .catch(err => console.error(err));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(,.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').replace(/^.*?\\s+/, '');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\(.+\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine\n // because this line doesn't have function name\n var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);\n var functionName = location && sanitizedLine || undefined;\n var fileName = ['eval', '<anonymous>'].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(/<anonymous function(: (\\w+))?>/, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function (root, factory) {\n // Hack to make all exports of this module sha256 function object properties.\n var exports = {};\n factory(exports);\n var sha256 = exports[\"default\"];\n for (var k in exports) {\n sha256[k] = exports[k];\n }\n \n if (typeof module === 'object' && typeof module.exports === 'object') {\n module.exports = sha256;\n } else if (typeof define === 'function' && define.amd) {\n define(function() { return sha256; }); \n } else {\n root.sha256 = sha256;\n }\n})(this, function(exports) {\n\"use strict\";\nexports.__esModule = true;\n// SHA-256 (+ HMAC and PBKDF2) for JavaScript.\n//\n// Written in 2014-2016 by Dmitry Chestnykh.\n// Public domain, no warranty.\n//\n// Functions (accept and return Uint8Arrays):\n//\n// sha256(message) -> hash\n// sha256.hmac(key, message) -> mac\n// sha256.pbkdf2(password, salt, rounds, dkLen) -> dk\n//\n// Classes:\n//\n// new sha256.Hash()\n// new sha256.HMAC(key)\n//\nexports.digestLength = 32;\nexports.blockSize = 64;\n// SHA-256 constants\nvar K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,\n 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01,\n 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7,\n 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152,\n 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,\n 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc,\n 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,\n 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08,\n 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,\n 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\nfunction hashBlocks(w, v, p, pos, len) {\n var a, b, c, d, e, f, g, h, u, i, j, t1, t2;\n while (len >= 64) {\n a = v[0];\n b = v[1];\n c = v[2];\n d = v[3];\n e = v[4];\n f = v[5];\n g = v[6];\n h = v[7];\n for (i = 0; i < 16; i++) {\n j = pos + i * 4;\n w[i] = (((p[j] & 0xff) << 24) | ((p[j + 1] & 0xff) << 16) |\n ((p[j + 2] & 0xff) << 8) | (p[j + 3] & 0xff));\n }\n for (i = 16; i < 64; i++) {\n u = w[i - 2];\n t1 = (u >>> 17 | u << (32 - 17)) ^ (u >>> 19 | u << (32 - 19)) ^ (u >>> 10);\n u = w[i - 15];\n t2 = (u >>> 7 | u << (32 - 7)) ^ (u >>> 18 | u << (32 - 18)) ^ (u >>> 3);\n w[i] = (t1 + w[i - 7] | 0) + (t2 + w[i - 16] | 0);\n }\n for (i = 0; i < 64; i++) {\n t1 = (((((e >>> 6 | e << (32 - 6)) ^ (e >>> 11 | e << (32 - 11)) ^\n (e >>> 25 | e << (32 - 25))) + ((e & f) ^ (~e & g))) | 0) +\n ((h + ((K[i] + w[i]) | 0)) | 0)) | 0;\n t2 = (((a >>> 2 | a << (32 - 2)) ^ (a >>> 13 | a << (32 - 13)) ^\n (a >>> 22 | a << (32 - 22))) + ((a & b) ^ (a & c) ^ (b & c))) | 0;\n h = g;\n g = f;\n f = e;\n e = (d + t1) | 0;\n d = c;\n c = b;\n b = a;\n a = (t1 + t2) | 0;\n }\n v[0] += a;\n v[1] += b;\n v[2] += c;\n v[3] += d;\n v[4] += e;\n v[5] += f;\n v[6] += g;\n v[7] += h;\n pos += 64;\n len -= 64;\n }\n return pos;\n}\n// Hash implements SHA256 hash algorithm.\nvar Hash = /** @class */ (function () {\n function Hash() {\n this.digestLength = exports.digestLength;\n this.blockSize = exports.blockSize;\n // Note: Int32Array is used instead of Uint32Array for performance reasons.\n this.state = new Int32Array(8); // hash state\n this.temp = new Int32Array(64); // temporary state\n this.buffer = new Uint8Array(128); // buffer for data to hash\n this.bufferLength = 0; // number of bytes in buffer\n this.bytesHashed = 0; // number of total bytes hashed\n this.finished = false; // indicates whether the hash was finalized\n this.reset();\n }\n // Resets hash state making it possible\n // to re-use this instance to hash other data.\n Hash.prototype.reset = function () {\n this.state[0] = 0x6a09e667;\n this.state[1] = 0xbb67ae85;\n this.state[2] = 0x3c6ef372;\n this.state[3] = 0xa54ff53a;\n this.state[4] = 0x510e527f;\n this.state[5] = 0x9b05688c;\n this.state[6] = 0x1f83d9ab;\n this.state[7] = 0x5be0cd19;\n this.bufferLength = 0;\n this.bytesHashed = 0;\n this.finished = false;\n return this;\n };\n // Cleans internal buffers and re-initializes hash state.\n Hash.prototype.clean = function () {\n for (var i = 0; i < this.buffer.length; i++) {\n this.buffer[i] = 0;\n }\n for (var i = 0; i < this.temp.length; i++) {\n this.temp[i] = 0;\n }\n this.reset();\n };\n // Updates hash state with the given data.\n //\n // Optionally, length of the data can be specified to hash\n // fewer bytes than data.length.\n //\n // Throws error when trying to update already finalized hash:\n // instance must be reset to use it again.\n Hash.prototype.update = function (data, dataLength) {\n if (dataLength === void 0) { dataLength = data.length; }\n if (this.finished) {\n throw new Error(\"SHA256: can't update because hash was finished.\");\n }\n var dataPos = 0;\n this.bytesHashed += dataLength;\n if (this.bufferLength > 0) {\n while (this.bufferLength < 64 && dataLength > 0) {\n this.buffer[this.bufferLength++] = data[dataPos++];\n dataLength--;\n }\n if (this.bufferLength === 64) {\n hashBlocks(this.temp, this.state, this.buffer, 0, 64);\n this.bufferLength = 0;\n }\n }\n if (dataLength >= 64) {\n dataPos = hashBlocks(this.temp, this.state, data, dataPos, dataLength);\n dataLength %= 64;\n }\n while (dataLength > 0) {\n this.buffer[this.bufferLength++] = data[dataPos++];\n dataLength--;\n }\n return this;\n };\n // Finalizes hash state and puts hash into out.\n //\n // If hash was already finalized, puts the same value.\n Hash.prototype.finish = function (out) {\n if (!this.finished) {\n var bytesHashed = this.bytesHashed;\n var left = this.bufferLength;\n var bitLenHi = (bytesHashed / 0x20000000) | 0;\n var bitLenLo = bytesHashed << 3;\n var padLength = (bytesHashed % 64 < 56) ? 64 : 128;\n this.buffer[left] = 0x80;\n for (var i = left + 1; i < padLength - 8; i++) {\n this.buffer[i] = 0;\n }\n this.buffer[padLength - 8] = (bitLenHi >>> 24) & 0xff;\n this.buffer[padLength - 7] = (bitLenHi >>> 16) & 0xff;\n this.buffer[padLength - 6] = (bitLenHi >>> 8) & 0xff;\n this.buffer[padLength - 5] = (bitLenHi >>> 0) & 0xff;\n this.buffer[padLength - 4] = (bitLenLo >>> 24) & 0xff;\n this.buffer[padLength - 3] = (bitLenLo >>> 16) & 0xff;\n this.buffer[padLength - 2] = (bitLenLo >>> 8) & 0xff;\n this.buffer[padLength - 1] = (bitLenLo >>> 0) & 0xff;\n hashBlocks(this.temp, this.state, this.buffer, 0, padLength);\n this.finished = true;\n }\n for (var i = 0; i < 8; i++) {\n out[i * 4 + 0] = (this.state[i] >>> 24) & 0xff;\n out[i * 4 + 1] = (this.state[i] >>> 16) & 0xff;\n out[i * 4 + 2] = (this.state[i] >>> 8) & 0xff;\n out[i * 4 + 3] = (this.state[i] >>> 0) & 0xff;\n }\n return this;\n };\n // Returns the final hash digest.\n Hash.prototype.digest = function () {\n var out = new Uint8Array(this.digestLength);\n this.finish(out);\n return out;\n };\n // Internal function for use in HMAC for optimization.\n Hash.prototype._saveState = function (out) {\n for (var i = 0; i < this.state.length; i++) {\n out[i] = this.state[i];\n }\n };\n // Internal function for use in HMAC for optimization.\n Hash.prototype._restoreState = function (from, bytesHashed) {\n for (var i = 0; i < this.state.length; i++) {\n this.state[i] = from[i];\n }\n this.bytesHashed = bytesHashed;\n this.finished = false;\n this.bufferLength = 0;\n };\n return Hash;\n}());\nexports.Hash = Hash;\n// HMAC implements HMAC-SHA256 message authentication algorithm.\nvar HMAC = /** @class */ (function () {\n function HMAC(key) {\n this.inner = new Hash();\n this.outer = new Hash();\n this.blockSize = this.inner.blockSize;\n this.digestLength = this.inner.digestLength;\n var pad = new Uint8Array(this.blockSize);\n if (key.length > this.blockSize) {\n (new Hash()).update(key).finish(pad).clean();\n }\n else {\n for (var i = 0; i < key.length; i++) {\n pad[i] = key[i];\n }\n }\n for (var i = 0; i < pad.length; i++) {\n pad[i] ^= 0x36;\n }\n this.inner.update(pad);\n for (var i = 0; i < pad.length; i++) {\n pad[i] ^= 0x36 ^ 0x5c;\n }\n this.outer.update(pad);\n this.istate = new Uint32Array(8);\n this.ostate = new Uint32Array(8);\n this.inner._saveState(this.istate);\n this.outer._saveState(this.ostate);\n for (var i = 0; i < pad.length; i++) {\n pad[i] = 0;\n }\n }\n // Returns HMAC state to the state initialized with key\n // to make it possible to run HMAC over the other data with the same\n // key without creating a new instance.\n HMAC.prototype.reset = function () {\n this.inner._restoreState(this.istate, this.inner.blockSize);\n this.outer._restoreState(this.ostate, this.outer.blockSize);\n return this;\n };\n // Cleans HMAC state.\n HMAC.prototype.clean = function () {\n for (var i = 0; i < this.istate.length; i++) {\n this.ostate[i] = this.istate[i] = 0;\n }\n this.inner.clean();\n this.outer.clean();\n };\n // Updates state with provided data.\n HMAC.prototype.update = function (data) {\n this.inner.update(data);\n return this;\n };\n // Finalizes HMAC and puts the result in out.\n HMAC.prototype.finish = function (out) {\n if (this.outer.finished) {\n this.outer.finish(out);\n }\n else {\n this.inner.finish(out);\n this.outer.update(out, this.digestLength).finish(out);\n }\n return this;\n };\n // Returns message authentication code.\n HMAC.prototype.digest = function () {\n var out = new Uint8Array(this.digestLength);\n this.finish(out);\n return out;\n };\n return HMAC;\n}());\nexports.HMAC = HMAC;\n// Returns SHA256 hash of data.\nfunction hash(data) {\n var h = (new Hash()).update(data);\n var digest = h.digest();\n h.clean();\n return digest;\n}\nexports.hash = hash;\n// Function hash is both available as module.hash and as default export.\nexports[\"default\"] = hash;\n// Returns HMAC-SHA256 of data under the key.\nfunction hmac(key, data) {\n var h = (new HMAC(key)).update(data);\n var digest = h.digest();\n h.clean();\n return digest;\n}\nexports.hmac = hmac;\n// Fills hkdf buffer like this:\n// T(1) = HMAC-Hash(PRK, T(0) | info | 0x01)\nfunction fillBuffer(buffer, hmac, info, counter) {\n // Counter is a byte value: check if it overflowed.\n var num = counter[0];\n if (num === 0) {\n throw new Error(\"hkdf: cannot expand more\");\n }\n // Prepare HMAC instance for new data with old key.\n hmac.reset();\n // Hash in previous output if it was generated\n // (i.e. counter is greater than 1).\n if (num > 1) {\n hmac.update(buffer);\n }\n // Hash in info if it exists.\n if (info) {\n hmac.update(info);\n }\n // Hash in the counter.\n hmac.update(counter);\n // Output result to buffer and clean HMAC instance.\n hmac.finish(buffer);\n // Increment counter inside typed array, this works properly.\n counter[0]++;\n}\nvar hkdfSalt = new Uint8Array(exports.digestLength); // Filled with zeroes.\nfunction hkdf(key, salt, info, length) {\n if (salt === void 0) { salt = hkdfSalt; }\n if (length === void 0) { length = 32; }\n var counter = new Uint8Array([1]);\n // HKDF-Extract uses salt as HMAC key, and key as data.\n var okm = hmac(salt, key);\n // Initialize HMAC for expanding with extracted key.\n // Ensure no collisions with `hmac` function.\n var hmac_ = new HMAC(okm);\n // Allocate buffer.\n var buffer = new Uint8Array(hmac_.digestLength);\n var bufpos = buffer.length;\n var out = new Uint8Array(length);\n for (var i = 0; i < length; i++) {\n if (bufpos === buffer.length) {\n fillBuffer(buffer, hmac_, info, counter);\n bufpos = 0;\n }\n out[i] = buffer[bufpos++];\n }\n hmac_.clean();\n buffer.fill(0);\n counter.fill(0);\n return out;\n}\nexports.hkdf = hkdf;\n// Derives a key from password and salt using PBKDF2-HMAC-SHA256\n// with the given number of iterations.\n//\n// The number of bytes returned is equal to dkLen.\n//\n// (For better security, avoid dkLen greater than hash length - 32 bytes).\nfunction pbkdf2(password, salt, iterations, dkLen) {\n var prf = new HMAC(password);\n var len = prf.digestLength;\n var ctr = new Uint8Array(4);\n var t = new Uint8Array(len);\n var u = new Uint8Array(len);\n var dk = new Uint8Array(dkLen);\n for (var i = 0; i * len < dkLen; i++) {\n var c = i + 1;\n ctr[0] = (c >>> 24) & 0xff;\n ctr[1] = (c >>> 16) & 0xff;\n ctr[2] = (c >>> 8) & 0xff;\n ctr[3] = (c >>> 0) & 0xff;\n prf.reset();\n prf.update(salt);\n prf.update(ctr);\n prf.finish(u);\n for (var j = 0; j < len; j++) {\n t[j] = u[j];\n }\n for (var j = 2; j <= iterations; j++) {\n prf.reset();\n prf.update(u).finish(u);\n for (var k = 0; k < len; k++) {\n t[k] ^= u[k];\n }\n }\n for (var j = 0; j < len && i * len + j < dkLen; j++) {\n dk[i * len + j] = t[j];\n }\n }\n for (var i = 0; i < len; i++) {\n t[i] = u[i] = 0;\n }\n for (var i = 0; i < 4; i++) {\n ctr[i] = 0;\n }\n prf.clean();\n return dk;\n}\nexports.pbkdf2 = pbkdf2;\n});\n","/*--------------------------------------------------------------------------\r\n * linq.js - LINQ for JavaScript\r\n * licensed under MIT License\r\n *------------------------------------------------------------------------*/\r\n\r\n(function (root, undefined) {\r\n // ReadOnly Function\r\n var Functions = {\r\n Identity: function (x) { return x; },\r\n True: function () { return true; },\r\n Blank: function () { }\r\n };\r\n\r\n // const Type\r\n var Types = {\r\n Boolean: typeof true,\r\n Number: typeof 0,\r\n String: typeof \"\",\r\n Object: typeof {},\r\n Undefined: typeof undefined,\r\n Function: typeof function () { }\r\n };\r\n\r\n // createLambda cache\r\n var funcCache = { \"\": Functions.Identity };\r\n\r\n // private utility methods\r\n var Utils = {\r\n // Create anonymous function from lambda expression string\r\n createLambda: function (expression) {\r\n if (expression == null) return Functions.Identity;\r\n if (typeof expression === Types.String) {\r\n // get from cache\r\n var f = funcCache[expression];\r\n if (f != null) {\r\n return f;\r\n }\r\n\r\n if (expression.indexOf(\"=>\") === -1) {\r\n var regexp = new RegExp(\"[$]+\", \"g\");\r\n\r\n var maxLength = 0;\r\n var match;\r\n while ((match = regexp.exec(expression)) != null) {\r\n var paramNumber = match[0].length;\r\n if (paramNumber > maxLength) {\r\n maxLength = paramNumber;\r\n }\r\n }\r\n\r\n var argArray = [];\r\n for (var i = 1; i <= maxLength; i++) {\r\n var dollar = \"\";\r\n for (var j = 0; j < i; j++) {\r\n dollar += \"$\";\r\n }\r\n argArray.push(dollar);\r\n }\r\n\r\n var args = Array.prototype.join.call(argArray, \",\");\r\n\r\n f = new Function(args, \"return \" + expression);\r\n funcCache[expression] = f;\r\n return f;\r\n }\r\n else {\r\n var expr = expression.match(/^[(\\s]*([^()]*?)[)\\s]*=>(.*)/);\r\n f = new Function(expr[1], (expr[2].match(/\\breturn\\b/) ? expr[2] : \"return \" + expr[2]));\r\n funcCache[expression] = f;\r\n return f;\r\n }\r\n }\r\n return expression;\r\n },\r\n\r\n isIEnumerable: function (obj) {\r\n if (typeof Enumerator !== Types.Undefined) {\r\n try {\r\n new Enumerator(obj); // check JScript(IE)'s Enumerator\r\n return true;\r\n }\r\n catch (e) { }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n // IE8's defineProperty is defined but cannot use, therefore check defineProperties\r\n defineProperty: (Object.defineProperties != null)\r\n ? function (target, methodName, value) {\r\n Object.defineProperty(target, methodName, {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: value\r\n })\r\n }\r\n : function (target, methodName, value) {\r\n target[methodName] = value;\r\n },\r\n\r\n compare: function (a, b) {\r\n return (a === b) ? 0\r\n : (a > b) ? 1\r\n : -1;\r\n },\r\n\r\n dispose: function (obj) {\r\n if (obj != null) obj.dispose();\r\n },\r\n\r\n hasNativeIteratorSupport: function () {\r\n return typeof Symbol !== 'undefined' && typeof Symbol.iterator !== 'undefined';\r\n }\r\n };\r\n\r\n // IEnumerator State\r\n var State = { Before: 0, Running: 1, After: 2 };\r\n\r\n // \"Enumerator\" is conflict JScript's \"Enumerator\"\r\n var IEnumerator = function (initialize, tryGetNext, dispose) {\r\n var yielder = new Yielder();\r\n var state = State.Before;\r\n\r\n this.current = yielder.current;\r\n\r\n this.moveNext = function () {\r\n try {\r\n switch (state) {\r\n case State.Before:\r\n state = State.Running;\r\n initialize();\r\n // fall through\r\n case State.Running:\r\n if (tryGetNext.apply(yielder)) {\r\n return true;\r\n }\r\n else {\r\n this.dispose();\r\n return false;\r\n }\r\n case State.After:\r\n return false;\r\n }\r\n }\r\n catch (e) {\r\n this.dispose();\r\n throw e;\r\n }\r\n };\r\n\r\n this.dispose = function () {\r\n if (state != State.Running) return;\r\n\r\n try {\r\n dispose();\r\n }\r\n finally {\r\n state = State.After;\r\n }\r\n };\r\n };\r\n\r\n // for tryGetNext\r\n var Yielder = function () {\r\n var current = null;\r\n this.current = function () { return current; };\r\n this.yieldReturn = function (value) {\r\n current = value;\r\n return true;\r\n };\r\n this.yieldBreak = function () {\r\n return false;\r\n };\r\n };\r\n\r\n // Enumerable constuctor\r\n var Enumerable = function (getEnumerator) {\r\n this.getEnumerator = getEnumerator;\r\n };\r\n\r\n // Utility\r\n\r\n Enumerable.Utils = {}; // container\r\n\r\n Enumerable.Utils.createLambda = function (expression) {\r\n return Utils.createLambda(expression);\r\n };\r\n\r\n Enumerable.Utils.createEnumerable = function (getEnumerator) {\r\n return new Enumerable(getEnumerator);\r\n };\r\n\r\n Enumerable.Utils.createEnumerator = function (initialize, tryGetNext, dispose) {\r\n return new IEnumerator(initialize, tryGetNext, dispose);\r\n };\r\n\r\n Enumerable.Utils.extendTo = function (type) {\r\n var typeProto = type.prototype;\r\n var enumerableProto;\r\n\r\n if (type === Array) {\r\n enumerableProto = ArrayEnumerable.prototype;\r\n Utils.defineProperty(typeProto, \"getSource\", function () {\r\n return this;\r\n });\r\n }\r\n else {\r\n enumerableProto = Enumerable.prototype;\r\n Utils.defineProperty(typeProto, \"getEnumerator\", function () {\r\n return Enumerable.from(this).getEnumerator();\r\n });\r\n }\r\n\r\n for (var methodName in enumerableProto) {\r\n var func = enumerableProto[methodName];\r\n\r\n // already extended\r\n if (typeProto[methodName] == func) continue;\r\n\r\n // already defined(example Array#reverse/join/forEach...)\r\n if (typeProto[methodName] != null) {\r\n methodName = methodName + \"ByLinq\";\r\n if (typeProto[methodName] == func) continue; // recheck\r\n }\r\n\r\n if (func instanceof Function) {\r\n Utils.defineProperty(typeProto, methodName, func);\r\n }\r\n }\r\n };\r\n\r\n Enumerable.Utils.recallFrom = function (type) {\r\n var typeProto = type.prototype;\r\n var enumerableProto;\r\n\r\n if (type === Array) {\r\n enumerableProto = ArrayEnumerable.prototype;\r\n delete typeProto.getSource;\r\n }\r\n else {\r\n enumerableProto = Enumerable.prototype;\r\n delete typeProto.getEnumerator;\r\n }\r\n\r\n for (var methodName in enumerableProto) {\r\n var func = enumerableProto[methodName];\r\n\r\n if (typeProto[methodName + 'ByLinq']) {\r\n delete typeProto[methodName + 'ByLinq'];\r\n }\r\n else if (typeProto[methodName] == func && func instanceof Function) {\r\n delete typeProto[methodName];\r\n }\r\n }\r\n };\r\n\r\n // Generator\r\n\r\n Enumerable.choice = function () // variable argument\r\n {\r\n var args = arguments;\r\n\r\n return new Enumerable(function () {\r\n return new IEnumerator(\r\n function () {\r\n args = (args[0] instanceof Array) ? args[0]\r\n : (args[0].getEnumerator != null) ? args[0].toArray()\r\n : args;\r\n },\r\n function () {\r\n return this.yieldReturn(args[Math.floor(Math.random() * args.length)]);\r\n },\r\n Functions.Blank);\r\n });\r\n };\r\n\r\n Enumerable.cycle = function () // variable argument\r\n {\r\n var args = arguments;\r\n\r\n return new Enumerable(function () {\r\n var index = 0;\r\n return new IEnumerator(\r\n function () {\r\n args = (args[0] instanceof Array) ? args[0]\r\n : (args[0].getEnumerator != null) ? args[0].toArray()\r\n : args;\r\n },\r\n function () {\r\n if (index >= args.length) index = 0;\r\n return this.yieldReturn(args[index++]);\r\n },\r\n Functions.Blank);\r\n });\r\n };\r\n\r\n Enumerable.empty = function () {\r\n return new Enumerable(function () {\r\n return new IEnumerator(\r\n Functions.Blank,\r\n function () { return false; },\r\n Functions.Blank);\r\n });\r\n };\r\n\r\n Enumerable.from = function (obj) {\r\n if (obj == null) {\r\n return Enumerable.empty();\r\n }\r\n if (obj instanceof Enumerable) {\r\n return obj;\r\n }\r\n if (typeof obj == Types.Number || typeof obj == Types.Boolean) {\r\n return Enumerable.repeat(obj, 1);\r\n }\r\n if (typeof obj == Types.String) {\r\n return new Enumerable(function () {\r\n var index = 0;\r\n return new IEnumerator(\r\n Functions.Blank,\r\n function () {\r\n return (index < obj.length) ? this.yieldReturn(obj.charAt(index++)) : false;\r\n },\r\n Functions.Blank);\r\n });\r\n }\r\n if (typeof obj != Types.Function) {\r\n // array or array like object\r\n if (typeof obj.length == Types.Number) {\r\n return new ArrayEnumerable(obj);\r\n }\r\n\r\n // iterable object\r\n if (typeof Symbol !== 'undefined' && typeof obj[Symbol.iterator] !== 'undefined') {\r\n return new Enumerable(function () {\r\n return new IEnumerator(\r\n Functions.Blank,\r\n function () {\r\n var next = obj.next();\r\n return (next.done ? false : (this.yieldReturn(next.value)));\r\n },\r\n Functions.Blank);\r\n });\r\n }\r\n\r\n // JScript's IEnumerable\r\n if (!(obj instanceof Object) && Utils.isIEnumerable(obj)) {\r\n return new Enumerable(function () {\r\n var isFirst = true;\r\n var enumerator;\r\n return new IEnumerator(\r\n function () { enumerator = new Enumerator(obj); },\r\n function () {\r\n if (isFirst) isFirst = false;\r\n else enumerator.moveNext();\r\n\r\n return (enumerator.atEnd()) ? false : this.yieldReturn(enumerator.item());\r\n },\r\n Functions.Blank);\r\n });\r\n }\r\n\r\n // WinMD IIterable<T>\r\n if (typeof Windows === Types.Object && typeof obj.first === Types.Function) {\r\n return new Enumerable(function () {\r\n var isFirst = true;\r\n var enumerator;\r\n return new IEnumerator(\r\n function () { enumerator = obj.first(); },\r\n function () {\r\n if (isFirst) isFirst = false;\r\n else enumerator.moveNext();\r\n\r\n return (enumerator.hasCurrent) ? this.yieldReturn(enumerator.current) : this.yieldBreak();\r\n },\r\n Functions.Blank);\r\n });\r\n }\r\n }\r\n\r\n // case function/object : Create keyValuePair[]\r\n return new Enumerable(function () {\r\n var array = [];\r\n var index = 0;\r\n\r\n return new IEnumerator(\r\n function () {\r\n for (var key in obj) {\r\n var value = obj[key];\r\n if (!(value instanceof Function) && Object.prototype.hasOwnProperty.call(obj, key)) {\r\n array.push({ key: key, value: value });\r\n }\r\n }\r\n },\r\n function () {\r\n return (index < array.length)\r\n ? this.yieldReturn(array[index++])\r\n : false;\r\n },\r\n Functions.Blank);\r\n });\r\n },\r\n\r\n Enumerable.make = function (element) {\r\n return Enumerable.repeat(element, 1);\r\n };\r\n\r\n // Overload:function(input, pattern)\r\n // Overload:function(input, pattern, flags)\r\n Enumerable.matches = function (input, pattern, flags) {\r\n if (flags == null) flags = \"\";\r\n if (pattern instanceof RegExp) {\r\n flags += (pattern.ignoreCase) ? \"i\" : \"\";\r\n flags += (pattern.multiline) ? \"m\" : \"\";\r\n pattern = pattern.source;\r\n }\r\n if (flags.indexOf(\"g\") === -1) flags += \"g\";\r\n\r\n return new Enumerable(function () {\r\n var regex;\r\n return new IEnumerator(\r\n function () { regex = new RegExp(pattern, flags); },\r\n function () {\r\n var match = regex.exec(input);\r\n return (match) ? this.yieldReturn(match) : false;\r\n },\r\n Functions.Blank);\r\n });\r\n };\r\n\r\n // Overload:function(start, count)\r\n // Overload:function(start, count, step)\r\n Enumerable.range = function (start, count, step) {\r\n if (step == null) step = 1;\r\n\r\n return new Enumerable(function () {\r\n var value;\r\n var index = 0;\r\n\r\n return new IEnumerator(\r\n function () { value = start - step; },\r\n function () {\r\n return (index++ < count)\r\n ? this.yieldReturn(value += step)\r\n : this.yieldBreak();\r\n },\r\n Functions.Blank);\r\n });\r\n };\r\n\r\n // Overload:function(start, count)\r\n // Overload:function(start, count, step)\r\n Enumerable.rangeDown = function (start, count, step) {\r\n if (step == null) step = 1;\r\n\r\n return new Enumerable(function () {\r\n var value;\r\n var index = 0;\r\n\r\n return new IEnumerator(\r\n function () { value = start + step; },\r\n function () {\r\n return (index++ < count)\r\n ? this.yieldReturn(value -= step)\r\n : this.yieldBreak();\r\n },\r\n Functions.Blank);\r\n });\r\n };\r\n\r\n // Overload:function(start, to)\r\n // Overload:function(start, to, step)\r\n Enumerable.rangeTo = function (start, to, step) {\r\n if (step == null) step = 1;\r\n\r\n if (start < to) {\r\n return new Enumerable(function () {\r\n var value;\r\n\r\n return new IEnumerator(\r\n function () { value = start - step; },\r\n function () {\r\n var next = value += step;\r\n return (next <= to)\r\n ? this.yieldReturn(next)\r\n : this.yieldBreak();\r\n },\r\n Functions.Blank);\r\n });\r\n }\r\n else {\r\n return new Enumerable(function () {\r\n var value;\r\n\r\n return new IEnumerator(\r\n function () { value = start + step; },\r\n function () {\r\n var next = value -= step;\r\n return (next >= to)\r\n ? this.yieldReturn(next)\r\n : this.yieldBreak();\r\n },\r\n Functions.Blank);\r\n });\r\n }\r\n };\r\n\r\n // Overload:function(element)\r\n // Overload:function(element, count)\r\n Enumerable.repeat = function (element, count) {\r\n if (count != null) return Enumerable.repeat(element).take(count);\r\n\r\n return new Enumerable(function () {\r\n return new IEnumerator(\r\n Functions.Blank,\r\n function () { return this.yieldReturn(element); },\r\n Functions.Blank);\r\n });\r\n };\r\n\r\n Enumerable.repeatWithFinalize = function (initializer, finalizer) {\r\n initializer = Utils.createLambda(initializer);\r\n finalizer = Utils.createLambda(finalizer);\r\n\r\n return new Enumerable(function () {\r\n var element;\r\n return new IEnumerator(\r\n function () { element = initializer(); },\r\n function () { return this.yieldReturn(element); },\r\n function () {\r\n if (element != null) {\r\n finalizer(element);\r\n element = null;\r\n }\r\n });\r\n });\r\n };\r\n\r\n // Overload:function(func)\r\n // Overload:function(func, count)\r\n Enumerable.generate = function (func, count) {\r\n if (count != null) return Enumerable.generate(func).take(count);\r\n func = Utils.createLambda(func);\r\n\r\n return new Enumerable(function () {\r\n return new IEnumerator(\r\n Functions.Blank,\r\n function () { return this.yieldReturn(func()); },\r\n Functions.Blank);\r\n });\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(start)\r\n // Overload:function(start, step)\r\n Enumerable.toInfinity = function (start, step) {\r\n if (start == null) start = 0;\r\n if (step == null) step = 1;\r\n\r\n return new Enumerable(function () {\r\n var value;\r\n return new IEnumerator(\r\n function () { value = start - step; },\r\n function () { return this.yieldReturn(value += step); },\r\n Functions.Blank);\r\n });\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(start)\r\n // Overload:function(start, step)\r\n Enumerable.toNegativeInfinity = function (start, step) {\r\n if (start == null) start = 0;\r\n if (step == null) step = 1;\r\n\r\n return new Enumerable(function () {\r\n var value;\r\n return new IEnumerator(\r\n function () { value = start + step; },\r\n function () { return this.yieldReturn(value -= step); },\r\n Functions.Blank);\r\n });\r\n };\r\n\r\n Enumerable.unfold = function (seed, func) {\r\n func = Utils.createLambda(func);\r\n\r\n return new Enumerable(function () {\r\n var isFirst = true;\r\n var value;\r\n return new IEnumerator(\r\n Functions.Blank,\r\n function () {\r\n if (isFirst) {\r\n isFirst = false;\r\n value = seed;\r\n return this.yieldReturn(value);\r\n }\r\n value = func(value);\r\n return this.yieldReturn(value);\r\n },\r\n Functions.Blank);\r\n });\r\n };\r\n\r\n Enumerable.defer = function (enumerableFactory) {\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = Enumerable.from(enumerableFactory()).getEnumerator(); },\r\n function () {\r\n return (enumerator.moveNext())\r\n ? this.yieldReturn(enumerator.current())\r\n : this.yieldBreak();\r\n },\r\n function () {\r\n Utils.dispose(enumerator);\r\n });\r\n });\r\n };\r\n\r\n // Extension Methods\r\n\r\n /* Projection and Filtering Methods */\r\n\r\n // Overload:function(func)\r\n // Overload:function(func, resultSelector<element>)\r\n // Overload:function(func, resultSelector<element, nestLevel>)\r\n Enumerable.prototype.traverseBreadthFirst = function (func, resultSelector) {\r\n var source = this;\r\n func = Utils.createLambda(func);\r\n resultSelector = Utils.createLambda(resultSelector);\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var nestLevel = 0;\r\n var buffer = [];\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n while (true) {\r\n if (enumerator.moveNext()) {\r\n buffer.push(enumerator.current());\r\n return this.yieldReturn(resultSelector(enumerator.current(), nestLevel));\r\n }\r\n\r\n var next = Enumerable.from(buffer).selectMany(function (x) { return func(x); });\r\n if (!next.any()) {\r\n return false;\r\n }\r\n else {\r\n nestLevel++;\r\n buffer = [];\r\n Utils.dispose(enumerator);\r\n enumerator = next.getEnumerator();\r\n }\r\n }\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n // Overload:function(func)\r\n // Overload:function(func, resultSelector<element>)\r\n // Overload:function(func, resultSelector<element, nestLevel>)\r\n Enumerable.prototype.traverseDepthFirst = function (func, resultSelector) {\r\n var source = this;\r\n func = Utils.createLambda(func);\r\n resultSelector = Utils.createLambda(resultSelector);\r\n\r\n return new Enumerable(function () {\r\n var enumeratorStack = [];\r\n var enumerator;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n while (true) {\r\n if (enumerator.moveNext()) {\r\n var value = resultSelector(enumerator.current(), enumeratorStack.length);\r\n enumeratorStack.push(enumerator);\r\n enumerator = Enumerable.from(func(enumerator.current())).getEnumerator();\r\n return this.yieldReturn(value);\r\n }\r\n\r\n if (enumeratorStack.length <= 0) return false;\r\n Utils.dispose(enumerator);\r\n enumerator = enumeratorStack.pop();\r\n }\r\n },\r\n function () {\r\n try {\r\n Utils.dispose(enumerator);\r\n }\r\n finally {\r\n Enumerable.from(enumeratorStack).forEach(function (s) { s.dispose(); });\r\n }\r\n });\r\n });\r\n };\r\n\r\n Enumerable.prototype.flatten = function () {\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var middleEnumerator = null;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n while (true) {\r\n if (middleEnumerator != null) {\r\n if (middleEnumerator.moveNext()) {\r\n return this.yieldReturn(middleEnumerator.current());\r\n }\r\n else {\r\n middleEnumerator = null;\r\n }\r\n }\r\n\r\n if (enumerator.moveNext()) {\r\n if (enumerator.current() instanceof Array) {\r\n Utils.dispose(middleEnumerator);\r\n middleEnumerator = Enumerable.from(enumerator.current())\r\n .selectMany(Functions.Identity)\r\n .flatten()\r\n .getEnumerator();\r\n continue;\r\n }\r\n else {\r\n return this.yieldReturn(enumerator.current());\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n },\r\n function () {\r\n try {\r\n Utils.dispose(enumerator);\r\n }\r\n finally {\r\n Utils.dispose(middleEnumerator);\r\n }\r\n });\r\n });\r\n };\r\n\r\n Enumerable.prototype.pairwise = function (selector) {\r\n var source = this;\r\n selector = Utils.createLambda(selector);\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n\r\n return new IEnumerator(\r\n function () {\r\n enumerator = source.getEnumerator();\r\n enumerator.moveNext();\r\n },\r\n function () {\r\n var prev = enumerator.current();\r\n return (enumerator.moveNext())\r\n ? this.yieldReturn(selector(prev, enumerator.current()))\r\n : false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n // Overload:function(func)\r\n // Overload:function(seed,func<value,element>)\r\n Enumerable.prototype.scan = function (seed, func) {\r\n var isUseSeed;\r\n if (func == null) {\r\n func = Utils.createLambda(seed); // arguments[0]\r\n isUseSeed = false;\r\n } else {\r\n func = Utils.createLambda(func);\r\n isUseSeed = true;\r\n }\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var value;\r\n var isFirst = true;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n if (isFirst) {\r\n isFirst = false;\r\n if (!isUseSeed) {\r\n if (enumerator.moveNext()) {\r\n return this.yieldReturn(value = enumerator.current());\r\n }\r\n }\r\n else {\r\n return this.yieldReturn(value = seed);\r\n }\r\n }\r\n\r\n return (enumerator.moveNext())\r\n ? this.yieldReturn(value = func(value, enumerator.current()))\r\n : false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n // Overload:function(selector<element>)\r\n // Overload:function(selector<element,index>)\r\n Enumerable.prototype.select = function (selector) {\r\n selector = Utils.createLambda(selector);\r\n\r\n if (selector.length <= 1) {\r\n return new WhereSelectEnumerable(this, null, selector);\r\n }\r\n else {\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var index = 0;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n return (enumerator.moveNext())\r\n ? this.yieldReturn(selector(enumerator.current(), index++))\r\n : false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n }\r\n };\r\n\r\n // Overload:function(collectionSelector<element>)\r\n // Overload:function(collectionSelector<element,index>)\r\n // Overload:function(collectionSelector<element>,resultSelector)\r\n // Overload:function(collectionSelector<element,index>,resultSelector)\r\n Enumerable.prototype.selectMany = function (collectionSelector, resultSelector) {\r\n var source = this;\r\n collectionSelector = Utils.createLambda(collectionSelector);\r\n if (resultSelector == null) resultSelector = function (a, b) { return b; };\r\n resultSelector = Utils.createLambda(resultSelector);\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var middleEnumerator = undefined;\r\n var index = 0;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n if (middleEnumerator === undefined) {\r\n if (!enumerator.moveNext()) return false;\r\n }\r\n do {\r\n if (middleEnumerator == null) {\r\n var middleSeq = collectionSelector(enumerator.current(), index++);\r\n middleEnumerator = Enumerable.from(middleSeq).getEnumerator();\r\n }\r\n if (middleEnumerator.moveNext()) {\r\n return this.yieldReturn(resultSelector(enumerator.current(), middleEnumerator.current()));\r\n }\r\n Utils.dispose(middleEnumerator);\r\n middleEnumerator = null;\r\n } while (enumerator.moveNext());\r\n return false;\r\n },\r\n function () {\r\n try {\r\n Utils.dispose(enumerator);\r\n }\r\n finally {\r\n Utils.dispose(middleEnumerator);\r\n }\r\n });\r\n });\r\n };\r\n\r\n // Overload:function(predicate<element>)\r\n // Overload:function(predicate<element,index>)\r\n Enumerable.prototype.where = function (predicate) {\r\n predicate = Utils.createLambda(predicate);\r\n\r\n if (predicate.length <= 1) {\r\n return new WhereEnumerable(this, predicate);\r\n }\r\n else {\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var index = 0;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n while (enumerator.moveNext()) {\r\n if (predicate(enumerator.current(), index++)) {\r\n return this.yieldReturn(enumerator.current());\r\n }\r\n }\r\n return false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n }\r\n };\r\n\r\n\r\n // Overload:function(selector<element>)\r\n // Overload:function(selector<element,index>)\r\n Enumerable.prototype.choose = function (selector) {\r\n selector = Utils.createLambda(selector);\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var index = 0;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n while (enumerator.moveNext()) {\r\n var result = selector(enumerator.current(), index++);\r\n if (result != null) {\r\n return this.yieldReturn(result);\r\n }\r\n }\r\n return this.yieldBreak();\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n Enumerable.prototype.ofType = function (type) {\r\n var typeName;\r\n switch (type) {\r\n case Number:\r\n typeName = Types.Number;\r\n break;\r\n case String:\r\n typeName = Types.String;\r\n break;\r\n case Boolean:\r\n typeName = Types.Boolean;\r\n break;\r\n case Function:\r\n typeName = Types.Function;\r\n break;\r\n default:\r\n typeName = null;\r\n break;\r\n }\r\n return (typeName === null)\r\n ? this.where(function (x) { return x instanceof type; })\r\n : this.where(function (x) { return typeof x === typeName; });\r\n };\r\n\r\n // mutiple arguments, last one is selector, others are enumerable\r\n Enumerable.prototype.zip = function () {\r\n var args = arguments;\r\n var selector = Utils.createLambda(arguments[arguments.length - 1]);\r\n\r\n var source = this;\r\n // optimized case:argument is 2\r\n if (arguments.length == 2) {\r\n var second = arguments[0];\r\n\r\n return new Enumerable(function () {\r\n var firstEnumerator;\r\n var secondEnumerator;\r\n var index = 0;\r\n\r\n return new IEnumerator(\r\n function () {\r\n firstEnumerator = source.getEnumerator();\r\n secondEnumerator = Enumerable.from(second).getEnumerator();\r\n },\r\n function () {\r\n if (firstEnumerator.moveNext() && secondEnumerator.moveNext()) {\r\n return this.yieldReturn(selector(firstEnumerator.current(), secondEnumerator.current(), index++));\r\n }\r\n return false;\r\n },\r\n function () {\r\n try {\r\n Utils.dispose(firstEnumerator);\r\n } finally {\r\n Utils.dispose(secondEnumerator);\r\n }\r\n });\r\n });\r\n }\r\n else {\r\n return new Enumerable(function () {\r\n var enumerators;\r\n var index = 0;\r\n\r\n return new IEnumerator(\r\n function () {\r\n var array = Enumerable.make(source)\r\n .concat(Enumerable.from(args).takeExceptLast().select(Enumerable.from))\r\n .select(function (x) { return x.getEnumerator() })\r\n .toArray();\r\n enumerators = Enumerable.from(array);\r\n },\r\n function () {\r\n if (enumerators.all(function (x) { return x.moveNext() })) {\r\n var array = enumerators\r\n .select(function (x) { return x.current() })\r\n .toArray();\r\n array.push(index++);\r\n return this.yieldReturn(selector.apply(null, array));\r\n }\r\n else {\r\n return this.yieldBreak();\r\n }\r\n },\r\n function () {\r\n Enumerable.from(enumerators).forEach(Utils.dispose);\r\n });\r\n });\r\n }\r\n };\r\n\r\n // mutiple arguments\r\n Enumerable.prototype.merge = function () {\r\n var args = arguments;\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerators;\r\n var index = -1;\r\n\r\n return new IEnumerator(\r\n function () {\r\n enumerators = Enumerable.make(source)\r\n .concat(Enumerable.from(args).select(Enumerable.from))\r\n .select(function (x) { return x.getEnumerator() })\r\n .toArray();\r\n },\r\n function () {\r\n while (enumerators.length > 0) {\r\n index = (index >= enumerators.length - 1) ? 0 : index + 1;\r\n var enumerator = enumerators[index];\r\n\r\n if (enumerator.moveNext()) {\r\n return this.yieldReturn(enumerator.current());\r\n }\r\n else {\r\n enumerator.dispose();\r\n enumerators.splice(index--, 1);\r\n }\r\n }\r\n return this.yieldBreak();\r\n },\r\n function () {\r\n Enumerable.from(enumerators).forEach(Utils.dispose);\r\n });\r\n });\r\n };\r\n\r\n /* Join Methods */\r\n\r\n // Overload:function (inner, outerKeySelector, innerKeySelector, resultSelector)\r\n // Overload:function (inner, outerKeySelector, innerKeySelector, resultSelector, compareSelector)\r\n Enumerable.prototype.join = function (inner, outerKeySelector, innerKeySelector, resultSelector, compareSelector) {\r\n outerKeySelector = Utils.createLambda(outerKeySelector);\r\n innerKeySelector = Utils.createLambda(innerKeySelector);\r\n resultSelector = Utils.createLambda(resultSelector);\r\n compareSelector = Utils.createLambda(compareSelector);\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var outerEnumerator;\r\n var lookup;\r\n var innerElements = null;\r\n var innerCount = 0;\r\n\r\n return new IEnumerator(\r\n function () {\r\n outerEnumerator = source.getEnumerator();\r\n lookup = Enumerable.from(inner).toLookup(innerKeySelector, Functions.Identity, compareSelector);\r\n },\r\n function () {\r\n while (true) {\r\n if (innerElements != null) {\r\n var innerElement = innerElements[innerCount++];\r\n if (innerElement !== undefined) {\r\n return this.yieldReturn(resultSelector(outerEnumerator.current(), innerElement));\r\n }\r\n\r\n innerElement = null;\r\n innerCount = 0;\r\n }\r\n\r\n if (outerEnumerator.moveNext()) {\r\n var key = outerKeySelector(outerEnumerator.current());\r\n innerElements = lookup.get(key).toArray();\r\n } else {\r\n return false;\r\n }\r\n }\r\n },\r\n function () { Utils.dispose(outerEnumerator); });\r\n });\r\n };\r\n\r\n // Overload:function (inner, outerKeySelector, innerKeySelector, resultSelector)\r\n // Overload:function (inner, outerKeySelector, innerKeySelector, resultSelector, compareSelector)\r\n Enumerable.prototype.groupJoin = function (inner, outerKeySelector, innerKeySelector, resultSelector, compareSelector) {\r\n outerKeySelector = Utils.createLambda(outerKeySelector);\r\n innerKeySelector = Utils.createLambda(innerKeySelector);\r\n resultSelector = Utils.createLambda(resultSelector);\r\n compareSelector = Utils.createLambda(compareSelector);\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator = source.getEnumerator();\r\n var lookup = null;\r\n\r\n return new IEnumerator(\r\n function () {\r\n enumerator = source.getEnumerator();\r\n lookup = Enumerable.from(inner).toLookup(innerKeySelector, Functions.Identity, compareSelector);\r\n },\r\n function () {\r\n if (enumerator.moveNext()) {\r\n var innerElement = lookup.get(outerKeySelector(enumerator.current()));\r\n return this.yieldReturn(resultSelector(enumerator.current(), innerElement));\r\n }\r\n return false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n /* Set Methods */\r\n\r\n Enumerable.prototype.all = function (predicate) {\r\n predicate = Utils.createLambda(predicate);\r\n\r\n var result = true;\r\n this.forEach(function (x) {\r\n if (!predicate(x)) {\r\n result = false;\r\n return false; // break\r\n }\r\n });\r\n return result;\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(predicate)\r\n Enumerable.prototype.any = function (predicate) {\r\n predicate = Utils.createLambda(predicate);\r\n\r\n var enumerator = this.getEnumerator();\r\n try {\r\n if (arguments.length == 0) return enumerator.moveNext(); // case:function()\r\n\r\n while (enumerator.moveNext()) // case:function(predicate)\r\n {\r\n if (predicate(enumerator.current())) return true;\r\n }\r\n return false;\r\n }\r\n finally {\r\n Utils.dispose(enumerator);\r\n }\r\n };\r\n\r\n Enumerable.prototype.isEmpty = function () {\r\n return !this.any();\r\n };\r\n\r\n // multiple arguments\r\n Enumerable.prototype.concat = function () {\r\n var source = this;\r\n\r\n if (arguments.length == 1) {\r\n var second = arguments[0];\r\n\r\n return new Enumerable(function () {\r\n var firstEnumerator;\r\n var secondEnumerator;\r\n\r\n return new IEnumerator(\r\n function () { firstEnumerator = source.getEnumerator(); },\r\n function () {\r\n if (secondEnumerator == null) {\r\n if (firstEnumerator.moveNext()) return this.yieldReturn(firstEnumerator.current());\r\n secondEnumerator = Enumerable.from(second).getEnumerator();\r\n }\r\n if (secondEnumerator.moveNext()) return this.yieldReturn(secondEnumerator.current());\r\n return false;\r\n },\r\n function () {\r\n try {\r\n Utils.dispose(firstEnumerator);\r\n }\r\n finally {\r\n Utils.dispose(secondEnumerator);\r\n }\r\n });\r\n });\r\n }\r\n else {\r\n var args = arguments;\r\n\r\n return new Enumerable(function () {\r\n var enumerators;\r\n\r\n return new IEnumerator(\r\n function () {\r\n enumerators = Enumerable.make(source)\r\n .concat(Enumerable.from(args).select(Enumerable.from))\r\n .select(function (x) { return x.getEnumerator() })\r\n .toArray();\r\n },\r\n function () {\r\n while (enumerators.length > 0) {\r\n var enumerator = enumerators[0];\r\n\r\n if (enumerator.moveNext()) {\r\n return this.yieldReturn(enumerator.current());\r\n }\r\n else {\r\n enumerator.dispose();\r\n enumerators.splice(0, 1);\r\n }\r\n }\r\n return this.yieldBreak();\r\n },\r\n function () {\r\n Enumerable.from(enumerators).forEach(Utils.dispose);\r\n });\r\n });\r\n }\r\n };\r\n\r\n Enumerable.prototype.insert = function (index, second) {\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var firstEnumerator;\r\n var secondEnumerator;\r\n var count = 0;\r\n var isEnumerated = false;\r\n\r\n return new IEnumerator(\r\n function () {\r\n firstEnumerator = source.getEnumerator();\r\n secondEnumerator = Enumerable.from(second).getEnumerator();\r\n },\r\n function () {\r\n if (count == index && secondEnumerator.moveNext()) {\r\n isEnumerated = true;\r\n return this.yieldReturn(secondEnumerator.current());\r\n }\r\n if (firstEnumerator.moveNext()) {\r\n count++;\r\n return this.yieldReturn(firstEnumerator.current());\r\n }\r\n if (!isEnumerated && secondEnumerator.moveNext()) {\r\n return this.yieldReturn(secondEnumerator.current());\r\n }\r\n return false;\r\n },\r\n function () {\r\n try {\r\n Utils.dispose(firstEnumerator);\r\n }\r\n finally {\r\n Utils.dispose(secondEnumerator);\r\n }\r\n });\r\n });\r\n };\r\n\r\n Enumerable.prototype.alternate = function (alternateValueOrSequence) {\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var buffer;\r\n var enumerator;\r\n var alternateSequence;\r\n var alternateEnumerator;\r\n\r\n return new IEnumerator(\r\n function () {\r\n if (alternateValueOrSequence instanceof Array || alternateValueOrSequence.getEnumerator != null) {\r\n alternateSequence = Enumerable.from(Enumerable.from(alternateValueOrSequence).toArray()); // freeze\r\n }\r\n else {\r\n alternateSequence = Enumerable.make(alternateValueOrSequence);\r\n }\r\n enumerator = source.getEnumerator();\r\n if (enumerator.moveNext()) buffer = enumerator.current();\r\n },\r\n function () {\r\n while (true) {\r\n if (alternateEnumerator != null) {\r\n if (alternateEnumerator.moveNext()) {\r\n return this.yieldReturn(alternateEnumerator.current());\r\n }\r\n else {\r\n alternateEnumerator = null;\r\n }\r\n }\r\n\r\n if (buffer == null && enumerator.moveNext()) {\r\n buffer = enumerator.current(); // hasNext\r\n alternateEnumerator = alternateSequence.getEnumerator();\r\n continue; // GOTO\r\n }\r\n else if (buffer != null) {\r\n var retVal = buffer;\r\n buffer = null;\r\n return this.yieldReturn(retVal);\r\n }\r\n\r\n return this.yieldBreak();\r\n }\r\n },\r\n function () {\r\n try {\r\n Utils.dispose(enumerator);\r\n }\r\n finally {\r\n Utils.dispose(alternateEnumerator);\r\n }\r\n });\r\n });\r\n };\r\n\r\n // Overload:function(value)\r\n // Overload:function(value, compareSelector)\r\n Enumerable.prototype.contains = function (value, compareSelector) {\r\n compareSelector = Utils.createLambda(compareSelector);\r\n var enumerator = this.getEnumerator();\r\n try {\r\n while (enumerator.moveNext()) {\r\n if (compareSelector(enumerator.current()) === value) return true;\r\n }\r\n return false;\r\n }\r\n finally {\r\n Utils.dispose(enumerator);\r\n }\r\n };\r\n\r\n Enumerable.prototype.defaultIfEmpty = function (defaultValue) {\r\n var source = this;\r\n if (defaultValue === undefined) defaultValue = null;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var isFirst = true;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n if (enumerator.moveNext()) {\r\n isFirst = false;\r\n return this.yieldReturn(enumerator.current());\r\n }\r\n else if (isFirst) {\r\n isFirst = false;\r\n return this.yieldReturn(defaultValue);\r\n }\r\n return false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(compareSelector)\r\n Enumerable.prototype.distinct = function (compareSelector) {\r\n return this.except(Enumerable.empty(), compareSelector);\r\n };\r\n\r\n Enumerable.prototype.distinctUntilChanged = function (compareSelector) {\r\n compareSelector = Utils.createLambda(compareSelector);\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var compareKey;\r\n var initial;\r\n\r\n return new IEnumerator(\r\n function () {\r\n enumerator = source.getEnumerator();\r\n },\r\n function () {\r\n while (enumerator.moveNext()) {\r\n var key = compareSelector(enumerator.current());\r\n\r\n if (initial) {\r\n initial = false;\r\n compareKey = key;\r\n return this.yieldReturn(enumerator.current());\r\n }\r\n\r\n if (compareKey === key) {\r\n continue;\r\n }\r\n\r\n compareKey = key;\r\n return this.yieldReturn(enumerator.current());\r\n }\r\n return this.yieldBreak();\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n // Overload:function(second)\r\n // Overload:function(second, compareSelector)\r\n Enumerable.prototype.except = function (second, compareSelector) {\r\n compareSelector = Utils.createLambda(compareSelector);\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var keys;\r\n\r\n return new IEnumerator(\r\n function () {\r\n enumerator = source.getEnumerator();\r\n keys = new Dictionary(compareSelector);\r\n Enumerable.from(second).forEach(function (key) { keys.add(key); });\r\n },\r\n function () {\r\n while (enumerator.moveNext()) {\r\n var current = enumerator.current();\r\n if (!keys.contains(current)) {\r\n keys.add(current);\r\n return this.yieldReturn(current);\r\n }\r\n }\r\n return false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n // Overload:function(second)\r\n // Overload:function(second, compareSelector)\r\n Enumerable.prototype.intersect = function (second, compareSelector) {\r\n compareSelector = Utils.createLambda(compareSelector);\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var keys;\r\n var outs;\r\n\r\n return new IEnumerator(\r\n function () {\r\n enumerator = source.getEnumerator();\r\n\r\n keys = new Dictionary(compareSelector);\r\n Enumerable.from(second).forEach(function (key) { keys.add(key); });\r\n outs = new Dictionary(compareSelector);\r\n },\r\n function () {\r\n while (enumerator.moveNext()) {\r\n var current = enumerator.current();\r\n if (!outs.contains(current) && keys.contains(current)) {\r\n outs.add(current);\r\n return this.yieldReturn(current);\r\n }\r\n }\r\n return false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n // Overload:function(second)\r\n // Overload:function(second, compareSelector)\r\n Enumerable.prototype.sequenceEqual = function (second, compareSelector) {\r\n compareSelector = Utils.createLambda(compareSelector);\r\n\r\n var firstEnumerator = this.getEnumerator();\r\n try {\r\n var secondEnumerator = Enumerable.from(second).getEnumerator();\r\n try {\r\n while (firstEnumerator.moveNext()) {\r\n if (!secondEnumerator.moveNext()\r\n || compareSelector(firstEnumerator.current()) !== compareSelector(secondEnumerator.current())) {\r\n return false;\r\n }\r\n }\r\n\r\n if (secondEnumerator.moveNext()) return false;\r\n return true;\r\n }\r\n finally {\r\n Utils.dispose(secondEnumerator);\r\n }\r\n }\r\n finally {\r\n Utils.dispose(firstEnumerator);\r\n }\r\n };\r\n\r\n Enumerable.prototype.union = function (second, compareSelector) {\r\n compareSelector = Utils.createLambda(compareSelector);\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var firstEnumerator;\r\n var secondEnumerator;\r\n var keys;\r\n\r\n return new IEnumerator(\r\n function () {\r\n firstEnumerator = source.getEnumerator();\r\n keys = new Dictionary(compareSelector);\r\n },\r\n function () {\r\n var current;\r\n if (secondEnumerator === undefined) {\r\n while (firstEnumerator.moveNext()) {\r\n current = firstEnumerator.current();\r\n if (!keys.contains(current)) {\r\n keys.add(current);\r\n return this.yieldReturn(current);\r\n }\r\n }\r\n secondEnumerator = Enumerable.from(second).getEnumerator();\r\n }\r\n while (secondEnumerator.moveNext()) {\r\n current = secondEnumerator.current();\r\n if (!keys.contains(current)) {\r\n keys.add(current);\r\n return this.yieldReturn(current);\r\n }\r\n }\r\n return false;\r\n },\r\n function () {\r\n try {\r\n Utils.dispose(firstEnumerator);\r\n }\r\n finally {\r\n Utils.dispose(secondEnumerator);\r\n }\r\n });\r\n });\r\n };\r\n\r\n /* Ordering Methods */\r\n\r\n Enumerable.prototype.orderBy = function (keySelector, comparer) {\r\n return new OrderedEnumerable(this, keySelector, comparer, false);\r\n };\r\n\r\n Enumerable.prototype.orderByDescending = function (keySelector, comparer) {\r\n return new OrderedEnumerable(this, keySelector, comparer, true);\r\n };\r\n\r\n Enumerable.prototype.reverse = function () {\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var buffer;\r\n var index;\r\n\r\n return new IEnumerator(\r\n function () {\r\n buffer = source.toArray();\r\n index = buffer.length;\r\n },\r\n function () {\r\n return (index > 0)\r\n ? this.yieldReturn(buffer[--index])\r\n : false;\r\n },\r\n Functions.Blank);\r\n });\r\n };\r\n\r\n Enumerable.prototype.shuffle = function () {\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var buffer;\r\n\r\n return new IEnumerator(\r\n function () { buffer = source.toArray(); },\r\n function () {\r\n if (buffer.length > 0) {\r\n var i = Math.floor(Math.random() * buffer.length);\r\n return this.yieldReturn(buffer.splice(i, 1)[0]);\r\n }\r\n return false;\r\n },\r\n Functions.Blank);\r\n });\r\n };\r\n\r\n Enumerable.prototype.weightedSample = function (weightSelector) {\r\n weightSelector = Utils.createLambda(weightSelector);\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var sortedByBound;\r\n var totalWeight = 0;\r\n\r\n return new IEnumerator(\r\n function () {\r\n sortedByBound = source\r\n .choose(function (x) {\r\n var weight = weightSelector(x);\r\n if (weight <= 0) return null; // ignore 0\r\n\r\n totalWeight += weight;\r\n return { value: x, bound: totalWeight };\r\n })\r\n .toArray();\r\n },\r\n function () {\r\n if (sortedByBound.length > 0) {\r\n var draw = Math.floor(Math.random() * totalWeight) + 1;\r\n\r\n var lower = -1;\r\n var upper = sortedByBound.length;\r\n while (upper - lower > 1) {\r\n var index = Math.floor((lower + upper) / 2);\r\n if (sortedByBound[index].bound >= draw) {\r\n upper = index;\r\n }\r\n else {\r\n lower = index;\r\n }\r\n }\r\n\r\n return this.yieldReturn(sortedByBound[upper].value);\r\n }\r\n\r\n return this.yieldBreak();\r\n },\r\n Functions.Blank);\r\n });\r\n };\r\n\r\n /* Grouping Methods */\r\n\r\n // Overload:function(keySelector)\r\n // Overload:function(keySelector,elementSelector)\r\n // Overload:function(keySelector,elementSelector,resultSelector)\r\n // Overload:function(keySelector,elementSelector,resultSelector,compareSelector)\r\n Enumerable.prototype.groupBy = function (keySelector, elementSelector, resultSelector, compareSelector) {\r\n var source = this;\r\n keySelector = Utils.createLambda(keySelector);\r\n elementSelector = Utils.createLambda(elementSelector);\r\n if (resultSelector != null) resultSelector = Utils.createLambda(resultSelector);\r\n compareSelector = Utils.createLambda(compareSelector);\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n\r\n return new IEnumerator(\r\n function () {\r\n enumerator = source.toLookup(keySelector, elementSelector, compareSelector)\r\n .toEnumerable()\r\n .getEnumerator();\r\n },\r\n function () {\r\n while (enumerator.moveNext()) {\r\n return (resultSelector == null)\r\n ? this.yieldReturn(enumerator.current())\r\n : this.yieldReturn(resultSelector(enumerator.current().key(), enumerator.current()));\r\n }\r\n return false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n // Overload:function(keySelector)\r\n // Overload:function(keySelector,elementSelector)\r\n // Overload:function(keySelector,elementSelector,resultSelector)\r\n // Overload:function(keySelector,elementSelector,resultSelector,compareSelector)\r\n Enumerable.prototype.partitionBy = function (keySelector, elementSelector, resultSelector, compareSelector) {\r\n\r\n var source = this;\r\n keySelector = Utils.createLambda(keySelector);\r\n elementSelector = Utils.createLambda(elementSelector);\r\n compareSelector = Utils.createLambda(compareSelector);\r\n var hasResultSelector;\r\n if (resultSelector == null) {\r\n hasResultSelector = false;\r\n resultSelector = function (key, group) { return new Grouping(key, group); };\r\n }\r\n else {\r\n hasResultSelector = true;\r\n resultSelector = Utils.createLambda(resultSelector);\r\n }\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var key;\r\n var compareKey;\r\n var group = [];\r\n\r\n return new IEnumerator(\r\n function () {\r\n enumerator = source.getEnumerator();\r\n if (enumerator.moveNext()) {\r\n key = keySelector(enumerator.current());\r\n compareKey = compareSelector(key);\r\n group.push(elementSelector(enumerator.current()));\r\n }\r\n },\r\n function () {\r\n var hasNext;\r\n while ((hasNext = enumerator.moveNext()) == true) {\r\n if (compareKey === compareSelector(keySelector(enumerator.current()))) {\r\n group.push(elementSelector(enumerator.current()));\r\n }\r\n else break;\r\n }\r\n\r\n if (group.length > 0) {\r\n var result = (hasResultSelector)\r\n ? resultSelector(key, Enumerable.from(group))\r\n : resultSelector(key, group);\r\n if (hasNext) {\r\n key = keySelector(enumerator.current());\r\n compareKey = compareSelector(key);\r\n group = [elementSelector(enumerator.current())];\r\n }\r\n else group = [];\r\n\r\n return this.yieldReturn(result);\r\n }\r\n\r\n return false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n Enumerable.prototype.buffer = function (count) {\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n var array = [];\r\n var index = 0;\r\n while (enumerator.moveNext()) {\r\n array.push(enumerator.current());\r\n if (++index >= count) return this.yieldReturn(array);\r\n }\r\n if (array.length > 0) return this.yieldReturn(array);\r\n return false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n /* Aggregate Methods */\r\n\r\n // Overload:function(func)\r\n // Overload:function(seed,func)\r\n // Overload:function(seed,func,resultSelector)\r\n Enumerable.prototype.aggregate = function (seed, func, resultSelector) {\r\n resultSelector = Utils.createLambda(resultSelector);\r\n return resultSelector(this.scan(seed, func, resultSelector).last());\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(selector)\r\n Enumerable.prototype.average = function (selector) {\r\n selector = Utils.createLambda(selector);\r\n\r\n var sum = 0;\r\n var count = 0;\r\n this.forEach(function (x) {\r\n sum += selector(x);\r\n ++count;\r\n });\r\n\r\n return sum / count;\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(predicate)\r\n Enumerable.prototype.count = function (predicate) {\r\n predicate = (predicate == null) ? Functions.True : Utils.createLambda(predicate);\r\n\r\n var count = 0;\r\n this.forEach(function (x, i) {\r\n if (predicate(x, i))++count;\r\n });\r\n return count;\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(selector)\r\n Enumerable.prototype.max = function (selector) {\r\n if (selector == null) selector = Functions.Identity;\r\n return this.select(selector).aggregate(function (a, b) { return (a > b) ? a : b; });\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(selector)\r\n Enumerable.prototype.min = function (selector) {\r\n if (selector == null) selector = Functions.Identity;\r\n return this.select(selector).aggregate(function (a, b) { return (a < b) ? a : b; });\r\n };\r\n\r\n Enumerable.prototype.maxBy = function (keySelector) {\r\n keySelector = Utils.createLambda(keySelector);\r\n return this.aggregate(function (a, b) { return (keySelector(a) > keySelector(b)) ? a : b; });\r\n };\r\n\r\n Enumerable.prototype.minBy = function (keySelector) {\r\n keySelector = Utils.createLambda(keySelector);\r\n return this.aggregate(function (a, b) { return (keySelector(a) < keySelector(b)) ? a : b; });\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(selector)\r\n Enumerable.prototype.sum = function (selector) {\r\n if (selector == null) selector = Functions.Identity;\r\n return this.select(selector).aggregate(0, function (a, b) { return a + b; });\r\n };\r\n\r\n /* Paging Methods */\r\n\r\n Enumerable.prototype.elementAt = function (index) {\r\n var value;\r\n var found = false;\r\n this.forEach(function (x, i) {\r\n if (i == index) {\r\n value = x;\r\n found = true;\r\n return false;\r\n }\r\n });\r\n\r\n if (!found) throw new Error(\"index is less than 0 or greater than or equal to the number of elements in source.\");\r\n return value;\r\n };\r\n\r\n Enumerable.prototype.elementAtOrDefault = function (index, defaultValue) {\r\n if (defaultValue === undefined) defaultValue = null;\r\n var value;\r\n var found = false;\r\n this.forEach(function (x, i) {\r\n if (i == index) {\r\n value = x;\r\n found = true;\r\n return false;\r\n }\r\n });\r\n\r\n return (!found) ? defaultValue : value;\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(predicate)\r\n Enumerable.prototype.first = function (predicate) {\r\n if (predicate != null) return this.where(predicate).first();\r\n\r\n var value;\r\n var found = false;\r\n this.forEach(function (x) {\r\n value = x;\r\n found = true;\r\n return false;\r\n });\r\n\r\n if (!found) throw new Error(\"first:No element satisfies the condition.\");\r\n return value;\r\n };\r\n\r\n Enumerable.prototype.firstOrDefault = function (predicate, defaultValue) {\r\n if (predicate !== undefined) {\r\n if (typeof predicate === Types.Function || typeof Utils.createLambda(predicate) === Types.Function) {\r\n return this.where(predicate).firstOrDefault(undefined, defaultValue);\r\n }\r\n defaultValue = predicate;\r\n }\r\n\r\n var value;\r\n var found = false;\r\n this.forEach(function (x) {\r\n value = x;\r\n found = true;\r\n return false;\r\n });\r\n return (!found) ? defaultValue : value;\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(predicate)\r\n Enumerable.prototype.last = function (predicate) {\r\n if (predicate != null) return this.where(predicate).last();\r\n\r\n var value;\r\n var found = false;\r\n this.forEach(function (x) {\r\n found = true;\r\n value = x;\r\n });\r\n\r\n if (!found) throw new Error(\"last:No element satisfies the condition.\");\r\n return value;\r\n };\r\n\r\n Enumerable.prototype.lastOrDefault = function (predicate, defaultValue) {\r\n if (predicate !== undefined) {\r\n if (typeof predicate === Types.Function || typeof Utils.createLambda(predicate) === Types.Function) {\r\n return this.where(predicate).lastOrDefault(undefined, defaultValue);\r\n }\r\n defaultValue = predicate;\r\n }\r\n\r\n var value;\r\n var found = false;\r\n this.forEach(function (x) {\r\n found = true;\r\n value = x;\r\n });\r\n return (!found) ? defaultValue : value;\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(predicate)\r\n Enumerable.prototype.single = function (predicate) {\r\n if (predicate != null) return this.where(predicate).single();\r\n\r\n var value;\r\n var found = false;\r\n this.forEach(function (x) {\r\n if (!found) {\r\n found = true;\r\n value = x;\r\n } else throw new Error(\"single:sequence contains more than one element.\");\r\n });\r\n\r\n if (!found) throw new Error(\"single:No element satisfies the condition.\");\r\n return value;\r\n };\r\n\r\n // Overload:function(defaultValue)\r\n // Overload:function(defaultValue,predicate)\r\n Enumerable.prototype.singleOrDefault = function (predicate, defaultValue) {\r\n if (defaultValue === undefined) defaultValue = null;\r\n if (predicate != null) return this.where(predicate).singleOrDefault(null, defaultValue);\r\n\r\n var value;\r\n var found = false;\r\n this.forEach(function (x) {\r\n if (!found) {\r\n found = true;\r\n value = x;\r\n } else throw new Error(\"single:sequence contains more than one element.\");\r\n });\r\n\r\n return (!found) ? defaultValue : value;\r\n };\r\n\r\n Enumerable.prototype.skip = function (count) {\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var index = 0;\r\n\r\n return new IEnumerator(\r\n function () {\r\n enumerator = source.getEnumerator();\r\n while (index++ < count && enumerator.moveNext()) {\r\n }\r\n ;\r\n },\r\n function () {\r\n return (enumerator.moveNext())\r\n ? this.yieldReturn(enumerator.current())\r\n : false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n // Overload:function(predicate<element>)\r\n // Overload:function(predicate<element,index>)\r\n Enumerable.prototype.skipWhile = function (predicate) {\r\n predicate = Utils.createLambda(predicate);\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var index = 0;\r\n var isSkipEnd = false;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n while (!isSkipEnd) {\r\n if (enumerator.moveNext()) {\r\n if (!predicate(enumerator.current(), index++)) {\r\n isSkipEnd = true;\r\n return this.yieldReturn(enumerator.current());\r\n }\r\n continue;\r\n } else return false;\r\n }\r\n\r\n return (enumerator.moveNext())\r\n ? this.yieldReturn(enumerator.current())\r\n : false;\r\n\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n Enumerable.prototype.take = function (count) {\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var index = 0;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n return (index++ < count && enumerator.moveNext())\r\n ? this.yieldReturn(enumerator.current())\r\n : false;\r\n },\r\n function () { Utils.dispose(enumerator); }\r\n );\r\n });\r\n };\r\n\r\n // Overload:function(predicate<element>)\r\n // Overload:function(predicate<element,index>)\r\n Enumerable.prototype.takeWhile = function (predicate) {\r\n predicate = Utils.createLambda(predicate);\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var index = 0;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n return (enumerator.moveNext() && predicate(enumerator.current(), index++))\r\n ? this.yieldReturn(enumerator.current())\r\n : false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(count)\r\n Enumerable.prototype.takeExceptLast = function (count) {\r\n if (count == null) count = 1;\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n if (count <= 0) return source.getEnumerator(); // do nothing\r\n\r\n var enumerator;\r\n var q = [];\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n while (enumerator.moveNext()) {\r\n if (q.length == count) {\r\n q.push(enumerator.current());\r\n return this.yieldReturn(q.shift());\r\n }\r\n q.push(enumerator.current());\r\n }\r\n return false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n Enumerable.prototype.takeFromLast = function (count) {\r\n if (count <= 0 || count == null) return Enumerable.empty();\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var sourceEnumerator;\r\n var enumerator;\r\n var q = [];\r\n\r\n return new IEnumerator(\r\n function () { sourceEnumerator = source.getEnumerator(); },\r\n function () {\r\n while (sourceEnumerator.moveNext()) {\r\n if (q.length == count) q.shift();\r\n q.push(sourceEnumerator.current());\r\n }\r\n if (enumerator == null) {\r\n enumerator = Enumerable.from(q).getEnumerator();\r\n }\r\n return (enumerator.moveNext())\r\n ? this.yieldReturn(enumerator.current())\r\n : false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n // Overload:function(item)\r\n // Overload:function(predicate)\r\n Enumerable.prototype.indexOf = function (item) {\r\n var found = null;\r\n\r\n // item as predicate\r\n if (typeof (item) === Types.Function) {\r\n this.forEach(function (x, i) {\r\n if (item(x, i)) {\r\n found = i;\r\n return false;\r\n }\r\n });\r\n }\r\n else {\r\n this.forEach(function (x, i) {\r\n if (x === item) {\r\n found = i;\r\n return false;\r\n }\r\n });\r\n }\r\n\r\n return (found !== null) ? found : -1;\r\n };\r\n\r\n // Overload:function(item)\r\n // Overload:function(predicate)\r\n Enumerable.prototype.lastIndexOf = function (item) {\r\n var result = -1;\r\n\r\n // item as predicate\r\n if (typeof (item) === Types.Function) {\r\n this.forEach(function (x, i) {\r\n if (item(x, i)) result = i;\r\n });\r\n }\r\n else {\r\n this.forEach(function (x, i) {\r\n if (x === item) result = i;\r\n });\r\n }\r\n\r\n return result;\r\n };\r\n\r\n /* Convert Methods */\r\n\r\n Enumerable.prototype.cast = function () {\r\n return this;\r\n };\r\n\r\n Enumerable.prototype.asEnumerable = function () {\r\n return Enumerable.from(this);\r\n };\r\n\r\n Enumerable.prototype.toArray = function () {\r\n var array = [];\r\n this.forEach(function (x) { array.push(x); });\r\n return array;\r\n };\r\n\r\n // Overload:function(keySelector)\r\n // Overload:function(keySelector, elementSelector)\r\n // Overload:function(keySelector, elementSelector, compareSelector)\r\n Enumerable.prototype.toLookup = function (keySelector, elementSelector, compareSelector) {\r\n keySelector = Utils.createLambda(keySelector);\r\n elementSelector = Utils.createLambda(elementSelector);\r\n compareSelector = Utils.createLambda(compareSelector);\r\n\r\n var dict = new Dictionary(compareSelector);\r\n this.forEach(function (x) {\r\n var key = keySelector(x);\r\n var element = elementSelector(x);\r\n\r\n var array = dict.get(key);\r\n if (array !== undefined) array.push(element);\r\n else dict.add(key, [element]);\r\n });\r\n return new Lookup(dict);\r\n };\r\n\r\n Enumerable.prototype.toObject = function (keySelector, elementSelector) {\r\n keySelector = Utils.createLambda(keySelector);\r\n elementSelector = Utils.createLambda(elementSelector);\r\n\r\n var obj = {};\r\n this.forEach(function (x) {\r\n obj[keySelector(x)] = elementSelector(x);\r\n });\r\n return obj;\r\n };\r\n\r\n // Overload:function(keySelector, elementSelector)\r\n // Overload:function(keySelector, elementSelector, compareSelector)\r\n Enumerable.prototype.toDictionary = function (keySelector, elementSelector, compareSelector) {\r\n keySelector = Utils.createLambda(keySelector);\r\n elementSelector = Utils.createLambda(elementSelector);\r\n compareSelector = Utils.createLambda(compareSelector);\r\n\r\n var dict = new Dictionary(compareSelector);\r\n this.forEach(function (x) {\r\n dict.add(keySelector(x), elementSelector(x));\r\n });\r\n return dict;\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(replacer)\r\n // Overload:function(replacer, space)\r\n Enumerable.prototype.toJSONString = function (replacer, space) {\r\n if (typeof JSON === Types.Undefined || JSON.stringify == null) {\r\n throw new Error(\"toJSONString can't find JSON.stringify. This works native JSON support Browser or include json2.js\");\r\n }\r\n return JSON.stringify(this.toArray(), replacer, space);\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(separator)\r\n // Overload:function(separator,selector)\r\n Enumerable.prototype.toJoinedString = function (separator, selector) {\r\n if (separator == null) separator = \"\";\r\n if (selector == null) selector = Functions.Identity;\r\n\r\n return this.select(selector).toArray().join(separator);\r\n };\r\n\r\n\r\n /* Action Methods */\r\n\r\n // Overload:function(action<element>)\r\n // Overload:function(action<element,index>)\r\n Enumerable.prototype.doAction = function (action) {\r\n var source = this;\r\n action = Utils.createLambda(action);\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n var index = 0;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n if (enumerator.moveNext()) {\r\n action(enumerator.current(), index++);\r\n return this.yieldReturn(enumerator.current());\r\n }\r\n return false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n // Overload:function(action<element>)\r\n // Overload:function(action<element,index>)\r\n // Overload:function(func<element,bool>)\r\n // Overload:function(func<element,index,bool>)\r\n Enumerable.prototype.forEach = function (action) {\r\n action = Utils.createLambda(action);\r\n\r\n var index = 0;\r\n var enumerator = this.getEnumerator();\r\n try {\r\n while (enumerator.moveNext()) {\r\n if (action(enumerator.current(), index++) === false) break;\r\n }\r\n } finally {\r\n Utils.dispose(enumerator);\r\n }\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(separator)\r\n // Overload:function(separator,selector)\r\n Enumerable.prototype.write = function (separator, selector) {\r\n if (separator == null) separator = \"\";\r\n selector = Utils.createLambda(selector);\r\n\r\n var isFirst = true;\r\n this.forEach(function (item) {\r\n if (isFirst) isFirst = false;\r\n else document.write(separator);\r\n document.write(selector(item));\r\n });\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(selector)\r\n Enumerable.prototype.writeLine = function (selector) {\r\n selector = Utils.createLambda(selector);\r\n\r\n this.forEach(function (item) {\r\n document.writeln(selector(item) + \"<br />\");\r\n });\r\n };\r\n\r\n Enumerable.prototype.force = function () {\r\n var enumerator = this.getEnumerator();\r\n\r\n try {\r\n while (enumerator.moveNext()) {\r\n }\r\n }\r\n finally {\r\n Utils.dispose(enumerator);\r\n }\r\n };\r\n\r\n /* Functional Methods */\r\n\r\n Enumerable.prototype.letBind = function (func) {\r\n func = Utils.createLambda(func);\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n\r\n return new IEnumerator(\r\n function () {\r\n enumerator = Enumerable.from(func(source)).getEnumerator();\r\n },\r\n function () {\r\n return (enumerator.moveNext())\r\n ? this.yieldReturn(enumerator.current())\r\n : false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n Enumerable.prototype.share = function () {\r\n var source = this;\r\n var sharedEnumerator;\r\n var disposed = false;\r\n\r\n return new DisposableEnumerable(function () {\r\n return new IEnumerator(\r\n function () {\r\n if (sharedEnumerator == null) {\r\n sharedEnumerator = source.getEnumerator();\r\n }\r\n },\r\n function () {\r\n if (disposed) throw new Error(\"enumerator is disposed\");\r\n\r\n return (sharedEnumerator.moveNext())\r\n ? this.yieldReturn(sharedEnumerator.current())\r\n : false;\r\n },\r\n Functions.Blank\r\n );\r\n }, function () {\r\n disposed = true;\r\n Utils.dispose(sharedEnumerator);\r\n });\r\n };\r\n\r\n Enumerable.prototype.memoize = function () {\r\n var source = this;\r\n var cache;\r\n var enumerator;\r\n var disposed = false;\r\n\r\n return new DisposableEnumerable(function () {\r\n var index = -1;\r\n\r\n return new IEnumerator(\r\n function () {\r\n if (enumerator == null) {\r\n enumerator = source.getEnumerator();\r\n cache = [];\r\n }\r\n },\r\n function () {\r\n if (disposed) throw new Error(\"enumerator is disposed\");\r\n\r\n index++;\r\n if (cache.length <= index) {\r\n return (enumerator.moveNext())\r\n ? this.yieldReturn(cache[index] = enumerator.current())\r\n : false;\r\n }\r\n\r\n return this.yieldReturn(cache[index]);\r\n },\r\n Functions.Blank\r\n );\r\n }, function () {\r\n disposed = true;\r\n Utils.dispose(enumerator);\r\n cache = null;\r\n });\r\n };\r\n\r\n /* Iterator (ES6 for..of) support */\r\n if (Utils.hasNativeIteratorSupport()) {\r\n Enumerable.prototype[Symbol.iterator] = function () {\r\n return {\r\n enumerator: this.getEnumerator(),\r\n next: function () {\r\n if (this.enumerator.moveNext()) {\r\n return {\r\n done: false,\r\n value: this.enumerator.current()\r\n };\r\n } else {\r\n return { done: true };\r\n }\r\n }\r\n };\r\n };\r\n }\r\n\r\n /* Error Handling Methods */\r\n\r\n Enumerable.prototype.catchError = function (handler) {\r\n handler = Utils.createLambda(handler);\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n try {\r\n return (enumerator.moveNext())\r\n ? this.yieldReturn(enumerator.current())\r\n : false;\r\n } catch (e) {\r\n handler(e);\r\n return false;\r\n }\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n });\r\n };\r\n\r\n Enumerable.prototype.finallyAction = function (finallyAction) {\r\n finallyAction = Utils.createLambda(finallyAction);\r\n var source = this;\r\n\r\n return new Enumerable(function () {\r\n var enumerator;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n return (enumerator.moveNext())\r\n ? this.yieldReturn(enumerator.current())\r\n : false;\r\n },\r\n function () {\r\n try {\r\n Utils.dispose(enumerator);\r\n } finally {\r\n finallyAction();\r\n }\r\n });\r\n });\r\n };\r\n\r\n /* For Debug Methods */\r\n\r\n // Overload:function()\r\n // Overload:function(selector)\r\n Enumerable.prototype.log = function (selector) {\r\n selector = Utils.createLambda(selector);\r\n\r\n return this.doAction(function (item) {\r\n if (typeof console !== Types.Undefined) {\r\n console.log(selector(item));\r\n }\r\n });\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(message)\r\n // Overload:function(message,selector)\r\n Enumerable.prototype.trace = function (message, selector) {\r\n if (message == null) message = \"Trace\";\r\n selector = Utils.createLambda(selector);\r\n\r\n return this.doAction(function (item) {\r\n if (typeof console !== Types.Undefined) {\r\n console.log(message, selector(item));\r\n }\r\n });\r\n };\r\n\r\n // private\r\n\r\n var OrderedEnumerable = function (source, keySelector, comparer, descending, parent) {\r\n this.source = source;\r\n this.keySelector = Utils.createLambda(keySelector);\r\n this.descending = descending;\r\n this.parent = parent;\r\n\r\n if (comparer)\r\n this.comparer = Utils.createLambda(comparer);\r\n };\r\n OrderedEnumerable.prototype = new Enumerable();\r\n\r\n OrderedEnumerable.prototype.createOrderedEnumerable = function (keySelector, comparer, descending) {\r\n return new OrderedEnumerable(this.source, keySelector, comparer, descending, this);\r\n };\r\n\r\n OrderedEnumerable.prototype.thenBy = function (keySelector, comparer) {\r\n return this.createOrderedEnumerable(keySelector, comparer, false);\r\n };\r\n\r\n OrderedEnumerable.prototype.thenByDescending = function (keySelector, comparer) {\r\n return this.createOrderedEnumerable(keySelector, comparer, true);\r\n };\r\n\r\n OrderedEnumerable.prototype.getEnumerator = function () {\r\n var self = this;\r\n var buffer;\r\n var indexes;\r\n var index = 0;\r\n\r\n return new IEnumerator(\r\n function () {\r\n buffer = [];\r\n indexes = [];\r\n self.source.forEach(function (item, index) {\r\n buffer.push(item);\r\n indexes.push(index);\r\n });\r\n var sortContext = SortContext.create(self, null);\r\n sortContext.GenerateKeys(buffer);\r\n\r\n indexes.sort(function (a, b) { return sortContext.compare(a, b); });\r\n },\r\n function () {\r\n return (index < indexes.length)\r\n ? this.yieldReturn(buffer[indexes[index++]])\r\n : false;\r\n },\r\n Functions.Blank\r\n );\r\n };\r\n\r\n var SortContext = function (keySelector, comparer, descending, child) {\r\n this.keySelector = keySelector;\r\n this.descending = descending;\r\n this.child = child;\r\n this.comparer = comparer;\r\n this.keys = null;\r\n };\r\n\r\n SortContext.create = function (orderedEnumerable, currentContext) {\r\n var context = new SortContext(\r\n orderedEnumerable.keySelector, orderedEnumerable.comparer, orderedEnumerable.descending, currentContext\r\n );\r\n\r\n if (orderedEnumerable.parent != null) return SortContext.create(orderedEnumerable.parent, context);\r\n return context;\r\n };\r\n\r\n SortContext.prototype.GenerateKeys = function (source) {\r\n var len = source.length;\r\n var keySelector = this.keySelector;\r\n var keys = new Array(len);\r\n for (var i = 0; i < len; i++) keys[i] = keySelector(source[i]);\r\n this.keys = keys;\r\n\r\n if (this.child != null) this.child.GenerateKeys(source);\r\n };\r\n\r\n SortContext.prototype.compare = function (index1, index2) {\r\n var comparison = this.comparer ?\r\n this.comparer(this.keys[index1], this.keys[index2]) :\r\n Utils.compare(this.keys[index1], this.keys[index2]);\r\n\r\n if (comparison == 0) {\r\n if (this.child != null) return this.child.compare(index1, index2);\r\n return Utils.compare(index1, index2);\r\n }\r\n\r\n return (this.descending) ? -comparison : comparison;\r\n };\r\n\r\n var DisposableEnumerable = function (getEnumerator, dispose) {\r\n this.dispose = dispose;\r\n Enumerable.call(this, getEnumerator);\r\n };\r\n DisposableEnumerable.prototype = new Enumerable();\r\n\r\n // optimize array or arraylike object\r\n\r\n var ArrayEnumerable = function (source) {\r\n this.getSource = function () { return source; };\r\n };\r\n ArrayEnumerable.prototype = new Enumerable();\r\n\r\n ArrayEnumerable.prototype.any = function (predicate) {\r\n return (predicate == null)\r\n ? (this.getSource().length > 0)\r\n : Enumerable.prototype.any.apply(this, arguments);\r\n };\r\n\r\n ArrayEnumerable.prototype.count = function (predicate) {\r\n return (predicate == null)\r\n ? this.getSource().length\r\n : Enumerable.prototype.count.apply(this, arguments);\r\n };\r\n\r\n ArrayEnumerable.prototype.elementAt = function (index) {\r\n var source = this.getSource();\r\n return (0 <= index && index < source.length)\r\n ? source[index]\r\n : Enumerable.prototype.elementAt.apply(this, arguments);\r\n };\r\n\r\n ArrayEnumerable.prototype.elementAtOrDefault = function (index, defaultValue) {\r\n if (defaultValue === undefined) defaultValue = null;\r\n var source = this.getSource();\r\n return (0 <= index && index < source.length)\r\n ? source[index]\r\n : defaultValue;\r\n };\r\n\r\n ArrayEnumerable.prototype.first = function (predicate) {\r\n var source = this.getSource();\r\n return (predicate == null && source.length > 0)\r\n ? source[0]\r\n : Enumerable.prototype.first.apply(this, arguments);\r\n };\r\n\r\n ArrayEnumerable.prototype.firstOrDefault = function (predicate, defaultValue) {\r\n if (predicate !== undefined) {\r\n return Enumerable.prototype.firstOrDefault.apply(this, arguments);\r\n }\r\n defaultValue = predicate;\r\n\r\n var source = this.getSource();\r\n return source.length > 0 ? source[0] : defaultValue;\r\n };\r\n\r\n ArrayEnumerable.prototype.last = function (predicate) {\r\n var source = this.getSource();\r\n return (predicate == null && source.length > 0)\r\n ? source[source.length - 1]\r\n : Enumerable.prototype.last.apply(this, arguments);\r\n };\r\n\r\n ArrayEnumerable.prototype.lastOrDefault = function (predicate, defaultValue) {\r\n if (predicate !== undefined) {\r\n return Enumerable.prototype.lastOrDefault.apply(this, arguments);\r\n }\r\n defaultValue = predicate;\r\n\r\n var source = this.getSource();\r\n return source.length > 0 ? source[source.length - 1] : defaultValue;\r\n };\r\n\r\n ArrayEnumerable.prototype.skip = function (count) {\r\n var source = this.getSource();\r\n\r\n return new Enumerable(function () {\r\n var index;\r\n\r\n return new IEnumerator(\r\n function () { index = (count < 0) ? 0 : count; },\r\n function () {\r\n return (index < source.length)\r\n ? this.yieldReturn(source[index++])\r\n : false;\r\n },\r\n Functions.Blank);\r\n });\r\n };\r\n\r\n ArrayEnumerable.prototype.takeExceptLast = function (count) {\r\n if (count == null) count = 1;\r\n return this.take(this.getSource().length - count);\r\n };\r\n\r\n ArrayEnumerable.prototype.takeFromLast = function (count) {\r\n return this.skip(this.getSource().length - count);\r\n };\r\n\r\n ArrayEnumerable.prototype.reverse = function () {\r\n var source = this.getSource();\r\n\r\n return new Enumerable(function () {\r\n var index;\r\n\r\n return new IEnumerator(\r\n function () {\r\n index = source.length;\r\n },\r\n function () {\r\n return (index > 0)\r\n ? this.yieldReturn(source[--index])\r\n : false;\r\n },\r\n Functions.Blank);\r\n });\r\n };\r\n\r\n ArrayEnumerable.prototype.sequenceEqual = function (second, compareSelector) {\r\n if ((second instanceof ArrayEnumerable || second instanceof Array)\r\n && compareSelector == null\r\n && Enumerable.from(second).count() != this.count()) {\r\n return false;\r\n }\r\n\r\n return Enumerable.prototype.sequenceEqual.apply(this, arguments);\r\n };\r\n\r\n ArrayEnumerable.prototype.toJoinedString = function (separator, selector) {\r\n var source = this.getSource();\r\n if (selector != null || !(source instanceof Array)) {\r\n return Enumerable.prototype.toJoinedString.apply(this, arguments);\r\n }\r\n\r\n if (separator == null) separator = \"\";\r\n return source.join(separator);\r\n };\r\n\r\n ArrayEnumerable.prototype.getEnumerator = function () {\r\n var source = this.getSource();\r\n var index = -1;\r\n\r\n // fast and simple enumerator\r\n return {\r\n current: function () { return source[index]; },\r\n moveNext: function () {\r\n return ++index < source.length;\r\n },\r\n dispose: Functions.Blank\r\n };\r\n };\r\n\r\n // optimization for multiple where and multiple select and whereselect\r\n\r\n var WhereEnumerable = function (source, predicate) {\r\n this.prevSource = source;\r\n this.prevPredicate = predicate; // predicate.length always <= 1\r\n };\r\n WhereEnumerable.prototype = new Enumerable();\r\n\r\n WhereEnumerable.prototype.where = function (predicate) {\r\n predicate = Utils.createLambda(predicate);\r\n\r\n if (predicate.length <= 1) {\r\n var prevPredicate = this.prevPredicate;\r\n var composedPredicate = function (x) { return prevPredicate(x) && predicate(x); };\r\n return new WhereEnumerable(this.prevSource, composedPredicate);\r\n }\r\n else {\r\n // if predicate use index, can't compose\r\n return Enumerable.prototype.where.call(this, predicate);\r\n }\r\n };\r\n\r\n WhereEnumerable.prototype.select = function (selector) {\r\n selector = Utils.createLambda(selector);\r\n\r\n return (selector.length <= 1)\r\n ? new WhereSelectEnumerable(this.prevSource, this.prevPredicate, selector)\r\n : Enumerable.prototype.select.call(this, selector);\r\n };\r\n\r\n WhereEnumerable.prototype.getEnumerator = function () {\r\n var predicate = this.prevPredicate;\r\n var source = this.prevSource;\r\n var enumerator;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n while (enumerator.moveNext()) {\r\n if (predicate(enumerator.current())) {\r\n return this.yieldReturn(enumerator.current());\r\n }\r\n }\r\n return false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n };\r\n\r\n var WhereSelectEnumerable = function (source, predicate, selector) {\r\n this.prevSource = source;\r\n this.prevPredicate = predicate; // predicate.length always <= 1 or null\r\n this.prevSelector = selector; // selector.length always <= 1\r\n };\r\n WhereSelectEnumerable.prototype = new Enumerable();\r\n\r\n WhereSelectEnumerable.prototype.where = function (predicate) {\r\n predicate = Utils.createLambda(predicate);\r\n\r\n return (predicate.length <= 1)\r\n ? new WhereEnumerable(this, predicate)\r\n : Enumerable.prototype.where.call(this, predicate);\r\n };\r\n\r\n WhereSelectEnumerable.prototype.select = function (selector) {\r\n selector = Utils.createLambda(selector);\r\n\r\n if (selector.length <= 1) {\r\n var prevSelector = this.prevSelector;\r\n var composedSelector = function (x) { return selector(prevSelector(x)); };\r\n return new WhereSelectEnumerable(this.prevSource, this.prevPredicate, composedSelector);\r\n }\r\n else {\r\n // if selector use index, can't compose\r\n return Enumerable.prototype.select.call(this, selector);\r\n }\r\n };\r\n\r\n WhereSelectEnumerable.prototype.getEnumerator = function () {\r\n var predicate = this.prevPredicate;\r\n var selector = this.prevSelector;\r\n var source = this.prevSource;\r\n var enumerator;\r\n\r\n return new IEnumerator(\r\n function () { enumerator = source.getEnumerator(); },\r\n function () {\r\n while (enumerator.moveNext()) {\r\n if (predicate == null || predicate(enumerator.current())) {\r\n return this.yieldReturn(selector(enumerator.current()));\r\n }\r\n }\r\n return false;\r\n },\r\n function () { Utils.dispose(enumerator); });\r\n };\r\n\r\n // Collections\r\n\r\n var Dictionary = (function () {\r\n // static utility methods\r\n var callHasOwnProperty = function (target, key) {\r\n return Object.prototype.hasOwnProperty.call(target, key);\r\n };\r\n\r\n var computeHashCode = function (obj) {\r\n if (obj === null) return \"null\";\r\n if (obj === undefined) return \"undefined\";\r\n\r\n return (typeof obj.toString === Types.Function)\r\n ? obj.toString()\r\n : Object.prototype.toString.call(obj);\r\n };\r\n\r\n // LinkedList for Dictionary\r\n var HashEntry = function (key, value) {\r\n this.key = key;\r\n this.value = value;\r\n this.prev = null;\r\n this.next = null;\r\n };\r\n\r\n var EntryList = function () {\r\n this.first = null;\r\n this.last = null;\r\n };\r\n EntryList.prototype =\r\n {\r\n addLast: function (entry) {\r\n if (this.last != null) {\r\n this.last.next = entry;\r\n entry.prev = this.last;\r\n this.last = entry;\r\n } else this.first = this.last = entry;\r\n },\r\n\r\n replace: function (entry, newEntry) {\r\n if (entry.prev != null) {\r\n entry.prev.next = newEntry;\r\n newEntry.prev = entry.prev;\r\n } else this.first = newEntry;\r\n\r\n if (entry.next != null) {\r\n entry.next.prev = newEntry;\r\n newEntry.next = entry.next;\r\n } else this.last = newEntry;\r\n\r\n },\r\n\r\n remove: function (entry) {\r\n if (entry.prev != null) entry.prev.next = entry.next;\r\n else this.first = entry.next;\r\n\r\n if (entry.next != null) entry.next.prev = entry.prev;\r\n else this.last = entry.prev;\r\n }\r\n };\r\n\r\n // Overload:function()\r\n // Overload:function(compareSelector)\r\n var Dictionary = function (compareSelector) {\r\n this.countField = 0;\r\n this.entryList = new EntryList();\r\n this.buckets = {}; // as Dictionary<string,List<object>>\r\n this.compareSelector = (compareSelector == null) ? Functions.Identity : compareSelector;\r\n };\r\n Dictionary.prototype =\r\n {\r\n add: function (key, value) {\r\n var compareKey = this.compareSelector(key);\r\n var hash = computeHashCode(compareKey);\r\n var entry = new HashEntry(key, value);\r\n if (callHasOwnProperty(this.buckets, hash)) {\r\n var array = this.buckets[hash];\r\n for (var i = 0; i < array.length; i++) {\r\n if (this.compareSelector(array[i].key) === compareKey) {\r\n this.entryList.replace(array[i], entry);\r\n array[i] = entry;\r\n return;\r\n }\r\n }\r\n array.push(entry);\r\n } else {\r\n this.buckets[hash] = [entry];\r\n }\r\n this.countField++;\r\n this.entryList.addLast(entry);\r\n },\r\n\r\n get: function (key) {\r\n var compareKey = this.compareSelector(key);\r\n var hash = computeHashCode(compareKey);\r\n if (!callHasOwnProperty(this.buckets, hash)) return undefined;\r\n\r\n var array = this.buckets[hash];\r\n for (var i = 0; i < array.length; i++) {\r\n var entry = array[i];\r\n if (this.compareSelector(entry.key) === compareKey) return entry.value;\r\n }\r\n return undefined;\r\n },\r\n\r\n set: function (key, value) {\r\n var compareKey = this.compareSelector(key);\r\n var hash = computeHashCode(compareKey);\r\n if (callHasOwnProperty(this.buckets, hash)) {\r\n var array = this.buckets[hash];\r\n for (var i = 0; i < array.length; i++) {\r\n if (this.compareSelector(array[i].key) === compareKey) {\r\n var newEntry = new HashEntry(key, value);\r\n this.entryList.replace(array[i], newEntry);\r\n array[i] = newEntry;\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n },\r\n\r\n contains: function (key) {\r\n var compareKey = this.compareSelector(key);\r\n var hash = computeHashCode(compareKey);\r\n if (!callHasOwnProperty(this.buckets, hash)) return false;\r\n\r\n var array = this.buckets[hash];\r\n for (var i = 0; i < array.length; i++) {\r\n if (this.compareSelector(array[i].key) === compareKey) return true;\r\n }\r\n return false;\r\n },\r\n\r\n clear: function () {\r\n this.countField = 0;\r\n this.buckets = {};\r\n this.entryList = new EntryList();\r\n },\r\n\r\n remove: function (key) {\r\n var compareKey = this.compareSelector(key);\r\n var hash = computeHashCode(compareKey);\r\n if (!callHasOwnProperty(this.buckets, hash)) return;\r\n\r\n var array = this.buckets[hash];\r\n for (var i = 0; i < array.length; i++) {\r\n if (this.compareSelector(array[i].key) === compareKey) {\r\n this.entryList.remove(array[i]);\r\n array.splice(i, 1);\r\n if (array.length == 0) delete this.buckets[hash];\r\n this.countField--;\r\n return;\r\n }\r\n }\r\n },\r\n\r\n count: function () {\r\n return this.countField;\r\n },\r\n\r\n toEnumerable: function () {\r\n var self = this;\r\n return new Enumerable(function () {\r\n var currentEntry;\r\n\r\n return new IEnumerator(\r\n function () { currentEntry = self.entryList.first; },\r\n function () {\r\n if (currentEntry != null) {\r\n var result = { key: currentEntry.key, value: currentEntry.value };\r\n currentEntry = currentEntry.next;\r\n return this.yieldReturn(result);\r\n }\r\n return false;\r\n },\r\n Functions.Blank);\r\n });\r\n }\r\n };\r\n\r\n return Dictionary;\r\n })();\r\n\r\n // dictionary = Dictionary<TKey, TValue[]>\r\n var Lookup = function (dictionary) {\r\n this.count = function () {\r\n return dictionary.count();\r\n };\r\n this.get = function (key) {\r\n return Enumerable.from(dictionary.get(key));\r\n };\r\n this.contains = function (key) {\r\n return dictionary.contains(key);\r\n };\r\n this.toEnumerable = function () {\r\n return dictionary.toEnumerable().select(function (kvp) {\r\n return new Grouping(kvp.key, kvp.value);\r\n });\r\n };\r\n };\r\n\r\n var Grouping = function (groupKey, elements) {\r\n this.key = function () {\r\n return groupKey;\r\n };\r\n ArrayEnumerable.call(this, elements);\r\n };\r\n Grouping.prototype = new ArrayEnumerable();\r\n\r\n // module export\r\n if (typeof define === Types.Function && define.amd) { // AMD\r\n define(\"linqjs\", [], function () { return Enumerable; });\r\n }\r\n else if (typeof module !== Types.Undefined && module.exports) { // Node\r\n module.exports = Enumerable;\r\n }\r\n else {\r\n root.Enumerable = Enumerable;\r\n }\r\n})(this);\r\n","/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.21';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function',\n INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading whitespace. */\n var reTrimStart = /^\\s+/;\n\n /** Used to match a single whitespace character. */\n var reWhitespace = /\\s/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /**\n * Used to validate the `validate` option in `_.template` variable.\n *\n * Forbids characters which could potentially change the meaning of the function argument definition:\n * - \"(),\" (modification of function parameters)\n * - \"=\" (default value)\n * - \"[]{}\" (destructuring of function parameters)\n * - \"/\" (beginning of a comment)\n * - whitespace\n */\n var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\n function baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\n function trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n var low = 0,\n high = array == null ? 0 : array.length;\n if (high === 0) {\n return 0;\n }\n\n value = iteratee(value);\n var valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '<p>' + func(text) + '</p>';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '<p>fred, barney, & pebbles</p>'\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('<body>');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<b><%- value %></b>');\n * compiled({ 'value': '<script>' });\n * // => '<b><script></b>'\n *\n * // Use the \"evaluate\" delimiter to execute JavaScript and generate HTML.\n * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\n * compiled({ 'users': ['fred', 'barney'] });\n * // => '<li>fred</li><li>barney</li>'\n *\n * // Use the internal `print` function in \"evaluate\" delimiters.\n * var compiled = _.template('<% print(\"hello \" + user); %>!');\n * compiled({ 'user': 'barney' });\n * // => 'hello barney!'\n *\n * // Use the ES template literal delimiter as an \"interpolate\" delimiter.\n * // Disable support by replacing the \"interpolate\" delimiter.\n * var compiled = _.template('hello ${ user }!');\n * compiled({ 'user': 'pebbles' });\n * // => 'hello pebbles!'\n *\n * // Use backslashes to treat delimiters as plain text.\n * var compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\n * compiled({ 'value': 'ignored' });\n * // => '<%- value %>'\n *\n * // Use the `imports` option to import `jQuery` as `jq`.\n * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\n * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });\n * compiled({ 'users': ['fred', 'barney'] });\n * // => '<li>fred</li><li>barney</li>'\n *\n * // Use the `sourceURL` option to specify a custom sourceURL for the template.\n * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\n * compiled(data);\n * // => Find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector.\n *\n * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.\n * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\n * compiled.source;\n * // => function(data) {\n * // var __t, __p = '';\n * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n * // return __p;\n * // }\n *\n * // Use custom template delimiters.\n * _.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n * var compiled = _.template('hello {{ user }}!');\n * compiled({ 'user': 'mustache' });\n * // => 'hello mustache!'\n *\n * // Use the `source` property to inline compiled templates for meaningful\n * // line numbers in error messages and stack traces.\n * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\\\n * var JST = {\\\n * \"main\": ' + _.template(mainText).source + '\\\n * };\\\n * ');\n */\n function template(string, options, guard) {\n // Based on John Resig's `tmpl` implementation\n // (http://ejohn.org/blog/javascript-micro-templating/)\n // and Laura Doktorova's doT.js (https://github.com/olado/doT).\n var settings = lodash.templateSettings;\n\n if (guard && isIterateeCall(string, options, guard)) {\n options = undefined;\n }\n string = toString(string);\n options = assignInWith({}, options, settings, customDefaultsAssignIn);\n\n var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),\n importsKeys = keys(imports),\n importsValues = baseValues(imports, importsKeys);\n\n var isEscaping,\n isEvaluating,\n index = 0,\n interpolate = options.interpolate || reNoMatch,\n source = \"__p += '\";\n\n // Compile the regexp to match each delimiter.\n var reDelimiters = RegExp(\n (options.escape || reNoMatch).source + '|' +\n interpolate.source + '|' +\n (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +\n (options.evaluate || reNoMatch).source + '|$'\n , 'g');\n\n // Use a sourceURL for easier debugging.\n // The sourceURL gets injected into the source that's eval-ed, so be careful\n // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in\n // and escape the comment, thus injecting code that gets evaled.\n var sourceURL = '//# sourceURL=' +\n (hasOwnProperty.call(options, 'sourceURL')\n ? (options.sourceURL + '').replace(/\\s/g, ' ')\n : ('lodash.templateSources[' + (++templateCounter) + ']')\n ) + '\\n';\n\n string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {\n interpolateValue || (interpolateValue = esTemplateValue);\n\n // Escape characters that can't be included in string literals.\n source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);\n\n // Replace delimiters with snippets.\n if (escapeValue) {\n isEscaping = true;\n source += \"' +\\n__e(\" + escapeValue + \") +\\n'\";\n }\n if (evaluateValue) {\n isEvaluating = true;\n source += \"';\\n\" + evaluateValue + \";\\n__p += '\";\n }\n if (interpolateValue) {\n source += \"' +\\n((__t = (\" + interpolateValue + \")) == null ? '' : __t) +\\n'\";\n }\n index = offset + match.length;\n\n // The JS engine embedded in Adobe products needs `match` returned in\n // order to produce the correct `offset` value.\n return match;\n });\n\n source += \"';\\n\";\n\n // If `variable` is not specified wrap a with-statement around the generated\n // code to add the data object to the top of the scope chain.\n var variable = hasOwnProperty.call(options, 'variable') && options.variable;\n if (!variable) {\n source = 'with (obj) {\\n' + source + '\\n}\\n';\n }\n // Throw an error if a forbidden character was found in `variable`, to prevent\n // potential command injection attacks.\n else if (reForbiddenIdentifierChars.test(variable)) {\n throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);\n }\n\n // Cleanup code by stripping empty strings.\n source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)\n .replace(reEmptyStringMiddle, '$1')\n .replace(reEmptyStringTrailing, '$1;');\n\n // Frame code as the function body.\n source = 'function(' + (variable || 'obj') + ') {\\n' +\n (variable\n ? ''\n : 'obj || (obj = {});\\n'\n ) +\n \"var __t, __p = ''\" +\n (isEscaping\n ? ', __e = _.escape'\n : ''\n ) +\n (isEvaluating\n ? ', __j = Array.prototype.join;\\n' +\n \"function print() { __p += __j.call(arguments, '') }\\n\"\n : ';\\n'\n ) +\n source +\n 'return __p\\n}';\n\n var result = attempt(function() {\n return Function(importsKeys, sourceURL + 'return ' + source)\n .apply(undefined, importsValues);\n });\n\n // Provide the compiled function's source by its `toString` method or\n // the `source` property as a convenience for inlining compiled templates.\n result.source = source;\n if (isError(result)) {\n throw result;\n }\n return result;\n }\n\n /**\n * Converts `string`, as a whole, to lower case just like\n * [String#toLowerCase](https://mdn.io/toLowerCase).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.toLower('--Foo-Bar--');\n * // => '--foo-bar--'\n *\n * _.toLower('fooBar');\n * // => 'foobar'\n *\n * _.toLower('__FOO_BAR__');\n * // => '__foo_bar__'\n */\n function toLower(value) {\n return toString(value).toLowerCase();\n }\n\n /**\n * Converts `string`, as a whole, to upper case just like\n * [String#toUpperCase](https://mdn.io/toUpperCase).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the upper cased string.\n * @example\n *\n * _.toUpper('--foo-bar--');\n * // => '--FOO-BAR--'\n *\n * _.toUpper('fooBar');\n * // => 'FOOBAR'\n *\n * _.toUpper('__foo_bar__');\n * // => '__FOO_BAR__'\n */\n function toUpper(value) {\n return toString(value).toUpperCase();\n }\n\n /**\n * Removes leading and trailing whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trim(' abc ');\n * // => 'abc'\n *\n * _.trim('-_-abc-_-', '_-');\n * // => 'abc'\n *\n * _.map([' foo ', ' bar '], _.trim);\n * // => ['foo', 'bar']\n */\n function trim(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return baseTrim(string);\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n chrSymbols = stringToArray(chars),\n start = charsStartIndex(strSymbols, chrSymbols),\n end = charsEndIndex(strSymbols, chrSymbols) + 1;\n\n return castSlice(strSymbols, start, end).join('');\n }\n\n /**\n * Removes trailing whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trimEnd(' abc ');\n * // => ' abc'\n *\n * _.trimEnd('-_-abc-_-', '_-');\n * // => '-_-abc'\n */\n function trimEnd(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return string.slice(0, trimmedEndIndex(string) + 1);\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;\n\n return castSlice(strSymbols, 0, end).join('');\n }\n\n /**\n * Removes leading whitespace or specified characters from `string`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to trim.\n * @param {string} [chars=whitespace] The characters to trim.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the trimmed string.\n * @example\n *\n * _.trimStart(' abc ');\n * // => 'abc '\n *\n * _.trimStart('-_-abc-_-', '_-');\n * // => 'abc-_-'\n */\n function trimStart(string, chars, guard) {\n string = toString(string);\n if (string && (guard || chars === undefined)) {\n return string.replace(reTrimStart, '');\n }\n if (!string || !(chars = baseToString(chars))) {\n return string;\n }\n var strSymbols = stringToArray(string),\n start = charsStartIndex(strSymbols, stringToArray(chars));\n\n return castSlice(strSymbols, start).join('');\n }\n\n /**\n * Truncates `string` if it's longer than the given maximum string length.\n * The last characters of the truncated string are replaced with the omission\n * string which defaults to \"...\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to truncate.\n * @param {Object} [options={}] The options object.\n * @param {number} [options.length=30] The maximum string length.\n * @param {string} [options.omission='...'] The string to indicate text is omitted.\n * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\n * @returns {string} Returns the truncated string.\n * @example\n *\n * _.truncate('hi-diddly-ho there, neighborino');\n * // => 'hi-diddly-ho there, neighbo...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'length': 24,\n * 'separator': ' '\n * });\n * // => 'hi-diddly-ho there,...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'length': 24,\n * 'separator': /,? +/\n * });\n * // => 'hi-diddly-ho there...'\n *\n * _.truncate('hi-diddly-ho there, neighborino', {\n * 'omission': ' [...]'\n * });\n * // => 'hi-diddly-ho there, neig [...]'\n */\n function truncate(string, options) {\n var length = DEFAULT_TRUNC_LENGTH,\n omission = DEFAULT_TRUNC_OMISSION;\n\n if (isObject(options)) {\n var separator = 'separator' in options ? options.separator : separator;\n length = 'length' in options ? toInteger(options.length) : length;\n omission = 'omission' in options ? baseToString(options.omission) : omission;\n }\n string = toString(string);\n\n var strLength = string.length;\n if (hasUnicode(string)) {\n var strSymbols = stringToArray(string);\n strLength = strSymbols.length;\n }\n if (length >= strLength) {\n return string;\n }\n var end = length - stringSize(omission);\n if (end < 1) {\n return omission;\n }\n var result = strSymbols\n ? castSlice(strSymbols, 0, end).join('')\n : string.slice(0, end);\n\n if (separator === undefined) {\n return result + omission;\n }\n if (strSymbols) {\n end += (result.length - end);\n }\n if (isRegExp(separator)) {\n if (string.slice(end).search(separator)) {\n var match,\n substring = result;\n\n if (!separator.global) {\n separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');\n }\n separator.lastIndex = 0;\n while ((match = separator.exec(substring))) {\n var newEnd = match.index;\n }\n result = result.slice(0, newEnd === undefined ? end : newEnd);\n }\n } else if (string.indexOf(baseToString(separator), end) != end) {\n var index = result.lastIndexOf(separator);\n if (index > -1) {\n result = result.slice(0, index);\n }\n }\n return result + omission;\n }\n\n /**\n * The inverse of `_.escape`; this method converts the HTML entities\n * `&`, `<`, `>`, `"`, and `'` in `string` to\n * their corresponding characters.\n *\n * **Note:** No other HTML entities are unescaped. To unescape additional\n * HTML entities use a third-party library like [_he_](https://mths.be/he).\n *\n * @static\n * @memberOf _\n * @since 0.6.0\n * @category String\n * @param {string} [string=''] The string to unescape.\n * @returns {string} Returns the unescaped string.\n * @example\n *\n * _.unescape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function unescape(string) {\n string = toString(string);\n return (string && reHasEscapedHtml.test(string))\n ? string.replace(reEscapedHtml, unescapeHtmlChar)\n : string;\n }\n\n /**\n * Converts `string`, as space separated words, to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the upper cased string.\n * @example\n *\n * _.upperCase('--foo-bar');\n * // => 'FOO BAR'\n *\n * _.upperCase('fooBar');\n * // => 'FOO BAR'\n *\n * _.upperCase('__foo_bar__');\n * // => 'FOO BAR'\n */\n var upperCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toUpperCase();\n });\n\n /**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\n var upperFirst = createCaseFirst('toUpperCase');\n\n /**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\n function words(string, pattern, guard) {\n string = toString(string);\n pattern = guard ? undefined : pattern;\n\n if (pattern === undefined) {\n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n }\n return string.match(pattern) || [];\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Attempts to invoke `func`, returning either the result or the caught error\n * object. Any additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Function} func The function to attempt.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {*} Returns the `func` result or error object.\n * @example\n *\n * // Avoid throwing errors for invalid selectors.\n * var elements = _.attempt(function(selector) {\n * return document.querySelectorAll(selector);\n * }, '>_>');\n *\n * if (_.isError(elements)) {\n * elements = [];\n * }\n */\n var attempt = baseRest(function(func, args) {\n try {\n return apply(func, undefined, args);\n } catch (e) {\n return isError(e) ? e : new Error(e);\n }\n });\n\n /**\n * Binds methods of an object to the object itself, overwriting the existing\n * method.\n *\n * **Note:** This method doesn't set the \"length\" property of bound functions.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {Object} object The object to bind and assign the bound methods to.\n * @param {...(string|string[])} methodNames The object method names to bind.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var view = {\n * 'label': 'docs',\n * 'click': function() {\n * console.log('clicked ' + this.label);\n * }\n * };\n *\n * _.bindAll(view, ['click']);\n * jQuery(element).on('click', view.click);\n * // => Logs 'clicked docs' when clicked.\n */\n var bindAll = flatRest(function(object, methodNames) {\n arrayEach(methodNames, function(key) {\n key = toKey(key);\n baseAssignValue(object, key, bind(object[key], object));\n });\n return object;\n });\n\n /**\n * Creates a function that iterates over `pairs` and invokes the corresponding\n * function of the first predicate to return truthy. The predicate-function\n * pairs are invoked with the `this` binding and arguments of the created\n * function.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {Array} pairs The predicate-function pairs.\n * @returns {Function} Returns the new composite function.\n * @example\n *\n * var func = _.cond([\n * [_.matches({ 'a': 1 }), _.constant('matches A')],\n * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n * [_.stubTrue, _.constant('no match')]\n * ]);\n *\n * func({ 'a': 1, 'b': 2 });\n * // => 'matches A'\n *\n * func({ 'a': 0, 'b': 1 });\n * // => 'matches B'\n *\n * func({ 'a': '1', 'b': '2' });\n * // => 'no match'\n */\n function cond(pairs) {\n var length = pairs == null ? 0 : pairs.length,\n toIteratee = getIteratee();\n\n pairs = !length ? [] : arrayMap(pairs, function(pair) {\n if (typeof pair[1] != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return [toIteratee(pair[0]), pair[1]];\n });\n\n return baseRest(function(args) {\n var index = -1;\n while (++index < length) {\n var pair = pairs[index];\n if (apply(pair[0], this, args)) {\n return apply(pair[1], this, args);\n }\n }\n });\n }\n\n /**\n * Creates a function that invokes the predicate properties of `source` with\n * the corresponding property values of a given object, returning `true` if\n * all predicates return truthy, else `false`.\n *\n * **Note:** The created function is equivalent to `_.conformsTo` with\n * `source` partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 2, 'b': 1 },\n * { 'a': 1, 'b': 2 }\n * ];\n *\n * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\n * // => [{ 'a': 1, 'b': 2 }]\n */\n function conforms(source) {\n return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\n function constant(value) {\n return function() {\n return value;\n };\n }\n\n /**\n * Checks `value` to determine whether a default value should be returned in\n * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n * or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Util\n * @param {*} value The value to check.\n * @param {*} defaultValue The default value.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * _.defaultTo(1, 10);\n * // => 1\n *\n * _.defaultTo(undefined, 10);\n * // => 10\n */\n function defaultTo(value, defaultValue) {\n return (value == null || value !== value) ? defaultValue : value;\n }\n\n /**\n * Creates a function that returns the result of invoking the given functions\n * with the `this` binding of the created function, where each successive\n * invocation is supplied the return value of the previous.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flowRight\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flow([_.add, square]);\n * addSquare(1, 2);\n * // => 9\n */\n var flow = createFlow();\n\n /**\n * This method is like `_.flow` except that it creates a function that\n * invokes the given functions from right to left.\n *\n * @static\n * @since 3.0.0\n * @memberOf _\n * @category Util\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\n * @returns {Function} Returns the new composite function.\n * @see _.flow\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var addSquare = _.flowRight([square, _.add]);\n * addSquare(1, 2);\n * // => 9\n */\n var flowRight = createFlow(true);\n\n /**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\n function identity(value) {\n return value;\n }\n\n /**\n * Creates a function that invokes `func` with the arguments of the created\n * function. If `func` is a property name, the created function returns the\n * property value for a given element. If `func` is an array or object, the\n * created function returns `true` for elements that contain the equivalent\n * source properties, otherwise it returns `false`.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Util\n * @param {*} [func=_.identity] The value to convert to a callback.\n * @returns {Function} Returns the callback.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, _.iteratee(['user', 'fred']));\n * // => [{ 'user': 'fred', 'age': 40 }]\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, _.iteratee('user'));\n * // => ['barney', 'fred']\n *\n * // Create custom iteratee shorthands.\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n * return !_.isRegExp(func) ? iteratee(func) : function(string) {\n * return func.test(string);\n * };\n * });\n *\n * _.filter(['abc', 'def'], /ef/);\n * // => ['def']\n */\n function iteratee(func) {\n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that performs a partial deep comparison between a given\n * object and `source`, returning `true` if the given object has equivalent\n * property values, else `false`.\n *\n * **Note:** The created function is equivalent to `_.isMatch` with `source`\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * **Note:** Multiple values can be checked by combining several matchers\n * using `_.overSome`\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 1, 'b': 2, 'c': 3 },\n * { 'a': 4, 'b': 5, 'c': 6 }\n * ];\n *\n * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\n * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\n *\n * // Checking for several possible values\n * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));\n * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n */\n function matches(source) {\n return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that performs a partial deep comparison between the\n * value at `path` of a given object to `srcValue`, returning `true` if the\n * object value is equivalent, else `false`.\n *\n * **Note:** Partial comparisons will match empty array and empty object\n * `srcValue` values against any array or object value, respectively. See\n * `_.isEqual` for a list of supported value comparisons.\n *\n * **Note:** Multiple values can be checked by combining several matchers\n * using `_.overSome`\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n * @example\n *\n * var objects = [\n * { 'a': 1, 'b': 2, 'c': 3 },\n * { 'a': 4, 'b': 5, 'c': 6 }\n * ];\n *\n * _.find(objects, _.matchesProperty('a', 4));\n * // => { 'a': 4, 'b': 5, 'c': 6 }\n *\n * // Checking for several possible values\n * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));\n * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n */\n function matchesProperty(path, srcValue) {\n return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\n }\n\n /**\n * Creates a function that invokes the method at `path` of a given object.\n * Any additional arguments are provided to the invoked method.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Util\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Function} Returns the new invoker function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': _.constant(2) } },\n * { 'a': { 'b': _.constant(1) } }\n * ];\n *\n * _.map(objects, _.method('a.b'));\n * // => [2, 1]\n *\n * _.map(objects, _.method(['a', 'b']));\n * // => [2, 1]\n */\n var method = baseRest(function(path, args) {\n return function(object) {\n return baseInvoke(object, path, args);\n };\n });\n\n /**\n * The opposite of `_.method`; this method creates a function that invokes\n * the method at a given path of `object`. Any additional arguments are\n * provided to the invoked method.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Util\n * @param {Object} object The object to query.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {Function} Returns the new invoker function.\n * @example\n *\n * var array = _.times(3, _.constant),\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n * // => [2, 0]\n */\n var methodOf = baseRest(function(object, args) {\n return function(path) {\n return baseInvoke(object, path, args);\n };\n });\n\n /**\n * Adds all own enumerable string keyed function properties of a source\n * object to the destination object. If `object` is a function, then methods\n * are added to its prototype as well.\n *\n * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n * avoid conflicts caused by modifying the original.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {Function|Object} [object=lodash] The destination object.\n * @param {Object} source The object of functions to add.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\n * @returns {Function|Object} Returns `object`.\n * @example\n *\n * function vowels(string) {\n * return _.filter(string, function(v) {\n * return /[aeiou]/i.test(v);\n * });\n * }\n *\n * _.mixin({ 'vowels': vowels });\n * _.vowels('fred');\n * // => ['e']\n *\n * _('fred').vowels().value();\n * // => ['e']\n *\n * _.mixin({ 'vowels': vowels }, { 'chain': false });\n * _('fred').vowels();\n * // => ['e']\n */\n function mixin(object, source, options) {\n var props = keys(source),\n methodNames = baseFunctions(source, props);\n\n if (options == null &&\n !(isObject(source) && (methodNames.length || !props.length))) {\n options = source;\n source = object;\n object = this;\n methodNames = baseFunctions(source, keys(source));\n }\n var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\n isFunc = isFunction(object);\n\n arrayEach(methodNames, function(methodName) {\n var func = source[methodName];\n object[methodName] = func;\n if (isFunc) {\n object.prototype[methodName] = function() {\n var chainAll = this.__chain__;\n if (chain || chainAll) {\n var result = object(this.__wrapped__),\n actions = result.__actions__ = copyArray(this.__actions__);\n\n actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n result.__chain__ = chainAll;\n return result;\n }\n return func.apply(object, arrayPush([this.value()], arguments));\n };\n }\n });\n\n return object;\n }\n\n /**\n * Reverts the `_` variable to its previous value and returns a reference to\n * the `lodash` function.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @returns {Function} Returns the `lodash` function.\n * @example\n *\n * var lodash = _.noConflict();\n */\n function noConflict() {\n if (root._ === this) {\n root._ = oldDash;\n }\n return this;\n }\n\n /**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\n function noop() {\n // No operation performed.\n }\n\n /**\n * Creates a function that gets the argument at index `n`. If `n` is negative,\n * the nth argument from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {number} [n=0] The index of the argument to return.\n * @returns {Function} Returns the new pass-thru function.\n * @example\n *\n * var func = _.nthArg(1);\n * func('a', 'b', 'c', 'd');\n * // => 'b'\n *\n * var func = _.nthArg(-2);\n * func('a', 'b', 'c', 'd');\n * // => 'c'\n */\n function nthArg(n) {\n n = toInteger(n);\n return baseRest(function(args) {\n return baseNth(args, n);\n });\n }\n\n /**\n * Creates a function that invokes `iteratees` with the arguments it receives\n * and returns their results.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to invoke.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.over([Math.max, Math.min]);\n *\n * func(1, 2, 3, 4);\n * // => [4, 1]\n */\n var over = createOver(arrayMap);\n\n /**\n * Creates a function that checks if **all** of the `predicates` return\n * truthy when invoked with the arguments it receives.\n *\n * Following shorthands are possible for providing predicates.\n * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [predicates=[_.identity]]\n * The predicates to check.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.overEvery([Boolean, isFinite]);\n *\n * func('1');\n * // => true\n *\n * func(null);\n * // => false\n *\n * func(NaN);\n * // => false\n */\n var overEvery = createOver(arrayEvery);\n\n /**\n * Creates a function that checks if **any** of the `predicates` return\n * truthy when invoked with the arguments it receives.\n *\n * Following shorthands are possible for providing predicates.\n * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {...(Function|Function[])} [predicates=[_.identity]]\n * The predicates to check.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var func = _.overSome([Boolean, isFinite]);\n *\n * func('1');\n * // => true\n *\n * func(null);\n * // => true\n *\n * func(NaN);\n * // => false\n *\n * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])\n * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])\n */\n var overSome = createOver(arraySome);\n\n /**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\n function property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n }\n\n /**\n * The opposite of `_.property`; this method creates a function that returns\n * the value at a given path of `object`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Util\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var array = [0, 1, 2],\n * object = { 'a': array, 'b': array, 'c': array };\n *\n * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n * // => [2, 0]\n *\n * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n * // => [2, 0]\n */\n function propertyOf(object) {\n return function(path) {\n return object == null ? undefined : baseGet(object, path);\n };\n }\n\n /**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\n var range = createRange();\n\n /**\n * This method is like `_.range` except that it populates values in\n * descending order.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.range\n * @example\n *\n * _.rangeRight(4);\n * // => [3, 2, 1, 0]\n *\n * _.rangeRight(-4);\n * // => [-3, -2, -1, 0]\n *\n * _.rangeRight(1, 5);\n * // => [4, 3, 2, 1]\n *\n * _.rangeRight(0, 20, 5);\n * // => [15, 10, 5, 0]\n *\n * _.rangeRight(0, -4, -1);\n * // => [-3, -2, -1, 0]\n *\n * _.rangeRight(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.rangeRight(0);\n * // => []\n */\n var rangeRight = createRange(true);\n\n /**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\n function stubArray() {\n return [];\n }\n\n /**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\n function stubFalse() {\n return false;\n }\n\n /**\n * This method returns a new empty object.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Object} Returns the new empty object.\n * @example\n *\n * var objects = _.times(2, _.stubObject);\n *\n * console.log(objects);\n * // => [{}, {}]\n *\n * console.log(objects[0] === objects[1]);\n * // => false\n */\n function stubObject() {\n return {};\n }\n\n /**\n * This method returns an empty string.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {string} Returns the empty string.\n * @example\n *\n * _.times(2, _.stubString);\n * // => ['', '']\n */\n function stubString() {\n return '';\n }\n\n /**\n * This method returns `true`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `true`.\n * @example\n *\n * _.times(2, _.stubTrue);\n * // => [true, true]\n */\n function stubTrue() {\n return true;\n }\n\n /**\n * Invokes the iteratee `n` times, returning an array of the results of\n * each invocation. The iteratee is invoked with one argument; (index).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.times(3, String);\n * // => ['0', '1', '2']\n *\n * _.times(4, _.constant(0));\n * // => [0, 0, 0, 0]\n */\n function times(n, iteratee) {\n n = toInteger(n);\n if (n < 1 || n > MAX_SAFE_INTEGER) {\n return [];\n }\n var index = MAX_ARRAY_LENGTH,\n length = nativeMin(n, MAX_ARRAY_LENGTH);\n\n iteratee = getIteratee(iteratee);\n n -= MAX_ARRAY_LENGTH;\n\n var result = baseTimes(length, iteratee);\n while (++index < n) {\n iteratee(index);\n }\n return result;\n }\n\n /**\n * Converts `value` to a property path array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Util\n * @param {*} value The value to convert.\n * @returns {Array} Returns the new property path array.\n * @example\n *\n * _.toPath('a.b.c');\n * // => ['a', 'b', 'c']\n *\n * _.toPath('a[0].b.c');\n * // => ['a', '0', 'b', 'c']\n */\n function toPath(value) {\n if (isArray(value)) {\n return arrayMap(value, toKey);\n }\n return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n }\n\n /**\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {string} [prefix=''] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */\n function uniqueId(prefix) {\n var id = ++idCounter;\n return toString(prefix) + id;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Adds two numbers.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {number} augend The first number in an addition.\n * @param {number} addend The second number in an addition.\n * @returns {number} Returns the total.\n * @example\n *\n * _.add(6, 4);\n * // => 10\n */\n var add = createMathOperation(function(augend, addend) {\n return augend + addend;\n }, 0);\n\n /**\n * Computes `number` rounded up to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round up.\n * @param {number} [precision=0] The precision to round up to.\n * @returns {number} Returns the rounded up number.\n * @example\n *\n * _.ceil(4.006);\n * // => 5\n *\n * _.ceil(6.004, 2);\n * // => 6.01\n *\n * _.ceil(6040, -2);\n * // => 6100\n */\n var ceil = createRound('ceil');\n\n /**\n * Divide two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {number} dividend The first number in a division.\n * @param {number} divisor The second number in a division.\n * @returns {number} Returns the quotient.\n * @example\n *\n * _.divide(6, 4);\n * // => 1.5\n */\n var divide = createMathOperation(function(dividend, divisor) {\n return dividend / divisor;\n }, 1);\n\n /**\n * Computes `number` rounded down to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round down.\n * @param {number} [precision=0] The precision to round down to.\n * @returns {number} Returns the rounded down number.\n * @example\n *\n * _.floor(4.006);\n * // => 4\n *\n * _.floor(0.046, 2);\n * // => 0.04\n *\n * _.floor(4060, -2);\n * // => 4000\n */\n var floor = createRound('floor');\n\n /**\n * Computes the maximum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * _.max([4, 2, 8, 6]);\n * // => 8\n *\n * _.max([]);\n * // => undefined\n */\n function max(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseGt)\n : undefined;\n }\n\n /**\n * This method is like `_.max` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\n function maxBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)\n : undefined;\n }\n\n /**\n * Computes the mean of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the mean.\n * @example\n *\n * _.mean([4, 2, 8, 6]);\n * // => 5\n */\n function mean(array) {\n return baseMean(array, identity);\n }\n\n /**\n * This method is like `_.mean` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the value to be averaged.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the mean.\n * @example\n *\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n *\n * _.meanBy(objects, function(o) { return o.n; });\n * // => 5\n *\n * // The `_.property` iteratee shorthand.\n * _.meanBy(objects, 'n');\n * // => 5\n */\n function meanBy(array, iteratee) {\n return baseMean(array, getIteratee(iteratee, 2));\n }\n\n /**\n * Computes the minimum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * _.min([4, 2, 8, 6]);\n * // => 2\n *\n * _.min([]);\n * // => undefined\n */\n function min(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseLt)\n : undefined;\n }\n\n /**\n * This method is like `_.min` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * the value is ranked. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {*} Returns the minimum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * _.minBy(objects, function(o) { return o.n; });\n * // => { 'n': 1 }\n *\n * // The `_.property` iteratee shorthand.\n * _.minBy(objects, 'n');\n * // => { 'n': 1 }\n */\n function minBy(array, iteratee) {\n return (array && array.length)\n ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)\n : undefined;\n }\n\n /**\n * Multiply two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {number} multiplier The first number in a multiplication.\n * @param {number} multiplicand The second number in a multiplication.\n * @returns {number} Returns the product.\n * @example\n *\n * _.multiply(6, 4);\n * // => 24\n */\n var multiply = createMathOperation(function(multiplier, multiplicand) {\n return multiplier * multiplicand;\n }, 1);\n\n /**\n * Computes `number` rounded to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round.\n * @param {number} [precision=0] The precision to round to.\n * @returns {number} Returns the rounded number.\n * @example\n *\n * _.round(4.006);\n * // => 4\n *\n * _.round(4.006, 2);\n * // => 4.01\n *\n * _.round(4060, -2);\n * // => 4100\n */\n var round = createRound('round');\n\n /**\n * Subtract two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {number} minuend The first number in a subtraction.\n * @param {number} subtrahend The second number in a subtraction.\n * @returns {number} Returns the difference.\n * @example\n *\n * _.subtract(6, 4);\n * // => 2\n */\n var subtract = createMathOperation(function(minuend, subtrahend) {\n return minuend - subtrahend;\n }, 0);\n\n /**\n * Computes the sum of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the sum.\n * @example\n *\n * _.sum([4, 2, 8, 6]);\n * // => 20\n */\n function sum(array) {\n return (array && array.length)\n ? baseSum(array, identity)\n : 0;\n }\n\n /**\n * This method is like `_.sum` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the value to be summed.\n * The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the sum.\n * @example\n *\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n *\n * _.sumBy(objects, function(o) { return o.n; });\n * // => 20\n *\n * // The `_.property` iteratee shorthand.\n * _.sumBy(objects, 'n');\n * // => 20\n */\n function sumBy(array, iteratee) {\n return (array && array.length)\n ? baseSum(array, getIteratee(iteratee, 2))\n : 0;\n }\n\n /*------------------------------------------------------------------------*/\n\n // Add methods that return wrapped values in chain sequences.\n lodash.after = after;\n lodash.ary = ary;\n lodash.assign = assign;\n lodash.assignIn = assignIn;\n lodash.assignInWith = assignInWith;\n lodash.assignWith = assignWith;\n lodash.at = at;\n lodash.before = before;\n lodash.bind = bind;\n lodash.bindAll = bindAll;\n lodash.bindKey = bindKey;\n lodash.castArray = castArray;\n lodash.chain = chain;\n lodash.chunk = chunk;\n lodash.compact = compact;\n lodash.concat = concat;\n lodash.cond = cond;\n lodash.conforms = conforms;\n lodash.constant = constant;\n lodash.countBy = countBy;\n lodash.create = create;\n lodash.curry = curry;\n lodash.curryRight = curryRight;\n lodash.debounce = debounce;\n lodash.defaults = defaults;\n lodash.defaultsDeep = defaultsDeep;\n lodash.defer = defer;\n lodash.delay = delay;\n lodash.difference = difference;\n lodash.differenceBy = differenceBy;\n lodash.differenceWith = differenceWith;\n lodash.drop = drop;\n lodash.dropRight = dropRight;\n lodash.dropRightWhile = dropRightWhile;\n lodash.dropWhile = dropWhile;\n lodash.fill = fill;\n lodash.filter = filter;\n lodash.flatMap = flatMap;\n lodash.flatMapDeep = flatMapDeep;\n lodash.flatMapDepth = flatMapDepth;\n lodash.flatten = flatten;\n lodash.flattenDeep = flattenDeep;\n lodash.flattenDepth = flattenDepth;\n lodash.flip = flip;\n lodash.flow = flow;\n lodash.flowRight = flowRight;\n lodash.fromPairs = fromPairs;\n lodash.functions = functions;\n lodash.functionsIn = functionsIn;\n lodash.groupBy = groupBy;\n lodash.initial = initial;\n lodash.intersection = intersection;\n lodash.intersectionBy = intersectionBy;\n lodash.intersectionWith = intersectionWith;\n lodash.invert = invert;\n lodash.invertBy = invertBy;\n lodash.invokeMap = invokeMap;\n lodash.iteratee = iteratee;\n lodash.keyBy = keyBy;\n lodash.keys = keys;\n lodash.keysIn = keysIn;\n lodash.map = map;\n lodash.mapKeys = mapKeys;\n lodash.mapValues = mapValues;\n lodash.matches = matches;\n lodash.matchesProperty = matchesProperty;\n lodash.memoize = memoize;\n lodash.merge = merge;\n lodash.mergeWith = mergeWith;\n lodash.method = method;\n lodash.methodOf = methodOf;\n lodash.mixin = mixin;\n lodash.negate = negate;\n lodash.nthArg = nthArg;\n lodash.omit = omit;\n lodash.omitBy = omitBy;\n lodash.once = once;\n lodash.orderBy = orderBy;\n lodash.over = over;\n lodash.overArgs = overArgs;\n lodash.overEvery = overEvery;\n lodash.overSome = overSome;\n lodash.partial = partial;\n lodash.partialRight = partialRight;\n lodash.partition = partition;\n lodash.pick = pick;\n lodash.pickBy = pickBy;\n lodash.property = property;\n lodash.propertyOf = propertyOf;\n lodash.pull = pull;\n lodash.pullAll = pullAll;\n lodash.pullAllBy = pullAllBy;\n lodash.pullAllWith = pullAllWith;\n lodash.pullAt = pullAt;\n lodash.range = range;\n lodash.rangeRight = rangeRight;\n lodash.rearg = rearg;\n lodash.reject = reject;\n lodash.remove = remove;\n lodash.rest = rest;\n lodash.reverse = reverse;\n lodash.sampleSize = sampleSize;\n lodash.set = set;\n lodash.setWith = setWith;\n lodash.shuffle = shuffle;\n lodash.slice = slice;\n lodash.sortBy = sortBy;\n lodash.sortedUniq = sortedUniq;\n lodash.sortedUniqBy = sortedUniqBy;\n lodash.split = split;\n lodash.spread = spread;\n lodash.tail = tail;\n lodash.take = take;\n lodash.takeRight = takeRight;\n lodash.takeRightWhile = takeRightWhile;\n lodash.takeWhile = takeWhile;\n lodash.tap = tap;\n lodash.throttle = throttle;\n lodash.thru = thru;\n lodash.toArray = toArray;\n lodash.toPairs = toPairs;\n lodash.toPairsIn = toPairsIn;\n lodash.toPath = toPath;\n lodash.toPlainObject = toPlainObject;\n lodash.transform = transform;\n lodash.unary = unary;\n lodash.union = union;\n lodash.unionBy = unionBy;\n lodash.unionWith = unionWith;\n lodash.uniq = uniq;\n lodash.uniqBy = uniqBy;\n lodash.uniqWith = uniqWith;\n lodash.unset = unset;\n lodash.unzip = unzip;\n lodash.unzipWith = unzipWith;\n lodash.update = update;\n lodash.updateWith = updateWith;\n lodash.values = values;\n lodash.valuesIn = valuesIn;\n lodash.without = without;\n lodash.words = words;\n lodash.wrap = wrap;\n lodash.xor = xor;\n lodash.xorBy = xorBy;\n lodash.xorWith = xorWith;\n lodash.zip = zip;\n lodash.zipObject = zipObject;\n lodash.zipObjectDeep = zipObjectDeep;\n lodash.zipWith = zipWith;\n\n // Add aliases.\n lodash.entries = toPairs;\n lodash.entriesIn = toPairsIn;\n lodash.extend = assignIn;\n lodash.extendWith = assignInWith;\n\n // Add methods to `lodash.prototype`.\n mixin(lodash, lodash);\n\n /*------------------------------------------------------------------------*/\n\n // Add methods that return unwrapped values in chain sequences.\n lodash.add = add;\n lodash.attempt = attempt;\n lodash.camelCase = camelCase;\n lodash.capitalize = capitalize;\n lodash.ceil = ceil;\n lodash.clamp = clamp;\n lodash.clone = clone;\n lodash.cloneDeep = cloneDeep;\n lodash.cloneDeepWith = cloneDeepWith;\n lodash.cloneWith = cloneWith;\n lodash.conformsTo = conformsTo;\n lodash.deburr = deburr;\n lodash.defaultTo = defaultTo;\n lodash.divide = divide;\n lodash.endsWith = endsWith;\n lodash.eq = eq;\n lodash.escape = escape;\n lodash.escapeRegExp = escapeRegExp;\n lodash.every = every;\n lodash.find = find;\n lodash.findIndex = findIndex;\n lodash.findKey = findKey;\n lodash.findLast = findLast;\n lodash.findLastIndex = findLastIndex;\n lodash.findLastKey = findLastKey;\n lodash.floor = floor;\n lodash.forEach = forEach;\n lodash.forEachRight = forEachRight;\n lodash.forIn = forIn;\n lodash.forInRight = forInRight;\n lodash.forOwn = forOwn;\n lodash.forOwnRight = forOwnRight;\n lodash.get = get;\n lodash.gt = gt;\n lodash.gte = gte;\n lodash.has = has;\n lodash.hasIn = hasIn;\n lodash.head = head;\n lodash.identity = identity;\n lodash.includes = includes;\n lodash.indexOf = indexOf;\n lodash.inRange = inRange;\n lodash.invoke = invoke;\n lodash.isArguments = isArguments;\n lodash.isArray = isArray;\n lodash.isArrayBuffer = isArrayBuffer;\n lodash.isArrayLike = isArrayLike;\n lodash.isArrayLikeObject = isArrayLikeObject;\n lodash.isBoolean = isBoolean;\n lodash.isBuffer = isBuffer;\n lodash.isDate = isDate;\n lodash.isElement = isElement;\n lodash.isEmpty = isEmpty;\n lodash.isEqual = isEqual;\n lodash.isEqualWith = isEqualWith;\n lodash.isError = isError;\n lodash.isFinite = isFinite;\n lodash.isFunction = isFunction;\n lodash.isInteger = isInteger;\n lodash.isLength = isLength;\n lodash.isMap = isMap;\n lodash.isMatch = isMatch;\n lodash.isMatchWith = isMatchWith;\n lodash.isNaN = isNaN;\n lodash.isNative = isNative;\n lodash.isNil = isNil;\n lodash.isNull = isNull;\n lodash.isNumber = isNumber;\n lodash.isObject = isObject;\n lodash.isObjectLike = isObjectLike;\n lodash.isPlainObject = isPlainObject;\n lodash.isRegExp = isRegExp;\n lodash.isSafeInteger = isSafeInteger;\n lodash.isSet = isSet;\n lodash.isString = isString;\n lodash.isSymbol = isSymbol;\n lodash.isTypedArray = isTypedArray;\n lodash.isUndefined = isUndefined;\n lodash.isWeakMap = isWeakMap;\n lodash.isWeakSet = isWeakSet;\n lodash.join = join;\n lodash.kebabCase = kebabCase;\n lodash.last = last;\n lodash.lastIndexOf = lastIndexOf;\n lodash.lowerCase = lowerCase;\n lodash.lowerFirst = lowerFirst;\n lodash.lt = lt;\n lodash.lte = lte;\n lodash.max = max;\n lodash.maxBy = maxBy;\n lodash.mean = mean;\n lodash.meanBy = meanBy;\n lodash.min = min;\n lodash.minBy = minBy;\n lodash.stubArray = stubArray;\n lodash.stubFalse = stubFalse;\n lodash.stubObject = stubObject;\n lodash.stubString = stubString;\n lodash.stubTrue = stubTrue;\n lodash.multiply = multiply;\n lodash.nth = nth;\n lodash.noConflict = noConflict;\n lodash.noop = noop;\n lodash.now = now;\n lodash.pad = pad;\n lodash.padEnd = padEnd;\n lodash.padStart = padStart;\n lodash.parseInt = parseInt;\n lodash.random = random;\n lodash.reduce = reduce;\n lodash.reduceRight = reduceRight;\n lodash.repeat = repeat;\n lodash.replace = replace;\n lodash.result = result;\n lodash.round = round;\n lodash.runInContext = runInContext;\n lodash.sample = sample;\n lodash.size = size;\n lodash.snakeCase = snakeCase;\n lodash.some = some;\n lodash.sortedIndex = sortedIndex;\n lodash.sortedIndexBy = sortedIndexBy;\n lodash.sortedIndexOf = sortedIndexOf;\n lodash.sortedLastIndex = sortedLastIndex;\n lodash.sortedLastIndexBy = sortedLastIndexBy;\n lodash.sortedLastIndexOf = sortedLastIndexOf;\n lodash.startCase = startCase;\n lodash.startsWith = startsWith;\n lodash.subtract = subtract;\n lodash.sum = sum;\n lodash.sumBy = sumBy;\n lodash.template = template;\n lodash.times = times;\n lodash.toFinite = toFinite;\n lodash.toInteger = toInteger;\n lodash.toLength = toLength;\n lodash.toLower = toLower;\n lodash.toNumber = toNumber;\n lodash.toSafeInteger = toSafeInteger;\n lodash.toString = toString;\n lodash.toUpper = toUpper;\n lodash.trim = trim;\n lodash.trimEnd = trimEnd;\n lodash.trimStart = trimStart;\n lodash.truncate = truncate;\n lodash.unescape = unescape;\n lodash.uniqueId = uniqueId;\n lodash.upperCase = upperCase;\n lodash.upperFirst = upperFirst;\n\n // Add aliases.\n lodash.each = forEach;\n lodash.eachRight = forEachRight;\n lodash.first = head;\n\n mixin(lodash, (function() {\n var source = {};\n baseForOwn(lodash, function(func, methodName) {\n if (!hasOwnProperty.call(lodash.prototype, methodName)) {\n source[methodName] = func;\n }\n });\n return source;\n }()), { 'chain': false });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The semantic version number.\n *\n * @static\n * @memberOf _\n * @type {string}\n */\n lodash.VERSION = VERSION;\n\n // Assign default placeholders.\n arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\n lodash[methodName].placeholder = lodash;\n });\n\n // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\n arrayEach(['drop', 'take'], function(methodName, index) {\n LazyWrapper.prototype[methodName] = function(n) {\n n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\n\n var result = (this.__filtered__ && !index)\n ? new LazyWrapper(this)\n : this.clone();\n\n if (result.__filtered__) {\n result.__takeCount__ = nativeMin(n, result.__takeCount__);\n } else {\n result.__views__.push({\n 'size': nativeMin(n, MAX_ARRAY_LENGTH),\n 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\n });\n }\n return result;\n };\n\n LazyWrapper.prototype[methodName + 'Right'] = function(n) {\n return this.reverse()[methodName](n).reverse();\n };\n });\n\n // Add `LazyWrapper` methods that accept an `iteratee` value.\n arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\n var type = index + 1,\n isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\n\n LazyWrapper.prototype[methodName] = function(iteratee) {\n var result = this.clone();\n result.__iteratees__.push({\n 'iteratee': getIteratee(iteratee, 3),\n 'type': type\n });\n result.__filtered__ = result.__filtered__ || isFilter;\n return result;\n };\n });\n\n // Add `LazyWrapper` methods for `_.head` and `_.last`.\n arrayEach(['head', 'last'], function(methodName, index) {\n var takeName = 'take' + (index ? 'Right' : '');\n\n LazyWrapper.prototype[methodName] = function() {\n return this[takeName](1).value()[0];\n };\n });\n\n // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\n arrayEach(['initial', 'tail'], function(methodName, index) {\n var dropName = 'drop' + (index ? '' : 'Right');\n\n LazyWrapper.prototype[methodName] = function() {\n return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\n };\n });\n\n LazyWrapper.prototype.compact = function() {\n return this.filter(identity);\n };\n\n LazyWrapper.prototype.find = function(predicate) {\n return this.filter(predicate).head();\n };\n\n LazyWrapper.prototype.findLast = function(predicate) {\n return this.reverse().find(predicate);\n };\n\n LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\n if (typeof path == 'function') {\n return new LazyWrapper(this);\n }\n return this.map(function(value) {\n return baseInvoke(value, path, args);\n });\n });\n\n LazyWrapper.prototype.reject = function(predicate) {\n return this.filter(negate(getIteratee(predicate)));\n };\n\n LazyWrapper.prototype.slice = function(start, end) {\n start = toInteger(start);\n\n var result = this;\n if (result.__filtered__ && (start > 0 || end < 0)) {\n return new LazyWrapper(result);\n }\n if (start < 0) {\n result = result.takeRight(-start);\n } else if (start) {\n result = result.drop(start);\n }\n if (end !== undefined) {\n end = toInteger(end);\n result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n }\n return result;\n };\n\n LazyWrapper.prototype.takeRightWhile = function(predicate) {\n return this.reverse().takeWhile(predicate).reverse();\n };\n\n LazyWrapper.prototype.toArray = function() {\n return this.take(MAX_ARRAY_LENGTH);\n };\n\n // Add `LazyWrapper` methods to `lodash.prototype`.\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\n isTaker = /^(?:head|last)$/.test(methodName),\n lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\n retUnwrapped = isTaker || /^find/.test(methodName);\n\n if (!lodashFunc) {\n return;\n }\n lodash.prototype[methodName] = function() {\n var value = this.__wrapped__,\n args = isTaker ? [1] : arguments,\n isLazy = value instanceof LazyWrapper,\n iteratee = args[0],\n useLazy = isLazy || isArray(value);\n\n var interceptor = function(value) {\n var result = lodashFunc.apply(lodash, arrayPush([value], args));\n return (isTaker && chainAll) ? result[0] : result;\n };\n\n if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n isLazy = useLazy = false;\n }\n var chainAll = this.__chain__,\n isHybrid = !!this.__actions__.length,\n isUnwrapped = retUnwrapped && !chainAll,\n onlyLazy = isLazy && !isHybrid;\n\n if (!retUnwrapped && useLazy) {\n value = onlyLazy ? value : new LazyWrapper(this);\n var result = func.apply(value, args);\n result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n return new LodashWrapper(result, chainAll);\n }\n if (isUnwrapped && onlyLazy) {\n return func.apply(this, args);\n }\n result = this.thru(interceptor);\n return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\n };\n });\n\n // Add `Array` methods to `lodash.prototype`.\n arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\n var func = arrayProto[methodName],\n chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n retUnwrapped = /^(?:pop|shift)$/.test(methodName);\n\n lodash.prototype[methodName] = function() {\n var args = arguments;\n if (retUnwrapped && !this.__chain__) {\n var value = this.value();\n return func.apply(isArray(value) ? value : [], args);\n }\n return this[chainName](function(value) {\n return func.apply(isArray(value) ? value : [], args);\n });\n };\n });\n\n // Map minified method names to their real names.\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n var lodashFunc = lodash[methodName];\n if (lodashFunc) {\n var key = lodashFunc.name + '';\n if (!hasOwnProperty.call(realNames, key)) {\n realNames[key] = [];\n }\n realNames[key].push({ 'name': methodName, 'func': lodashFunc });\n }\n });\n\n realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\n 'name': 'wrapper',\n 'func': undefined\n }];\n\n // Add methods to `LazyWrapper`.\n LazyWrapper.prototype.clone = lazyClone;\n LazyWrapper.prototype.reverse = lazyReverse;\n LazyWrapper.prototype.value = lazyValue;\n\n // Add chain sequence methods to the `lodash` wrapper.\n lodash.prototype.at = wrapperAt;\n lodash.prototype.chain = wrapperChain;\n lodash.prototype.commit = wrapperCommit;\n lodash.prototype.next = wrapperNext;\n lodash.prototype.plant = wrapperPlant;\n lodash.prototype.reverse = wrapperReverse;\n lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;\n\n // Add lazy aliases.\n lodash.prototype.first = lodash.prototype.head;\n\n if (symIterator) {\n lodash.prototype[symIterator] = wrapperToIterator;\n }\n return lodash;\n });\n\n /*--------------------------------------------------------------------------*/\n\n // Export lodash.\n var _ = runInContext();\n\n // Some AMD build optimizers, like r.js, check for condition patterns like:\n if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n // Expose Lodash on the global object to prevent errors when Lodash is\n // loaded by a script tag in the presence of an AMD loader.\n // See http://requirejs.org/docs/errors.html#mismatch for more details.\n // Use `_.noConflict` to remove Lodash from the global object.\n root._ = _;\n\n // Define as an anonymous module so, through path mapping, it can be\n // referenced as the \"underscore\" module.\n define(function() {\n return _;\n });\n }\n // Check for `exports` after `define` in case a build optimizer adds it.\n else if (freeModule) {\n // Export for Node.js.\n (freeModule.exports = _)._ = _;\n // Export for CommonJS support.\n freeExports._ = _;\n }\n else {\n // Export to the global object.\n root._ = _;\n }\n}.call(this));\n","import { Subject } from './Subject';\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 !subscription.closed && subscriber.next(this._value);\n return subscription;\n }\n getValue() {\n const { hasError, thrownError, _value } = this;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n }\n next(value) {\n super.next((this._value = value));\n }\n}\n","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nexport class Observable {\n constructor(subscribe) {\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 subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(() => {\n const { operator, source } = this;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n this._subscribe(subscriber)\n :\n this._trySubscribe(subscriber));\n });\n return subscriber;\n }\n _trySubscribe(sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n }\n forEach(next, promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n this.subscribe(subscriber);\n });\n }\n _subscribe(subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n }\n [Symbol_observable]() {\n return this;\n }\n pipe(...operations) {\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 var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n","import { Subject } from './Subject';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class ReplaySubject extends Subject {\n constructor(_bufferSize = Infinity, _windowTime = Infinity, _timestampProvider = dateTimestampProvider) {\n super();\n this._bufferSize = _bufferSize;\n this._windowTime = _windowTime;\n this._timestampProvider = _timestampProvider;\n this._buffer = [];\n this._infiniteTimeWindow = true;\n this._infiniteTimeWindow = _windowTime === Infinity;\n this._bufferSize = Math.max(1, _bufferSize);\n this._windowTime = Math.max(1, _windowTime);\n }\n next(value) {\n const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n super.next(value);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._trimBuffer();\n const subscription = this._innerSubscribe(subscriber);\n const { _infiniteTimeWindow, _buffer } = this;\n const copy = _buffer.slice();\n for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i]);\n }\n this._checkFinalizedStatuses(subscriber);\n return subscription;\n }\n _trimBuffer() {\n const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this;\n const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n if (!_infiniteTimeWindow) {\n const now = _timestampProvider.now();\n let last = 0;\n for (let i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n }\n}\n","import { createErrorClass } from './createErrorClass';\nexport const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n});\n","import { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nexport class Subject extends Observable {\n constructor() {\n super();\n this.closed = false;\n this.currentObservers = null;\n this.observers = [];\n this.isStopped = false;\n this.hasError = false;\n this.thrownError = null;\n }\n lift(operator) {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n }\n _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n next(value) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n error(err) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n }\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n }\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n }\n get observed() {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n }\n _trySubscribe(subscriber) {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n _innerSubscribe(subscriber) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n _checkFinalizedStatuses(subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\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 var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n }\n error(err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n }\n complete() {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n _subscribe(subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n }\n}\n","export const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))();\nexport function errorNotification(error) {\n return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n return {\n kind,\n value,\n error,\n };\n}\n","import { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nexport class Subscriber extends Subscription {\n constructor(destination) {\n super();\n this.isStopped = false;\n if (destination) {\n this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(this);\n }\n }\n else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n static create(next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n }\n next(value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n }\n error(err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n }\n complete() {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n }\n unsubscribe() {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null;\n }\n }\n _next(value) {\n this.destination.next(value);\n }\n _error(err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n _complete() {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n }\n}\nconst _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nclass ConsumerObserver {\n constructor(partialObserver) {\n this.partialObserver = partialObserver;\n }\n next(value) {\n const { partialObserver } = this;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n error(err) {\n const { partialObserver } = this;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n else {\n handleUnhandledError(err);\n }\n }\n complete() {\n const { partialObserver } = this;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n}\nexport class SafeSubscriber extends Subscriber {\n constructor(observerOrNext, error, complete) {\n super();\n let partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined,\n };\n }\n else {\n let context;\n if (this && config.useDeprecatedNextContext) {\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context),\n error: observerOrNext.error && bind(observerOrNext.error, context),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context),\n };\n }\n else {\n partialObserver = observerOrNext;\n }\n }\n this.destination = new ConsumerObserver(partialObserver);\n }\n}\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n }\n else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n const { onStoppedNotification } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\nexport const EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n","import { createErrorClass } from './createErrorClass';\nexport const UnsubscriptionError = createErrorClass((_super) => function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}`\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n});\n","import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nexport class Subscription {\n constructor(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n unsubscribe() {\n let errors;\n if (!this.closed) {\n this.closed = true;\n const { _parentage } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n const { initialTeardown: initialFinalizer } = this;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n const { _finalizers } = this;\n if (_finalizers) {\n this._finalizers = null;\n for (const finalizer of _finalizers) {\n try {\n execFinalizer(finalizer);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n add(teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n }\n _hasParent(parent) {\n const { _parentage } = this;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n }\n _addParent(parent) {\n const { _parentage } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n _removeParent(parent) {\n const { _parentage } = this;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n remove(teardown) {\n const { _finalizers } = this;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\nSubscription.EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n})();\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n }\n else {\n finalizer.unsubscribe();\n }\n}\n","export const config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { from } from './from';\nimport { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { popResultSelector, popScheduler } from '../util/args';\nimport { createObject } from '../util/createObject';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function combineLatest(...args) {\n const scheduler = popScheduler(args);\n const resultSelector = popResultSelector(args);\n const { args: observables, keys } = argsArgArrayOrObject(args);\n if (observables.length === 0) {\n return from([], scheduler);\n }\n const result = new Observable(combineLatestInit(observables, scheduler, keys\n ?\n (values) => createObject(keys, values)\n :\n identity));\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\nexport function combineLatestInit(observables, scheduler, valueTransform = identity) {\n return (subscriber) => {\n maybeSchedule(scheduler, () => {\n const { length } = observables;\n const values = new Array(length);\n let active = length;\n let remainingFirstValues = length;\n for (let i = 0; i < length; i++) {\n maybeSchedule(scheduler, () => {\n const source = from(observables[i], scheduler);\n let hasFirstValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n values[i] = value;\n if (!hasFirstValue) {\n hasFirstValue = true;\n remainingFirstValues--;\n }\n if (!remainingFirstValues) {\n subscriber.next(valueTransform(values.slice()));\n }\n }, () => {\n if (!--active) {\n subscriber.complete();\n }\n }));\n }, subscriber);\n }\n }, subscriber);\n };\n}\nfunction maybeSchedule(scheduler, execute, subscription) {\n if (scheduler) {\n executeSchedule(subscription, scheduler, execute);\n }\n else {\n execute();\n }\n}\n","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat(...args) {\n return concatAll()(from(args, popScheduler(args)));\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 { operate } from '../util/lift';\nexport function subscribeOn(scheduler, delay = 0) {\n return operate((source, subscriber) => {\n subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay));\n });\n}\n","import { Observable } from '../Observable';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleAsyncIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n return new Observable((subscriber) => {\n executeSchedule(subscriber, scheduler, () => {\n const iterator = input[Symbol.asyncIterator]();\n executeSchedule(subscriber, scheduler, () => {\n iterator.next().then((result) => {\n if (result.done) {\n subscriber.complete();\n }\n else {\n subscriber.next(result.value);\n }\n });\n }, 0, true);\n });\n });\n}\n","import { scheduled } from '../scheduled/scheduled';\nimport { innerFrom } from './innerFrom';\nexport function from(input, scheduler) {\n return scheduler ? scheduled(input, scheduler) : innerFrom(input);\n}\n","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isReadableStreamLike } from '../util/isReadableStreamLike';\nimport { scheduleReadableStreamLike } from './scheduleReadableStreamLike';\nexport function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n if (isAsyncIterable(input)) {\n return scheduleAsyncIterable(input, scheduler);\n }\n if (isIterable(input)) {\n return scheduleIterable(input, scheduler);\n }\n if (isReadableStreamLike(input)) {\n return scheduleReadableStreamLike(input, scheduler);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function scheduleObservable(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n","import { Observable } from '../Observable';\nexport function scheduleArray(input, scheduler) {\n return new Observable((subscriber) => {\n let i = 0;\n return scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n }\n else {\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n this.schedule();\n }\n }\n });\n });\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function schedulePromise(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n","import { Observable } from '../Observable';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from '../util/isFunction';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleIterable(input, scheduler) {\n return new Observable((subscriber) => {\n let iterator;\n executeSchedule(subscriber, scheduler, () => {\n iterator = input[Symbol_iterator]();\n executeSchedule(subscriber, scheduler, () => {\n let value;\n let done;\n try {\n ({ value, done } = iterator.next());\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 }\n }, 0, true);\n });\n return () => isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return();\n });\n}\n","import { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nexport function scheduleReadableStreamLike(input, scheduler) {\n return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);\n}\n","import { __asyncValues, __awaiter } from \"tslib\";\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { Observable } from '../Observable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\nimport { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function innerFrom(input) {\n if (input instanceof Observable) {\n return input;\n }\n if (input != null) {\n if (isInteropObservable(input)) {\n return fromInteropObservable(input);\n }\n if (isArrayLike(input)) {\n return fromArrayLike(input);\n }\n if (isPromise(input)) {\n return fromPromise(input);\n }\n if (isAsyncIterable(input)) {\n return fromAsyncIterable(input);\n }\n if (isIterable(input)) {\n return fromIterable(input);\n }\n if (isReadableStreamLike(input)) {\n return fromReadableStreamLike(input);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\nexport function fromInteropObservable(obj) {\n return new Observable((subscriber) => {\n const obs = obj[Symbol_observable]();\n if (isFunction(obs.subscribe)) {\n return obs.subscribe(subscriber);\n }\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n });\n}\nexport function fromArrayLike(array) {\n return new Observable((subscriber) => {\n for (let i = 0; i < array.length && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n });\n}\nexport function fromPromise(promise) {\n return new Observable((subscriber) => {\n promise\n .then((value) => {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, (err) => subscriber.error(err))\n .then(null, reportUnhandledError);\n });\n}\nexport function fromIterable(iterable) {\n return new Observable((subscriber) => {\n for (const value of iterable) {\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n subscriber.complete();\n });\n}\nexport function fromAsyncIterable(asyncIterable) {\n return new Observable((subscriber) => {\n process(asyncIterable, subscriber).catch((err) => subscriber.error(err));\n });\n}\nexport function fromReadableStreamLike(readableStream) {\n return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));\n}\nfunction process(asyncIterable, subscriber) {\n var asyncIterable_1, asyncIterable_1_1;\n var e_1, _a;\n return __awaiter(this, void 0, void 0, function* () {\n try {\n for (asyncIterable_1 = __asyncValues(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), !asyncIterable_1_1.done;) {\n const value = asyncIterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)) yield _a.call(asyncIterable_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n subscriber.complete();\n });\n}\n","import { mergeAll } from '../operators/mergeAll';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from './from';\nexport function merge(...args) {\n const scheduler = popScheduler(args);\n const concurrent = popNumber(args, Infinity);\n const sources = args;\n return !sources.length\n ?\n EMPTY\n : sources.length === 1\n ?\n innerFrom(sources[0])\n :\n mergeAll(concurrent)(from(sources, scheduler));\n}\n","import { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function of(...args) {\n const scheduler = popScheduler(args);\n return from(args, scheduler);\n}\n","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nexport function race(...sources) {\n sources = argsOrArgArray(sources);\n return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources));\n}\nexport function raceInit(sources) {\n return (subscriber) => {\n let subscriptions = [];\n for (let i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) {\n subscriptions.push(innerFrom(sources[i]).subscribe(createOperatorSubscriber(subscriber, (value) => {\n if (subscriptions) {\n for (let s = 0; s < subscriptions.length; s++) {\n s !== i && subscriptions[s].unsubscribe();\n }\n subscriptions = null;\n }\n subscriber.next(value);\n })));\n }\n };\n}\n","import { Observable } from '../Observable';\nimport { isFunction } from '../util/isFunction';\nexport function throwError(errorOrErrorFactory, scheduler) {\n const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory;\n const init = (subscriber) => subscriber.error(errorFactory());\n return new Observable(scheduler ? (subscriber) => scheduler.schedule(init, 0, subscriber) : init);\n}\n","import { Observable } from '../Observable';\nimport { async as asyncScheduler } from '../scheduler/async';\nimport { isScheduler } from '../util/isScheduler';\nimport { isValidDate } from '../util/isDate';\nexport function timer(dueTime = 0, intervalOrScheduler, scheduler = asyncScheduler) {\n let intervalDuration = -1;\n if (intervalOrScheduler != null) {\n if (isScheduler(intervalOrScheduler)) {\n scheduler = intervalOrScheduler;\n }\n else {\n intervalDuration = intervalOrScheduler;\n }\n }\n return new Observable((subscriber) => {\n let due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;\n if (due < 0) {\n due = 0;\n }\n let n = 0;\n return scheduler.schedule(function () {\n if (!subscriber.closed) {\n subscriber.next(n++);\n if (0 <= intervalDuration) {\n this.schedule(undefined, intervalDuration);\n }\n else {\n subscriber.complete();\n }\n }\n }, due);\n });\n}\n","import { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nexport class OperatorSubscriber extends Subscriber {\n constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n super(destination);\n this.onFinalize = onFinalize;\n this.shouldUnsubscribe = shouldUnsubscribe;\n this._next = onNext\n ? function (value) {\n try {\n onNext(value);\n }\n catch (err) {\n destination.error(err);\n }\n }\n : super._next;\n this._error = onError\n ? function (err) {\n try {\n onError(err);\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : super._error;\n this._complete = onComplete\n ? function () {\n try {\n onComplete();\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : super._complete;\n }\n unsubscribe() {\n var _a;\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n const { closed } = this;\n super.unsubscribe();\n !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n }\n }\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n return operate((source, subscriber) => {\n let innerSub = null;\n let syncUnsub = false;\n let handledResult;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, (err) => {\n handledResult = innerFrom(selector(err, catchError(selector)(source)));\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n else {\n syncUnsub = true;\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n });\n}\n","import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMap(project, resultSelector) {\n return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function debounceTime(dueTime, scheduler = asyncScheduler) {\n return operate((source, subscriber) => {\n let activeTask = null;\n let lastValue = null;\n let lastTime = null;\n const emit = () => {\n if (activeTask) {\n activeTask.unsubscribe();\n activeTask = null;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n function emitWhenIdle() {\n const targetTime = lastTime + dueTime;\n const now = scheduler.now();\n if (now < targetTime) {\n activeTask = this.schedule(undefined, targetTime - now);\n subscriber.add(activeTask);\n return;\n }\n emit();\n }\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n lastValue = value;\n lastTime = scheduler.now();\n if (!activeTask) {\n activeTask = scheduler.schedule(emitWhenIdle, dueTime);\n subscriber.add(activeTask);\n }\n }, () => {\n emit();\n subscriber.complete();\n }, undefined, () => {\n lastValue = activeTask = null;\n }));\n });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function defaultIfEmpty(defaultValue) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n subscriber.next(value);\n }, () => {\n if (!hasValue) {\n subscriber.next(defaultValue);\n }\n subscriber.complete();\n }));\n });\n}\n","import { concat } from '../observable/concat';\nimport { take } from './take';\nimport { ignoreElements } from './ignoreElements';\nimport { mapTo } from './mapTo';\nimport { mergeMap } from './mergeMap';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return (source) => concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));\n }\n return mergeMap((value, index) => delayDurationSelector(value, index).pipe(take(1), mapTo(value)));\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { delayWhen } from './delayWhen';\nimport { timer } from '../observable/timer';\nexport function delay(due, scheduler = asyncScheduler) {\n const duration = timer(due, scheduler);\n return delayWhen(() => duration);\n}\n","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector = identity) {\n comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n return operate((source, subscriber) => {\n let previousKey;\n let first = true;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const currentKey = keySelector(value);\n if (first || !comparator(previousKey, currentKey)) {\n first = false;\n previousKey = currentKey;\n subscriber.next(value);\n }\n }));\n });\n}\nfunction defaultCompare(a, b) {\n return a === b;\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value)));\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 { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nexport function ignoreElements() {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, noop));\n });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n","import { map } from './map';\nexport function mapTo(value) {\n return map(() => value);\n}\n","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent = Infinity) {\n return mergeMap(identity, concurrent);\n}\n","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent = Infinity) {\n if (isFunction(resultSelector)) {\n return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n const buffer = [];\n let active = 0;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => {\n if (isComplete && !buffer.length && !active) {\n subscriber.complete();\n }\n };\n const outerNext = (value) => (active < concurrent ? doInnerSub(value) : buffer.push(value));\n const doInnerSub = (value) => {\n expand && subscriber.next(value);\n active++;\n let innerComplete = false;\n innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, (innerValue) => {\n onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n if (expand) {\n outerNext(innerValue);\n }\n else {\n subscriber.next(innerValue);\n }\n }, () => {\n innerComplete = true;\n }, undefined, () => {\n if (innerComplete) {\n try {\n active--;\n while (buffer.length && active < concurrent) {\n const bufferedValue = buffer.shift();\n if (innerSubScheduler) {\n executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));\n }\n else {\n doInnerSub(bufferedValue);\n }\n }\n checkComplete();\n }\n catch (err) {\n subscriber.error(err);\n }\n }\n }));\n };\n source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => {\n isComplete = true;\n checkComplete();\n }));\n return () => {\n additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n };\n}\n","import { executeSchedule } from '../util/executeSchedule';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function observeOn(scheduler, delay = 0) {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, (value) => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay), () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay), (err) => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay)));\n });\n}\n","import { createOperatorSubscriber } from './OperatorSubscriber';\nexport function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {\n return (source, subscriber) => {\n let hasState = hasSeed;\n let state = seed;\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const i = index++;\n state = hasState\n ?\n accumulator(state, value, i)\n :\n ((hasState = true), value);\n emitOnNext && subscriber.next(state);\n }, emitBeforeComplete &&\n (() => {\n hasState && subscriber.next(state);\n subscriber.complete();\n })));\n };\n}\n","import { operate } from '../util/lift';\nimport { scanInternals } from './scanInternals';\nexport function scan(accumulator, seed) {\n return operate(scanInternals(accumulator, seed, arguments.length >= 2, true));\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { SafeSubscriber } from '../Subscriber';\nimport { operate } from '../util/lift';\nexport function share(options = {}) {\n const { connector = () => new Subject(), resetOnError = true, resetOnComplete = true, resetOnRefCountZero = true } = options;\n return (wrapperSource) => {\n let connection;\n let resetConnection;\n let subject;\n let refCount = 0;\n let hasCompleted = false;\n let hasErrored = false;\n const cancelReset = () => {\n resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();\n resetConnection = undefined;\n };\n const reset = () => {\n cancelReset();\n connection = subject = undefined;\n hasCompleted = hasErrored = false;\n };\n const resetAndUnsubscribe = () => {\n const conn = connection;\n reset();\n conn === null || conn === void 0 ? void 0 : conn.unsubscribe();\n };\n return operate((source, subscriber) => {\n refCount++;\n if (!hasErrored && !hasCompleted) {\n cancelReset();\n }\n const dest = (subject = subject !== null && subject !== void 0 ? subject : connector());\n subscriber.add(() => {\n refCount--;\n if (refCount === 0 && !hasErrored && !hasCompleted) {\n resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero);\n }\n });\n dest.subscribe(subscriber);\n if (!connection &&\n refCount > 0) {\n connection = new SafeSubscriber({\n next: (value) => dest.next(value),\n error: (err) => {\n hasErrored = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnError, err);\n dest.error(err);\n },\n complete: () => {\n hasCompleted = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnComplete);\n dest.complete();\n },\n });\n innerFrom(source).subscribe(connection);\n }\n })(wrapperSource);\n };\n}\nfunction handleReset(reset, on, ...args) {\n if (on === true) {\n reset();\n return;\n }\n if (on === false) {\n return;\n }\n const onSubscriber = new SafeSubscriber({\n next: () => {\n onSubscriber.unsubscribe();\n reset();\n },\n });\n return on(...args).subscribe(onSubscriber);\n}\n","import { filter } from './filter';\nexport function skip(count) {\n return filter((_, index) => count <= index);\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function switchMap(project, resultSelector) {\n return operate((source, subscriber) => {\n let innerSubscriber = null;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete();\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();\n let innerIndex = 0;\n const outerIndex = index++;\n innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => {\n innerSubscriber = null;\n checkComplete();\n })));\n }, () => {\n isComplete = true;\n checkComplete();\n }));\n });\n}\n","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function take(count) {\n return count <= 0\n ?\n () => EMPTY\n : operate((source, subscriber) => {\n let seen = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n if (++seen <= count) {\n subscriber.next(value);\n if (count <= seen) {\n subscriber.complete();\n }\n }\n }));\n });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n return operate((source, subscriber) => {\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));\n !subscriber.closed && source.subscribe(subscriber);\n });\n}\n","import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n const tapObserver = isFunction(observerOrNext) || error || complete\n ?\n { next: observerOrNext, error, complete }\n : observerOrNext;\n return tapObserver\n ? operate((source, subscriber) => {\n var _a;\n (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n let isUnsub = true;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n var _a;\n (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n subscriber.next(value);\n }, () => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n subscriber.complete();\n }, (err) => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n subscriber.error(err);\n }, () => {\n var _a, _b;\n if (isUnsub) {\n (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n }\n (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n }));\n })\n :\n identity;\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function throwIfEmpty(errorFactory = defaultErrorFactory) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n subscriber.next(value);\n }, () => (hasValue ? subscriber.complete() : subscriber.error(errorFactory()))));\n });\n}\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { isValidDate } from '../util/isDate';\nimport { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createErrorClass } from '../util/createErrorClass';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport const TimeoutError = createErrorClass((_super) => function TimeoutErrorImpl(info = null) {\n _super(this);\n this.message = 'Timeout has occurred';\n this.name = 'TimeoutError';\n this.info = info;\n});\nexport function timeout(config, schedulerArg) {\n const { first, each, with: _with = timeoutErrorFactory, scheduler = schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : asyncScheduler, meta = null, } = (isValidDate(config) ? { first: config } : typeof config === 'number' ? { each: config } : config);\n if (first == null && each == null) {\n throw new TypeError('No timeout provided.');\n }\n return operate((source, subscriber) => {\n let originalSourceSubscription;\n let timerSubscription;\n let lastValue = null;\n let seen = 0;\n const startTimer = (delay) => {\n timerSubscription = executeSchedule(subscriber, scheduler, () => {\n try {\n originalSourceSubscription.unsubscribe();\n innerFrom(_with({\n meta,\n lastValue,\n seen,\n })).subscribe(subscriber);\n }\n catch (err) {\n subscriber.error(err);\n }\n }, delay);\n };\n originalSourceSubscription = source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe();\n seen++;\n subscriber.next((lastValue = value));\n each > 0 && startTimer(each);\n }, undefined, undefined, () => {\n if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) {\n timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe();\n }\n lastValue = null;\n }));\n !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each);\n });\n}\nfunction timeoutErrorFactory(info) {\n throw new TimeoutError(info);\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { identity } from '../util/identity';\nimport { noop } from '../util/noop';\nimport { popResultSelector } from '../util/args';\nexport function withLatestFrom(...inputs) {\n const project = popResultSelector(inputs);\n return operate((source, subscriber) => {\n const len = inputs.length;\n const otherValues = new Array(len);\n let hasValue = inputs.map(() => false);\n let ready = false;\n for (let i = 0; i < len; i++) {\n innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, (value) => {\n otherValues[i] = value;\n if (!ready && !hasValue[i]) {\n hasValue[i] = true;\n (ready = hasValue.every(identity)) && (hasValue = null);\n }\n }, noop));\n }\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n if (ready) {\n const values = [value, ...otherValues];\n subscriber.next(project ? project(...values) : values);\n }\n }));\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 const intervalProvider = {\n setInterval(handler, timeout, ...args) {\n const { delegate } = intervalProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n },\n delegate: undefined,\n};\n","import { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\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 intervalProvider.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 intervalProvider.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;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n this.work = this.state = this.scheduler = null;\n this.pending = false;\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n super.unsubscribe();\n }\n }\n}\n","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class Scheduler {\n constructor(schedulerActionCtor, now = Scheduler.now) {\n this.schedulerActionCtor = schedulerActionCtor;\n this.now = now;\n }\n schedule(work, delay = 0, state) {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\nScheduler.now = dateTimestampProvider.now;\n","import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n constructor(SchedulerAction, now = Scheduler.now) {\n super(SchedulerAction, now);\n this.actions = [];\n this._active = false;\n this._scheduled = undefined;\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","export const dateTimestampProvider = {\n now() {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n","import { QueueAction } from './QueueAction';\nimport { QueueScheduler } from './QueueScheduler';\nexport const queueScheduler = new QueueScheduler(QueueAction);\nexport const queue = queueScheduler;\n","import { AsyncScheduler } from './AsyncScheduler';\nexport class QueueScheduler extends AsyncScheduler {\n}\n","import { AsyncAction } from './AsyncAction';\nexport class QueueAction extends AsyncAction {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n }\n schedule(state, delay = 0) {\n if (delay > 0) {\n return super.schedule(state, delay);\n }\n this.delay = delay;\n this.state = state;\n this.scheduler.flush(this);\n return this;\n }\n execute(state, delay) {\n return (delay > 0 || this.closed) ?\n super.execute(state, delay) :\n this._execute(state, delay);\n }\n requestAsyncId(scheduler, id, delay = 0) {\n if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) {\n return super.requestAsyncId(scheduler, id, delay);\n }\n return scheduler.flush(this);\n }\n}\n","export const timeoutProvider = {\n setTimeout(handler, timeout, ...args) {\n const { delegate } = timeoutProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout(handler, timeout, ...args);\n }\n return setTimeout(handler, timeout, ...args);\n },\n clearTimeout(handle) {\n const { delegate } = timeoutProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\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();\n","export const observable = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n","import { createErrorClass } from './createErrorClass';\nexport const EmptyError = createErrorClass((_super) => function EmptyErrorImpl() {\n _super(this);\n this.name = 'EmptyError';\n this.message = 'no elements in sequence';\n});\n","import { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\nfunction last(arr) {\n return arr[arr.length - 1];\n}\nexport function popResultSelector(args) {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\nexport function popScheduler(args) {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\nexport function popNumber(args, defaultValue) {\n return typeof last(args) === 'number' ? args.pop() : defaultValue;\n}\n","const { isArray } = Array;\nconst { getPrototypeOf, prototype: objectProto, keys: getKeys } = Object;\nexport function argsArgArrayOrObject(args) {\n if (args.length === 1) {\n const first = args[0];\n if (isArray(first)) {\n return { args: first, keys: null };\n }\n if (isPOJO(first)) {\n const keys = getKeys(first);\n return {\n args: keys.map((key) => first[key]),\n keys,\n };\n }\n }\n return { args: args, keys: null };\n}\nfunction isPOJO(obj) {\n return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;\n}\n","const { isArray } = Array;\nexport function argsOrArgArray(args) {\n return args.length === 1 && isArray(args[0]) ? args[0] : args;\n}\n","export function arrRemove(arr, item) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n","export function createErrorClass(createImpl) {\n const _super = (instance) => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n","export function createObject(keys, values) {\n return keys.reduce((result, key, i) => ((result[key] = values[i]), result), {});\n}\n","import { config } from '../config';\nlet context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n const { errorThrown, error } = context;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n","export function executeSchedule(parentSubscription, scheduler, work, delay = 0, repeat = false) {\n const scheduleSubscription = scheduler.schedule(function () {\n work();\n if (repeat) {\n parentSubscription.add(this.schedule(null, delay));\n }\n else {\n this.unsubscribe();\n }\n }, delay);\n parentSubscription.add(scheduleSubscription);\n if (!repeat) {\n return scheduleSubscription;\n }\n}\n","export function identity(x) {\n return x;\n}\n","export const isArrayLike = ((x) => x && typeof x.length === 'number' && typeof x !== 'function');\n","import { isFunction } from './isFunction';\nexport function isAsyncIterable(obj) {\n return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);\n}\n","export function isValidDate(value) {\n return value instanceof Date && !isNaN(value);\n}\n","export function isFunction(value) {\n return typeof value === 'function';\n}\n","import { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\nexport function isInteropObservable(input) {\n return isFunction(input[Symbol_observable]);\n}\n","import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\nexport function isIterable(input) {\n return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]);\n}\n","import { isFunction } from \"./isFunction\";\nexport function isPromise(value) {\n return isFunction(value === null || value === void 0 ? void 0 : value.then);\n}\n","import { __asyncGenerator, __await } from \"tslib\";\nimport { isFunction } from './isFunction';\nexport function readableStreamLikeToAsyncGenerator(readableStream) {\n return __asyncGenerator(this, arguments, function* readableStreamLikeToAsyncGenerator_1() {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { value, done } = yield __await(reader.read());\n if (done) {\n return yield __await(void 0);\n }\n yield yield __await(value);\n }\n }\n finally {\n reader.releaseLock();\n }\n });\n}\nexport function isReadableStreamLike(obj) {\n return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);\n}\n","import { isFunction } from './isFunction';\nexport function isScheduler(value) {\n return value && isFunction(value.schedule);\n}\n","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n return (source) => {\n if (hasLift(source)) {\n return source.lift(function (liftedSource) {\n try {\n return init(liftedSource, this);\n }\n catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n","import { map } from \"../operators/map\";\nconst { isArray } = Array;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn(...args) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n return map(args => callOrApply(fn, args));\n}\n","export function noop() { }\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 { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(() => {\n const { onUnhandledError } = config;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n","export function createInvalidObservableTypeError(input) {\n return new TypeError(`You provided ${input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`);\n}\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stack-generator', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.StackGenerator = factory(root.StackFrame);\n }\n}(this, function(StackFrame) {\n return {\n backtrace: function StackGenerator$$backtrace(opts) {\n var stack = [];\n var maxStackSize = 10;\n\n if (typeof opts === 'object' && typeof opts.maxStackSize === 'number') {\n maxStackSize = opts.maxStackSize;\n }\n\n var curr = arguments.callee;\n while (curr && stack.length < maxStackSize && curr['arguments']) {\n // Allow V8 optimizations\n var args = new Array(curr['arguments'].length);\n for (var i = 0; i < args.length; ++i) {\n args[i] = curr['arguments'][i];\n }\n if (/function(?:\\s+([\\w$]+))+\\s*\\(/.test(curr.toString())) {\n stack.push(new StackFrame({functionName: RegExp.$1 || undefined, args: args}));\n } else {\n stack.push(new StackFrame({args: args}));\n }\n\n try {\n curr = curr.caller;\n } catch (e) {\n break;\n }\n }\n return stack;\n }\n };\n}));\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar StackTrace = require('stacktrace-js');\n\n/**\n * URL endpoint of the Stackdriver Error Reporting report API.\n */\nvar baseAPIUrl = 'https://clouderrorreporting.googleapis.com/v1beta1/projects/';\n\n/**\n * An Error handler that sends errors to the Stackdriver Error Reporting API.\n */\nvar StackdriverErrorReporter = function() {};\n\n/**\n * Initialize the StackdriverErrorReporter object.\n * @param {Object} config - the init configuration.\n * @param {Object} [config.context={}] - the context in which the error occurred.\n * @param {string} [config.context.user] - the user who caused or was affected by the error.\n * @param {String} config.key - the API key to use to call the API.\n * @param {String} config.projectId - the Google Cloud Platform project ID to report errors to.\n * @param {Function} config.customReportingFunction - Custom function to be called with the error payload for reporting, instead of HTTP request. The function should return a Promise.\n * @param {String} [config.service=web] - service identifier.\n * @param {String} [config.version] - version identifier.\n * @param {Boolean} [config.reportUncaughtExceptions=true] - Set to false to stop reporting unhandled exceptions.\n * @param {Boolean} [config.disabled=false] - Set to true to not report errors when calling report(), this can be used when developping locally.\n */\nStackdriverErrorReporter.prototype.start = function(config) {\n if (!config.key && !config.targetUrl && !config.customReportingFunction) {\n throw new Error('Cannot initialize: No API key, target url or custom reporting function provided.');\n }\n if (!config.projectId && !config.targetUrl && !config.customReportingFunction) {\n throw new Error('Cannot initialize: No project ID, target url or custom reporting function provided.');\n }\n\n this.customReportingFunction = config.customReportingFunction;\n this.apiKey = config.key;\n this.projectId = config.projectId;\n this.targetUrl = config.targetUrl;\n this.context = config.context || {};\n this.serviceContext = {service: config.service || 'web'};\n if (config.version) {\n this.serviceContext.version = config.version;\n }\n this.reportUncaughtExceptions = config.reportUncaughtExceptions !== false;\n this.reportUnhandledPromiseRejections = config.reportUnhandledPromiseRejections !== false;\n this.disabled = !!config.disabled;\n\n registerHandlers(this);\n};\n\nfunction registerHandlers(reporter) {\n // Register as global error handler if requested\n var noop = function() {};\n if (reporter.reportUncaughtExceptions) {\n var oldErrorHandler = window.onerror || noop;\n\n window.onerror = function(message, source, lineno, colno, error) {\n if (error) {\n reporter.report(error).catch(noop);\n }\n oldErrorHandler(message, source, lineno, colno, error);\n return true;\n };\n }\n if (reporter.reportUnhandledPromiseRejections) {\n var oldPromiseRejectionHandler = window.onunhandledrejection || noop;\n\n window.onunhandledrejection = function(promiseRejectionEvent) {\n if (promiseRejectionEvent) {\n reporter.report(promiseRejectionEvent.reason).catch(noop);\n }\n oldPromiseRejectionHandler(promiseRejectionEvent.reason);\n return true;\n };\n }\n}\n\n/**\n * Report an error to the Stackdriver Error Reporting API\n * @param {Error|String} err - The Error object or message string to report.\n * @param {Object} options - Configuration for this report.\n * @param {number} [options.skipLocalFrames=1] - Omit number of frames if creating stack.\n * @returns {Promise} A promise that completes when the report has been sent.\n */\nStackdriverErrorReporter.prototype.report = function(err, options) {\n if (this.disabled) {\n return Promise.resolve(null);\n }\n if (!err) {\n return Promise.reject(new Error('no error to report'));\n }\n options = options || {};\n\n var payload = {};\n payload.serviceContext = this.serviceContext;\n payload.context = this.context;\n payload.context.httpRequest = {\n userAgent: window.navigator.userAgent,\n url: window.location.href,\n };\n\n var firstFrameIndex = 0;\n if (typeof err == 'string' || err instanceof String) {\n // Transform the message in an error, use try/catch to make sure the stacktrace is populated.\n try {\n throw new Error(err);\n } catch (e) {\n err = e;\n }\n // the first frame when using report() is always this library\n firstFrameIndex = options.skipLocalFrames || 1;\n }\n\n var reportUrl = this.targetUrl || (\n baseAPIUrl + this.projectId + '/events:report?key=' + this.apiKey);\n\n var customFunc = this.customReportingFunction;\n\n return resolveError(err, firstFrameIndex)\n .then(function(message) {\n payload.message = message;\n if (customFunc) {\n return customFunc(payload);\n }\n return sendErrorPayload(reportUrl, payload);\n });\n};\n\nfunction resolveError(err, firstFrameIndex) {\n // This will use sourcemaps and normalize the stack frames\n return StackTrace.fromError(err).then(function(stack) {\n var lines = [err.toString()];\n // Reconstruct to a JS stackframe as expected by Error Reporting parsers.\n for (var s = firstFrameIndex; s < stack.length; s++) {\n // Cannot use stack[s].source as it is not populated from source maps.\n lines.push([\n ' at ',\n // If a function name is not available '<anonymous>' will be used.\n stack[s].getFunctionName() || '<anonymous>', ' (',\n stack[s].getFileName(), ':',\n stack[s].getLineNumber(), ':',\n stack[s].getColumnNumber(), ')',\n ].join(''));\n }\n return lines.join('\\n');\n }, function(reason) {\n // Failure to extract stacktrace\n return [\n 'Error extracting stack trace: ', reason, '\\n',\n err.toString(), '\\n',\n ' (', err.file, ':', err.line, ':', err.column, ')',\n ].join('');\n });\n}\n\nfunction sendErrorPayload(url, payload) {\n var xhr = new XMLHttpRequest();\n xhr.open('POST', url, true);\n xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');\n\n return new Promise(function(resolve, reject) {\n xhr.onreadystatechange = function() {\n if (xhr.readyState === 4) {\n var code = xhr.status;\n if (code >= 200 && code < 300) {\n resolve({message: payload.message});\n } else {\n var condition = code ? code + ' http response' : 'network error';\n reject(new Error(condition + ' on stackdriver report'));\n }\n }\n };\n xhr.send(JSON.stringify(payload));\n });\n}\n\n/**\n * Set the user for the current context.\n *\n * @param {string} user - the unique identifier of the user (can be ID, email or custom token) or `undefined` if not logged in.\n */\nStackdriverErrorReporter.prototype.setUser = function(user) {\n this.context.user = user;\n};\n\nmodule.exports = StackdriverErrorReporter;\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = util.toSetString(aStr);\n var isDuplicate = has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n this._set[sStr] = idx;\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are removed from this array, by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var shiftNextLine = function() {\n var lineContents = remainingLines.shift();\n // The last line of a file might not have a newline.\n var newLine = remainingLines.shift() || \"\";\n return lineContents + newLine;\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[0];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[0] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[0];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[0] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLines.length > 0) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '<dir>/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stacktrace-gps', ['source-map', 'stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('source-map/lib/source-map-consumer'), require('stackframe'));\n } else {\n root.StackTraceGPS = factory(root.SourceMap || root.sourceMap, root.StackFrame);\n }\n}(this, function(SourceMap, StackFrame) {\n 'use strict';\n\n /**\n * Make a X-Domain request to url and callback.\n *\n * @param {String} url\n * @returns {Promise} with response text if fulfilled\n */\n function _xdr(url) {\n return new Promise(function(resolve, reject) {\n var req = new XMLHttpRequest();\n req.open('get', url);\n req.onerror = reject;\n req.onreadystatechange = function onreadystatechange() {\n if (req.readyState === 4) {\n if ((req.status >= 200 && req.status < 300) ||\n (url.substr(0, 7) === 'file://' && req.responseText)) {\n resolve(req.responseText);\n } else {\n reject(new Error('HTTP status: ' + req.status + ' retrieving ' + url));\n }\n }\n };\n req.send();\n });\n\n }\n\n /**\n * Convert a Base64-encoded string into its original representation.\n * Used for inline sourcemaps.\n *\n * @param {String} b64str Base-64 encoded string\n * @returns {String} original representation of the base64-encoded string.\n */\n function _atob(b64str) {\n if (typeof window !== 'undefined' && window.atob) {\n return window.atob(b64str);\n } else {\n throw new Error('You must supply a polyfill for window.atob in this environment');\n }\n }\n\n function _parseJson(string) {\n if (typeof JSON !== 'undefined' && JSON.parse) {\n return JSON.parse(string);\n } else {\n throw new Error('You must supply a polyfill for JSON.parse in this environment');\n }\n }\n\n function _findFunctionName(source, lineNumber/*, columnNumber*/) {\n var syntaxes = [\n // {name} = function ({args}) TODO args capture\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*function\\b/,\n // function {name}({args}) m[1]=name m[2]=args\n /function\\s+([^('\"`]*?)\\s*\\(([^)]*)\\)/,\n // {name} = eval()\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*(?:eval|new Function)\\b/,\n // fn_name() {\n /\\b(?!(?:if|for|switch|while|with|catch)\\b)(?:(?:static)\\s+)?(\\S+)\\s*\\(.*?\\)\\s*\\{/,\n // {name} = () => {\n /['\"]?([$_A-Za-z][$_A-Za-z0-9]*)['\"]?\\s*[:=]\\s*\\(.*?\\)\\s*=>/\n ];\n var lines = source.split('\\n');\n\n // Walk backwards in the source lines until we find the line which matches one of the patterns above\n var code = '';\n var maxLines = Math.min(lineNumber, 20);\n for (var i = 0; i < maxLines; ++i) {\n // lineNo is 1-based, source[] is 0-based\n var line = lines[lineNumber - i - 1];\n var commentPos = line.indexOf('//');\n if (commentPos >= 0) {\n line = line.substr(0, commentPos);\n }\n\n if (line) {\n code = line + code;\n var len = syntaxes.length;\n for (var index = 0; index < len; index++) {\n var m = syntaxes[index].exec(code);\n if (m && m[1]) {\n return m[1];\n }\n }\n }\n }\n return undefined;\n }\n\n function _ensureSupportedEnvironment() {\n if (typeof Object.defineProperty !== 'function' || typeof Object.create !== 'function') {\n throw new Error('Unable to consume source maps in older browsers');\n }\n }\n\n function _ensureStackFrameIsLegit(stackframe) {\n if (typeof stackframe !== 'object') {\n throw new TypeError('Given StackFrame is not an object');\n } else if (typeof stackframe.fileName !== 'string') {\n throw new TypeError('Given file name is not a String');\n } else if (typeof stackframe.lineNumber !== 'number' ||\n stackframe.lineNumber % 1 !== 0 ||\n stackframe.lineNumber < 1) {\n throw new TypeError('Given line number must be a positive integer');\n } else if (typeof stackframe.columnNumber !== 'number' ||\n stackframe.columnNumber % 1 !== 0 ||\n stackframe.columnNumber < 0) {\n throw new TypeError('Given column number must be a non-negative integer');\n }\n return true;\n }\n\n function _findSourceMappingURL(source) {\n var sourceMappingUrlRegExp = /\\/\\/[#@] ?sourceMappingURL=([^\\s'\"]+)\\s*$/mg;\n var lastSourceMappingUrl;\n var matchSourceMappingUrl;\n // eslint-disable-next-line no-cond-assign\n while (matchSourceMappingUrl = sourceMappingUrlRegExp.exec(source)) {\n lastSourceMappingUrl = matchSourceMappingUrl[1];\n }\n if (lastSourceMappingUrl) {\n return lastSourceMappingUrl;\n } else {\n throw new Error('sourceMappingURL not found');\n }\n }\n\n function _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache) {\n return new Promise(function(resolve, reject) {\n var loc = sourceMapConsumer.originalPositionFor({\n line: stackframe.lineNumber,\n column: stackframe.columnNumber\n });\n\n if (loc.source) {\n // cache mapped sources\n var mappedSource = sourceMapConsumer.sourceContentFor(loc.source);\n if (mappedSource) {\n sourceCache[loc.source] = mappedSource;\n }\n\n resolve(\n // given stackframe and source location, update stackframe\n new StackFrame({\n functionName: loc.name || stackframe.functionName,\n args: stackframe.args,\n fileName: loc.source,\n lineNumber: loc.line,\n columnNumber: loc.column\n }));\n } else {\n reject(new Error('Could not get original source for given stackframe and source map'));\n }\n });\n }\n\n /**\n * @constructor\n * @param {Object} opts\n * opts.sourceCache = {url: \"Source String\"} => preload source cache\n * opts.sourceMapConsumerCache = {/path/file.js.map: SourceMapConsumer}\n * opts.offline = True to prevent network requests.\n * Best effort without sources or source maps.\n * opts.ajax = Promise returning function to make X-Domain requests\n */\n return function StackTraceGPS(opts) {\n if (!(this instanceof StackTraceGPS)) {\n return new StackTraceGPS(opts);\n }\n opts = opts || {};\n\n this.sourceCache = opts.sourceCache || {};\n this.sourceMapConsumerCache = opts.sourceMapConsumerCache || {};\n\n this.ajax = opts.ajax || _xdr;\n\n this._atob = opts.atob || _atob;\n\n this._get = function _get(location) {\n return new Promise(function(resolve, reject) {\n var isDataUrl = location.substr(0, 5) === 'data:';\n if (this.sourceCache[location]) {\n resolve(this.sourceCache[location]);\n } else if (opts.offline && !isDataUrl) {\n reject(new Error('Cannot make network requests in offline mode'));\n } else {\n if (isDataUrl) {\n // data URLs can have parameters.\n // see http://tools.ietf.org/html/rfc2397\n var supportedEncodingRegexp =\n /^data:application\\/json;([\\w=:\"-]+;)*base64,/;\n var match = location.match(supportedEncodingRegexp);\n if (match) {\n var sourceMapStart = match[0].length;\n var encodedSource = location.substr(sourceMapStart);\n var source = this._atob(encodedSource);\n this.sourceCache[location] = source;\n resolve(source);\n } else {\n reject(new Error('The encoding of the inline sourcemap is not supported'));\n }\n } else {\n var xhrPromise = this.ajax(location, {method: 'get'});\n // Cache the Promise to prevent duplicate in-flight requests\n this.sourceCache[location] = xhrPromise;\n xhrPromise.then(resolve, reject);\n }\n }\n }.bind(this));\n };\n\n /**\n * Creating SourceMapConsumers is expensive, so this wraps the creation of a\n * SourceMapConsumer in a per-instance cache.\n *\n * @param {String} sourceMappingURL = URL to fetch source map from\n * @param {String} defaultSourceRoot = Default source root for source map if undefined\n * @returns {Promise} that resolves a SourceMapConsumer\n */\n this._getSourceMapConsumer = function _getSourceMapConsumer(sourceMappingURL, defaultSourceRoot) {\n return new Promise(function(resolve) {\n if (this.sourceMapConsumerCache[sourceMappingURL]) {\n resolve(this.sourceMapConsumerCache[sourceMappingURL]);\n } else {\n var sourceMapConsumerPromise = new Promise(function(resolve, reject) {\n return this._get(sourceMappingURL).then(function(sourceMapSource) {\n if (typeof sourceMapSource === 'string') {\n sourceMapSource = _parseJson(sourceMapSource.replace(/^\\)\\]\\}'/, ''));\n }\n if (typeof sourceMapSource.sourceRoot === 'undefined') {\n sourceMapSource.sourceRoot = defaultSourceRoot;\n }\n\n resolve(new SourceMap.SourceMapConsumer(sourceMapSource));\n }).catch(reject);\n }.bind(this));\n this.sourceMapConsumerCache[sourceMappingURL] = sourceMapConsumerPromise;\n resolve(sourceMapConsumerPromise);\n }\n }.bind(this));\n };\n\n /**\n * Given a StackFrame, enhance function name and use source maps for a\n * better StackFrame.\n *\n * @param {StackFrame} stackframe object\n * @returns {Promise} that resolves with with source-mapped StackFrame\n */\n this.pinpoint = function StackTraceGPS$$pinpoint(stackframe) {\n return new Promise(function(resolve, reject) {\n this.getMappedLocation(stackframe).then(function(mappedStackFrame) {\n function resolveMappedStackFrame() {\n resolve(mappedStackFrame);\n }\n\n this.findFunctionName(mappedStackFrame)\n .then(resolve, resolveMappedStackFrame)\n // eslint-disable-next-line no-unexpected-multiline\n ['catch'](resolveMappedStackFrame);\n }.bind(this), reject);\n }.bind(this));\n };\n\n /**\n * Given a StackFrame, guess function name from location information.\n *\n * @param {StackFrame} stackframe\n * @returns {Promise} that resolves with enhanced StackFrame.\n */\n this.findFunctionName = function StackTraceGPS$$findFunctionName(stackframe) {\n return new Promise(function(resolve, reject) {\n _ensureStackFrameIsLegit(stackframe);\n this._get(stackframe.fileName).then(function getSourceCallback(source) {\n var lineNumber = stackframe.lineNumber;\n var columnNumber = stackframe.columnNumber;\n var guessedFunctionName = _findFunctionName(source, lineNumber, columnNumber);\n // Only replace functionName if we found something\n if (guessedFunctionName) {\n resolve(new StackFrame({\n functionName: guessedFunctionName,\n args: stackframe.args,\n fileName: stackframe.fileName,\n lineNumber: lineNumber,\n columnNumber: columnNumber\n }));\n } else {\n resolve(stackframe);\n }\n }, reject)['catch'](reject);\n }.bind(this));\n };\n\n /**\n * Given a StackFrame, seek source-mapped location and return new enhanced StackFrame.\n *\n * @param {StackFrame} stackframe\n * @returns {Promise} that resolves with enhanced StackFrame.\n */\n this.getMappedLocation = function StackTraceGPS$$getMappedLocation(stackframe) {\n return new Promise(function(resolve, reject) {\n _ensureSupportedEnvironment();\n _ensureStackFrameIsLegit(stackframe);\n\n var sourceCache = this.sourceCache;\n var fileName = stackframe.fileName;\n this._get(fileName).then(function(source) {\n var sourceMappingURL = _findSourceMappingURL(source);\n var isDataUrl = sourceMappingURL.substr(0, 5) === 'data:';\n var defaultSourceRoot = fileName.substring(0, fileName.lastIndexOf('/') + 1);\n\n if (sourceMappingURL[0] !== '/' && !isDataUrl && !(/^https?:\\/\\/|^\\/\\//i).test(sourceMappingURL)) {\n sourceMappingURL = defaultSourceRoot + sourceMappingURL;\n }\n\n return this._getSourceMapConsumer(sourceMappingURL, defaultSourceRoot)\n .then(function(sourceMapConsumer) {\n return _extractLocationInfoFromSourceMapSource(stackframe, sourceMapConsumer, sourceCache)\n .then(resolve)['catch'](function() {\n resolve(stackframe);\n });\n });\n }.bind(this), reject)['catch'](reject);\n }.bind(this));\n };\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stacktrace', ['error-stack-parser', 'stack-generator', 'stacktrace-gps'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('error-stack-parser'), require('stack-generator'), require('stacktrace-gps'));\n } else {\n root.StackTrace = factory(root.ErrorStackParser, root.StackGenerator, root.StackTraceGPS);\n }\n}(this, function StackTrace(ErrorStackParser, StackGenerator, StackTraceGPS) {\n var _options = {\n filter: function(stackframe) {\n // Filter out stackframes for this library by default\n return (stackframe.functionName || '').indexOf('StackTrace$$') === -1 &&\n (stackframe.functionName || '').indexOf('ErrorStackParser$$') === -1 &&\n (stackframe.functionName || '').indexOf('StackTraceGPS$$') === -1 &&\n (stackframe.functionName || '').indexOf('StackGenerator$$') === -1;\n },\n sourceCache: {}\n };\n\n var _generateError = function StackTrace$$GenerateError() {\n try {\n // Error must be thrown to get stack in IE\n throw new Error();\n } catch (err) {\n return err;\n }\n };\n\n /**\n * Merge 2 given Objects. If a conflict occurs the second object wins.\n * Does not do deep merges.\n *\n * @param {Object} first base object\n * @param {Object} second overrides\n * @returns {Object} merged first and second\n * @private\n */\n function _merge(first, second) {\n var target = {};\n\n [first, second].forEach(function(obj) {\n for (var prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n target[prop] = obj[prop];\n }\n }\n return target;\n });\n\n return target;\n }\n\n function _isShapedLikeParsableError(err) {\n return err.stack || err['opera#sourceloc'];\n }\n\n function _filtered(stackframes, filter) {\n if (typeof filter === 'function') {\n return stackframes.filter(filter);\n }\n return stackframes;\n }\n\n return {\n /**\n * Get a backtrace from invocation point.\n *\n * @param {Object} opts\n * @returns {Array} of StackFrame\n */\n get: function StackTrace$$get(opts) {\n var err = _generateError();\n return _isShapedLikeParsableError(err) ? this.fromError(err, opts) : this.generateArtificially(opts);\n },\n\n /**\n * Get a backtrace from invocation point.\n * IMPORTANT: Does not handle source maps or guess function names!\n *\n * @param {Object} opts\n * @returns {Array} of StackFrame\n */\n getSync: function StackTrace$$getSync(opts) {\n opts = _merge(_options, opts);\n var err = _generateError();\n var stack = _isShapedLikeParsableError(err) ? ErrorStackParser.parse(err) : StackGenerator.backtrace(opts);\n return _filtered(stack, opts.filter);\n },\n\n /**\n * Given an error object, parse it.\n *\n * @param {Error} error object\n * @param {Object} opts\n * @returns {Promise} for Array[StackFrame}\n */\n fromError: function StackTrace$$fromError(error, opts) {\n opts = _merge(_options, opts);\n var gps = new StackTraceGPS(opts);\n return new Promise(function(resolve) {\n var stackframes = _filtered(ErrorStackParser.parse(error), opts.filter);\n resolve(Promise.all(stackframes.map(function(sf) {\n return new Promise(function(resolve) {\n function resolveOriginal() {\n resolve(sf);\n }\n\n gps.pinpoint(sf).then(resolve, resolveOriginal)['catch'](resolveOriginal);\n });\n })));\n }.bind(this));\n },\n\n /**\n * Use StackGenerator to generate a backtrace.\n *\n * @param {Object} opts\n * @returns {Promise} of Array[StackFrame]\n */\n generateArtificially: function StackTrace$$generateArtificially(opts) {\n opts = _merge(_options, opts);\n var stackFrames = StackGenerator.backtrace(opts);\n if (typeof opts.filter === 'function') {\n stackFrames = stackFrames.filter(opts.filter);\n }\n return Promise.resolve(stackFrames);\n },\n\n /**\n * Given a function, wrap it such that invocations trigger a callback that\n * is called with a stack trace.\n *\n * @param {Function} fn to be instrumented\n * @param {Function} callback function to call with a stack trace on invocation\n * @param {Function} errback optional function to call with error if unable to get stack trace.\n * @param {Object} thisArg optional context object (e.g. window)\n */\n instrument: function StackTrace$$instrument(fn, callback, errback, thisArg) {\n if (typeof fn !== 'function') {\n throw new Error('Cannot instrument non-function object');\n } else if (typeof fn.__stacktraceOriginalFn === 'function') {\n // Already instrumented, return given Function\n return fn;\n }\n\n var instrumented = function StackTrace$$instrumented() {\n try {\n this.get().then(callback, errback)['catch'](errback);\n return fn.apply(thisArg || this, arguments);\n } catch (e) {\n if (_isShapedLikeParsableError(e)) {\n this.fromError(e).then(callback, errback)['catch'](errback);\n }\n throw e;\n }\n }.bind(this);\n instrumented.__stacktraceOriginalFn = fn;\n\n return instrumented;\n },\n\n /**\n * Given a function that has been instrumented,\n * revert the function to it's original (non-instrumented) state.\n *\n * @param {Function} fn to de-instrument\n */\n deinstrument: function StackTrace$$deinstrument(fn) {\n if (typeof fn !== 'function') {\n throw new Error('Cannot de-instrument non-function object');\n } else if (typeof fn.__stacktraceOriginalFn === 'function') {\n return fn.__stacktraceOriginalFn;\n } else {\n // Function not instrumented, return original\n return fn;\n }\n },\n\n /**\n * Given an error message and Array of StackFrames, serialize and POST to given URL.\n *\n * @param {Array} stackframes\n * @param {String} url\n * @param {String} errorMsg\n * @param {Object} requestOptions\n */\n report: function StackTrace$$report(stackframes, url, errorMsg, requestOptions) {\n return new Promise(function(resolve, reject) {\n var req = new XMLHttpRequest();\n req.onerror = reject;\n req.onreadystatechange = function onreadystatechange() {\n if (req.readyState === 4) {\n if (req.status >= 200 && req.status < 400) {\n resolve(req.responseText);\n } else {\n reject(new Error('POST to ' + url + ' failed with status: ' + req.status));\n }\n }\n };\n req.open('post', url);\n\n // Set request headers\n req.setRequestHeader('Content-Type', 'application/json');\n if (requestOptions && typeof requestOptions.headers === 'object') {\n var headers = requestOptions.headers;\n for (var header in headers) {\n if (Object.prototype.hasOwnProperty.call(headers, header)) {\n req.setRequestHeader(header, headers[header]);\n }\n }\n }\n\n var reportPayload = {stack: stackframes};\n if (errorMsg !== undefined && errorMsg !== null) {\n reportPayload.message = errorMsg;\n }\n\n req.send(JSON.stringify(reportPayload));\n });\n }\n };\n}));\n","\"use strict\";var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};\n/**\n * @license Angular v14.2.0-next.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */!function(e){\"function\"==typeof define&&define.amd?define(e):e()}((function(){\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n!function(e){var t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function r(e,n){t&&t.measure&&t.measure(e,n)}n(\"Zone\");var o=e.__Zone_symbol_prefix||\"__zone_symbol__\";function a(e){return o+e}var i=!0===e[a(\"forceDuplicateZoneCheck\")];if(e.Zone){if(i||\"function\"!=typeof e.Zone.__symbol__)throw new Error(\"Zone already loaded.\");return e.Zone}var c=function(){function t(e,t){this._parent=e,this._name=t?t.name||\"unnamed\":\"<root>\",this._properties=t&&t.properties||{},this._zoneDelegate=new l(this,this._parent&&this._parent._zoneDelegate,t)}return t.assertZonePatched=function(){if(e.Promise!==j.ZoneAwarePromise)throw new Error(\"Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)\")},Object.defineProperty(t,\"root\",{get:function(){for(var e=t.current;e.parent;)e=e.parent;return e},enumerable:!1,configurable:!0}),Object.defineProperty(t,\"current\",{get:function(){return z.zone},enumerable:!1,configurable:!0}),Object.defineProperty(t,\"currentTask\",{get:function(){return M},enumerable:!1,configurable:!0}),t.__load_patch=function(o,a,c){if(void 0===c&&(c=!1),j.hasOwnProperty(o)){if(!c&&i)throw Error(\"Already loaded patch: \"+o)}else if(!e[\"__Zone_disable_\"+o]){var s=\"Zone:\"+o;n(s),j[o]=a(e,t,C),r(s,s)}},Object.defineProperty(t.prototype,\"parent\",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"name\",{get:function(){return this._name},enumerable:!1,configurable:!0}),t.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},t.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},t.prototype.fork=function(e){if(!e)throw new Error(\"ZoneSpec required!\");return this._zoneDelegate.fork(this,e)},t.prototype.wrap=function(e,t){if(\"function\"!=typeof e)throw new Error(\"Expecting function got: \"+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},t.prototype.run=function(e,t,n,r){z={parent:z,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{z=z.parent}},t.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),z={parent:z,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{z=z.parent}},t.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error(\"A task can only be run in the zone of creation! (Creation: \"+(e.zone||k).name+\"; Execution: \"+this.name+\")\");if(e.state!==b||e.type!==D&&e.type!==Z){var r=e.state!=w;r&&e._transitionTo(w,E),e.runCount++;var o=M;M=e,z={parent:z,zone:this};try{e.type==Z&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==b&&e.state!==S&&(e.type==D||e.data&&e.data.isPeriodic?r&&e._transitionTo(E,w):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(b,w,b))),z=z.parent,M=o}}},t.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error(\"can not reschedule task to \".concat(this.name,\" which is descendants of the original zone \").concat(e.zone.name));t=t.parent}e._transitionTo(T,b);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(S,T,b),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==T&&e._transitionTo(E,T),e},t.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new f(P,e,t,n,r,void 0))},t.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new f(Z,e,t,n,r,o))},t.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new f(D,e,t,n,r,o))},t.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error(\"A task can only be cancelled in the zone of creation! (Creation: \"+(e.zone||k).name+\"; Execution: \"+this.name+\")\");e._transitionTo(O,E,w);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(S,O),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(b,O),e.runCount=0,e},t.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},t}();c.__symbol__=a;var s,u={name:\"\",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,a){return e.invokeTask(n,r,o,a)},onCancelTask:function(e,t,n,r){return e.cancelTask(n,r)}},l=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask;(r||t&&t._hasTaskZS)&&(this._hasTaskZS=r?n:u,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=u,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=u,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=u,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}return e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new c(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){var n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t))||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=P)throw new Error(\"Task is missing scheduleFn.\");_(t)}return n},e.prototype.invokeTask=function(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error(\"Task is not cancelable\");n=t.cancelFn(t)}return n},e.prototype.hasTask=function(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(o<0)throw new Error(\"More tasks executed then were scheduled.\");0!=r&&0!=o||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})},e}(),f=function(){function t(n,r,o,a,i,c){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state=\"notScheduled\",this.type=n,this.source=r,this.data=a,this.scheduleFn=i,this.cancelFn=c,!o)throw new Error(\"callback is not defined\");this.callback=o;var s=this;this.invoke=n===D&&a&&a.useG?t.invokeTask:function(){return t.invokeTask.call(e,s,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),I++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==I&&m(),I--}},Object.defineProperty(t.prototype,\"zone\",{get:function(){return this._zone},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"state\",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(b,T)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(\"\".concat(this.type,\" '\").concat(this.source,\"': can not transition to '\").concat(e,\"', expecting state '\").concat(t,\"'\").concat(n?\" or '\"+n+\"'\":\"\",\", was '\").concat(this._state,\"'.\"));this._state=e,e==b&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},t}(),p=a(\"setTimeout\"),h=a(\"Promise\"),d=a(\"then\"),v=[],g=!1;function y(t){if(s||e[h]&&(s=e[h].resolve(0)),s){var n=s[d];n||(n=s.then),n.call(s,t)}else e[p](t,0)}function _(e){0===I&&0===v.length&&y(m),e&&v.push(e)}function m(){if(!g){for(g=!0;v.length;){var e=v;v=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(e){C.onUnhandledError(e)}}}C.microtaskDrainDone(),g=!1}}var k={name:\"NO ZONE\"},b=\"notScheduled\",T=\"scheduling\",E=\"scheduled\",w=\"running\",O=\"canceling\",S=\"unknown\",P=\"microTask\",Z=\"macroTask\",D=\"eventTask\",j={},C={symbol:a,currentZoneFrame:function(){return z},onUnhandledError:R,microtaskDrainDone:R,scheduleMicroTask:_,showUncaughtError:function(){return!c[a(\"ignoreConsoleErrorUncaughtError\")]},patchEventTarget:function(){return[]},patchOnProperties:R,patchMethod:function(){return R},bindArguments:function(){return[]},patchThen:function(){return R},patchMacroTask:function(){return R},patchEventPrototype:function(){return R},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return R},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return R},wrapWithCurrentZone:function(){return R},filterProperties:function(){return[]},attachOriginToPatched:function(){return R},_redefineProperty:function(){return R},patchCallbacks:function(){return R},nativeScheduleMicroTask:y},z={parent:null,zone:new c(null,null)},M=null,I=0;function R(){}r(\"Zone\",\"Zone\"),e.Zone=c}(\"undefined\"!=typeof window&&window||\"undefined\"!=typeof self&&self||global);\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 e=Object.getOwnPropertyDescriptor,t=Object.defineProperty,n=Object.getPrototypeOf,r=Object.create,o=Array.prototype.slice,a=\"addEventListener\",i=\"removeEventListener\",c=Zone.__symbol__(a),s=Zone.__symbol__(i),u=\"true\",l=\"false\",f=Zone.__symbol__(\"\");function p(e,t){return Zone.current.wrap(e,t)}function h(e,t,n,r,o){return Zone.current.scheduleMacroTask(e,t,n,r,o)}var d=Zone.__symbol__,v=\"undefined\"!=typeof window,g=v?window:void 0,y=v&&g||\"object\"==typeof self&&self||global;function _(e,t){for(var n=e.length-1;n>=0;n--)\"function\"==typeof e[n]&&(e[n]=p(e[n],t+\"_\"+n));return e}function m(e){return!e||!1!==e.writable&&!(\"function\"==typeof e.get&&void 0===e.set)}var k=\"undefined\"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,b=!(\"nw\"in y)&&void 0!==y.process&&\"[object process]\"==={}.toString.call(y.process),T=!b&&!k&&!(!v||!g.HTMLElement),E=void 0!==y.process&&\"[object process]\"==={}.toString.call(y.process)&&!k&&!(!v||!g.HTMLElement),w={},O=function(e){if(e=e||y.event){var t=w[e.type];t||(t=w[e.type]=d(\"ON_PROPERTY\"+e.type));var n,r=this||e.target||y,o=r[t];if(T&&r===g&&\"error\"===e.type){var a=e;!0===(n=o&&o.call(this,a.message,a.filename,a.lineno,a.colno,a.error))&&e.preventDefault()}else null==(n=o&&o.apply(this,arguments))||n||e.preventDefault();return n}};function S(n,r,o){var a=e(n,r);if(!a&&o&&e(o,r)&&(a={enumerable:!0,configurable:!0}),a&&a.configurable){var i=d(\"on\"+r+\"patched\");if(!n.hasOwnProperty(i)||!n[i]){delete a.writable,delete a.value;var c=a.get,s=a.set,u=r.slice(2),l=w[u];l||(l=w[u]=d(\"ON_PROPERTY\"+u)),a.set=function(e){var t=this;t||n!==y||(t=y),t&&(\"function\"==typeof t[l]&&t.removeEventListener(u,O),s&&s.call(t,null),t[l]=e,\"function\"==typeof e&&t.addEventListener(u,O,!1))},a.get=function(){var e=this;if(e||n!==y||(e=y),!e)return null;var t=e[l];if(t)return t;if(c){var o=c.call(this);if(o)return a.set.call(this,o),\"function\"==typeof e.removeAttribute&&e.removeAttribute(r),o}return null},t(n,r,a),n[i]=!0}}}function P(e,t,n){if(t)for(var r=0;r<t.length;r++)S(e,\"on\"+t[r],n);else{var o=[];for(var a in e)\"on\"==a.slice(0,2)&&o.push(a);for(var i=0;i<o.length;i++)S(e,o[i],n)}}var Z=d(\"originalInstance\");function D(e){var n=y[e];if(n){y[d(e)]=n,y[e]=function(){var t=_(arguments,e);switch(t.length){case 0:this[Z]=new n;break;case 1:this[Z]=new n(t[0]);break;case 2:this[Z]=new n(t[0],t[1]);break;case 3:this[Z]=new n(t[0],t[1],t[2]);break;case 4:this[Z]=new n(t[0],t[1],t[2],t[3]);break;default:throw new Error(\"Arg list too long.\")}},z(y[e],n);var r,o=new n((function(){}));for(r in o)\"XMLHttpRequest\"===e&&\"responseBlob\"===r||function(n){\"function\"==typeof o[n]?y[e].prototype[n]=function(){return this[Z][n].apply(this[Z],arguments)}:t(y[e].prototype,n,{set:function(t){\"function\"==typeof t?(this[Z][n]=p(t,e+\".\"+n),z(this[Z][n],t)):this[Z][n]=t},get:function(){return this[Z][n]}})}(r);for(r in n)\"prototype\"!==r&&n.hasOwnProperty(r)&&(y[e][r]=n[r])}}function j(t,r,o){for(var a=t;a&&!a.hasOwnProperty(r);)a=n(a);!a&&t[r]&&(a=t);var i=d(r),c=null;if(a&&(!(c=a[i])||!a.hasOwnProperty(i))&&(c=a[i]=a[r],m(a&&e(a,r)))){var s=o(c,i,r);a[r]=function(){return s(this,arguments)},z(a[r],c)}return c}function C(e,t,n){var r=null;function o(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=j(e,t,(function(e){return function(t,r){var a=n(t,r);return a.cbIdx>=0&&\"function\"==typeof r[a.cbIdx]?h(a.name,r[a.cbIdx],a,o):e.apply(t,r)}}))}function z(e,t){e[d(\"OriginalDelegate\")]=t}var M=!1,I=!1;function R(){if(M)return I;M=!0;try{var e=g.navigator.userAgent;-1===e.indexOf(\"MSIE \")&&-1===e.indexOf(\"Trident/\")&&-1===e.indexOf(\"Edge/\")||(I=!0)}catch(e){}return I}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */Zone.__load_patch(\"ZoneAwarePromise\",(function(e,t,n){var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,a=n.symbol,i=[],c=!0===e[a(\"DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION\")],s=a(\"Promise\"),u=a(\"then\");n.onUnhandledError=function(e){if(n.showUncaughtError()){var t=e&&e.rejection;t?console.error(\"Unhandled Promise rejection:\",t instanceof Error?t.message:t,\"; Zone:\",e.zone.name,\"; Task:\",e.task&&e.task.source,\"; Value:\",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=function(){for(var e=function(){var e=i.shift();try{e.zone.runGuarded((function(){if(e.throwOriginal)throw e.rejection;throw e}))}catch(e){!function r(e){n.onUnhandledError(e);try{var r=t[l];\"function\"==typeof r&&r.call(this,e)}catch(e){}}(e)}};i.length;)e()};var l=a(\"unhandledPromiseRejectionHandler\");function f(e){return e&&e.then}function p(e){return e}function h(e){return z.reject(e)}var d=a(\"state\"),v=a(\"value\"),g=a(\"finally\"),y=a(\"parentPromiseValue\"),_=a(\"parentPromiseState\"),m=null,k=!0,b=!1;function T(e,t){return function(n){try{O(e,t,n)}catch(t){O(e,!1,t)}}}var E=function(){var e=!1;return function t(n){return function(){e||(e=!0,n.apply(null,arguments))}}},w=a(\"currentTaskTrace\");function O(e,r,a){var s=E();if(e===a)throw new TypeError(\"Promise resolved with itself\");if(e[d]===m){var u=null;try{\"object\"!=typeof a&&\"function\"!=typeof a||(u=a&&a.then)}catch(t){return s((function(){O(e,!1,t)}))(),e}if(r!==b&&a instanceof z&&a.hasOwnProperty(d)&&a.hasOwnProperty(v)&&a[d]!==m)P(a),O(e,a[d],a[v]);else if(r!==b&&\"function\"==typeof u)try{u.call(a,s(T(e,r)),s(T(e,!1)))}catch(t){s((function(){O(e,!1,t)}))()}else{e[d]=r;var l=e[v];if(e[v]=a,e[g]===g&&r===k&&(e[d]=e[_],e[v]=e[y]),r===b&&a instanceof Error){var f=t.currentTask&&t.currentTask.data&&t.currentTask.data.__creationTrace__;f&&o(a,w,{configurable:!0,enumerable:!1,writable:!0,value:f})}for(var p=0;p<l.length;)Z(e,l[p++],l[p++],l[p++],l[p++]);if(0==l.length&&r==b){e[d]=0;var h=a;try{throw new Error(\"Uncaught (in promise): \"+function e(t){return t&&t.toString===Object.prototype.toString?(t.constructor&&t.constructor.name||\"\")+\": \"+JSON.stringify(t):t?t.toString():Object.prototype.toString.call(t)}(a)+(a&&a.stack?\"\\n\"+a.stack:\"\"))}catch(e){h=e}c&&(h.throwOriginal=!0),h.rejection=a,h.promise=e,h.zone=t.current,h.task=t.currentTask,i.push(h),n.scheduleMicroTask()}}}return e}var S=a(\"rejectionHandledHandler\");function P(e){if(0===e[d]){try{var n=t[S];n&&\"function\"==typeof n&&n.call(this,{rejection:e[v],promise:e})}catch(e){}e[d]=b;for(var r=0;r<i.length;r++)e===i[r].promise&&i.splice(r,1)}}function Z(e,t,n,r,o){P(e);var a=e[d],i=a?\"function\"==typeof r?r:p:\"function\"==typeof o?o:h;t.scheduleMicroTask(\"Promise.then\",(function(){try{var r=e[v],o=!!n&&g===n[g];o&&(n[y]=r,n[_]=a);var c=t.run(i,void 0,o&&i!==h&&i!==p?[]:[r]);O(n,!0,c)}catch(e){O(n,!1,e)}}),n)}var D=function(){},C=e.AggregateError,z=function(){function e(t){var n=this;if(!(n instanceof e))throw new Error(\"Must be an instanceof Promise.\");n[d]=m,n[v]=[];try{var r=E();t&&t(r(T(n,k)),r(T(n,b)))}catch(e){O(n,!1,e)}}return e.toString=function(){return\"function ZoneAwarePromise() { [native code] }\"},e.resolve=function(e){return O(new this(null),k,e)},e.reject=function(e){return O(new this(null),b,e)},e.any=function(t){if(!t||\"function\"!=typeof t[Symbol.iterator])return Promise.reject(new C([],\"All promises were rejected\"));var n=[],r=0;try{for(var o=0,a=t;o<a.length;o++)r++,n.push(e.resolve(a[o]))}catch(e){return Promise.reject(new C([],\"All promises were rejected\"))}if(0===r)return Promise.reject(new C([],\"All promises were rejected\"));var i=!1,c=[];return new e((function(e,t){for(var o=0;o<n.length;o++)n[o].then((function(t){i||(i=!0,e(t))}),(function(e){c.push(e),0==--r&&(i=!0,t(new C(c,\"All promises were rejected\")))}))}))},e.race=function(e){var t,n,r=new this((function(e,r){t=e,n=r}));function o(e){t(e)}function a(e){n(e)}for(var i=0,c=e;i<c.length;i++){var s=c[i];f(s)||(s=this.resolve(s)),s.then(o,a)}return r},e.all=function(t){return e.allWithCallback(t)},e.allSettled=function(t){return(this&&this.prototype instanceof e?this:e).allWithCallback(t,{thenCallback:function(e){return{status:\"fulfilled\",value:e}},errorCallback:function(e){return{status:\"rejected\",reason:e}}})},e.allWithCallback=function(e,t){for(var n,r,o=new this((function(e,t){n=e,r=t})),a=2,i=0,c=[],s=function(e){f(e)||(e=u.resolve(e));var o=i;try{e.then((function(e){c[o]=t?t.thenCallback(e):e,0==--a&&n(c)}),(function(e){t?(c[o]=t.errorCallback(e),0==--a&&n(c)):r(e)}))}catch(e){r(e)}a++,i++},u=this,l=0,p=e;l<p.length;l++)s(p[l]);return 0==(a-=2)&&n(c),o},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return\"Promise\"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.then=function(n,r){var o,a=null===(o=this.constructor)||void 0===o?void 0:o[Symbol.species];a&&\"function\"==typeof a||(a=this.constructor||e);var i=new a(D),c=t.current;return this[d]==m?this[v].push(c,i,n,r):Z(this,c,i,n,r),i},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(n){var r,o=null===(r=this.constructor)||void 0===r?void 0:r[Symbol.species];o&&\"function\"==typeof o||(o=e);var a=new o(D);a[g]=g;var i=t.current;return this[d]==m?this[v].push(i,a,n,n):Z(this,i,a,n,n),a},e}();z.resolve=z.resolve,z.reject=z.reject,z.race=z.race,z.all=z.all;var M=e[s]=e.Promise;e.Promise=z;var I=a(\"thenPatched\");function R(e){var t=e.prototype,n=r(t,\"then\");if(!n||!1!==n.writable&&n.configurable){var o=t.then;t[u]=o,e.prototype.then=function(e,t){var n=this;return new z((function(e,t){o.call(n,e,t)})).then(e,t)},e[I]=!0}}return n.patchThen=R,M&&(R(M),j(e,\"fetch\",(function(e){return function t(e){return function(t,n){var r=e.apply(t,n);if(r instanceof z)return r;var o=r.constructor;return o[I]||R(o),r}}(e)}))),Promise[t.__symbol__(\"uncaughtPromiseErrors\")]=i,z})),\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nZone.__load_patch(\"toString\",(function(e){var t=Function.prototype.toString,n=d(\"OriginalDelegate\"),r=d(\"Promise\"),o=d(\"Error\"),a=function a(){if(\"function\"==typeof this){var i=this[n];if(i)return\"function\"==typeof i?t.call(i):Object.prototype.toString.call(i);if(this===Promise){var c=e[r];if(c)return t.call(c)}if(this===Error){var s=e[o];if(s)return t.call(s)}}return t.call(this)};a[n]=t,Function.prototype.toString=a;var i=Object.prototype.toString;Object.prototype.toString=function(){return\"function\"==typeof Promise&&this instanceof Promise?\"[object Promise]\":i.call(this)}}));\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 L=!1;if(\"undefined\"!=typeof window)try{var A=Object.defineProperty({},\"passive\",{get:function(){L=!0}});window.addEventListener(\"test\",A,A),window.removeEventListener(\"test\",A,A)}catch(e){L=!1}var N,x,F,H,B,G={useG:!0},W={},q={},U=new RegExp(\"^\"+f+\"(\\\\w+)(true|false)$\"),V=d(\"propagationStopped\");function X(e,t){var n=(t?t(e):e)+l,r=(t?t(e):e)+u,o=f+n,a=f+r;W[e]={},W[e].false=o,W[e].true=a}function Y(e,t,r,o){var c=o&&o.add||a,s=o&&o.rm||i,p=o&&o.listeners||\"eventListeners\",h=o&&o.rmAll||\"removeAllListeners\",v=d(c),g=\".\"+c+\":\",y=function(e,t,n){if(!e.isRemoved){var r,o=e.callback;\"object\"==typeof o&&o.handleEvent&&(e.callback=function(e){return o.handleEvent(e)},e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}var a=e.options;return a&&\"object\"==typeof a&&a.once&&t[s].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,a),r}};function _(n,r,o){if(r=r||e.event){var a=n||r.target||e,i=a[W[r.type][o?u:l]];if(i){var c=[];if(1===i.length)(p=y(i[0],a,r))&&c.push(p);else for(var s=i.slice(),f=0;f<s.length&&(!r||!0!==r[V]);f++){var p;(p=y(s[f],a,r))&&c.push(p)}if(1===c.length)throw c[0];var h=function(e){var n=c[e];t.nativeScheduleMicroTask((function(){throw n}))};for(f=0;f<c.length;f++)h(f)}}}var m=function(e){return _(this,e,!1)},k=function(e){return _(this,e,!0)};function T(t,r){if(!t)return!1;var o=!0;r&&void 0!==r.useG&&(o=r.useG);var a=r&&r.vh,i=!0;r&&void 0!==r.chkDup&&(i=r.chkDup);var y=!1;r&&void 0!==r.rt&&(y=r.rt);for(var _=t;_&&!_.hasOwnProperty(c);)_=n(_);if(!_&&t[c]&&(_=t),!_)return!1;if(_[v])return!1;var T,E=r&&r.eventNameToString,w={},O=_[v]=_[c],S=_[d(s)]=_[s],P=_[d(p)]=_[p],Z=_[d(h)]=_[h];function D(e,t){return!L&&\"object\"==typeof e&&e?!!e.capture:L&&t?\"boolean\"==typeof e?{capture:e,passive:!0}:e?\"object\"==typeof e&&!1!==e.passive?Object.assign(Object.assign({},e),{passive:!0}):e:{passive:!0}:e}r&&r.prepend&&(T=_[d(r.prepend)]=_[r.prepend]);var j=o?function(e){if(!w.isExisting)return O.call(w.target,w.eventName,w.capture?k:m,w.options)}:function(e){return O.call(w.target,w.eventName,e.invoke,w.options)},C=o?function(e){if(!e.isRemoved){var t=W[e.eventName],n=void 0;t&&(n=t[e.capture?u:l]);var r=n&&e.target[n];if(r)for(var o=0;o<r.length;o++)if(r[o]===e){r.splice(o,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return S.call(e.target,e.eventName,e.capture?k:m,e.options)}:function(e){return S.call(e.target,e.eventName,e.invoke,e.options)},M=r&&r.diff?r.diff:function(e,t){var n=typeof t;return\"function\"===n&&e.callback===t||\"object\"===n&&e.originalDelegate===t},I=Zone[d(\"UNPATCHED_EVENTS\")],R=e[d(\"PASSIVE_EVENTS\")],A=function(t,n,c,s,f,p){return void 0===f&&(f=!1),void 0===p&&(p=!1),function(){var h=this||e,d=arguments[0];r&&r.transferEventName&&(d=r.transferEventName(d));var v=arguments[1];if(!v)return t.apply(this,arguments);if(b&&\"uncaughtException\"===d)return t.apply(this,arguments);var g=!1;if(\"function\"!=typeof v){if(!v.handleEvent)return t.apply(this,arguments);g=!0}if(!a||a(t,v,h,arguments)){var y=L&&!!R&&-1!==R.indexOf(d),_=D(arguments[2],y);if(I)for(var m=0;m<I.length;m++)if(d===I[m])return y?t.call(h,d,v,_):t.apply(this,arguments);var k=!!_&&(\"boolean\"==typeof _||_.capture),T=!(!_||\"object\"!=typeof _)&&_.once,O=Zone.current,S=W[d];S||(X(d,E),S=W[d]);var P,Z=S[k?u:l],j=h[Z],C=!1;if(j){if(C=!0,i)for(m=0;m<j.length;m++)if(M(j[m],v))return}else j=h[Z]=[];var z=h.constructor.name,A=q[z];A&&(P=A[d]),P||(P=z+n+(E?E(d):d)),w.options=_,T&&(w.options.once=!1),w.target=h,w.capture=k,w.eventName=d,w.isExisting=C;var N=o?G:void 0;N&&(N.taskData=w);var x=O.scheduleEventTask(P,v,N,c,s);return w.target=null,N&&(N.taskData=null),T&&(_.once=!0),(L||\"boolean\"!=typeof x.options)&&(x.options=_),x.target=h,x.capture=k,x.eventName=d,g&&(x.originalDelegate=v),p?j.unshift(x):j.push(x),f?h:void 0}}};return _[c]=A(O,g,j,C,y),T&&(_.prependListener=A(T,\".prependListener:\",(function(e){return T.call(w.target,w.eventName,e.invoke,w.options)}),C,y,!0)),_[s]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));var o=arguments[2],i=!!o&&(\"boolean\"==typeof o||o.capture),c=arguments[1];if(!c)return S.apply(this,arguments);if(!a||a(S,c,t,arguments)){var s,p=W[n];p&&(s=p[i?u:l]);var h=s&&t[s];if(h)for(var d=0;d<h.length;d++){var v=h[d];if(M(v,c)){if(h.splice(d,1),v.isRemoved=!0,0===h.length&&(v.allRemoved=!0,t[s]=null,\"string\"==typeof n)){var g=f+\"ON_PROPERTY\"+n;t[g]=null}return v.zone.cancelTask(v),y?t:void 0}}return S.apply(this,arguments)}},_[p]=function(){var t=this||e,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));for(var o=[],a=J(t,E?E(n):n),i=0;i<a.length;i++){var c=a[i],s=c.originalDelegate?c.originalDelegate:c.callback;o.push(s)}return o},_[h]=function(){var t=this||e,n=arguments[0];if(n){r&&r.transferEventName&&(n=r.transferEventName(n));var o=W[n];if(o){var a=o.false,i=o.true,c=t[a],u=t[i];if(c){var l=c.slice();for(d=0;d<l.length;d++)this[s].call(this,n,(f=l[d]).originalDelegate?f.originalDelegate:f.callback,f.options)}if(u)for(l=u.slice(),d=0;d<l.length;d++){var f;this[s].call(this,n,(f=l[d]).originalDelegate?f.originalDelegate:f.callback,f.options)}}}else{for(var p=Object.keys(t),d=0;d<p.length;d++){var v=p[d],g=U.exec(v),_=g&&g[1];_&&\"removeListener\"!==_&&this[h].call(this,_)}this[h].call(this,\"removeListener\")}if(y)return this},z(_[c],O),z(_[s],S),Z&&z(_[h],Z),P&&z(_[p],P),!0}for(var E=[],w=0;w<r.length;w++)E[w]=T(r[w],o);return E}function J(e,t){if(!t){var n=[];for(var r in e){var o=U.exec(r),a=o&&o[1];if(a&&(!t||a===t)){var i=e[r];if(i)for(var c=0;c<i.length;c++)n.push(i[c])}}return n}var s=W[t];s||(X(t),s=W[t]);var u=e[s.false],l=e[s.true];return u?l?u.concat(l):u.slice():l?l.slice():[]}function K(e,t){var n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,\"stopImmediatePropagation\",(function(e){return function(t,n){t[V]=!0,e&&e.apply(t,n)}}))}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */function Q(e,t,n,r,o){var a=Zone.__symbol__(r);if(!t[a]){var i=t[a]=t[r];t[r]=function(a,c,s){return c&&c.prototype&&o.forEach((function(t){var o=\"\".concat(n,\".\").concat(r,\"::\")+t,a=c.prototype;try{if(a.hasOwnProperty(t)){var i=e.ObjectGetOwnPropertyDescriptor(a,t);i&&i.value?(i.value=e.wrapWithCurrentZone(i.value,o),e._redefineProperty(c.prototype,t,i)):a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],o))}else a[t]&&(a[t]=e.wrapWithCurrentZone(a[t],o))}catch(e){}})),i.call(t,a,c,s)},e.attachOriginToPatched(t[r],i)}}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */function $(e,t,n){if(!n||0===n.length)return t;var r=n.filter((function(t){return t.target===e}));if(!r||0===r.length)return t;var o=r[0].ignoreProperties;return t.filter((function(e){return-1===o.indexOf(e)}))}function ee(e,t,n,r){e&&P(e,$(e,t,n),r)}function te(e){return Object.getOwnPropertyNames(e).filter((function(e){return e.startsWith(\"on\")&&e.length>2})).map((function(e){return e.substring(2)}))}function ne(e,t){if((!b||E)&&!Zone[e.symbol(\"patchEvents\")]){var r=t.__Zone_ignore_on_properties,o=[];if(T){var a=window;o=o.concat([\"Document\",\"SVGElement\",\"Element\",\"HTMLElement\",\"HTMLBodyElement\",\"HTMLMediaElement\",\"HTMLFrameSetElement\",\"HTMLFrameElement\",\"HTMLIFrameElement\",\"HTMLMarqueeElement\",\"Worker\"]);var i=function e(){try{var e=g.navigator.userAgent;if(-1!==e.indexOf(\"MSIE \")||-1!==e.indexOf(\"Trident/\"))return!0}catch(e){}return!1}()?[{target:a,ignoreProperties:[\"error\"]}]:[];ee(a,te(a),r?r.concat(i):r,n(a))}o=o.concat([\"XMLHttpRequest\",\"XMLHttpRequestEventTarget\",\"IDBIndex\",\"IDBRequest\",\"IDBOpenDBRequest\",\"IDBDatabase\",\"IDBTransaction\",\"IDBCursor\",\"WebSocket\"]);for(var c=0;c<o.length;c++){var s=t[o[c]];s&&s.prototype&&ee(s.prototype,te(s.prototype),r)}}}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */function re(){N=Zone.__symbol__,x=Object[N(\"defineProperty\")]=Object.defineProperty,F=Object[N(\"getOwnPropertyDescriptor\")]=Object.getOwnPropertyDescriptor,H=Object.create,B=N(\"unconfigurables\"),Object.defineProperty=function(e,t,n){if(ae(e,t))throw new TypeError(\"Cannot assign to read only property '\"+t+\"' of \"+e);var r=n.configurable;return\"prototype\"!==t&&(n=ie(e,t,n)),ce(e,t,n,r)},Object.defineProperties=function(e,t){Object.keys(t).forEach((function(n){Object.defineProperty(e,n,t[n])}));for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++){var o=r[n],a=Object.getOwnPropertyDescriptor(t,o);(null==a?void 0:a.enumerable)&&Object.defineProperty(e,o,t[o])}return e},Object.create=function(e,t){return\"object\"!=typeof t||Object.isFrozen(t)||Object.keys(t).forEach((function(n){t[n]=ie(e,n,t[n])})),H(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=F(e,t);return n&&ae(e,t)&&(n.configurable=!1),n}}function oe(e,t,n){var r=n.configurable;return ce(e,t,n=ie(e,t,n),r)}function ae(e,t){return e&&e[B]&&e[B][t]}function ie(e,t,n){return Object.isFrozen(n)||(n.configurable=!0),n.configurable||(e[B]||Object.isFrozen(e)||x(e,B,{writable:!0,value:{}}),e[B]&&(e[B][t]=!0)),n}function ce(e,t,n,r){try{return x(e,t,n)}catch(i){if(!n.configurable)throw i;void 0===r?delete n.configurable:n.configurable=r;try{return x(e,t,n)}catch(r){var o=!1;if(\"createdCallback\"!==t&&\"attachedCallback\"!==t&&\"detachedCallback\"!==t&&\"attributeChangedCallback\"!==t||(o=!0),!o)throw r;var a=null;try{a=JSON.stringify(n)}catch(e){a=n.toString()}console.log(\"Attempting to configure '\".concat(t,\"' with descriptor '\").concat(a,\"' on object '\").concat(e,\"' and got error, giving up: \").concat(r))}}}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */function se(e,t){var n=t.getGlobalObjects(),r=n.eventNames,o=n.globalSources,a=n.zoneSymbolEventNames,i=n.TRUE_STR,c=n.FALSE_STR,s=n.ZONE_SYMBOL_PREFIX,u=\"ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket\".split(\",\"),l=[],f=e.wtf,p=\"Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video\".split(\",\");f?l=p.map((function(e){return\"HTML\"+e+\"Element\"})).concat(u):e.EventTarget?l.push(\"EventTarget\"):l=u;for(var h=e.__Zone_disable_IE_check||!1,d=e.__Zone_enable_cross_context_check||!1,v=t.isIEOrEdge(),g=\"[object FunctionWrapper]\",y=\"function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }\",_={MSPointerCancel:\"pointercancel\",MSPointerDown:\"pointerdown\",MSPointerEnter:\"pointerenter\",MSPointerHover:\"pointerhover\",MSPointerLeave:\"pointerleave\",MSPointerMove:\"pointermove\",MSPointerOut:\"pointerout\",MSPointerOver:\"pointerover\",MSPointerUp:\"pointerup\"},m=0;m<r.length;m++){var k=s+((O=r[m])+c),b=s+(O+i);a[O]={},a[O][c]=k,a[O][i]=b}for(m=0;m<p.length;m++)for(var T=p[m],E=o[T]={},w=0;w<r.length;w++){var O;E[O=r[w]]=T+\".addEventListener:\"+O}var S=[];for(m=0;m<l.length;m++){var P=e[l[m]];S.push(P&&P.prototype)}return t.patchEventTarget(e,t,S,{vh:function(e,t,n,r){if(!h&&v){if(d)try{var o;if((o=t.toString())===g||o==y)return e.apply(n,r),!1}catch(t){return e.apply(n,r),!1}else if((o=t.toString())===g||o==y)return e.apply(n,r),!1}else if(d)try{t.toString()}catch(t){return e.apply(n,r),!1}return!0},transferEventName:function(e){return _[e]||e}}),Zone[t.symbol(\"patchEventTarget\")]=!!e.EventTarget,!0}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 ue(e,t){var n=e.getGlobalObjects();if((!n.isNode||n.isMix)&&!function r(e,t){var n=e.getGlobalObjects();if((n.isBrowser||n.isMix)&&!e.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype,\"onclick\")&&\"undefined\"!=typeof Element){var r=e.ObjectGetOwnPropertyDescriptor(Element.prototype,\"onclick\");if(r&&!r.configurable)return!1;if(r){e.ObjectDefineProperty(Element.prototype,\"onclick\",{enumerable:!0,configurable:!0,get:function(){return!0}});var o=!!document.createElement(\"div\").onclick;return e.ObjectDefineProperty(Element.prototype,\"onclick\",r),o}}var a=t.XMLHttpRequest;if(!a)return!1;var i=\"onreadystatechange\",c=a.prototype,s=e.ObjectGetOwnPropertyDescriptor(c,i);if(s)return e.ObjectDefineProperty(c,i,{enumerable:!0,configurable:!0,get:function(){return!0}}),o=!!(l=new a).onreadystatechange,e.ObjectDefineProperty(c,i,s||{}),o;var u=e.symbol(\"fake\");e.ObjectDefineProperty(c,i,{enumerable:!0,configurable:!0,get:function(){return this[u]},set:function(e){this[u]=e}});var l,f=function(){};return(l=new a).onreadystatechange=f,o=l[u]===f,l.onreadystatechange=null,o}(e,t)){var o=\"undefined\"!=typeof WebSocket;!function n(e){for(var t=e.symbol(\"unbound\"),n=function(n){var r=le[n],o=\"on\"+r;self.addEventListener(r,(function(n){var r,a,i=n.target;for(a=i?i.constructor.name+\".\"+o:\"unknown.\"+o;i;)i[o]&&!i[o][t]&&((r=e.wrapWithCurrentZone(i[o],a))[t]=i[o],i[o]=r),i=i.parentElement}),!0)},r=0;r<le.length;r++)n(r)}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */(e),e.patchClass(\"XMLHttpRequest\"),o&&function r(e,t){var n=e.getGlobalObjects(),r=n.ADD_EVENT_LISTENER_STR,o=n.REMOVE_EVENT_LISTENER_STR,a=t.WebSocket;t.EventTarget||e.patchEventTarget(t,e,[a.prototype]),t.WebSocket=function(t,n){var i,c,s=arguments.length>1?new a(t,n):new a(t),u=e.ObjectGetOwnPropertyDescriptor(s,\"onmessage\");return u&&!1===u.configurable?(i=e.ObjectCreate(s),c=s,[r,o,\"send\",\"close\"].forEach((function(t){i[t]=function(){var n=e.ArraySlice.call(arguments);if(t===r||t===o){var a=n.length>0?n[0]:void 0;if(a){var c=Zone.__symbol__(\"ON_PROPERTY\"+a);s[c]=i[c]}}return s[t].apply(s,n)}}))):i=s,e.patchOnProperties(i,[\"close\",\"error\",\"message\",\"open\"],c),i};var i=t.WebSocket;for(var c in a)i[c]=a[c]}(e,t),Zone[e.symbol(\"patchEvents\")]=!0}}Zone.__load_patch(\"util\",(function(n,c,s){var h=te(n);s.patchOnProperties=P,s.patchMethod=j,s.bindArguments=_,s.patchMacroTask=C;var d=c.__symbol__(\"BLACK_LISTED_EVENTS\"),v=c.__symbol__(\"UNPATCHED_EVENTS\");n[v]&&(n[d]=n[v]),n[d]&&(c[d]=c[v]=n[d]),s.patchEventPrototype=K,s.patchEventTarget=Y,s.isIEOrEdge=R,s.ObjectDefineProperty=t,s.ObjectGetOwnPropertyDescriptor=e,s.ObjectCreate=r,s.ArraySlice=o,s.patchClass=D,s.wrapWithCurrentZone=p,s.filterProperties=$,s.attachOriginToPatched=z,s._redefineProperty=Object.defineProperty,s.patchCallbacks=Q,s.getGlobalObjects=function(){return{globalSources:q,zoneSymbolEventNames:W,eventNames:h,isBrowser:T,isMix:E,isNode:b,TRUE_STR:u,FALSE_STR:l,ZONE_SYMBOL_PREFIX:f,ADD_EVENT_LISTENER_STR:a,REMOVE_EVENT_LISTENER_STR:i}}}));var le=__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([],[\"abort\",\"animationcancel\",\"animationend\",\"animationiteration\",\"auxclick\",\"beforeinput\",\"blur\",\"cancel\",\"canplay\",\"canplaythrough\",\"change\",\"compositionstart\",\"compositionupdate\",\"compositionend\",\"cuechange\",\"click\",\"close\",\"contextmenu\",\"curechange\",\"dblclick\",\"drag\",\"dragend\",\"dragenter\",\"dragexit\",\"dragleave\",\"dragover\",\"drop\",\"durationchange\",\"emptied\",\"ended\",\"error\",\"focus\",\"focusin\",\"focusout\",\"gotpointercapture\",\"input\",\"invalid\",\"keydown\",\"keypress\",\"keyup\",\"load\",\"loadstart\",\"loadeddata\",\"loadedmetadata\",\"lostpointercapture\",\"mousedown\",\"mouseenter\",\"mouseleave\",\"mousemove\",\"mouseout\",\"mouseover\",\"mouseup\",\"mousewheel\",\"orientationchange\",\"pause\",\"play\",\"playing\",\"pointercancel\",\"pointerdown\",\"pointerenter\",\"pointerleave\",\"pointerlockchange\",\"mozpointerlockchange\",\"webkitpointerlockerchange\",\"pointerlockerror\",\"mozpointerlockerror\",\"webkitpointerlockerror\",\"pointermove\",\"pointout\",\"pointerover\",\"pointerup\",\"progress\",\"ratechange\",\"reset\",\"resize\",\"scroll\",\"seeked\",\"seeking\",\"select\",\"selectionchange\",\"selectstart\",\"show\",\"sort\",\"stalled\",\"submit\",\"suspend\",\"timeupdate\",\"volumechange\",\"touchcancel\",\"touchmove\",\"touchstart\",\"touchend\",\"transitioncancel\",\"transitionend\",\"waiting\",\"wheel\"],!0),[\"webglcontextrestored\",\"webglcontextlost\",\"webglcontextcreationerror\"],!0),[\"autocomplete\",\"autocompleteerror\"],!0),[\"toggle\"],!0),[\"afterscriptexecute\",\"beforescriptexecute\",\"DOMContentLoaded\",\"freeze\",\"fullscreenchange\",\"mozfullscreenchange\",\"webkitfullscreenchange\",\"msfullscreenchange\",\"fullscreenerror\",\"mozfullscreenerror\",\"webkitfullscreenerror\",\"msfullscreenerror\",\"readystatechange\",\"visibilitychange\",\"resume\"],!0),[\"absolutedeviceorientation\",\"afterinput\",\"afterprint\",\"appinstalled\",\"beforeinstallprompt\",\"beforeprint\",\"beforeunload\",\"devicelight\",\"devicemotion\",\"deviceorientation\",\"deviceorientationabsolute\",\"deviceproximity\",\"hashchange\",\"languagechange\",\"message\",\"mozbeforepaint\",\"offline\",\"online\",\"paint\",\"pageshow\",\"pagehide\",\"popstate\",\"rejectionhandled\",\"storage\",\"unhandledrejection\",\"unload\",\"userproximity\",\"vrdisplayconnected\",\"vrdisplaydisconnected\",\"vrdisplaypresentchange\"],!0),[\"beforecopy\",\"beforecut\",\"beforepaste\",\"copy\",\"cut\",\"paste\",\"dragstart\",\"loadend\",\"animationstart\",\"search\",\"transitionrun\",\"transitionstart\",\"webkitanimationend\",\"webkitanimationiteration\",\"webkitanimationstart\",\"webkittransitionend\"],!0),[\"activate\",\"afterupdate\",\"ariarequest\",\"beforeactivate\",\"beforedeactivate\",\"beforeeditfocus\",\"beforeupdate\",\"cellchange\",\"controlselect\",\"dataavailable\",\"datasetchanged\",\"datasetcomplete\",\"errorupdate\",\"filterchange\",\"layoutcomplete\",\"losecapture\",\"move\",\"moveend\",\"movestart\",\"propertychange\",\"resizeend\",\"resizestart\",\"rowenter\",\"rowexit\",\"rowsdelete\",\"rowsinserted\",\"command\",\"compassneedscalibration\",\"deactivate\",\"help\",\"mscontentzoom\",\"msmanipulationstatechanged\",\"msgesturechange\",\"msgesturedoubletap\",\"msgestureend\",\"msgesturehold\",\"msgesturestart\",\"msgesturetap\",\"msgotpointercapture\",\"msinertiastart\",\"mslostpointercapture\",\"mspointercancel\",\"mspointerdown\",\"mspointerenter\",\"mspointerhover\",\"mspointerleave\",\"mspointermove\",\"mspointerout\",\"mspointerover\",\"mspointerup\",\"pointerout\",\"mssitemodejumplistitemremoved\",\"msthumbnailclick\",\"stop\",\"storagecommit\"],!0);\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n!function(e){var t=e.__Zone_symbol_prefix||\"__zone_symbol__\";e[function n(e){return t+e}(\"legacyPatch\")]=function(){var t=e.Zone;t.__load_patch(\"defineProperty\",(function(e,t,n){n._redefineProperty=oe,re()})),t.__load_patch(\"registerElement\",(function(e,t,n){!function r(e,t){var n=t.getGlobalObjects();(n.isBrowser||n.isMix)&&\"registerElement\"in e.document&&t.patchCallbacks(t,document,\"Document\",\"registerElement\",[\"createdCallback\",\"attachedCallback\",\"detachedCallback\",\"attributeChangedCallback\"])}(e,n)})),t.__load_patch(\"EventTargetLegacy\",(function(e,t,n){se(e,n),ue(n,e)}))}}(\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{});\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 fe=d(\"zoneTask\");function pe(e,t,n,r){var o=null,a=null;n+=r;var i={};function c(t){var n=t.data;return n.args[0]=function(){return t.invoke.apply(this,arguments)},n.handleId=o.apply(e,n.args),t}function s(t){return a.call(e,t.data.handleId)}o=j(e,t+=r,(function(n){return function(o,a){if(\"function\"==typeof a[0]){var u={isPeriodic:\"Interval\"===r,delay:\"Timeout\"===r||\"Interval\"===r?a[1]||0:void 0,args:a},l=a[0];a[0]=function e(){try{return l.apply(this,arguments)}finally{u.isPeriodic||(\"number\"==typeof u.handleId?delete i[u.handleId]:u.handleId&&(u.handleId[fe]=null))}};var f=h(t,a[0],u,c,s);if(!f)return f;var p=f.data.handleId;return\"number\"==typeof p?i[p]=f:p&&(p[fe]=f),p&&p.ref&&p.unref&&\"function\"==typeof p.ref&&\"function\"==typeof p.unref&&(f.ref=p.ref.bind(p),f.unref=p.unref.bind(p)),\"number\"==typeof p||p?p:f}return n.apply(e,a)}})),a=j(e,n,(function(t){return function(n,r){var o,a=r[0];\"number\"==typeof a?o=i[a]:(o=a&&a[fe])||(o=a),o&&\"string\"==typeof o.type?\"notScheduled\"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&(\"number\"==typeof a?delete i[a]:a&&(a[fe]=null),o.zone.cancelTask(o)):t.apply(e,r)}}))}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 he(e,t){if(!Zone[t.symbol(\"patchEventTarget\")]){for(var n=t.getGlobalObjects(),r=n.eventNames,o=n.zoneSymbolEventNames,a=n.TRUE_STR,i=n.FALSE_STR,c=n.ZONE_SYMBOL_PREFIX,s=0;s<r.length;s++){var u=r[s],l=c+(u+i),f=c+(u+a);o[u]={},o[u][i]=l,o[u][a]=f}var p=e.EventTarget;if(p&&p.prototype)return t.patchEventTarget(e,t,[p&&p.prototype]),!0}}\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nZone.__load_patch(\"legacy\",(function(e){var t=e[Zone.__symbol__(\"legacyPatch\")];t&&t()})),Zone.__load_patch(\"queueMicrotask\",(function(e,t,n){n.patchMethod(e,\"queueMicrotask\",(function(e){return function(e,n){t.current.scheduleMicroTask(\"queueMicrotask\",n[0])}}))})),Zone.__load_patch(\"timers\",(function(e){var t=\"set\",n=\"clear\";pe(e,t,n,\"Timeout\"),pe(e,t,n,\"Interval\"),pe(e,t,n,\"Immediate\")})),Zone.__load_patch(\"requestAnimationFrame\",(function(e){pe(e,\"request\",\"cancel\",\"AnimationFrame\"),pe(e,\"mozRequest\",\"mozCancel\",\"AnimationFrame\"),pe(e,\"webkitRequest\",\"webkitCancel\",\"AnimationFrame\")})),Zone.__load_patch(\"blocking\",(function(e,t){for(var n=[\"alert\",\"prompt\",\"confirm\"],r=0;r<n.length;r++)j(e,n[r],(function(n,r,o){return function(r,a){return t.current.run(n,e,a,o)}}))})),Zone.__load_patch(\"EventTarget\",(function(e,t,n){!function r(e,t){t.patchEventPrototype(e,t)}(e,n),he(e,n);var o=e.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(e,n,[o.prototype])})),Zone.__load_patch(\"MutationObserver\",(function(e,t,n){D(\"MutationObserver\"),D(\"WebKitMutationObserver\")})),Zone.__load_patch(\"IntersectionObserver\",(function(e,t,n){D(\"IntersectionObserver\")})),Zone.__load_patch(\"FileReader\",(function(e,t,n){D(\"FileReader\")})),Zone.__load_patch(\"on_property\",(function(e,t,n){ne(n,e)})),Zone.__load_patch(\"customElements\",(function(e,t,n){!function r(e,t){var n=t.getGlobalObjects();(n.isBrowser||n.isMix)&&e.customElements&&\"customElements\"in e&&t.patchCallbacks(t,e.customElements,\"customElements\",\"define\",[\"connectedCallback\",\"disconnectedCallback\",\"adoptedCallback\",\"attributeChangedCallback\"])}(e,n)})),Zone.__load_patch(\"XHR\",(function(e,t){!function n(e){var n=e.XMLHttpRequest;if(n){var f=n.prototype,p=f[c],v=f[s];if(!p){var g=e.XMLHttpRequestEventTarget;if(g){var y=g.prototype;p=y[c],v=y[s]}}var _=\"readystatechange\",m=\"scheduled\",k=j(f,\"open\",(function(){return function(e,t){return e[o]=0==t[2],e[u]=t[1],k.apply(e,t)}})),b=d(\"fetchTaskAborting\"),T=d(\"fetchTaskScheduling\"),E=j(f,\"send\",(function(){return function(e,n){if(!0===t.current[T])return E.apply(e,n);if(e[o])return E.apply(e,n);var r={target:e,url:e[u],isPeriodic:!1,args:n,aborted:!1},a=h(\"XMLHttpRequest.send\",S,r,O,P);e&&!0===e[l]&&!r.aborted&&a.state===m&&a.invoke()}})),w=j(f,\"abort\",(function(){return function(e,n){var o=function a(e){return e[r]}(e);if(o&&\"string\"==typeof o.type){if(null==o.cancelFn||o.data&&o.data.aborted)return;o.zone.cancelTask(o)}else if(!0===t.current[b])return w.apply(e,n)}}))}function O(e){var n=e.data,o=n.target;o[i]=!1,o[l]=!1;var u=o[a];p||(p=o[c],v=o[s]),u&&v.call(o,_,u);var f=o[a]=function(){if(o.readyState===o.DONE)if(!n.aborted&&o[i]&&e.state===m){var r=o[t.__symbol__(\"loadfalse\")];if(0!==o.status&&r&&r.length>0){var a=e.invoke;e.invoke=function(){for(var r=o[t.__symbol__(\"loadfalse\")],i=0;i<r.length;i++)r[i]===e&&r.splice(i,1);n.aborted||e.state!==m||a.call(e)},r.push(e)}else e.invoke()}else n.aborted||!1!==o[i]||(o[l]=!0)};return p.call(o,_,f),o[r]||(o[r]=e),E.apply(o,n.args),o[i]=!0,e}function S(){}function P(e){var t=e.data;return t.aborted=!0,w.apply(t.target,t.args)}}(e);var r=d(\"xhrTask\"),o=d(\"xhrSync\"),a=d(\"xhrListener\"),i=d(\"xhrScheduled\"),u=d(\"xhrURL\"),l=d(\"xhrErrorBeforeScheduled\")})),Zone.__load_patch(\"geolocation\",(function(t){t.navigator&&t.navigator.geolocation&&function n(t,r){for(var o=t.constructor.name,a=function(n){var a=r[n],i=t[a];if(i){if(!m(e(t,a)))return\"continue\";t[a]=function(e){var t=function(){return e.apply(this,_(arguments,o+\".\"+a))};return z(t,e),t}(i)}},i=0;i<r.length;i++)a(i)}(t.navigator.geolocation,[\"getCurrentPosition\",\"watchPosition\"])})),Zone.__load_patch(\"PromiseRejectionEvent\",(function(e,t){function n(t){return function(n){J(e,t).forEach((function(r){var o=e.PromiseRejectionEvent;if(o){var a=new o(t,{promise:n.promise,reason:n.rejection});r.invoke(a)}}))}}e.PromiseRejectionEvent&&(t[d(\"unhandledPromiseRejectionHandler\")]=n(\"unhandledrejection\"),t[d(\"rejectionHandledHandler\")]=n(\"rejectionhandled\"))}))}));","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","/**\n * @license Angular v14.1.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, ɵɵinject, Inject, Optional, EventEmitter, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵisListLikeIterable, ɵstringify, Directive, Input, createNgModule, NgModuleRef, ɵRuntimeError, Host, Attribute, RendererStyleFlags2, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable } 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 */\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: useBrowserPlatformLocation });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: PlatformLocation, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'platform',\n // See #23917\n useFactory: useBrowserPlatformLocation\n }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserPlatformLocation, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nBrowserPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: createBrowserPlatformLocation });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: BrowserPlatformLocation, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'platform',\n // See #23917\n useFactory: createBrowserPlatformLocation,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: provideLocationStrategy });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: LocationStrategy, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: provideLocationStrategy }]\n }] });\nfunction provideLocationStrategy() {\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 /** @nodoc */\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 getState() {\n return this._platformLocation.getState();\n }\n historyGo(relativePosition = 0) {\n this._platformLocation.historyGo?.(relativePosition);\n }\n}\nPathLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nPathLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: PathLocationStrategy });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: PathLocationStrategy, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: PlatformLocation }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [APP_BASE_HREF]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 /** @nodoc */\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 getState() {\n return this._platformLocation.getState();\n }\n historyGo(relativePosition = 0) {\n this._platformLocation.historyGo?.(relativePosition);\n }\n}\nHashLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\nHashLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HashLocationStrategy });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HashLocationStrategy, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: PlatformLocation }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [APP_BASE_HREF]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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(locationStrategy) {\n /** @internal */\n this._subject = new EventEmitter();\n /** @internal */\n this._urlChangeListeners = [];\n /** @internal */\n this._urlChangeSubscription = null;\n this._locationStrategy = locationStrategy;\n const browserBaseHref = this._locationStrategy.getBaseHref();\n this._baseHref = stripTrailingSlash(_stripIndexHtml(browserBaseHref));\n this._locationStrategy.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 /** @nodoc */\n ngOnDestroy() {\n this._urlChangeSubscription?.unsubscribe();\n this._urlChangeListeners = [];\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._locationStrategy.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._locationStrategy.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._locationStrategy.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._locationStrategy.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._locationStrategy.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._locationStrategy.forward();\n }\n /**\n * Navigates back in the platform's history.\n */\n back() {\n this._locationStrategy.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 this._locationStrategy.historyGo?.(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 * @returns A function that, when executed, unregisters a URL change listener.\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 return () => {\n const fnIndex = this._urlChangeListeners.indexOf(fn);\n this._urlChangeListeners.splice(fnIndex, 1);\n if (this._urlChangeListeners.length === 0) {\n this._urlChangeSubscription?.unsubscribe();\n this._urlChangeSubscription = null;\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}\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.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable });\nLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: Location, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n // See #23917\n useFactory: createLocation,\n }]\n }], ctorParameters: function () { return [{ type: LocationStrategy }]; } });\nfunction createLocation() {\n return new Location(ɵɵinject(LocationStrategy));\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, \"؋\", 0], \"ALL\": [undefined, undefined, 0], \"AMD\": [undefined, \"֏\", 2], \"AOA\": [undefined, \"Kz\"], \"ARS\": [undefined, \"$\"], \"AUD\": [\"A$\", \"$\"], \"AZN\": [undefined, \"₼\"], \"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, 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, \"₾\"], \"GHS\": [undefined, \"GH₵\"], \"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\": [\"₱\"], \"PKR\": [undefined, \"Rs\", 2], \"PLN\": [undefined, \"zł\"], \"PYG\": [undefined, \"₲\", 0], \"RON\": [undefined, \"lei\"], \"RSD\": [undefined, undefined, 0], \"RUB\": [undefined, \"₽\"], \"RWF\": [undefined, \"RF\", 0], \"SBD\": [undefined, \"$\"], \"SEK\": [undefined, \"kr\", 2], \"SGD\": [undefined, \"$\"], \"SHP\": [undefined, \"£\"], \"SLE\": [undefined, undefined, 2], \"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\": [\"F 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-overview)\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-overview)\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-overview)\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-overview)\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-overview)\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-overview)\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-overview)\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-overview)\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-overview)\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-overview)\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-overview)\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-overview)\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 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-overview)\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-overview)\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-overview)\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-overview)\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-overview)\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-overview)\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-overview)\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-overview)\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-common-format-data-locale).\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-overview)\n *\n * @publicApi\n */\nfunction getLocaleExtraDayPeriodRules(locale) {\n const data = ɵfindLocaleData(locale);\n checkFullData(data);\n const rules = data[ɵLocaleDataIndex.ExtraData][2 /* ɵExtraLocaleDataIndex.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-common-format-data-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 The translated day-period strings.\n * @see `getLocaleExtraDayPeriodRules()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)\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 /* ɵExtraLocaleDataIndex.ExtraDayPeriodFormats */],\n data[ɵLocaleDataIndex.ExtraData][1 /* ɵExtraLocaleDataIndex.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-overview)\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-overview)\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-overview)\n *\n * @publicApi\n */\nfunction getCurrencySymbol(code, format, locale = 'en') {\n const currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];\n const symbolNarrow = currency[1 /* ɵCurrencyIndex.SymbolNarrow */];\n if (format === 'narrow' && typeof symbolNarrow === 'string') {\n return symbolNarrow;\n }\n return currency[0 /* ɵCurrencyIndex.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-overview)\n *\n * @publicApi\n */\nfunction getNumberOfCurrencyDigits(code) {\n let digits;\n const currency = CURRENCIES_EN[code];\n if (currency) {\n digits = currency[2 /* ɵCurrencyIndex.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-overview)\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 ? dateFormatter(date, locale, dateTimezoneOffset) :\n value === '\\'\\'' ? '\\'' :\n 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.slice(strNum.length - digits);\n }\n return neg + strNum;\n}\nfunction formatFractionalSeconds(milliseconds, digits) {\n const strMs = padNumber(milliseconds, 3);\n return strMs.substring(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-overview)\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 suppressed 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-overview)\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-overview)\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.substring(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.substring(0, pos).replace(/'/g, '');\n p.negSuf = negative.slice(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}\nNgLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNgLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgLocalization, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n useFactory: (locale) => new NgLocaleLocalization(locale),\n deps: [LOCALE_ID],\n }]\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });\nNgLocaleLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgLocaleLocalization });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgLocaleLocalization, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [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 * Register global data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n-common-format-data-locale) to know how to import additional locale\n * 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgClass, deps: [{ token: i0.IterableDiffers }, { token: i0.KeyValueDiffers }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });\nNgClass.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgClass, isStandalone: true, selector: \"[ngClass]\", inputs: { klass: [\"class\", \"klass\"], ngClass: \"ngClass\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgClass, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngClass]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.IterableDiffers }, { type: i0.KeyValueDiffers }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { 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 * * `ngComponentOutletNgModule`: Optional NgModule class reference to allow loading another\n * module dynamically, then loading a component from that module.\n *\n * * `ngComponentOutletNgModuleFactory`: Deprecated config option that allows providing optional\n * NgModule factory to allow loading another module dynamically, then loading a component from that\n * module. Use `ngComponentOutletNgModule` instead.\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 NgModule reference\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n * ngModule: ngModuleClass;\">\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.ngComponentOutlet = null;\n }\n /** @nodoc */\n ngOnChanges(changes) {\n const { _viewContainerRef: viewContainerRef, ngComponentOutletNgModule: ngModule, ngComponentOutletNgModuleFactory: ngModuleFactory, } = this;\n viewContainerRef.clear();\n this._componentRef = undefined;\n if (this.ngComponentOutlet) {\n const injector = this.ngComponentOutletInjector || viewContainerRef.parentInjector;\n if (changes['ngComponentOutletNgModule'] || changes['ngComponentOutletNgModuleFactory']) {\n if (this._moduleRef)\n this._moduleRef.destroy();\n if (ngModule) {\n this._moduleRef = createNgModule(ngModule, getParentInjector(injector));\n }\n else if (ngModuleFactory) {\n this._moduleRef = ngModuleFactory.create(getParentInjector(injector));\n }\n else {\n this._moduleRef = undefined;\n }\n }\n this._componentRef = viewContainerRef.createComponent(this.ngComponentOutlet, {\n index: viewContainerRef.length,\n injector,\n ngModuleRef: this._moduleRef,\n projectableNodes: this.ngComponentOutletContent,\n });\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this._moduleRef)\n this._moduleRef.destroy();\n }\n}\nNgComponentOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgComponentOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgComponentOutlet, isStandalone: true, selector: \"[ngComponentOutlet]\", inputs: { ngComponentOutlet: \"ngComponentOutlet\", ngComponentOutletInjector: \"ngComponentOutletInjector\", ngComponentOutletContent: \"ngComponentOutletContent\", ngComponentOutletNgModule: \"ngComponentOutletNgModule\", ngComponentOutletNgModuleFactory: \"ngComponentOutletNgModuleFactory\" }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgComponentOutlet, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngComponentOutlet]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { ngComponentOutlet: [{\n type: Input\n }], ngComponentOutletInjector: [{\n type: Input\n }], ngComponentOutletContent: [{\n type: Input\n }], ngComponentOutletNgModule: [{\n type: Input\n }], ngComponentOutletNgModuleFactory: [{\n type: Input\n }] } });\n// Helper function that returns an Injector instance of a parent NgModule.\nfunction getParentInjector(injector) {\n const parentNgModule = injector.get(NgModuleRef);\n return parentNgModule.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 */\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\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/structural-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 further discussion, see\n * [Structural Directives](guide/structural-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 (NG_DEV_MODE && 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 * @nodoc\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 if (NG_DEV_MODE) {\n try {\n // CAUTION: this logic is duplicated for production mode below, as the try-catch\n // is only present in development builds.\n this._differ = this._differs.find(value).create(this.ngForTrackBy);\n }\n catch {\n let errorMessage = `Cannot find a differ supporting object '${value}' of type '` +\n `${getTypeName(value)}'. NgFor only supports binding to Iterables, such as Arrays.`;\n if (typeof value === 'object') {\n errorMessage += ' Did you mean to use the keyvalue pipe?';\n }\n throw new ɵRuntimeError(-2200 /* RuntimeErrorCode.NG_FOR_MISSING_DIFFER */, errorMessage);\n }\n }\n else {\n // CAUTION: this logic is duplicated for development mode above, as the try-catch\n // is only present in development builds.\n this._differ = this._differs.find(value).create(this.ngForTrackBy);\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 viewContainer = this._viewContainer;\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 viewContainer.createEmbeddedView(this._template, new NgForOfContext(item.item, this._ngForOf, -1, -1), currentIndex === null ? undefined : currentIndex);\n }\n else if (currentIndex == null) {\n viewContainer.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);\n }\n else if (adjustedPreviousIndex !== null) {\n const view = viewContainer.get(adjustedPreviousIndex);\n viewContainer.move(view, currentIndex);\n applyViewChange(view, item);\n }\n });\n for (let i = 0, ilen = viewContainer.length; i < ilen; i++) {\n const viewRef = viewContainer.get(i);\n const context = viewRef.context;\n context.index = i;\n context.count = ilen;\n context.ngForOf = this._ngForOf;\n }\n changes.forEachIdentityChange((record) => {\n const viewRef = viewContainer.get(record.currentIndex);\n applyViewChange(viewRef, record);\n });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });\nNgForOf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgForOf, isStandalone: true, selector: \"[ngFor][ngForOf]\", inputs: { ngForOf: \"ngForOf\", ngForTrackBy: \"ngForTrackBy\", ngForTemplate: \"ngForTemplate\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgForOf, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngFor][ngForOf]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i0.IterableDiffers }]; }, propDecorators: { ngForOf: [{\n type: Input\n }], ngForTrackBy: [{\n type: Input\n }], ngForTemplate: [{\n type: Input\n }] } });\nfunction applyViewChange(view, record) {\n view.context.$implicit = record.item;\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](guide/structural-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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgIf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgIf, isStandalone: true, selector: \"[ngIf]\", inputs: { ngIf: \"ngIf\", ngIfThen: \"ngIfThen\", ngIfElse: \"ngIfElse\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgIf, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngIf]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }]; }, propDecorators: { 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nNgSwitch.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgSwitch, isStandalone: true, selector: \"[ngSwitch]\", inputs: { ngSwitch: \"ngSwitch\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgSwitch, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngSwitch]',\n standalone: true,\n }]\n }], propDecorators: { 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 * @nodoc\n */\n ngDoCheck() {\n this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));\n }\n}\nNgSwitchCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgSwitchCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgSwitchCase, isStandalone: true, selector: \"[ngSwitchCase]\", inputs: { ngSwitchCase: \"ngSwitchCase\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgSwitchCase, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngSwitchCase]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: NgSwitch, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }]; }, propDecorators: { 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgSwitchDefault.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgSwitchDefault, isStandalone: true, selector: \"[ngSwitchDefault]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgSwitchDefault, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngSwitchDefault]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: NgSwitch, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }]; } });\nfunction throwNgSwitchProviderNotFoundError(attrName, directiveName) {\n throw new ɵRuntimeError(2000 /* RuntimeErrorCode.PARENT_NG_SWITCH_NOT_FOUND */, `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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive });\nNgPlural.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgPlural, isStandalone: true, selector: \"[ngPlural]\", inputs: { ngPlural: \"ngPlural\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgPlural, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngPlural]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: NgLocalization }]; }, propDecorators: { 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive });\nNgPluralCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgPluralCase, isStandalone: true, selector: \"[ngPluralCase]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgPluralCase, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngPluralCase]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Attribute,\n args: ['ngPluralCase']\n }] }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: NgPlural, decorators: [{\n type: Host\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 const flags = name.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase;\n if (value != null) {\n this._renderer.setStyle(this._ngEl.nativeElement, name, unit ? `${value}${unit}` : value, flags);\n }\n else {\n this._renderer.removeStyle(this._ngEl.nativeElement, name, flags);\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });\nNgStyle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgStyle, isStandalone: true, selector: \"[ngStyle]\", inputs: { ngStyle: \"ngStyle\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgStyle, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngStyle]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.KeyValueDiffers }, { type: i0.Renderer2 }]; }, propDecorators: { 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 /** Injector to be used within the embedded view. */\n this.ngTemplateOutletInjector = null;\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (changes['ngTemplateOutlet'] || changes['ngTemplateOutletInjector']) {\n const viewContainerRef = this._viewContainerRef;\n if (this._viewRef) {\n viewContainerRef.remove(viewContainerRef.indexOf(this._viewRef));\n }\n if (this.ngTemplateOutlet) {\n const { ngTemplateOutlet: template, ngTemplateOutletContext: context, ngTemplateOutletInjector: injector } = this;\n this._viewRef = viewContainerRef.createEmbeddedView(template, context, injector ? { injector } : undefined);\n }\n else {\n this._viewRef = null;\n }\n }\n else if (this._viewRef && changes['ngTemplateOutletContext'] && this.ngTemplateOutletContext) {\n this._viewRef.context = this.ngTemplateOutletContext;\n }\n }\n}\nNgTemplateOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nNgTemplateOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"14.1.0\", type: NgTemplateOutlet, isStandalone: true, selector: \"[ngTemplateOutlet]\", inputs: { ngTemplateOutletContext: \"ngTemplateOutletContext\", ngTemplateOutlet: \"ngTemplateOutlet\", ngTemplateOutletInjector: \"ngTemplateOutletInjector\" }, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NgTemplateOutlet, decorators: [{\n type: Directive,\n args: [{\n selector: '[ngTemplateOutlet]',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { ngTemplateOutletContext: [{\n type: Input\n }], ngTemplateOutlet: [{\n type: Input\n }], ngTemplateOutletInjector: [{\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 new ɵRuntimeError(2100 /* RuntimeErrorCode.INVALID_PIPE_ARGUMENT */, ngDevMode && `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}\nclass PromiseStrategy {\n createSubscription(async, updateLatestValue) {\n return async.then(updateLatestValue, e => {\n throw e;\n });\n }\n dispose(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. When the reference of the expression changes, the `async` pipe\n * automatically unsubscribes from the old `Observable` or `Promise` and subscribes to the new one.\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._latestValue = null;\n this._subscription = null;\n this._obj = null;\n this._strategy = null;\n // Assign `ref` into `this._ref` manually instead of declaring `_ref` in the constructor\n // parameter list, as the type of `this._ref` includes `null` unlike the type of `ref`.\n this._ref = ref;\n }\n ngOnDestroy() {\n if (this._subscription) {\n this._dispose();\n }\n // Clear the `ChangeDetectorRef` and its association with the view data, to mitigate\n // potential memory leaks in Observables that could otherwise cause the view data to\n // be retained.\n // https://github.com/angular/angular/issues/17624\n this._ref = null;\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 // Note: `dispose` is only called if a subscription has been initialized before, indicating\n // that `this._strategy` is also available.\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 // Note: `this._ref` is only cleared in `ngOnDestroy` so is known to be available when a\n // value is being updated.\n this._ref.markForCheck();\n }\n }\n}\nAsyncPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });\nAsyncPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: AsyncPipe, isStandalone: true, name: \"async\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: AsyncPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'async',\n pure: false,\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nLowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: \"lowercase\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: LowerCasePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'lowercase',\n standalone: true,\n }]\n }] });\n//\n// Regex below matches any Unicode word and number compatible with ES5. In ES2018 the same result\n// can be achieved by using /[0-9\\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+%2F%5B0-9%5Cp%7BL%7D%5D%5CS*%2Fgu%3B%0A%0A&unicodePropertyEscape=1\n//\nconst unicodeWordMatch = /(?:[0-9A-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\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\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\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\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\\u0C5D\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\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\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\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-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\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-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\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-\\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-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\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-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB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\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEB0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|\\uD80B[\\uDF90-\\uDFF0]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE70-\\uDEBE\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82B[\\uDFF0-\\uDFF3\\uDFF5-\\uDFFB\\uDFFD\\uDFFE]|\\uD82C[\\uDC00-\\uDD22\\uDD50-\\uDD52\\uDD64-\\uDD67\\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\\uDD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\\uDF4A])\\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.slice(1).toLowerCase()));\n }\n}\nTitleCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nTitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: \"titlecase\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: TitleCasePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'titlecase',\n standalone: true,\n }]\n }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nUpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: \"uppercase\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: UpperCasePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'uppercase',\n standalone: 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 * Optionally-provided default timezone to use for all instances of `DatePipe` (such as `'+0430'`).\n * If the value isn't provided, the `DatePipe` will use the end-user's local system timezone.\n */\nconst DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken('DATE_PIPE_DEFAULT_TIMEZONE');\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-common-format-data-locale) for more information.\n *\n * The time zone of the formatted value can be specified either by passing it in as the second\n * parameter of the pipe, or by setting the default through the `DATE_PIPE_DEFAULT_TIMEZONE`\n * injection token. The value that is passed in as the second parameter takes precedence over\n * the one defined using the injection token.\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, defaultTimezone) {\n this.locale = locale;\n this.defaultTimezone = defaultTimezone;\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 ?? this.defaultTimezone ?? undefined);\n }\n catch (error) {\n throw invalidPipeArgumentError(DatePipe, error.message);\n }\n }\n}\nDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DatePipe, deps: [{ token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });\nDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: DatePipe, isStandalone: true, name: \"date\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DatePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'date',\n pure: true,\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DATE_PIPE_DEFAULT_TIMEZONE]\n }, {\n type: Optional\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe });\nI18nPluralPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: \"i18nPlural\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: I18nPluralPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'i18nPlural',\n pure: true,\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: NgLocalization }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nI18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: \"i18nSelect\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: I18nSelectPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'i18nSelect',\n pure: true,\n standalone: 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 * @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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nJsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: JsonPipe, isStandalone: true, name: \"json\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: JsonPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'json',\n pure: false,\n standalone: 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 */\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe });\nKeyValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: \"keyvalue\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: KeyValuePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'keyvalue',\n pure: false,\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: i0.KeyValueDiffers }]; } });\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-common-locale-id).\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });\nDecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: DecimalPipe, isStandalone: true, name: \"number\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: DecimalPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'number',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; } });\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-common-locale-id).\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });\nPercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: PercentPipe, isStandalone: true, name: \"percent\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: PercentPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'percent',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; } });\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-common-locale-id) 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-common-locale-id).\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe });\nCurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: \"currency\" });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: CurrencyPipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'currency',\n standalone: true,\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DEFAULT_CURRENCY_CODE]\n }] }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\nSlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: SlicePipe, isStandalone: true, name: \"slice\", pure: false });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: SlicePipe, decorators: [{\n type: Pipe,\n args: [{\n name: 'slice',\n pure: false,\n standalone: 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 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 * @publicApi\n */\nclass CommonModule {\n}\nCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: CommonModule, imports: [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] });\nCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: CommonModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: CommonModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [COMMON_DIRECTIVES, COMMON_PIPES],\n exports: [COMMON_DIRECTIVES, COMMON_PIPES],\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 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('14.1.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 * 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 //\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 elSelected.focus();\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 * 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 {\n return false;\n }\n }\n supportsScrolling() {\n try {\n return !!this.window && !!this.window.scrollTo && 'pageXOffset' in this.window;\n }\n catch {\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, DATE_PIPE_DEFAULT_TIMEZONE, 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, getDOM as ɵgetDOM, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };\n","/**\n * @license Angular v14.1.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i1 from '@angular/common';\nimport { DOCUMENT, ɵparseCookieValue, XhrFactory as XhrFactory$1 } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Injectable, InjectionToken, Inject, PLATFORM_ID, 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 */\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 if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertValidHeaders(headers);\n }\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 override 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 * Verifies that the headers object has the right shape: the values\n * must be either strings or arrays. Throws an error if an invalid\n * header value is present.\n */\nfunction assertValidHeaders(headers) {\n for (const [key, value] of Object.entries(headers)) {\n if (typeof value !== 'string' && !Array.isArray(value)) {\n throw new Error(`Unexpected value of the \\`${key}\\` header provided. ` +\n `Expecting either a string or an array, but got: \\`${value}\\`.`);\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 * 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 '3D': '=',\n '3F': '?',\n '2F': '/',\n};\nfunction standardEncoding(v) {\n return encodeURIComponent(v).replace(STANDARD_ENCODING_REGEX, (s, t) => STANDARD_ENCODING_REPLACEMENTS[t] ?? 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 // convert the values to strings\n const values = Array.isArray(value) ? value.map(valueToString) : [valueToString(value)];\n this.map.set(key, values);\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 * Checks for existence of a given token.\n *\n * @param token The reference to an instance of `HttpContextToken`.\n *\n * @returns True if the token exists, false otherwise.\n */\n has(token) {\n return this.map.has(token);\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 // 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 = update.context ?? 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 /* HttpStatusCode.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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpClient, deps: [{ token: HttpHandler }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpClient });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpClient, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: HttpHandler }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NoopInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\nNoopInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NoopInterceptor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: NoopInterceptor, decorators: [{\n type: Injectable\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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/**\n * When a pending <script> is unsubscribed we'll move it to this document, so it won't be\n * executed.\n */\nlet foreignDocument;\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// Error text given when a request is passed to the JsonpClientBackend that has\n// headers set\nconst JSONP_ERR_HEADERS_NOT_SUPPORTED = 'JSONP requests do not support headers.';\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 // Check the request headers. JSONP doesn't support headers and\n // cannot set any that were supplied.\n if (req.headers.keys().length > 0) {\n throw new Error(JSONP_ERR_HEADERS_NOT_SUPPORTED);\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 // 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 // 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 // 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 /* HttpStatusCode.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 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 if (!finished) {\n this.removeListeners(node);\n }\n // And finally, clean up the page.\n cleanup();\n };\n });\n }\n removeListeners(script) {\n // Issue #34818\n // Changing <script>'s ownerDocument will prevent it from execution.\n // https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block\n if (!foreignDocument) {\n foreignDocument = this.document.implementation.createHTMLDocument();\n }\n foreignDocument.adoptNode(script);\n }\n}\nJsonpClientBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: JsonpClientBackend, deps: [{ token: JsonpCallbackContext }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\nJsonpClientBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: JsonpClientBackend });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: JsonpClientBackend, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: JsonpCallbackContext }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: JsonpInterceptor, deps: [{ token: JsonpClientBackend }], target: i0.ɵɵFactoryTarget.Injectable });\nJsonpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: JsonpInterceptor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: JsonpInterceptor, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: JsonpClientBackend }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 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: xhr.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 /* HttpStatusCode.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 /* HttpStatusCode.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 // progress 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpXhrBackend, deps: [{ token: i1.XhrFactory }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpXhrBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpXhrBackend });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpXhrBackend, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i1.XhrFactory }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpXsrfCookieExtractor, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: XSRF_COOKIE_NAME }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpXsrfCookieExtractor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpXsrfCookieExtractor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpXsrfCookieExtractor, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [XSRF_COOKIE_NAME]\n }] }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpXsrfInterceptor, deps: [{ token: HttpXsrfTokenExtractor }, { token: XSRF_HEADER_NAME }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpXsrfInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpXsrfInterceptor });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpXsrfInterceptor, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: HttpXsrfTokenExtractor }, { type: undefined, decorators: [{\n type: Inject,\n args: [XSRF_HEADER_NAME]\n }] }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpInterceptingHandler, deps: [{ token: HttpBackend }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });\nHttpInterceptingHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpInterceptingHandler });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpInterceptingHandler, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: HttpBackend }, { type: i0.Injector }]; } });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpClientXsrfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHttpClientXsrfModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpClientXsrfModule });\nHttpClientXsrfModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpClientXsrfModule, 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 ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpClientXsrfModule, decorators: [{\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 }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHttpClientModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpClientModule, imports: [HttpClientXsrfModule] });\nHttpClientModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpClientModule, providers: [\n HttpClient,\n { provide: HttpHandler, useClass: HttpInterceptingHandler },\n HttpXhrBackend,\n { provide: HttpBackend, useExisting: HttpXhrBackend },\n ], imports: [HttpClientXsrfModule.withOptions({\n cookieName: 'XSRF-TOKEN',\n headerName: 'X-XSRF-TOKEN',\n })] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpClientModule, decorators: [{\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 }] });\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 = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpClientJsonpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nHttpClientJsonpModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpClientJsonpModule });\nHttpClientJsonpModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpClientJsonpModule, providers: [\n JsonpClientBackend,\n { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext },\n { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true },\n ] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.1.0\", ngImport: i0, type: HttpClientJsonpModule, decorators: [{\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 }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 };\n","/**\n * @license Angular v14.1.0\n * (c) 2010-2022 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/**\n * Base URL for the error details page.\n *\n * Keep the files below in full sync:\n * - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts\n * - packages/core/src/error_details_base_url.ts\n */\nconst ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Class that represents a runtime error.\n * Formats and outputs the error message in a consistent way.\n *\n * Example:\n * ```\n * throw new RuntimeError(\n * RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,\n * ngDevMode && 'Injector has already been destroyed.');\n * ```\n *\n * Note: the `message` argument contains a descriptive error message as a string in development\n * mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the\n * `message` argument becomes `false`, thus we account for it in the typings and the runtime logic.\n */\nclass RuntimeError extends Error {\n constructor(code, message) {\n super(formatRuntimeError(code, message));\n this.code = code;\n }\n}\n/**\n * Called to format a runtime error.\n * See additional info on the `message` argument type in the `RuntimeError` class description.\n */\nfunction formatRuntimeError(code, message) {\n // Error code might be a negative number, which is a special marker that instructs the logic to\n // generate a link to the error details page on angular.io.\n const fullCode = `NG0${Math.abs(code)}`;\n let errorMessage = `${fullCode}${message ? ': ' + message.trim() : ''}`;\n if (ngDevMode && code < 0) {\n const addPeriodSeparator = !errorMessage.match(/[.,;!?]$/);\n const separator = addPeriodSeparator ? '.' : '';\n errorMessage =\n `${errorMessage}${separator} Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/${fullCode}`;\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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 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 /* RuntimeErrorCode.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 if (ngModuleType && providers) {\n const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');\n throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}' - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`);\n }\n else if (provider.ɵproviders) {\n throw new RuntimeError(207 /* RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT */, `Invalid providers from 'importProvidersFrom' present in a non-environment injector. 'importProvidersFrom' can't be used for component providers.`);\n }\n else {\n throw new Error('Invalid provider');\n }\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 /* RuntimeErrorCode.PROVIDER_NOT_FOUND */, ngDevMode && `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 * @deprecated use an options object for `inject` instead.\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 the CSS styles encapsulation policies for the {@link Component} decorator's\n * `encapsulation` option.\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$1;\n(function (ViewEncapsulation) {\n // TODO: consider making `ViewEncapsulation` a `const enum` instead. See\n // https://github.com/angular/angular/issues/44119 for additional information.\n /**\n * Emulates a native Shadow DOM encapsulation behavior by adding a specific attribute to the\n * component's host element and applying the same attribute to all the CSS selectors provided\n * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls}.\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 * Doesn't provide any sort of CSS style encapsulation, meaning that all the styles provided\n * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls} are applicable\n * to any HTML element of the application regardless of their host Component.\n */\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n /**\n * Uses the browser's native Shadow DOM API to encapsulate CSS styles, meaning that it creates\n * a ShadowRoot for the component's host element which is then used to encapsulate\n * all the Component's styling.\n */\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 */\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. Note: Typeof/Instanceof\n// checks are considered side-effects in Terser. We explicitly mark this as side-effect free:\n// https://github.com/terser/terser/issues/250.\nconst _global = ( /* @__PURE__ */(() => (typeof globalThis !== 'undefined' && globalThis) ||\n (typeof global !== 'undefined' && global) || (typeof window !== 'undefined' && window) ||\n (typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && 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_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 */\n/** Counter used to generate unique IDs for component definitions. */\nlet componentDefCount = 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 standalone = componentDefinition.standalone === true;\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 standalone,\n dependencies: standalone && componentDefinition.dependencies || null,\n getStandaloneInjector: null,\n selectors: componentDefinition.selectors || EMPTY_ARRAY,\n viewQuery: componentDefinition.viewQuery || null,\n features: componentDefinition.features || null,\n data: componentDefinition.data || {},\n encapsulation: componentDefinition.encapsulation || ViewEncapsulation$1.Emulated,\n id: `c${componentDefCount++}`,\n styles: componentDefinition.styles || EMPTY_ARRAY,\n _: null,\n setInput: null,\n schemas: componentDefinition.schemas || null,\n tView: null,\n };\n const dependencies = componentDefinition.dependencies;\n const feature = componentDefinition.features;\n def.inputs = invertObject(componentDefinition.inputs, declaredInputs),\n def.outputs = invertObject(componentDefinition.outputs),\n feature && feature.forEach((fn) => fn(def));\n def.directiveDefs = dependencies ?\n (() => (typeof dependencies === 'function' ? dependencies() : dependencies)\n .map(extractDirectiveDef)\n .filter(nonNull)) :\n null;\n def.pipeDefs = dependencies ?\n (() => (typeof dependencies === 'function' ? dependencies() : dependencies)\n .map(getPipeDef$1)\n .filter(nonNull)) :\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 = () => (typeof directives === 'function' ? directives() : directives).map(extractDirectiveDef);\n def.pipeDefs = () => (typeof pipes === 'function' ? pipes() : pipes).map(getPipeDef$1);\n}\nfunction extractDirectiveDef(type) {\n return getComponentDef(type) || getDirectiveDef(type);\n}\nfunction nonNull(value) {\n return value !== null;\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 standalone: pipeDef.standalone === true,\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$1(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}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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$1 = 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;\nconst ID = 20;\nconst EMBEDDED_VIEW_INJECTOR = 21;\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 = 22;\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$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 */\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$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/**\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 /* TNodeFlags.hasContentQuery */) !== 0;\n}\nfunction isComponentHost(tNode) {\n return (tNode.flags & 2 /* TNodeFlags.isComponentHost */) === 2 /* TNodeFlags.isComponentHost */;\n}\nfunction isDirectiveHost(tNode) {\n return (tNode.flags & 1 /* TNodeFlags.isDirectiveHost */) === 1 /* TNodeFlags.isDirectiveHost */;\n}\nfunction isComponentDef(def) {\n return def.template !== null;\n}\nfunction isRootView(target) {\n return (target[FLAGS] & 256 /* LViewFlags.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 /* NodeInjectorOffset.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 /* NodeInjectorOffset.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?.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 = 'svg';\nconst SVG_NAMESPACE_URI = 'http://www.w3.org/2000/svg';\nconst MATH_ML_NAMESPACE = 'math';\nconst MATH_ML_NAMESPACE_URI = 'http://www.w3.org/1998/MathML/';\nfunction getNamespaceUri(namespace) {\n const name = namespace.toLowerCase();\n return name === SVG_NAMESPACE ? SVG_NAMESPACE_URI :\n (name === MATH_ML_NAMESPACE ? MATH_ML_NAMESPACE_URI : 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 * 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 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 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 /* LViewFlags.CreationMode */) === 4 /* LViewFlags.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] & 64 /* LViewFlags.Attached */) === 64 /* LViewFlags.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};\n/**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n *\n * The `checkNoChanges` function is invoked only in ngDevMode=true and verifies that no unintended\n * changes exist in the change detector or its children.\n */\nlet _isInCheckNoChangesMode = false;\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}\n/**\n * Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in\n * value so that it can be used as a return value of an instruction.\n *\n * @codeGenApi\n */\nfunction ɵɵresetView(value) {\n instructionState.lFrame.contextLView = null;\n return value;\n}\nfunction getCurrentTNode() {\n let currentTNode = getCurrentTNodePlaceholderOk();\n while (currentTNode !== null && currentTNode.type === 64 /* TNodeType.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 const contextLView = instructionState.lFrame.contextLView;\n ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');\n return contextLView;\n}\nfunction isInCheckNoChangesMode() {\n !ngDevMode && throwError('Must never be called in production mode');\n return _isInCheckNoChangesMode;\n}\nfunction setIsInCheckNoChangesMode(mode) {\n !ngDevMode && throwError('Must never be called in production mode');\n _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 /* TViewType.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 /* TViewType.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 /* TNodeType.Element */ | 8 /* TNodeType.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$1() {\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 /* InitPhaseState.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 /* InitPhaseState.InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once');\n if ((lView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n callHooks(lView, hooks, initPhase, nodeIndex);\n }\n}\nfunction incrementInitPhaseFlags(lView, initPhase) {\n ngDevMode &&\n assertNotEqual(initPhase, 3 /* InitPhaseState.InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');\n let flags = lView[FLAGS];\n if ((flags & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n flags &= 2047 /* LViewFlags.IndexWithinInitPhaseReset */;\n flags += 1 /* LViewFlags.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 /* PreOrderHookFlags.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 /* PreOrderHookFlags.NumberOfInitHooksCalledIncrementer */;\n if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n callHook(currentView, initPhase, arr, i);\n currentView[PREORDER_HOOK_FLAGS] =\n (currentView[PREORDER_HOOK_FLAGS] & 4294901760 /* PreOrderHookFlags.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 /* LViewFlags.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 /* PreOrderHookFlags.NumberOfInitHooksCalledShift */) &&\n (currentView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n currentView[FLAGS] += 2048 /* LViewFlags.IndexWithinInitPhaseIncrementer */;\n profiler(4 /* ProfilerEvent.LifecycleHookStart */, directive, hook);\n try {\n hook.call(directive);\n }\n finally {\n profiler(5 /* ProfilerEvent.LifecycleHookEnd */, directive, hook);\n }\n }\n }\n else {\n profiler(4 /* ProfilerEvent.LifecycleHookStart */, directive, hook);\n try {\n hook.call(directive);\n }\n finally {\n profiler(5 /* ProfilerEvent.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$6 = 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 /* TNodeType.Text */) && (text += '|Text');\n (tNodeType & 2 /* TNodeType.Element */) && (text += '|Element');\n (tNodeType & 4 /* TNodeType.Container */) && (text += '|Container');\n (tNodeType & 8 /* TNodeType.ElementContainer */) && (text += '|ElementContainer');\n (tNodeType & 16 /* TNodeType.Projection */) && (text += '|Projection');\n (tNodeType & 32 /* TNodeType.Icu */) && (text += '|IcuContainer');\n (tNodeType & 64 /* TNodeType.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$5 = 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 /* TNodeFlags.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 /* TNodeFlags.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 /* TNodeType.Element */ || //\n type === 1 /* TNodeType.Text */ || //\n type === 4 /* TNodeType.Container */ || //\n type === 8 /* TNodeType.ElementContainer */ || //\n type === 32 /* TNodeType.Icu */ || //\n type === 16 /* TNodeType.Projection */ || //\n type === 64 /* TNodeType.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 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 /* AttributeMarker.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 renderer.setAttribute(native, attrName, attrVal, namespaceURI);\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 renderer.setProperty(native, attrName, attrVal);\n }\n else {\n renderer.setAttribute(native, 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 /* AttributeMarker.Bindings */ || marker === 4 /* AttributeMarker.Template */ ||\n marker === 6 /* AttributeMarker.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 /* CharCode.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 /* AttributeMarker.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 /* AttributeMarker.NamespaceURI */) {\n // Case where we need to consume `key1`, `key2`, `value` items.\n }\n else if (srcMarker === -1 /* AttributeMarker.ImplicitAttributes */ ||\n srcMarker === 2 /* AttributeMarker.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 /* AttributeMarker.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 /* RelativeInjectorLocationFlags.InjectorIndexMask */;\n ngDevMode &&\n assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, 'Parent injector must be pointing past HEADER_OFFSET.');\n return parentLocation & 32767 /* RelativeInjectorLocationFlags.InjectorIndexMask */;\n}\nfunction getParentInjectorViewOffset(parentLocation) {\n return parentLocation >> 16 /* RelativeInjectorLocationFlags.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/** Value used when something wasn't found by an injector. */\nconst NOT_FOUND = {};\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 /* NodeInjectorOffset.BLOOM_SIZE */; i++) {\n lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n }\n }\n lView[injectorIndex + 8 /* NodeInjectorOffset.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 /* NodeInjectorOffset.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 parentTNode = getTNodeFromLView(lViewCursor);\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 /* RelativeInjectorLocationFlags.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 /* TNodeType.AnyContainer */ | 3 /* TNodeType.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 /* AttributeMarker.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$1];\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 // If the view or any of its ancestors have an embedded\n // view injector, we have to look it up there first.\n if (lView[FLAGS] & 1024 /* LViewFlags.HasEmbeddedViewInjector */) {\n const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND);\n if (embeddedInjectorValue !== NOT_FOUND) {\n return embeddedInjectorValue;\n }\n }\n // Otherwise try the node injector.\n const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND);\n if (value !== NOT_FOUND) {\n return value;\n }\n }\n // Finally, fall back to the module injector.\n return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n}\n/**\n * Returns the value associated to the given token from the node injector.\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 lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue) {\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 /* NodeInjectorOffset.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 /* NodeInjectorOffset.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 /* NodeInjectorOffset.PARENT */];\n if (parentLocation !== NO_PARENT_INJECTOR &&\n shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.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 return notFoundValue;\n}\nfunction searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {\n const currentTView = lView[TVIEW];\n const tNode = currentTView.data[injectorIndex + 8 /* NodeInjectorOffset.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 /* TNodeType.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 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n const directivesStart = tNode.directiveStart;\n const directiveEnd = tNode.directiveEnd;\n const cptViewProvidersCount = nodeProviderIndexes >> 20 /* TNodeProviderIndexes.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 /* InjectorMarkers.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, flags) {\n return getOrCreateInjectable(this._tNode, this._lView, token, flags, notFoundValue);\n }\n}\n/** Creates a `NodeInjector` for the current node. */\nfunction createNodeInjector() {\n return new NodeInjector(getCurrentTNode(), getLView());\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 * Returns a value from the closest embedded or node injector.\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 lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundValue) {\n let currentTNode = tNode;\n let currentLView = lView;\n // When an LView with an embedded view injector is inserted, it'll likely be interlaced with\n // nodes who may have injectors (e.g. node injector -> embedded view injector -> node injector).\n // Since the bloom filters for the node injectors have already been constructed and we don't\n // have a way of extracting the records from an injector, the only way to maintain the correct\n // hierarchy when resolving the value is to walk it node-by-node while attempting to resolve\n // the token at each level.\n while (currentTNode !== null && currentLView !== null &&\n (currentLView[FLAGS] & 1024 /* LViewFlags.HasEmbeddedViewInjector */) &&\n !(currentLView[FLAGS] & 256 /* LViewFlags.IsRoot */)) {\n ngDevMode && assertTNodeForLView(currentTNode, currentLView);\n // Note that this lookup on the node injector is using the `Self` flag, because\n // we don't want the node injector to look at any parent injectors since we\n // may hit the embedded view injector first.\n const nodeInjectorValue = lookupTokenUsingNodeInjector(currentTNode, currentLView, token, flags | InjectFlags.Self, NOT_FOUND);\n if (nodeInjectorValue !== NOT_FOUND) {\n return nodeInjectorValue;\n }\n // Has an explicit type due to a TS bug: https://github.com/microsoft/TypeScript/issues/33191\n let parentTNode = currentTNode.parent;\n // `TNode.parent` includes the parent within the current view only. If it doesn't exist,\n // it means that we've hit the view boundary and we need to go up to the next view.\n if (!parentTNode) {\n // Before we go to the next LView, check if the token exists on the current embedded injector.\n const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];\n if (embeddedViewInjector) {\n const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND, flags);\n if (embeddedViewInjectorValue !== NOT_FOUND) {\n return embeddedViewInjectorValue;\n }\n }\n // Otherwise keep going up the tree.\n parentTNode = getTNodeFromLView(currentLView);\n currentLView = currentLView[DECLARATION_VIEW];\n }\n currentTNode = parentTNode;\n }\n return notFoundValue;\n}\n/** Gets the TNode associated with an LView inside of the declaration view. */\nfunction getTNodeFromLView(lView) {\n const tView = lView[TVIEW];\n const tViewType = tView.type;\n // The parent pointer differs based on `TView.type`.\n if (tViewType === 2 /* TViewType.Embedded */) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\n }\n else if (tViewType === 1 /* TViewType.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 return lView[T_HOST];\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 * 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 */\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Attribute = makeParamDecorator('Attribute', (attributeName) => ({ attributeName, __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName) }));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 an additional level of type safety.\n *\n * ```\n * interface MyInterface {...}\n * const 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.\n * As you can see in the Tree-shakable InjectionToken example below.\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 Examples\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 /**\n * @param _desc Description for the token,\n * used only for debugging purposes,\n * it should but does not need to be unique\n * @param options Options for the token's usage, as described above\n */\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 /**\n * @internal\n */\n get multi() {\n return this;\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}\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nconst ContentChildren = makePropDecorator('ContentChildren', (selector, data = {}) => ({\n selector,\n first: false,\n isViewQuery: false,\n descendants: false,\n emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n ...data\n}), Query);\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\nconst ContentChild = makePropDecorator('ContentChild', (selector, data = {}) => ({ selector, first: true, isViewQuery: false, descendants: true, ...data }), Query);\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst ViewChildren = makePropDecorator('ViewChildren', (selector, data = {}) => ({\n selector,\n first: false,\n isViewQuery: true,\n descendants: true,\n emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n ...data\n}), Query);\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst ViewChild = makePropDecorator('ViewChild', (selector, data) => ({ selector, first: true, isViewQuery: true, descendants: true, ...data }), 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 R3TemplateDependencyKind;\n(function (R3TemplateDependencyKind) {\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Directive\"] = 0] = \"Directive\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Pipe\"] = 1] = \"Pipe\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"NgModule\"] = 2] = \"NgModule\";\n})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));\nvar ViewEncapsulation;\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 || (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 */\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 /* JitCompilerUsage.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), false)) || 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*{[^}]*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 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}\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';\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 RuntimeError(-203 /* RuntimeErrorCode.MISSING_INJECTION_CONTEXT */, ngDevMode &&\n `inject() must be called from an injection context (a constructor, a factory function or a field initializer)`);\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 * 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 throw new RuntimeError(202 /* RuntimeErrorCode.INVALID_FACTORY_DEPENDENCY */, 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}\n/**\n * Injects a token from the currently active injector.\n * `inject` is only supported during instantiation of a dependency by the DI system. It can be used\n * during:\n * - Construction (via the `constructor`) of a class being instantiated by the DI system, such\n * as an `@Injectable` or `@Component`.\n * - In the initializer for fields of such classes.\n * - In the factory function specified for `useFactory` of a `Provider` or an `@Injectable`.\n * - In the `factory` function specified for an `InjectionToken`.\n *\n * @param token A token that represents a dependency that should 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 operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @usageNotes\n * In practice the `inject()` calls are allowed in a constructor, a constructor parameter and a\n * field initializer:\n *\n * ```typescript\n * @Injectable({providedIn: 'root'})\n * export class Car {\n * radio: Radio|undefined;\n * // OK: field initializer\n * spareTyre = inject(Tyre);\n *\n * constructor() {\n * // OK: constructor body\n * this.radio = inject(Radio);\n * }\n * }\n * ```\n *\n * It is also legal to call `inject` from a provider's factory:\n *\n * ```typescript\n * providers: [\n * {provide: Car, useFactory: () => {\n * // OK: a class factory\n * const engine = inject(Engine);\n * return new Car(engine);\n * }}\n * ]\n * ```\n *\n * Calls to the `inject()` function outside of the class creation context will result in error. Most\n * notably, calls to `inject()` are disallowed after a class instance was created, in methods\n * (including lifecycle hooks):\n *\n * ```typescript\n * @Component({ ... })\n * export class CarComponent {\n * ngOnInit() {\n * // ERROR: too late, the component instance was already created\n * const engine = inject(Engine);\n * engine.start();\n * }\n * }\n * ```\n *\n * @publicApi\n */\nfunction inject(token, flags = InjectFlags.Default) {\n if (typeof flags !== 'number') {\n // While TypeScript doesn't accept it without a cast, bitwise OR with false-y values in\n // JavaScript is a no-op. We can use that for a very codesize-efficient conversion from\n // `InjectOptions` to `InjectFlags`.\n flags = (0 /* InternalInjectFlags.Default */ | // comment to force a line break in the formatter\n (flags.optional && 8 /* InternalInjectFlags.Optional */) |\n (flags.host && 1 /* InternalInjectFlags.Host */) |\n (flags.self && 2 /* InternalInjectFlags.Self */) |\n (flags.skipSelf && 4 /* InternalInjectFlags.SkipSelf */));\n }\n return ɵɵinject(token, flags);\n}\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 RuntimeError(900 /* RuntimeErrorCode.INVALID_DIFFER_INPUT */, ngDevMode && '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 /* DecoratorFlags.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.slice(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 */\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', (token) => ({ token })), -1 /* DecoratorFlags.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 /* InternalInjectFlags.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 /* InternalInjectFlags.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 /* InternalInjectFlags.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 /* InternalInjectFlags.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 RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `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 * Map of module-id to the corresponding NgModule.\n */\nconst modules = new Map();\n/**\n * Whether to check for duplicate NgModule registrations.\n *\n * This can be disabled for testing.\n */\nlet checkForDuplicateNgModules = true;\nfunction assertSameOrNotExisting(id, type, incoming) {\n if (type && type !== incoming && checkForDuplicateNgModules) {\n throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);\n }\n}\n/**\n * Adds the given NgModule type to Angular's NgModule registry.\n *\n * This is generated as a side-effect of NgModule compilation. Note that the `id` is passed in\n * explicitly and not read from the NgModule definition. This is for two reasons: it avoids a\n * megamorphic read, and in JIT there's a chicken-and-egg problem where the NgModule may not be\n * fully resolved when it's registered.\n *\n * @codeGenApi\n */\nfunction registerNgModuleType(ngModuleType, id) {\n const existing = modules.get(id) || null;\n assertSameOrNotExisting(id, existing, ngModuleType);\n modules.set(id, ngModuleType);\n}\nfunction clearModulesForTest() {\n modules.clear();\n}\nfunction getRegisteredNgModuleType(id) {\n return modules.get(id);\n}\n/**\n * Control whether the NgModule registration system enforces that each NgModule type registered has\n * a unique id.\n *\n * This is useful for testing as the NgModule registry cannot be properly reset between tests with\n * Angular's current API.\n */\nfunction setAllowDuplicateNgModuleIdsForTest(allowDuplicates) {\n checkForDuplicateNgModules = !allowDuplicates;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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/**\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.createPolicy('angular', {\n createHTML: (s) => s,\n createScript: (s) => s,\n createScriptURL: (s) => s,\n });\n }\n catch {\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 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 return getPolicy$1()?.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 return getPolicy$1()?.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 return getPolicy$1()?.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;\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\n .createPolicy('angular#unsafe-bypass', {\n createHTML: (s) => s,\n createScript: (s) => s,\n createScriptURL: (s) => s,\n });\n }\n catch {\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 it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nfunction trustedHTMLFromStringBypass(html) {\n return getPolicy()?.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 return getPolicy()?.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 return getPolicy()?.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\" /* BypassType.Html */;\n }\n}\nclass SafeStyleImpl extends SafeValueImpl {\n getTypeName() {\n return \"Style\" /* BypassType.Style */;\n }\n}\nclass SafeScriptImpl extends SafeValueImpl {\n getTypeName() {\n return \"Script\" /* BypassType.Script */;\n }\n}\nclass SafeUrlImpl extends SafeValueImpl {\n getTypeName() {\n return \"URL\" /* BypassType.Url */;\n }\n}\nclass SafeResourceUrlImpl extends SafeValueImpl {\n getTypeName() {\n return \"ResourceURL\" /* BypassType.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\" /* BypassType.ResourceUrl */ && type === \"URL\" /* BypassType.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 {\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 {\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. \"http\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo<bar/baz\". Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript:...\".\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, '&')\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, '<')\n .replace(/>/g, '>');\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\" /* BypassType.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\" /* BypassType.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\" /* BypassType.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\" /* BypassType.ResourceUrl */)) {\n return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl));\n }\n throw new RuntimeError(904 /* RuntimeErrorCode.UNSAFE_VALUE_IN_RESOURCE_URL */, ngDevMode &&\n '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\" /* BypassType.Script */)) {\n return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript));\n }\n throw new RuntimeError(905 /* RuntimeErrorCode.UNSAFE_VALUE_IN_SCRIPT */, ngDevMode && '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 errorMessage = `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 RuntimeError(306 /* RuntimeErrorCode.INVALID_EVENT_BINDING */, errorMessage);\n }\n}\nfunction validateAgainstEventAttributes(name) {\n if (name.toLowerCase().startsWith('on')) {\n const errorMessage = `Binding to event attribute '${name}' is disallowed for security reasons, ` +\n `please use (${name.slice(2)})=...`;\n throw new RuntimeError(306 /* RuntimeErrorCode.INVALID_EVENT_BINDING */, errorMessage);\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 * A multi-provider token for initialization functions that will run upon construction of an\n * environment injector.\n *\n * @publicApi\n */\nconst ENVIRONMENT_INITIALIZER = new InjectionToken('ENVIRONMENT_INITIALIZER');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 = new InjectionToken('INJECTOR', \n// Disable 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 /* InjectorMarkers.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 */\nconst INJECTOR_DEF_TYPES = new InjectionToken('INJECTOR_DEF_TYPES');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Collects providers from all NgModules and standalone components, including transitively imported\n * ones.\n *\n * Providers extracted via `importProvidersFrom` are only usable in an application injector or\n * another environment injector (such as a route injector). They should not be used in component\n * providers.\n *\n * More information about standalone components can be found in [this\n * guide](guide/standalone-components).\n *\n * @usageNotes\n * The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * importProvidersFrom(NgModuleOne, NgModuleTwo)\n * ]\n * });\n * ```\n *\n * You can also use the `importProvidersFrom` results in the `providers` field of a route, when a\n * standalone component is used:\n *\n * ```typescript\n * export const ROUTES: Route[] = [\n * {\n * path: 'foo',\n * providers: [\n * importProvidersFrom(NgModuleOne, NgModuleTwo)\n * ],\n * component: YourStandaloneComponent\n * }\n * ];\n * ```\n *\n * @returns Collected providers from the specified list of types.\n * @publicApi\n * @developerPreview\n */\nfunction importProvidersFrom(...sources) {\n return { ɵproviders: internalImportProvidersFrom(true, sources) };\n}\nfunction internalImportProvidersFrom(checkForStandaloneCmp, ...sources) {\n const providersOut = [];\n const dedup = new Set(); // already seen types\n let injectorTypesWithProviders;\n deepForEach(sources, source => {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && checkForStandaloneCmp) {\n const cmpDef = getComponentDef(source);\n if (cmpDef?.standalone) {\n throw new RuntimeError(800 /* RuntimeErrorCode.IMPORT_PROVIDERS_FROM_STANDALONE */, `Importing providers supports NgModule or ModuleWithProviders but got a standalone component \"${stringifyForError(source)}\"`);\n }\n }\n // Narrow `source` to access the internal type analogue for `ModuleWithProviders`.\n const internalSource = source;\n if (walkProviderTree(internalSource, providersOut, [], dedup)) {\n injectorTypesWithProviders || (injectorTypesWithProviders = []);\n injectorTypesWithProviders.push(internalSource);\n }\n });\n // Collect all providers from `ModuleWithProviders` types.\n if (injectorTypesWithProviders !== undefined) {\n processInjectorTypesWithProviders(injectorTypesWithProviders, providersOut);\n }\n return providersOut;\n}\n/**\n * Collects all providers from the list of `ModuleWithProviders` and appends them to the provided\n * array.\n */\nfunction processInjectorTypesWithProviders(typesWithProviders, providersOut) {\n for (let i = 0; i < typesWithProviders.length; i++) {\n const { ngModule, providers } = typesWithProviders[i];\n deepForEach(providers, provider => {\n ngDevMode && validateProvider(provider, providers || EMPTY_ARRAY, ngModule);\n providersOut.push(provider);\n });\n }\n}\n/**\n * The logic visits an `InjectorType`, an `InjectorTypeWithProviders`, or a standalone\n * `ComponentType`, and all of its transitive providers and collects providers.\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 */\nfunction walkProviderTree(container, providersOut, parents, dedup) {\n container = resolveForwardRef(container);\n if (!container)\n return false;\n // The actual type which had the definition. Usually `container`, but may be an unwrapped type\n // from `InjectorTypeWithProviders`.\n let defType = null;\n let injDef = getInjectorDef(container);\n const cmpDef = !injDef && getComponentDef(container);\n if (!injDef && !cmpDef) {\n // `container` is not an injector type or a component type. It might be:\n // * An `InjectorTypeWithProviders` that wraps an injector type.\n // * A standalone directive or pipe that got pulled in from a standalone component's\n // dependencies.\n // Try to unwrap it as an `InjectorTypeWithProviders` first.\n const ngModule = container.ngModule;\n injDef = getInjectorDef(ngModule);\n if (injDef) {\n defType = ngModule;\n }\n else {\n // Not a component or injector type, so ignore it.\n return false;\n }\n }\n else if (cmpDef && !cmpDef.standalone) {\n return false;\n }\n else {\n defType = container;\n }\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 = dedup.has(defType);\n if (cmpDef) {\n if (isDuplicate) {\n // This component definition has already been processed.\n return false;\n }\n dedup.add(defType);\n if (cmpDef.dependencies) {\n const deps = typeof cmpDef.dependencies === 'function' ? cmpDef.dependencies() : cmpDef.dependencies;\n for (const dep of deps) {\n walkProviderTree(dep, providersOut, parents, dedup);\n }\n }\n }\n else if (injDef) {\n // First, include providers from any imports.\n if (injDef.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 dedup.add(defType);\n let importTypesWithProviders;\n try {\n deepForEach(injDef.imports, imported => {\n if (walkProviderTree(imported, providersOut, parents, dedup)) {\n importTypesWithProviders || (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 processInjectorTypesWithProviders(importTypesWithProviders, providersOut);\n }\n }\n if (!isDuplicate) {\n // Track the InjectorType and add a provider for it.\n // It's important that this is done after the def's imports.\n const factory = getFactoryDef(defType) || (() => new defType());\n // Append extra providers to make more info available for consumers (to retrieve an injector\n // type), as well as internally (to calculate an injection scope correctly and eagerly\n // instantiate a `defType` when an injector is created).\n providersOut.push(\n // Provider to create `defType` using its factory.\n { provide: defType, useFactory: factory, deps: EMPTY_ARRAY }, \n // Make this `defType` available to an internal logic that calculates injector scope.\n { provide: INJECTOR_DEF_TYPES, useValue: defType, multi: true }, \n // Provider to eagerly instantiate `defType` via `ENVIRONMENT_INITIALIZER`.\n { provide: ENVIRONMENT_INITIALIZER, useValue: () => ɵɵinject(defType), multi: true } //\n );\n }\n // Next, include providers listed on the definition itself.\n const defProviders = injDef.providers;\n if (defProviders != null && !isDuplicate) {\n const injectorType = container;\n deepForEach(defProviders, provider => {\n ngDevMode && validateProvider(provider, defProviders, injectorType);\n providersOut.push(provider);\n });\n }\n }\n else {\n // Should not happen, but just in case.\n return false;\n }\n return (defType !== container &&\n container.providers !== undefined);\n}\nfunction validateProvider(provider, providers, containerType) {\n if (isTypeProvider(provider) || isValueProvider(provider) || isFactoryProvider(provider) ||\n isExistingProvider(provider)) {\n return;\n }\n // Here we expect the provider to be a `useClass` provider (by elimination).\n const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));\n if (!classRef) {\n throwInvalidProviderError(containerType, providers, provider);\n }\n}\nconst USE_VALUE$1 = getClosureSafeProperty({ provide: String, useValue: getClosureSafeProperty });\nfunction isValueProvider(value) {\n return value !== null && typeof value == 'object' && USE_VALUE$1 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}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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$1 = undefined;\nfunction getNullInjector() {\n if (NULL_INJECTOR$1 === undefined) {\n NULL_INJECTOR$1 = new NullInjector();\n }\n return NULL_INJECTOR$1;\n}\n/**\n * An `Injector` that's part of the environment injector hierarchy, which exists outside of the\n * component tree.\n *\n * @developerPreview\n */\nclass EnvironmentInjector {\n}\nclass R3Injector extends EnvironmentInjector {\n constructor(providers, parent, source, scopes) {\n super();\n this.parent = parent;\n this.source = source;\n this.scopes = scopes;\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 * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n */\n this._ngOnDestroyHooks = new Set();\n this._onDestroyHooks = [];\n this._destroyed = false;\n // Start off by creating Records for every provider.\n forEachSingleProvider(providers, provider => this.processProvider(provider));\n // Make sure the INJECTOR token provides this injector.\n this.records.set(INJECTOR, makeRecord(undefined, this));\n // And `EnvironmentInjector` if the current injector is supposed to be env-scoped.\n if (scopes.has('environment')) {\n this.records.set(EnvironmentInjector, makeRecord(undefined, this));\n }\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 if (record != null && typeof record.value === 'string') {\n this.scopes.add(record.value);\n }\n this.injectorDefTypes =\n new Set(this.get(INJECTOR_DEF_TYPES.multi, EMPTY_ARRAY, InjectFlags.Self));\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 for (const service of this._ngOnDestroyHooks) {\n service.ngOnDestroy();\n }\n for (const hook of this._onDestroyHooks) {\n hook();\n }\n }\n finally {\n // Release all references.\n this.records.clear();\n this._ngOnDestroyHooks.clear();\n this.injectorDefTypes.clear();\n this._onDestroyHooks.length = 0;\n }\n }\n onDestroy(callback) {\n this._onDestroyHooks.push(callback);\n }\n runInContext(fn) {\n this.assertNotDestroyed();\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n return fn();\n }\n finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\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 resolveInjectorInitializers() {\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n const initializers = this.get(ENVIRONMENT_INITIALIZER.multi, EMPTY_ARRAY, InjectFlags.Self);\n if (ngDevMode && !Array.isArray(initializers)) {\n throw new RuntimeError(209 /* RuntimeErrorCode.INVALID_MULTI_PROVIDER */, 'Unexpected type of the `ENVIRONMENT_INITIALIZER` token value ' +\n `(expected an array, but got ${typeof initializers}). ` +\n 'Please check that the `ENVIRONMENT_INITIALIZER` token is configured as a ' +\n '`multi: true` provider.');\n }\n for (const initializer of initializers) {\n initializer();\n }\n }\n finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n }\n }\n toString() {\n const tokens = [];\n const records = this.records;\n for (const token of records.keys()) {\n tokens.push(stringify(token));\n }\n return `R3Injector[${tokens.join(', ')}]`;\n }\n assertNotDestroyed() {\n if (this._destroyed) {\n throw new RuntimeError(205 /* RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED */, ngDevMode && 'Injector has already been destroyed.');\n }\n }\n /**\n * Process a `SingleProvider` and add it.\n */\n processProvider(provider) {\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);\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._ngOnDestroyHooks.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' || (this.scopes.has(providedIn));\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 RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `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 RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && '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 RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `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) {\n if (isValueProvider(provider)) {\n return makeRecord(undefined, provider.useValue);\n }\n else {\n const factory = providerToFactory(provider);\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 (ngDevMode && isImportedNgModuleProviders(provider)) {\n throwInvalidProviderError(undefined, providers, provider);\n }\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 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}\nfunction isImportedNgModuleProviders(provider) {\n return !!provider.ɵproviders;\n}\nfunction forEachSingleProvider(providers, fn) {\n for (const provider of providers) {\n if (Array.isArray(provider)) {\n forEachSingleProvider(provider, fn);\n }\n else if (isImportedNgModuleProviders(provider)) {\n forEachSingleProvider(provider.ɵproviders, fn);\n }\n else {\n fn(provider);\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$1 {\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 *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n * Component class can be used directly.\n */\nclass ComponentFactory$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 */\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 * Note: since v13, dynamic component creation via\n * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)\n * does **not** require resolving component factory: component class can be used directly.\n *\n * @publicApi\n *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n * Component class can be used directly.\n */\nclass ComponentFactoryResolver$1 {\n}\nComponentFactoryResolver$1.NULL = ( /* @__PURE__ */new _NullComponentFactoryResolver());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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}\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__ = injectElementRef;\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__ = () => injectRenderer2();\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 (isLView(nodeAtIndex) ? nodeAtIndex : lView)[RENDERER];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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('14.1.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// 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 = {};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 */\nlet shouldThrowErrorOnUnknownElement = false;\n/**\n * Sets a strict mode for JIT-compiled components to throw an error on unknown elements,\n * instead of just logging the error.\n * (for AOT-compiled ones this check happens at build time).\n */\nfunction ɵsetUnknownElementStrictMode(shouldThrow) {\n shouldThrowErrorOnUnknownElement = shouldThrow;\n}\n/**\n * Gets the current value of the strict mode.\n */\nfunction ɵgetUnknownElementStrictMode() {\n return shouldThrowErrorOnUnknownElement;\n}\nlet shouldThrowErrorOnUnknownProperty = false;\n/**\n * Sets a strict mode for JIT-compiled components to throw an error on unknown properties,\n * instead of just logging the error.\n * (for AOT-compiled ones this check happens at build time).\n */\nfunction ɵsetUnknownPropertyStrictMode(shouldThrow) {\n shouldThrowErrorOnUnknownProperty = shouldThrow;\n}\n/**\n * Gets the current value of the strict mode.\n */\nfunction ɵgetUnknownPropertyStrictMode() {\n return shouldThrowErrorOnUnknownProperty;\n}\n/**\n * Validates that the element is known at runtime and produces\n * an error if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The element is considered known if either:\n * - it's a known HTML element\n * - it's a known custom element\n * - the element matches any directive\n * - the element is allowed by one of the schemas\n *\n * @param element Element to validate\n * @param lView An `LView` that represents a current component that is being rendered\n * @param tagName Name of the tag to check\n * @param schemas Array of schemas\n * @param hasDirectives Boolean indicating that the element matches any directive\n */\nfunction validateElementIsKnown(element, lView, tagName, schemas, hasDirectives) {\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 // 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(schemas, tagName)) {\n const isHostStandalone = isHostComponentStandalone(lView);\n const templateLocation = getTemplateLocationDetails(lView);\n const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n let message = `'${tagName}' is not a known element${templateLocation}:\\n`;\n message += `1. If '${tagName}' is an Angular component, then verify that it is ${isHostStandalone ? 'included in the \\'@Component.imports\\' of this component' :\n 'a part of an @NgModule where this component is declared'}.\\n`;\n if (tagName && tagName.indexOf('-') > -1) {\n message +=\n `2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the ${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 ${schemas} of this component.`;\n }\n if (shouldThrowErrorOnUnknownElement) {\n throw new RuntimeError(304 /* RuntimeErrorCode.UNKNOWN_ELEMENT */, message);\n }\n else {\n console.error(formatRuntimeError(304 /* RuntimeErrorCode.UNKNOWN_ELEMENT */, message));\n }\n }\n }\n}\n/**\n * Validates that the property of the element is known at runtime and returns\n * false if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The property is considered known if either:\n * - it's a known property of the element\n * - the element is allowed by one of the schemas\n * - the property is used for animations\n *\n * @param element Element to validate\n * @param propName Name of the property to check\n * @param tagName Name of the tag hosting the property\n * @param schemas Array of schemas\n */\nfunction isPropertyValid(element, propName, tagName, 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 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(schemas, tagName) || 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 with `typeof null` also returning 'object'.\n return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n}\n/**\n * Logs or throws an error that a property is not supported on an element.\n *\n * @param propName Name of the invalid property\n * @param tagName Name of the tag hosting the property\n * @param nodeType Type of the node hosting the property\n * @param lView An `LView` that represents a current component\n */\nfunction handleUnknownPropertyError(propName, tagName, nodeType, lView) {\n // Special-case a situation when a structural directive is applied to\n // an `<ng-template>` element, for example: `<ng-template *ngIf=\"true\">`.\n // In this case the compiler generates the `ɵɵtemplate` instruction with\n // the `null` as the tagName. The directive matching logic at runtime relies\n // on this effect (see `isInlineTemplate`), thus using the 'ng-template' as\n // a default value of the `tNode.value` is not feasible at this moment.\n if (!tagName && nodeType === 4 /* TNodeType.Container */) {\n tagName = 'ng-template';\n }\n const isHostStandalone = isHostComponentStandalone(lView);\n const templateLocation = getTemplateLocationDetails(lView);\n let message = `Can't bind to '${propName}' since it isn't a known property of '${tagName}'${templateLocation}.`;\n const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n const importLocation = isHostStandalone ?\n 'included in the \\'@Component.imports\\' of this component' :\n 'a part of an @NgModule where this component is declared';\n if (KNOWN_CONTROL_FLOW_DIRECTIVES.has(propName)) {\n // Most likely this is a control flow directive (such as `*ngIf`) used in\n // a template, but the `CommonModule` is not imported.\n message += `\\nIf the '${propName}' is an Angular control flow directive, ` +\n `please make sure that the 'CommonModule' is ${importLocation}.`;\n }\n else {\n // May be an Angular component, which is not imported/declared?\n message += `\\n1. If '${tagName}' is an Angular component and it has the ` +\n `'${propName}' input, then verify that it is ${importLocation}.`;\n // May be a Web Component?\n if (tagName && tagName.indexOf('-') > -1) {\n message += `\\n2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' ` +\n `to the ${schemas} of this component to suppress this message.`;\n message += `\\n3. To allow any property add 'NO_ERRORS_SCHEMA' to ` +\n `the ${schemas} of this component.`;\n }\n else {\n // If it's expected, the error can be suppressed by the `NO_ERRORS_SCHEMA` schema.\n message += `\\n2. To allow any property add 'NO_ERRORS_SCHEMA' to ` +\n `the ${schemas} of this component.`;\n }\n }\n reportUnknownPropertyError(message);\n}\nfunction reportUnknownPropertyError(message) {\n if (shouldThrowErrorOnUnknownProperty) {\n throw new RuntimeError(303 /* RuntimeErrorCode.UNKNOWN_BINDING */, message);\n }\n else {\n console.error(formatRuntimeError(303 /* RuntimeErrorCode.UNKNOWN_BINDING */, message));\n }\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode and also it relies on the constructor function being available.\n *\n * Gets a reference to the host component def (where a current component is declared).\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction getDeclarationComponentDef(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const declarationLView = lView[DECLARATION_COMPONENT_VIEW];\n const context = declarationLView[CONTEXT];\n // Unable to obtain a context.\n if (!context)\n return null;\n return context.constructor ? getComponentDef(context.constructor) : null;\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Checks if the current component is declared inside of a standalone component template.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction isHostComponentStandalone(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const componentDef = getDeclarationComponentDef(lView);\n // Treat host component as non-standalone if we can't obtain the def.\n return !!componentDef?.standalone;\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Constructs a string describing the location of the host component template. The function is used\n * in dev mode to produce error messages.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction getTemplateLocationDetails(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const hostComponentDef = getDeclarationComponentDef(lView);\n const componentClassName = hostComponentDef?.type?.name;\n return componentClassName ? ` (used in the '${componentClassName}' component template)` : '';\n}\n/**\n * The set of known control flow directives.\n * We use this set to produce a more precises error message with a note\n * that the `CommonModule` should also be included.\n */\nconst KNOWN_CONTROL_FLOW_DIRECTIVES = new Set(['ngIf', 'ngFor', 'ngSwitch', 'ngSwitchCase', 'ngSwitchDefault']);\n/**\n * Returns true if the tag name is allowed by specified schemas.\n * @param schemas Array of schemas\n * @param tagName Name of the tag\n */\nfunction matchingSchemas(schemas, tagName) {\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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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_ORIGINAL_ERROR = 'ngOriginalError';\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}\nfunction getOriginalError(error) {\n return error[ERROR_ORIGINAL_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 */\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 this._console.error('ERROR', error);\n if (originalError) {\n this._console.error('ORIGINAL ERROR', originalError);\n }\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 * 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 */\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 */\n// Keeps track of the currently-active LViews.\nconst TRACKED_LVIEWS = new Map();\n// Used for generating unique IDs for LViews.\nlet uniqueIdCounter = 0;\n/** Gets a unique ID that can be assigned to an LView. */\nfunction getUniqueLViewId() {\n return uniqueIdCounter++;\n}\n/** Starts tracking an LView. */\nfunction registerLView(lView) {\n ngDevMode && assertNumber(lView[ID], 'LView must have an ID in order to be registered');\n TRACKED_LVIEWS.set(lView[ID], lView);\n}\n/** Gets an LView by its unique ID. */\nfunction getLViewById(id) {\n ngDevMode && assertNumber(id, 'ID used for LView lookup must be a number');\n return TRACKED_LVIEWS.get(id) || null;\n}\n/** Stops tracking an LView. */\nfunction unregisterLView(lView) {\n ngDevMode && assertNumber(lView[ID], 'Cannot stop tracking an LView that does not have an ID');\n TRACKED_LVIEWS.delete(lView[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 * The internal view context which is specific to a given DOM element, directive or\n * component instance. Each value in here (besides the LView and element node details)\n * can be present, null or undefined. If undefined then it implies the value has not been\n * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.\n *\n * Each value will get filled when the respective value is examined within the getContext\n * function. The component, element and each directive instance will share the same instance\n * of the context.\n */\nclass LContext {\n constructor(\n /**\n * ID of the component's parent view data.\n */\n lViewId, \n /**\n * The index instance of the node.\n */\n nodeIndex, \n /**\n * The instance of the DOM node that is attached to the lNode.\n */\n native) {\n this.lViewId = lViewId;\n this.nodeIndex = nodeIndex;\n this.native = native;\n }\n /** Component's parent view data. */\n get lView() {\n return getLViewById(this.lViewId);\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 * 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 (isLView(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 const lView = Array.isArray(parentContext) ? parentContext : parentContext.lView;\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 new LContext(lView[ID], nodeIndex, native);\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 patchedData = readPatchedData(componentInstance);\n let lView;\n if (isLView(patchedData)) {\n const contextLView = patchedData;\n const nodeIndex = findViaComponent(contextLView, componentInstance);\n lView = getComponentLViewByIndex(nodeIndex, contextLView);\n const context = createLContext(contextLView, nodeIndex, lView[HOST]);\n context.component = componentInstance;\n attachPatchData(componentInstance, context);\n attachPatchData(context.native, context);\n }\n else {\n const context = patchedData;\n const contextLView = context.lView;\n ngDevMode && assertLView(contextLView);\n lView = getComponentLViewByIndex(context.nodeIndex, contextLView);\n }\n return lView;\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 // Only attach the ID of the view in order to avoid memory leaks (see #41047). We only do this\n // for `LView`, because we have control over when an `LView` is created and destroyed, whereas\n // we can't know when to remove an `LContext`.\n if (isLView(data)) {\n target[MONKEY_PATCH_KEY_NAME] = data[ID];\n registerLView(data);\n }\n else {\n target[MONKEY_PATCH_KEY_NAME] = data;\n }\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 const data = target[MONKEY_PATCH_KEY_NAME];\n return (typeof data === 'number') ? getLViewById(data) : data || null;\n}\nfunction readPatchedLView(target) {\n const value = readPatchedData(target);\n if (value) {\n return (isLView(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 /* TNodeFlags.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 /* TNodeFlags.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 defaultScheduler = (() => (typeof requestAnimationFrame !== 'undefined' &&\n requestAnimationFrame || // browser only\n setTimeout // everything else\n)\n .bind(_global))();\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/** Verifies that a given type is a Standalone Component. */\nfunction assertStandaloneComponentType(type) {\n assertComponentDef(type);\n const componentDef = getComponentDef(type);\n if (!componentDef.standalone) {\n throw new RuntimeError(907 /* RuntimeErrorCode.TYPE_IS_NOT_STANDALONE */, `The ${stringifyForError(type)} component is not marked as standalone, ` +\n `but Angular expects to have a standalone component here. ` +\n `Please make sure the ${stringifyForError(type)} component has ` +\n `the \\`standalone: true\\` flag in the decorator.`);\n }\n}\n/** Verifies whether a given type is a component */\nfunction assertComponentDef(type) {\n if (!getComponentDef(type)) {\n throw new RuntimeError(906 /* RuntimeErrorCode.MISSING_GENERATED_DEF */, `The ${stringifyForError(type)} is not an Angular component, ` +\n `make sure it has the \\`@Component\\` decorator.`);\n }\n}\n/** Called when there are multiple component selectors that match a given node */\nfunction throwMultipleComponentError(tNode, first, second) {\n throw new RuntimeError(-300 /* RuntimeErrorCode.MULTIPLE_COMPONENTS_MATCH */, `Multiple components match node with tagname ${tNode.value}: ` +\n `${stringifyForError(first)} and ` +\n `${stringifyForError(second)}`);\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 throw new RuntimeError(-100 /* RuntimeErrorCode.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$4 = 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$3 = 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] & 256 /* LViewFlags.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$2 = unusedValueExportToPlacateAjd$7 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$3 + unusedValueExportToPlacateAjd$8;\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 if (action === 0 /* WalkTNodeTreeAction.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 /* WalkTNodeTreeAction.Insert */ && parent !== null) {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n }\n else if (action === 2 /* WalkTNodeTreeAction.Detach */) {\n nativeRemoveNode(renderer, rNode, isComponent);\n }\n else if (action === 3 /* WalkTNodeTreeAction.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 renderer.createText(value);\n}\nfunction updateTextNode(renderer, rNode, value) {\n ngDevMode && ngDevMode.rendererSetText++;\n renderer.setValue(rNode, value);\n}\nfunction createCommentNode(renderer, value) {\n ngDevMode && ngDevMode.rendererCreateComment++;\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 return renderer.createElement(name, namespace);\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 /* WalkTNodeTreeAction.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 /* WalkTNodeTreeAction.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 /* WalkTNodeTreeAction.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] |= 64 /* LViewFlags.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] & 512 /* LViewFlags.RefreshTransplantedView */) {\n lView[FLAGS] &= ~512 /* LViewFlags.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] &= ~64 /* LViewFlags.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] & 128 /* LViewFlags.Destroyed */)) {\n const renderer = lView[RENDERER];\n if (renderer.destroyNode) {\n applyView(tView, lView, renderer, 3 /* WalkTNodeTreeAction.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] & 128 /* LViewFlags.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] &= ~64 /* LViewFlags.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] |= 128 /* LViewFlags.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 /* TViewType.Component */) {\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 // Unregister the view once everything else has been cleaned up.\n unregisterLView(lView);\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 /* ProfilerEvent.LifecycleHookStart */, callContext, hook);\n try {\n hook.call(callContext);\n }\n finally {\n profiler(5 /* ProfilerEvent.LifecycleHookEnd */, callContext, hook);\n }\n }\n }\n else {\n profiler(4 /* ProfilerEvent.LifecycleHookStart */, context, toCall);\n try {\n toCall.call(context);\n }\n finally {\n profiler(5 /* ProfilerEvent.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 /* TNodeType.ElementContainer */ | 32 /* TNodeType.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 /* TNodeType.AnyRNode */ | 4 /* TNodeType.Container */);\n if (parentTNode.flags & 2 /* TNodeFlags.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$1.None ||\n encapsulation === ViewEncapsulation$1.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.\n * This is a utility function that can be used when native nodes were determined.\n */\nfunction nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {\n ngDevMode && ngDevMode.rendererInsertBefore++;\n renderer.insertBefore(parent, child, beforeNode, isMove);\n}\nfunction nativeAppendChild(renderer, parent, child) {\n ngDevMode && ngDevMode.rendererAppendChild++;\n ngDevMode && assertDefined(parent, 'parent node must be defined');\n renderer.appendChild(parent, child);\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 renderer.removeChild(parent, child, isHostElement);\n}\n/** Checks if an element is a `<template>` node. */\nfunction isTemplateNode(node) {\n return node.tagName === 'TEMPLATE' && node.content !== undefined;\n}\n/**\n * Returns a native parent of a given native node.\n */\nfunction nativeParentNode(renderer, node) {\n return renderer.parentNode(node);\n}\n/**\n * Returns a native sibling of a given native node.\n */\nfunction nativeNextSibling(renderer, node) {\n return renderer.nextSibling(node);\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 /* TNodeType.ElementContainer */ | 32 /* TNodeType.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 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */ | 32 /* TNodeType.Icu */ | 16 /* TNodeType.Projection */);\n const tNodeType = tNode.type;\n if (tNodeType & 3 /* TNodeType.AnyRNode */) {\n return getNativeByTNode(tNode, lView);\n }\n else if (tNodeType & 4 /* TNodeType.Container */) {\n return getBeforeNodeForView(-1, lView[tNode.index]);\n }\n else if (tNodeType & 8 /* TNodeType.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 /* TNodeType.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 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */ | 16 /* TNodeType.Projection */ | 32 /* TNodeType.Icu */);\n const rawSlotValue = lView[tNode.index];\n const tNodeType = tNode.type;\n if (isProjection) {\n if (action === 0 /* WalkTNodeTreeAction.Create */) {\n rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);\n tNode.flags |= 4 /* TNodeFlags.isProjected */;\n }\n }\n if ((tNode.flags & 64 /* TNodeFlags.isDetached */) !== 64 /* TNodeFlags.isDetached */) {\n if (tNodeType & 8 /* TNodeType.ElementContainer */) {\n applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);\n applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n }\n else if (tNodeType & 32 /* TNodeType.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 /* TNodeType.Projection */) {\n applyProjectionRecursive(renderer, action, lView, tNode, parentRElement, beforeNode);\n }\n else {\n ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.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 /* WalkTNodeTreeAction.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 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 renderer.removeClass(rNode, prop);\n }\n else {\n ngDevMode && ngDevMode.rendererAddClass++;\n renderer.addClass(rNode, prop);\n }\n }\n else {\n let flags = prop.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase;\n if (value == null /** || value === undefined */) {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n renderer.removeStyle(rNode, prop, flags);\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 renderer.setStyle(rNode, prop, value, flags);\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 renderer.setAttribute(element, 'style', newValue);\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 (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 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 /* CharCode.SPACE */) {\n // Ensure that it has leading whitespace\n const length = classToSearch.length;\n if (foundIndex + length === end ||\n className.charCodeAt(foundIndex + length) <= 32 /* CharCode.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$5 + unusedValueExportToPlacateAjd$4;\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 /* AttributeMarker.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 /* TNodeType.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 /* TNodeType.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 /* SelectorFlags.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 /* SelectorFlags.NOT */);\n continue;\n }\n if (skipToNextSelector)\n continue;\n if (mode & 4 /* SelectorFlags.ELEMENT */) {\n mode = 2 /* SelectorFlags.ATTRIBUTE */ | mode & 1 /* SelectorFlags.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 /* SelectorFlags.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 /* SelectorFlags.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 /* SelectorFlags.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 /* AttributeMarker.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 /* SelectorFlags.CLASS */ ? nodeAttrValue : null;\n if (compareAgainstClassName &&\n classIndexOf(compareAgainstClassName, selectorAttrValue, 0) !== -1 ||\n mode & 2 /* SelectorFlags.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 /* SelectorFlags.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 /* AttributeMarker.Bindings */ || maybeAttrName === 6 /* AttributeMarker.I18n */) {\n bindingsMode = true;\n }\n else if (maybeAttrName === 1 /* AttributeMarker.Classes */ || maybeAttrName === 2 /* AttributeMarker.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 /* AttributeMarker.Template */) {\n // We do not care about Template attributes in this scenario.\n break;\n }\n else if (maybeAttrName === 0 /* AttributeMarker.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 /* AttributeMarker.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 /* AttributeMarker.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 /* SelectorFlags.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 /* SelectorFlags.ATTRIBUTE */) {\n const attrValue = selector[++i];\n currentChunk +=\n '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n }\n else if (mode & 8 /* SelectorFlags.CLASS */) {\n currentChunk += '.' + valueOrMarker;\n }\n else if (mode & 4 /* SelectorFlags.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 /* SelectorFlags.ATTRIBUTE */;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode === 2 /* SelectorFlags.ATTRIBUTE */) {\n if (valueOrMarker !== '') {\n attrs.push(valueOrMarker, selector[++i]);\n }\n }\n else if (mode === 8 /* SelectorFlags.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, !!ngDevMode && 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 /* LViewFlags.InitPhaseStateMask */) === 3 /* InitPhaseState.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 /* InitPhaseState.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 */\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 /* JitCompilerUsage.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 /* JitCompilerUsage.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 USE_VALUE = getClosureSafeProperty({ provide: String, useValue: getClosureSafeProperty });\nfunction isUseClassProvider(meta) {\n return meta.useClass !== undefined;\n}\nfunction isUseValueProvider(meta) {\n return USE_VALUE 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 */\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Injectable = makeDecorator('Injectable', undefined, undefined, undefined, (type, meta) => compileInjectable(type, meta));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 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.resolveInjectorInitializers();\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, scopes = new Set()) {\n const providers = [\n additionalProviders || EMPTY_ARRAY,\n importProvidersFrom(defType),\n ];\n name = name || (typeof defType === 'object' ? undefined : stringify(defType));\n return new R3Injector(providers, parent || getNullInjector(), name || null, scopes);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * 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 createInjector({ name: '' }, parent, options, '');\n }\n else {\n const name = options.name ?? '';\n return createInjector({ name }, options.parent, options.providers, name);\n }\n }\n}\nInjector.THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\nInjector.NULL = ( /* @__PURE__ */new NullInjector());\n/** @nocollapse */\nInjector.ɵprov = ɵɵdefineInjectable({\n token: Injector,\n providedIn: 'any',\n factory: () => ɵɵinject(INJECTOR),\n});\n/**\n * @internal\n * @nocollapse\n */\nInjector.__NG_ELEMENT_ID__ = -1 /* InjectorMarkers.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 */\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 RuntimeError(208 /* RuntimeErrorCode.MISSING_INJECTION_TOKEN */, ngDevMode && '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 * `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 = getReflect().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 = getReflect().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 * TODO: delete in v14.\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 = ( /* @__PURE__ */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 * 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 toTStylingRange(prev, next) {\n ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);\n ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);\n return (prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */);\n}\nfunction getTStylingRangePrev(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;\n}\nfunction getTStylingRangePrevDuplicate(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) ==\n 2 /* StylingRange.PREV_DUPLICATE */;\n}\nfunction setTStylingRangePrev(tStylingRange, previous) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);\n return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |\n (previous << 17 /* StylingRange.PREV_SHIFT */));\n}\nfunction setTStylingRangePrevDuplicate(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);\n}\nfunction getTStylingRangeNext(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;\n}\nfunction setTStylingRangeNext(tStylingRange, next) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);\n return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //\n next << 2 /* StylingRange.NEXT_SHIFT */);\n}\nfunction getTStylingRangeNextDuplicate(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) ===\n 1 /* StylingRange.NEXT_DUPLICATE */;\n}\nfunction setTStylingRangeNextDuplicate(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange | 1 /* StylingRange.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 */\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;\nlet LVIEW_COMPONENT;\nlet LVIEW_EMBEDDED;\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}\nclass LRootView extends Array {\n}\nclass LComponentView extends Array {\n}\nclass LEmbeddedView extends Array {\n}\nfunction getLViewToClone(type, name) {\n switch (type) {\n case 0 /* TViewType.Root */:\n if (LVIEW_ROOT === undefined)\n LVIEW_ROOT = new LRootView();\n return LVIEW_ROOT;\n case 1 /* TViewType.Component */:\n if (!ngDevMode || !ngDevMode.namedConstructors) {\n if (LVIEW_COMPONENT === undefined)\n LVIEW_COMPONENT = new LComponentView();\n return LVIEW_COMPONENT;\n }\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 /* TViewType.Embedded */:\n if (!ngDevMode || !ngDevMode.namedConstructors) {\n if (LVIEW_EMBEDDED === undefined)\n LVIEW_EMBEDDED = new LEmbeddedView();\n return LVIEW_EMBEDDED;\n }\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.slice(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 /* NodeInjectorOffset.TNODE */];\n path.push(buildDebugNode(tNode, lView));\n const parentLocation = lView[injectorIndex + 8 /* NodeInjectorOffset.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 /* TNodeFlags.hasClassInput */)\n flags.push('TNodeFlags.hasClassInput');\n if (this.flags & 8 /* TNodeFlags.hasContentQuery */)\n flags.push('TNodeFlags.hasContentQuery');\n if (this.flags & 32 /* TNodeFlags.hasStyleInput */)\n flags.push('TNodeFlags.hasStyleInput');\n if (this.flags & 128 /* TNodeFlags.hasHostBindings */)\n flags.push('TNodeFlags.hasHostBindings');\n if (this.flags & 2 /* TNodeFlags.isComponentHost */)\n flags.push('TNodeFlags.isComponentHost');\n if (this.flags & 1 /* TNodeFlags.isDirectiveHost */)\n flags.push('TNodeFlags.isDirectiveHost');\n if (this.flags & 64 /* TNodeFlags.isDetached */)\n flags.push('TNodeFlags.isDetached');\n if (this.flags & 4 /* TNodeFlags.isProjected */)\n flags.push('TNodeFlags.isProjected');\n return flags.join('|');\n }\n get template_() {\n if (this.type & 1 /* TNodeType.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 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n }\n get providerIndexEnd_() {\n return this.providerIndexStart_ +\n (this.providerIndexes >>> 20 /* TNodeProviderIndexes.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}\nclass TViewData extends Array {\n}\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}\nclass LViewBlueprint extends Array {\n}\nclass MatchesArray extends Array {\n}\nclass TViewComponents extends Array {\n}\nclass TNodeLocalNames extends Array {\n}\nclass TNodeInitialInputs extends Array {\n}\nclass LCleanup extends Array {\n}\nclass TCleanup extends Array {\n}\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 /* LViewFlags.InitPhaseStateMask */,\n creationMode: !!(flags & 4 /* LViewFlags.CreationMode */),\n firstViewPass: !!(flags & 8 /* LViewFlags.FirstLViewPass */),\n checkAlways: !!(flags & 16 /* LViewFlags.CheckAlways */),\n dirty: !!(flags & 32 /* LViewFlags.Dirty */),\n attached: !!(flags & 64 /* LViewFlags.Attached */),\n destroyed: !!(flags & 128 /* LViewFlags.Destroyed */),\n isRoot: !!(flags & 256 /* LViewFlags.IsRoot */),\n indexWithinInitPhase: flags >> 11 /* LViewFlags.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$1];\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 id() {\n return this._raw_lView[ID];\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\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 permanent marker promise which signifies that the current CD tree is\n * clean.\n */\nconst _CLEAN_PROMISE = (() => Promise.resolve(null))();\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 /* RenderFlags.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 /* RenderFlags.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, embeddedViewInjector) {\n const lView = ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice();\n lView[HOST] = host;\n lView[FLAGS] = flags | 4 /* LViewFlags.CreationMode */ | 64 /* LViewFlags.Attached */ | 8 /* LViewFlags.FirstLViewPass */;\n if (embeddedViewInjector !== null ||\n (parentLView && (parentLView[FLAGS] & 1024 /* LViewFlags.HasEmbeddedViewInjector */))) {\n lView[FLAGS] |= 1024 /* LViewFlags.HasEmbeddedViewInjector */;\n }\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$1] = injector || parentLView && parentLView[INJECTOR$1] || null;\n lView[T_HOST] = tHostNode;\n lView[ID] = getUniqueLViewId();\n lView[EMBEDDED_VIEW_INJECTOR] = embeddedViewInjector;\n ngDevMode &&\n assertEqual(tView.type == 2 /* TViewType.Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');\n lView[DECLARATION_COMPONENT_VIEW] =\n tView.type == 2 /* TViewType.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 /* TNodeFlags.isDetached */;\n }\n }\n else if (tNode.type & 64 /* TNodeType.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 /* RenderFlags.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 /* RenderFlags.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 /* RenderFlags.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 /* LViewFlags.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 & 128 /* LViewFlags.Destroyed */) === 128 /* LViewFlags.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 = ngDevMode && isInCheckNoChangesMode();\n try {\n resetPreOrderHookFlags(lView);\n setBindingIndex(tView.bindingStartIndex);\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, 2 /* RenderFlags.Update */, context);\n }\n const hooksInitPhaseCompleted = (flags & 3 /* LViewFlags.InitPhaseStateMask */) === 3 /* InitPhaseState.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 /* InitPhaseState.OnInitHooksToBeRun */, null);\n }\n incrementInitPhaseFlags(lView, 0 /* InitPhaseState.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 /* InitPhaseState.AfterContentInitHooksToBeRun */);\n }\n incrementInitPhaseFlags(lView, 1 /* InitPhaseState.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 /* RenderFlags.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 /* InitPhaseState.AfterViewInitHooksToBeRun */);\n }\n incrementInitPhaseFlags(lView, 2 /* InitPhaseState.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] &= ~(32 /* LViewFlags.Dirty */ | 8 /* LViewFlags.FirstLViewPass */);\n }\n if (lView[FLAGS] & 512 /* LViewFlags.RefreshTransplantedView */) {\n lView[FLAGS] &= ~512 /* LViewFlags.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 // 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 invoke renderer factory functions in that mode\n // to avoid any possible side-effects.\n const checkNoChangesMode = !!ngDevMode && isInCheckNoChangesMode();\n const creationModeIsActive = isCreationMode(lView);\n try {\n if (!checkNoChangesMode && !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 (!checkNoChangesMode && !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 /* RenderFlags.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, !!ngDevMode && isInCheckNoChangesMode());\n }\n const preHookType = isUpdatePhase ? 2 /* ProfilerEvent.TemplateUpdateStart */ : 0 /* ProfilerEvent.TemplateCreateStart */;\n profiler(preHookType, context);\n templateFn(rf, context);\n }\n finally {\n setSelectedIndex(prevSelectedIndex);\n const postHookType = isUpdatePhase ? 3 /* ProfilerEvent.TemplateUpdateEnd */ : 1 /* ProfilerEvent.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 /* RenderFlags.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 /* TNodeFlags.hasHostBindings */) === 128 /* TNodeFlags.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 /* TViewType.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}\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 // When using native Shadow DOM, do not clear host element to allow native slot projection\n const preserveContent = encapsulation === ViewEncapsulation$1.ShadowDom;\n return renderer.selectRootElement(elementOrSelector, preserveContent);\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 /* TNodeFlags.hasClassInput */;\n }\n if (inputsStore.hasOwnProperty('style')) {\n tNode.flags |= 32 /* TNodeFlags.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 /* TNodeType.AnyRNode */) {\n propName = mapPropName(propName);\n if (ngDevMode) {\n validateAgainstEventProperties(propName);\n if (!isPropertyValid(element, propName, tNode.value, tView.schemas)) {\n handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\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 renderer.setProperty(element, propName, value);\n }\n else if (tNode.type & 12 /* TNodeType.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.schemas, tNode.value)) {\n handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\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 /* LViewFlags.CheckAlways */)) {\n childComponentLView[FLAGS] |= 32 /* LViewFlags.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 /* TNodeType.AnyRNode */) {\n if (value == null) {\n renderer.removeAttribute(element, attrName);\n }\n else {\n renderer.setAttribute(element, attrName, debugValue);\n }\n }\n else {\n const textContent = escapeCommentText(`bindings=${JSON.stringify({ [attrName]: debugValue }, null, 2)}`);\n renderer.setValue(element, textContent);\n }\n}\nfunction setNgReflectProperties(lView, element, type, dataValue, value) {\n if (type & (3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.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}\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 initializeInputAndOutputAliases(tView, rootTNode);\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 /* TNodeFlags.hasContentQuery */;\n if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0)\n tNode.flags |= 128 /* TNodeFlags.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 /* TNodeType.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 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 /* RenderFlags.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 /* TNodeType.AnyRNode */ | 12 /* TNodeType.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 /* TNodeType.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 /* TNodeFlags.isComponentHost */) {\n // If another component has been matched previously, it's the first element in the\n // `matches` array, see how we store components/directives in `matches` below.\n throwMultipleComponentError(tNode, matches[0].type, def.type);\n }\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 /* TNodeFlags.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 /* RuntimeErrorCode.EXPORT_NOT_FOUND */, ngDevMode && `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 /* TNodeFlags.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 // Even though `directiveFactory` will already be using `ɵɵdirectiveInject` in its generated code,\n // we also want to support `inject()` directly from the directive constructor context so we set\n // `ɵɵdirectiveInject` as the inject implementation here too.\n const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), ɵɵdirectiveInject);\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 ? 32 /* LViewFlags.Dirty */ : 16 /* LViewFlags.CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, 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 /* TNodeType.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 renderer.removeAttribute(element, name, namespace);\n }\n else {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n const strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name);\n renderer.setAttribute(element, name, strValue, namespace);\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 /* AttributeMarker.NamespaceURI */) {\n // We do not allow inputs on namespaced attributes.\n i += 4;\n continue;\n }\n else if (attrName === 5 /* AttributeMarker.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 = class LContainer extends Array {\n};\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 // 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] & 512 /* LViewFlags.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] |= 512 /* LViewFlags.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 /* LViewFlags.CheckAlways */ | 32 /* LViewFlags.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] & 512 /* LViewFlags.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] |= 32 /* LViewFlags.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 /* RootContextFlags.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 /* RootContextFlags.DetectChanges */) {\n rootContext.flags &= ~1 /* RootContextFlags.DetectChanges */;\n tickRootContext(rootContext);\n }\n if (rootContext.flags & 2 /* RootContextFlags.FlushPlayers */) {\n rootContext.flags &= ~2 /* RootContextFlags.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 // We might not have an `LView` if the component was destroyed.\n if (lView !== null) {\n const tView = lView[TVIEW];\n renderComponentOrTemplate(tView, lView, tView.template, rootComponent);\n }\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$1];\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 /* AttributeMarker.Classes */) {\n classes = concatStringsWithSpace(classes, value);\n }\n else if (mode == 2 /* AttributeMarker.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 */\nfunction collectNativeNodes(tView, lView, tNode, result, isProjection = false) {\n while (tNode !== null) {\n ngDevMode &&\n assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */ | 16 /* TNodeType.Projection */ | 32 /* TNodeType.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 /* TNodeType.ElementContainer */) {\n collectNativeNodes(tView, lView, tNode.child, result);\n }\n else if (tNodeType & 32 /* TNodeType.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 /* TNodeType.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$1 {\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] & 128 /* LViewFlags.Destroyed */) === 128 /* LViewFlags.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] &= ~64 /* LViewFlags.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] |= 64 /* LViewFlags.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 if (ngDevMode) {\n checkNoChangesInternal(this._lView[TVIEW], this._lView, this.context);\n }\n }\n attachToViewContainerRef() {\n if (this._appRef) {\n throw new RuntimeError(902 /* RuntimeErrorCode.VIEW_ALREADY_ATTACHED */, ngDevMode && '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 RuntimeError(902 /* RuntimeErrorCode.VIEW_ALREADY_ATTACHED */, ngDevMode && 'This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n }\n}\n/** @internal */\nclass RootViewRef extends ViewRef$1 {\n constructor(_view) {\n super(_view);\n this._view = _view;\n }\n detectChanges() {\n detectChangesInRootView(this._view);\n }\n checkNoChanges() {\n if (ngDevMode) {\n checkNoChangesInRootView(this._view);\n }\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 */\nclass ComponentFactoryResolver extends ComponentFactoryResolver$1 {\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(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(elementName) {\n const name = elementName.toLowerCase();\n return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null);\n}\n/**\n * Injector that looks up a value using a specific injector, before falling back to the module\n * injector. Used primarily when creating components or embedded views dynamically.\n */\nclass ChainedInjector {\n constructor(injector, parentInjector) {\n this.injector = injector;\n this.parentInjector = parentInjector;\n }\n get(token, notFoundValue, flags) {\n const value = this.injector.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 this.parentInjector.get(token, notFoundValue, flags);\n }\n}\n/**\n * Render3 implementation of {@link viewEngine_ComponentFactory}.\n */\nclass ComponentFactory extends ComponentFactory$1 {\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, environmentInjector) {\n environmentInjector = environmentInjector || this.ngModule;\n let realEnvironmentInjector = environmentInjector instanceof EnvironmentInjector ?\n environmentInjector :\n environmentInjector?.injector;\n if (realEnvironmentInjector && this.componentDef.getStandaloneInjector !== null) {\n realEnvironmentInjector = this.componentDef.getStandaloneInjector(realEnvironmentInjector) ||\n realEnvironmentInjector;\n }\n const rootViewInjector = realEnvironmentInjector ? new ChainedInjector(injector, realEnvironmentInjector) : injector;\n const rendererFactory = rootViewInjector.get(RendererFactory2, null);\n if (rendererFactory === null) {\n throw new RuntimeError(407 /* RuntimeErrorCode.RENDERER_NOT_FOUND */, ngDevMode &&\n 'Angular was not able to inject a renderer (RendererFactory2). ' +\n 'Likely this is due to a broken DI hierarchy. ' +\n 'Make sure that any injector used to create this component has a correct parent.');\n }\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(elementName));\n const rootFlags = this.componentDef.onPush ? 32 /* LViewFlags.Dirty */ | 256 /* LViewFlags.IsRoot */ :\n 16 /* LViewFlags.CheckAlways */ | 256 /* LViewFlags.IsRoot */;\n const rootContext = createRootContext();\n // Create the root view. Uses empty TView and ContentTemplate.\n const rootTView = createTView(0 /* TViewType.Root */, null, null, 1, 0, null, null, null, null, null);\n const rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector, null);\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(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode);\n }\n}\nconst componentFactoryResolver = new ComponentFactoryResolver();\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 extends ComponentRef$1 {\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 setInput(name, value) {\n const inputData = this._tNode.inputs;\n let dataValue;\n if (inputData !== null && (dataValue = inputData[name])) {\n const lView = this._rootLView;\n setInputsForProperty(lView[TVIEW], lView, dataValue, name, value);\n markDirtyIfOnPush(lView, this._tNode.index);\n }\n else {\n if (ngDevMode) {\n const cmpNameForError = stringifyForError(this.componentType);\n let message = `Can't set value of the '${name}' input on the '${cmpNameForError}' component. `;\n message += `Make sure that the '${name}' property is annotated with @Input() or a mapped @Input('${name}') exists.`;\n reportUnknownPropertyError(message);\n }\n }\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// TODO: A hack to not pull in the NullInjector from @angular/core.\nconst NULL_INJECTOR = {\n get: (token, notFoundValue) => {\n throwProviderNotFoundError(token, 'NullInjector');\n }\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 /* TNodeType.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 ? 32 /* LViewFlags.Dirty */ : 16 /* LViewFlags.CheckAlways */, rootView[index], tNode, rendererFactory, viewRenderer, sanitizer || null, 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 if (hostFeatures !== null) {\n for (const feature of hostFeatures) {\n feature(component, componentDef);\n }\n }\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 /* RenderFlags.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 /* RootContextFlags.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() {\n const tNode = getCurrentTNode();\n ngDevMode && assertDefined(tNode, 'TNode is required');\n registerPostOrderHooks(getLView()[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 RuntimeError(903 /* RuntimeErrorCode.INVALID_INHERITANCE */, ngDevMode &&\n `Directives cannot inherit Components. Directive ${stringifyForError(definition.type)} is attempting to extend component ${stringifyForError(superType)}`);\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 isIterable(obj) {\n return obj !== null && typeof obj === 'object' && obj[getSymbolIterator()] !== undefined;\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 */\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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 */\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 /* RootContextFlags.DetectChanges */);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 /* TNodeType.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 /* TViewType.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 * 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 /* TNodeType.Element */, name, attrs);\n const hasDirectives = resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\n if (ngDevMode) {\n validateElementIsKnown(native, lView, tNode.value, tView.schemas, hasDirectives);\n }\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 * @returns This function returns itself so that it may be chained.\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$1());\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 /* TNodeFlags.isDetached */) !== 64 /* TNodeFlags.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 return ɵɵelementStart;\n}\n/**\n * Mark the end of the element.\n * @returns This function returns itself so that it may be chained.\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 /* TNodeType.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 return ɵɵelementEnd;\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 * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nfunction ɵɵelement(index, name, attrsIndex, localRefsIndex) {\n ɵɵelementStart(index, name, attrsIndex, localRefsIndex);\n ɵɵelementEnd();\n return ɵɵelement;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 /* TNodeType.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 * @returns This function returns itself so that it may be chained.\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 return ɵɵelementContainerStart;\n}\n/**\n * Mark the end of the <ng-container>.\n * @returns This function returns itself so that it may be chained.\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 /* TNodeType.ElementContainer */);\n if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, currentTNode);\n if (isContentQueryHost(currentTNode)) {\n tView.queries.elementEnd(currentTNode);\n }\n }\n return ɵɵelementContainerEnd;\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 * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainer(index, attrsIndex, localRefsIndex) {\n ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);\n ɵɵelementContainerEnd();\n return ɵɵelementContainer;\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 /* TNodeType.AnyRNode */ | 12 /* TNodeType.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 /* TNodeType.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 // 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 // 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 /* ProfilerEvent.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 /* ProfilerEvent.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 /* TNodeFlags.isComponentHost */ ?\n getComponentLViewByIndex(tNode.index, lView) :\n lView;\n markViewDirty(startView);\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 /* TNodeType.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 /* TNodeFlags.isDetached */) !== 64 /* TNodeFlags.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 in between 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 /* CharCode.COLON */);\n index = parserState.value = consumeWhitespace(text, index, end);\n index = parserState.valueEnd = consumeStyleValue(text, index, end);\n return consumeSeparator(text, index, end, 59 /* CharCode.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 /* CharCode.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 /* CharCode.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 /* CharCode.DASH */ || ch === 95 /* CharCode.UNDERSCORE */ ||\n ((ch & -33 /* CharCode.UPPER_CASE */) >= 65 /* CharCode.A */ && (ch & -33 /* CharCode.UPPER_CASE */) <= 90 /* CharCode.Z */) ||\n (ch >= 48 /* CharCode.ZERO */ && ch <= 57 /* CharCode.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 /* CharCode.SEMI_COLON */) {\n return lastChIndex;\n }\n else if (ch === 34 /* CharCode.DOUBLE_QUOTE */ || ch === 39 /* CharCode.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 /* CharCode.U */ &&\n ch2 === 82 /* CharCode.R */ && ch1 === 76 /* CharCode.L */ && ch === 40 /* CharCode.OPEN_PAREN */) {\n lastChIndex = i = consumeQuotedText(text, 41 /* CharCode.CLOSE_PAREN */, i, endIndex);\n }\n else if (ch > 32 /* CharCode.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 /* CharCode.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 /* CharCode.BACK_SLASH */) {\n return index;\n }\n if (ch == 92 /* CharCode.BACK_SLASH */ && ch1 === 92 /* CharCode.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.slice(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 /* AttributeMarker.Classes */ : 2 /* AttributeMarker.Styles */;\n let currentMarker = -1 /* AttributeMarker.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 /* TNodeType.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 /* TNodeFlags.hasClassInput */ : 32 /* TNodeFlags.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 /* TNodeType.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(val) {\n const n = val, i = Math.floor(Math.abs(val)), v = val.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-common-format-data-locale) to know how to import additional locale\n * 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-overview)\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 RuntimeError(701 /* RuntimeErrorCode.MISSING_LOCALE_DATA */, ngDevMode && `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-overview)\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 immediately 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$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 * 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$1 = 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$1 = 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$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 * 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 /* TNodeType.AnyRNode */)) {\n anchorRNode = i18nParent;\n i18nParent = parentRElement;\n }\n if (i18nParent !== null && (childTNode.flags & 2 /* TNodeFlags.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 /* TNodeType.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 /* TNodeType.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 /* TNodeType.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 /* IcuCreateOpCode.SHIFT_PARENT */;\n}\nfunction getRefFromIcuCreateOpCode(mergedCode) {\n return (mergedCode & 131070 /* IcuCreateOpCode.MASK_REF */) >>> 1 /* IcuCreateOpCode.SHIFT_REF */;\n}\nfunction getInstructionFromIcuCreateOpCode(mergedCode) {\n return mergedCode & 1 /* IcuCreateOpCode.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 /* IcuCreateOpCode.SHIFT_PARENT */ | refIdx << 1 /* IcuCreateOpCode.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 /* IcuCreateOpCode.MASK_INSTRUCTION */) {\n case 0 /* IcuCreateOpCode.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 /* IcuCreateOpCode.Attr */:\n const elementNodeIndex = opCode >>> 1 /* IcuCreateOpCode.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 if (ngDevMode) {\n throw new RuntimeError(700 /* RuntimeErrorCode.INVALID_I18N_STRUCTURE */, `Unable to determine the type of mutate operation for \"${opCode}\"`);\n }\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 /* I18nUpdateOpCode.SHIFT_REF */);\n switch (opCode & 3 /* I18nUpdateOpCode.MASK_OPCODE */) {\n case 1 /* I18nUpdateOpCode.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 /* I18nUpdateOpCode.Text */:\n const rText = lView[nodeIndex];\n rText !== null && updateTextNode(lView[RENDERER], rText, value);\n break;\n case 2 /* I18nUpdateOpCode.IcuSwitch */:\n applyIcuSwitchCase(tView, getTIcu(tView, nodeIndex), lView, value);\n break;\n case 3 /* I18nUpdateOpCode.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 /* I18nUpdateOpCode.MASK_OPCODE */) === 3 /* I18nUpdateOpCode.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 /* I18nUpdateOpCode.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 /* IcuType.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 /* IcuType.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 /* I18nUpdateOpCode.SHIFT_REF */;\n const opCode = value & 3 /* I18nUpdateOpCode.MASK_OPCODE */;\n switch (opCode) {\n case 0 /* I18nUpdateOpCode.Text */:\n return `(lView[${ref}] as Text).textContent = $$$`;\n case 1 /* I18nUpdateOpCode.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 /* I18nUpdateOpCode.IcuSwitch */:\n return `icuSwitchCase(${ref}, $$$)`;\n case 3 /* I18nUpdateOpCode.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 /* IcuCreateOpCode.AppendChild */:\n return `(lView[${parent}] as Element).appendChild(lView[${lastRef}])`;\n case 1 /* IcuCreateOpCode.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 /* CharCode.SLASH */;\n const type = value.charCodeAt(isClosing ? 1 : 0);\n ngDevMode && assertOneOf(type, 42 /* CharCode.STAR */, 35 /* CharCode.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 create 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 /* TNodeType.Icu */ : 1 /* TNodeType.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 /* I18nUpdateOpCode.SHIFT_REF */ |\n (attrName ? 1 /* I18nUpdateOpCode.Attr */ : 0 /* I18nUpdateOpCode.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.slice(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 /* IcuType.plural */;\n let mainBinding = 0;\n pattern = pattern.replace(ICU_BLOCK_REGEXP, function (str, binding, type) {\n if (type === 'select') {\n icuType = 0 /* IcuType.select */;\n }\n else {\n icuType = 1 /* IcuType.plural */;\n }\n mainBinding = parseInt(binding.slice(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 /* IcuType.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 /* I18nUpdateOpCode.SHIFT_REF */ | 2 /* I18nUpdateOpCode.IcuSwitch */);\n}\nfunction addUpdateIcuUpdate(update, bindingMask, index) {\n update.push(bindingMask, 1, index << 2 /* I18nUpdateOpCode.SHIFT_REF */ | 3 /* I18nUpdateOpCode.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 /* IcuCreateOpCode.AppendChild */, appendToParentIdx, createAtIdx));\n}\nfunction addCreateAttribute(create, newIndex, attr) {\n create.push(newIndex << 1 /* IcuCreateOpCode.SHIFT_REF */ | 1 /* IcuCreateOpCode.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 /* TNodeType.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(viewProviders, tView.data, tView.blueprint, isComponent, true);\n // Then, the list of providers is processed, and the flags are updated\n resolveProvider(providers, tView.data, tView.blueprint, isComponent, false);\n }\n}\n/**\n * Resolves a provider and publishes it to the DI system.\n */\nfunction resolveProvider(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(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 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n const endIndex = tNode.directiveStart;\n const cptViewProvidersCount = tNode.providerIndexes >> 20 /* TNodeProviderIndexes.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 /* TNodeProviderIndexes.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 /* TNodeProviderIndexes.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 const providerIsClassProvider = isClassProvider(provider);\n if (providerIsTypeProvider || providerIsClassProvider) {\n // Resolve forward references as `useClass` can hold a forward reference.\n const classToken = providerIsClassProvider ? resolveForwardRef(provider.useClass) : provider;\n const prototype = classToken.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 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$1 {\n}\n/**\n * @publicApi\n *\n * @deprecated\n * This class was mostly used as a part of ViewEngine-based JIT API and is no longer needed in Ivy\n * JIT mode. See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes)\n * for additional context. Angular provides APIs that accept NgModule classes directly (such as\n * [PlatformRef.bootstrapModule](api/core/PlatformRef#bootstrapModule) and\n * [createNgModule](api/core/createNgModule)), consider switching to those APIs instead of\n * using factory-based ones.\n */\nclass NgModuleFactory$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 * Returns a new NgModuleRef instance based on the NgModule class and parent injector provided.\n *\n * @param ngModule NgModule class.\n * @param parentInjector Optional injector instance to use as a parent for the module injector. If\n * not provided, `NullInjector` will be used instead.\n * @returns NgModuleRef that represents an NgModule instance.\n *\n * @publicApi\n */\nfunction createNgModule(ngModule, parentInjector) {\n return new NgModuleRef(ngModule, parentInjector ?? null);\n}\n/**\n * The `createNgModule` function alias for backwards-compatibility.\n * Please avoid using it directly and use `createNgModule` instead.\n *\n * @deprecated Use `createNgModule` instead.\n */\nconst createNgModuleRef = createNgModule;\nclass NgModuleRef extends NgModuleRef$1 {\n constructor(ngModuleType, _parent) {\n super();\n this._parent = _parent;\n // tslint:disable-next-line:require-internal-with-underscore\n this._bootstrapComponents = [];\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(this);\n const ngModuleDef = getNgModuleDef(ngModuleType);\n ngDevMode &&\n assertDefined(ngModuleDef, `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`);\n this._bootstrapComponents = maybeUnwrapFn(ngModuleDef.bootstrap);\n this._r3Injector = createInjectorWithoutInjectorInstances(ngModuleType, _parent, [\n { provide: NgModuleRef$1, useValue: this }, {\n provide: ComponentFactoryResolver$1,\n useValue: this.componentFactoryResolver\n }\n ], stringify(ngModuleType), new Set(['environment']));\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 constructor for DI which will cause a\n // circular error that will eventually error out, because the injector isn't created yet.\n this._r3Injector.resolveInjectorInitializers();\n this.instance = this._r3Injector.get(ngModuleType);\n }\n get injector() {\n return this._r3Injector;\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 extends NgModuleFactory$1 {\n constructor(moduleType) {\n super();\n this.moduleType = moduleType;\n }\n create(parentInjector) {\n return new NgModuleRef(this.moduleType, parentInjector);\n }\n}\nclass EnvironmentNgModuleRefAdapter extends NgModuleRef$1 {\n constructor(providers, parent, source) {\n super();\n this.componentFactoryResolver = new ComponentFactoryResolver(this);\n this.instance = null;\n const injector = new R3Injector([\n ...providers,\n { provide: NgModuleRef$1, useValue: this },\n { provide: ComponentFactoryResolver$1, useValue: this.componentFactoryResolver },\n ], parent || getNullInjector(), source, new Set(['environment']));\n this.injector = injector;\n injector.resolveInjectorInitializers();\n }\n destroy() {\n this.injector.destroy();\n }\n onDestroy(callback) {\n this.injector.onDestroy(callback);\n }\n}\n/**\n * Create a new environment injector.\n *\n * Learn more about environment injectors in\n * [this guide](guide/standalone-components#environment-injectors).\n *\n * @param providers An array of providers.\n * @param parent A parent environment injector.\n * @param debugName An optional name for this injector instance, which will be used in error\n * messages.\n *\n * @publicApi\n * @developerPreview\n */\nfunction createEnvironmentInjector(providers, parent, debugName = null) {\n const adapter = new EnvironmentNgModuleRefAdapter(providers, parent, debugName);\n return adapter.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 */\n/**\n * A service used by the framework to create instances of standalone injectors. Those injectors are\n * created on demand in case of dynamic component instantiation and contain ambient providers\n * collected from the imports graph rooted at a given standalone component.\n */\nclass StandaloneService {\n constructor(_injector) {\n this._injector = _injector;\n this.cachedInjectors = new Map();\n }\n getOrCreateStandaloneInjector(componentDef) {\n if (!componentDef.standalone) {\n return null;\n }\n if (!this.cachedInjectors.has(componentDef.id)) {\n const providers = internalImportProvidersFrom(false, componentDef.type);\n const standaloneInjector = providers.length > 0 ?\n createEnvironmentInjector([providers], this._injector, `Standalone[${componentDef.type.name}]`) :\n null;\n this.cachedInjectors.set(componentDef.id, standaloneInjector);\n }\n return this.cachedInjectors.get(componentDef.id);\n }\n ngOnDestroy() {\n try {\n for (const injector of this.cachedInjectors.values()) {\n if (injector !== null) {\n injector.destroy();\n }\n }\n }\n finally {\n this.cachedInjectors.clear();\n }\n }\n}\n/** @nocollapse */\nStandaloneService.ɵprov = ɵɵdefineInjectable({\n token: StandaloneService,\n providedIn: 'environment',\n factory: () => new StandaloneService(ɵɵinject(EnvironmentInjector)),\n});\n/**\n * A feature that acts as a setup code for the {@link StandaloneService}.\n *\n * The most important responsibility of this feature is to expose the \"getStandaloneInjector\"\n * function (an entry points to a standalone injector creation) on a component definition object. We\n * go through the features infrastructure to make sure that the standalone injector creation logic\n * is tree-shakable and not included in applications that don't use standalone components.\n *\n * @codeGenApi\n */\nfunction ɵɵStandaloneFeature(definition) {\n definition.getStandaloneInjector = (parentInjector) => {\n return parentInjector.get(StandaloneService).getOrCreateStandaloneInjector(definition);\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 * 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 ngDevMode && assertDomElement(element);\n const context = getLContext(element);\n if (context === null)\n return null;\n if (context.component === undefined) {\n const lView = context.lView;\n if (lView === null) {\n return null;\n }\n context.component = getComponentAtNodeIndex(context.nodeIndex, 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 const lView = context ? context.lView : null;\n return lView === null ? null : 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 let lView = context ? context.lView : null;\n if (lView === null)\n return null;\n let parent;\n while (lView[TVIEW].type === 2 /* TViewType.Embedded */ && (parent = getLViewParent(lView))) {\n lView = parent;\n }\n return lView[FLAGS] & 256 /* LViewFlags.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 const lView = readPatchedLView(elementOrDir);\n return lView !== null ? [...getRootContext(lView).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 const lView = context ? context.lView : null;\n if (lView === null)\n return Injector.NULL;\n const tNode = lView[TVIEW].data[context.nodeIndex];\n return new NodeInjector(tNode, 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 const lView = context ? context.lView : null;\n if (lView === null)\n return [];\n const tView = lView[TVIEW];\n const tNode = tView.data[context.nodeIndex];\n const providerTokens = [];\n const startIndex = tNode.providerIndexes & 1048575 /* TNodeProviderIndexes.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 const lView = context ? context.lView : null;\n if (lView === null) {\n return [];\n }\n const tView = lView[TVIEW];\n const nodeIndex = context.nodeIndex;\n if (!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$1(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 const lView = context.lView;\n if (lView === null) {\n return {};\n }\n context.localRefs = discoverLocalRefs(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 ngDevMode && assertDomElement(element);\n const lContext = getLContext(element);\n const lView = lContext === null ? null : lContext.lView;\n if (lView === null)\n return [];\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$1(element) {\n if (ngDevMode && !(element instanceof Node)) {\n throw new Error('Expecting instance of DOM Element');\n }\n const lContext = getLContext(element);\n const lView = lContext ? lContext.lView : null;\n if (lView === null) {\n return null;\n }\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 ngDevMode && assertLView(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 * 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 = { ...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 * 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 // The `getPipeDef` throws if a pipe with a given name is not found\n // (so we use non-null assertion below).\n pipeDef = getPipeDef(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(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 if (ngDevMode) {\n throw new RuntimeError(-302 /* RuntimeErrorCode.PIPE_NOT_FOUND */, getPipeNotFoundErrorMessage(name));\n }\n}\n/**\n * Generates a helpful error message for the user when a pipe is not found.\n *\n * @param name Name of the missing pipe\n * @returns The error message\n */\nfunction getPipeNotFoundErrorMessage(name) {\n const lView = getLView();\n const declarationLView = lView[DECLARATION_COMPONENT_VIEW];\n const context = declarationLView[CONTEXT];\n const hostIsStandalone = isHostComponentStandalone(lView);\n const componentInfoMessage = context ? ` in the '${context.constructor.name}' component` : '';\n const verifyMessage = `Verify that it is ${hostIsStandalone ? 'included in the \\'@Component.imports\\' of this component' :\n 'declared or imported in this module'}`;\n const errorMessage = `The pipe '${name}' could not be found${componentInfoMessage}. ${verifyMessage}`;\n return errorMessage;\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 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 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 isPure(lView, adjustedIndex) ?\n 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 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 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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 let nextFn = observerOrNext;\n let errorFn = error || (() => null);\n let completeFn = complete;\n if (observerOrNext && typeof observerOrNext === 'object') {\n const observer = observerOrNext;\n nextFn = observer.next?.bind(observer);\n errorFn = observer.error?.bind(observer);\n completeFn = observer.complete?.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/**\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__ = injectTemplateRef;\nconst ViewEngineTemplateRef = TemplateRef;\n// TODO(alxhub): combine interface and implementation. Currently this is challenging since something\n// in g3 depends on them being separate.\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, injector) {\n const embeddedTView = this._declarationTContainer.tViews;\n const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* LViewFlags.CheckAlways */, null, embeddedTView.declTNode, null, null, null, null, injector || 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$1(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 /* TNodeType.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 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__ = injectViewContainerRef;\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;\n// TODO(alxhub): cleaning up this indirection triggers a subtle bug in Closure in g3. Once the fix\n// for that lands, this can be cleaned up.\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 /* NodeInjectorOffset.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, indexOrOptions) {\n let index;\n let injector;\n if (typeof indexOrOptions === 'number') {\n index = indexOrOptions;\n }\n else if (indexOrOptions != null) {\n index = indexOrOptions.index;\n injector = indexOrOptions.injector;\n }\n const viewRef = templateRef.createEmbeddedView(context || {}, injector);\n this.insert(viewRef, index);\n return viewRef;\n }\n createComponent(componentFactoryOrType, indexOrOptions, injector, projectableNodes, environmentInjector) {\n const isComponentFactory = componentFactoryOrType && !isType(componentFactoryOrType);\n let index;\n // This function supports 2 signatures and we need to handle options correctly for both:\n // 1. When first argument is a Component type. This signature also requires extra\n // options to be provided as as object (more ergonomic option).\n // 2. First argument is a Component factory. In this case extra options are represented as\n // positional arguments. This signature is less ergonomic and will be deprecated.\n if (isComponentFactory) {\n if (ngDevMode) {\n assertEqual(typeof indexOrOptions !== 'object', true, 'It looks like Component factory was provided as the first argument ' +\n 'and an options object as the second argument. This combination of arguments ' +\n 'is incompatible. You can either change the first argument to provide Component ' +\n 'type or change the second argument to be a number (representing an index at ' +\n 'which to insert the new component\\'s host view into this container)');\n }\n index = indexOrOptions;\n }\n else {\n if (ngDevMode) {\n assertDefined(getComponentDef(componentFactoryOrType), `Provided Component class doesn't contain Component definition. ` +\n `Please check whether provided class has @Component decorator.`);\n assertEqual(typeof indexOrOptions !== 'number', true, 'It looks like Component type was provided as the first argument ' +\n 'and a number (representing an index at which to insert the new component\\'s ' +\n 'host view into this container as the second argument. This combination of arguments ' +\n 'is incompatible. Please use an object as the second argument instead.');\n }\n const options = (indexOrOptions || {});\n if (ngDevMode && options.environmentInjector && options.ngModuleRef) {\n throwError(`Cannot pass both environmentInjector and ngModuleRef options to createComponent().`);\n }\n index = options.index;\n injector = options.injector;\n projectableNodes = options.projectableNodes;\n environmentInjector = options.environmentInjector || options.ngModuleRef;\n }\n const componentFactory = isComponentFactory ?\n componentFactoryOrType :\n new ComponentFactory(getComponentDef(componentFactoryOrType));\n const contextInjector = injector || this.parentInjector;\n // If an `NgModuleRef` is not provided explicitly, try retrieving it from the DI tree.\n if (!environmentInjector && componentFactory.ngModule == null) {\n // For the `ComponentFactory` case, entering this logic is very unlikely, since we expect that\n // an instance of a `ComponentFactory`, resolved via `ComponentFactoryResolver` would have an\n // `ngModule` field. This is possible in some test scenarios and potentially in some JIT-based\n // use-cases. For the `ComponentFactory` case we preserve backwards-compatibility and try\n // using a provided injector first, then fall back to the parent injector of this\n // `ViewContainerRef` instance.\n //\n // For the factory-less case, it's critical to establish a connection with the module\n // injector tree (by retrieving an instance of an `NgModuleRef` and accessing its injector),\n // so that a component can use DI tokens provided in MgModules. For this reason, we can not\n // rely on the provided injector, since it might be detached from the DI tree (for example, if\n // it was created via `Injector.create` without specifying a parent injector, or if an\n // injector is retrieved from an `NgModuleRef` created via `createNgModule` using an\n // NgModule outside of a module tree). Instead, we always use `ViewContainerRef`'s parent\n // injector, which is normally connected to the DI tree, which includes module injector\n // subtree.\n const _injector = isComponentFactory ? contextInjector : this.parentInjector;\n // DO NOT REFACTOR. The code here used to have a `injector.get(NgModuleRef, null) ||\n // undefined` expression which seems to cause internal google apps to fail. This is documented\n // in the following internal bug issue: go/b/142967802\n const result = _injector.get(EnvironmentInjector, null);\n if (result) {\n environmentInjector = result;\n }\n }\n const componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, environmentInjector);\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$1(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 /* TNodeType.AnyContainer */ | 3 /* TNodeType.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 /* TNodeType.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 */\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// 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 */\nconst unusedValueToPlacateAjd = unusedValueExportToPlacateAjd$1 + unusedValueExportToPlacateAjd$6 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd;\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 /* QueryFlags.descendants */) !== 1 /* QueryFlags.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 /* TNodeType.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 /* TNodeType.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 /* TNodeType.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 /* TNodeType.AnyRNode */ | 8 /* TNodeType.ElementContainer */)) {\n return createElementRef(tNode, currentView);\n }\n else if (tNode.type & 4 /* TNodeType.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 /* TNodeType.AnyRNode */ | 12 /* TNodeType.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 /* QueryFlags.isStatic */) === 2 /* QueryFlags.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 /* QueryFlags.isStatic */) === 2 /* QueryFlags.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 /* QueryFlags.isStatic */) === 2 /* QueryFlags.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 /* QueryFlags.emitDistinctChangesOnly */) === 4 /* QueryFlags.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 */\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 = (() => ({\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 'ɵɵresetView': ɵɵresetView,\n 'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,\n 'ɵɵProvidersFeature': ɵɵProvidersFeature,\n 'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,\n 'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,\n 'ɵɵStandaloneFeature': ɵɵStandaloneFeature,\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 'ɵɵregisterNgModuleType': registerNgModuleType,\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\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 */\nfunction patchModuleCompilation() {\n // Does nothing, but exists as a target for patching.\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 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 */\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 patchModuleCompilation();\n compileNgModuleDefs(moduleType, ngModule);\n if (ngModule.id !== undefined) {\n registerNgModuleType(moduleType, ngModule.id);\n }\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 /* JitCompilerUsage.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 /* JitCompilerUsage.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 /* JitCompilerUsage.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 isStandalone(type) {\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(type);\n return def !== null ? def.standalone : false;\n}\nfunction generateStandaloneInDeclarationsError(type, location) {\n const prefix = `Unexpected \"${stringifyForError(type)}\" found in the \"declarations\" array of the`;\n const suffix = `\"${stringifyForError(type)}\" is marked as standalone and can't be declared ` +\n 'in any NgModule - did you intend to import it instead (by adding it to the \"imports\" array)?';\n return `${prefix} ${location}, ${suffix}`;\n}\nfunction verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot, importingModule) {\n if (verifiedNgModule.get(moduleType))\n return;\n // skip verifications of standalone components, directives and pipes\n if (isStandalone(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(modOrStandaloneCmpt => {\n verifySemanticsOfNgModuleImport(modOrStandaloneCmpt, moduleType);\n verifySemanticsOfNgModuleDef(modOrStandaloneCmpt, false, moduleType);\n });\n const exports = maybeUnwrapFn(ngModuleDef.exports);\n declarations.forEach(verifyDeclarationsHaveDefinitions);\n declarations.forEach(verifyDirectivesHaveSelector);\n declarations.forEach((declarationType) => verifyNotStandalone(declarationType, moduleType));\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$1(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 verifyNotStandalone(type, moduleType) {\n type = resolveForwardRef(type);\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(type);\n if (def?.standalone) {\n const location = `\"${stringifyForError(moduleType)}\" NgModule`;\n errors.push(generateStandaloneInDeclarationsError(type, location));\n }\n }\n function verifyExportsAreDeclaredOrReExported(type) {\n type = resolveForwardRef(type);\n const kind = getComponentDef(type) && 'component' || getDirectiveDef(type) && 'directive' ||\n getPipeDef$1(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 && !isStandalone(type)) {\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 if (isStandalone(type)) {\n // Note: this error should be the same as the\n // `NGMODULE_BOOTSTRAP_IS_STANDALONE` one in AOT compiler.\n errors.push(`The \\`${stringifyForError(type)}\\` class is a standalone component, which can ` +\n `not be used in the \\`@NgModule.bootstrap\\` array. Use the \\`bootstrapApplication\\` ` +\n `function for bootstrap instead.`);\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 const directiveDef = getComponentDef(type) || getDirectiveDef(type);\n if (directiveDef !== null && !directiveDef.standalone) {\n throw new Error(`Unexpected directive '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n }\n const pipeDef = getPipeDef$1(type);\n if (pipeDef !== null && !pipeDef.standalone) {\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);\n // a standalone component, directive or pipe\n if (ngModuleDef === null) {\n return [type];\n }\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 declaration = resolveForwardRef(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$1(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 type\n * (either a NgModule or a standalone component / directive / pipe).\n */\nfunction transitiveScopesFor(type) {\n if (isNgModule(type)) {\n return transitiveScopesForNgModule(type);\n }\n else if (isStandalone(type)) {\n const directiveDef = getComponentDef(type) || getDirectiveDef(type);\n if (directiveDef !== null) {\n return {\n schemas: null,\n compilation: {\n directives: new Set(),\n pipes: new Set(),\n },\n exported: {\n directives: new Set([type]),\n pipes: new Set(),\n },\n };\n }\n const pipeDef = getPipeDef$1(type);\n if (pipeDef !== null) {\n return {\n schemas: null,\n compilation: {\n directives: new Set(),\n pipes: new Set(),\n },\n exported: {\n directives: new Set(),\n pipes: new Set([type]),\n },\n };\n }\n }\n // TODO: change the error message to be more user-facing and take standalone into account\n throw new Error(`${type.name} does not have a module def (ɵmod property)`);\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 transitiveScopesForNgModule(moduleType) {\n const def = getNgModuleDef(moduleType, true);\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 // 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(imported);\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$1(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$1(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}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 /* JitCompilerUsage.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$1.Emulated;\n }\n }\n const templateUrl = metadata.templateUrl || `ng:///${type.name}/template.html`;\n const meta = {\n ...directiveMetadata(type, metadata),\n typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl),\n template: metadata.template || '',\n preserveWhitespaces,\n styles: metadata.styles || EMPTY_ARRAY,\n animations: metadata.animations,\n // JIT components are always compiled against an empty set of `declarations`. Instead, the\n // `directiveDefs` and `pipeDefs` are updated at a later point:\n // * for NgModule-based components, they're set when the NgModule which declares the\n // component resolves in the module scoping queue\n // * for standalone components, they're set just below, after `compileComponent`.\n declarations: [],\n changeDetection: metadata.changeDetection,\n encapsulation,\n interpolation: metadata.interpolation,\n viewProviders: metadata.viewProviders || null,\n isStandalone: !!metadata.standalone,\n };\n compilationDepth++;\n try {\n if (meta.usesInheritance) {\n addDirectiveDefToUndecoratedParents(type);\n }\n ngComponentDef =\n compiler.compileComponent(angularCoreEnv, templateUrl, meta);\n if (metadata.standalone) {\n // Patch the component definition for standalone components with `directiveDefs` and\n // `pipeDefs` functions which lazily compute the directives/pipes available in the\n // standalone component. Also set `dependencies` to the lazily resolved list of imports.\n const imports = flatten(metadata.imports || EMPTY_ARRAY);\n const { directiveDefs, pipeDefs } = getStandaloneDefFunctions(type, imports);\n ngComponentDef.directiveDefs = directiveDefs;\n ngComponentDef.pipeDefs = pipeDefs;\n ngComponentDef.dependencies = () => imports.map(resolveForwardRef);\n }\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 if (metadata.schemas) {\n if (metadata.standalone) {\n ngComponentDef.schemas = metadata.schemas;\n }\n else {\n throw new Error(`The 'schemas' was specified for the ${stringifyForError(type)} but is only valid on a component that is standalone.`);\n }\n }\n else if (metadata.standalone) {\n ngComponentDef.schemas = [];\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 getDependencyTypeForError(type) {\n if (getComponentDef(type))\n return 'component';\n if (getDirectiveDef(type))\n return 'directive';\n if (getPipeDef$1(type))\n return 'pipe';\n return 'type';\n}\nfunction verifyStandaloneImport(depType, importingType) {\n if (isForwardRef(depType)) {\n depType = resolveForwardRef(depType);\n if (!depType) {\n throw new Error(`Expected forwardRef function, imported from \"${stringifyForError(importingType)}\", to return a standalone entity or NgModule but got \"${stringifyForError(depType) || depType}\".`);\n }\n }\n if (getNgModuleDef(depType) == null) {\n const def = getComponentDef(depType) || getDirectiveDef(depType) || getPipeDef$1(depType);\n if (def != null) {\n // if a component, directive or pipe is imported make sure that it is standalone\n if (!def.standalone) {\n throw new Error(`The \"${stringifyForError(depType)}\" ${getDependencyTypeForError(depType)}, imported from \"${stringifyForError(importingType)}\", is not standalone. Did you forget to add the standalone: true flag?`);\n }\n }\n else {\n // it can be either a module with provider or an unknown (not annotated) type\n if (isModuleWithProviders(depType)) {\n throw new Error(`A module with providers was imported from \"${stringifyForError(importingType)}\". Modules with providers are not supported in standalone components imports.`);\n }\n else {\n throw new Error(`The \"${stringifyForError(depType)}\" type, imported from \"${stringifyForError(importingType)}\", must be a standalone component / directive / pipe or an NgModule. Did you forget to add the required @Component / @Directive / @Pipe or @NgModule annotation?`);\n }\n }\n }\n}\n/**\n * Build memoized `directiveDefs` and `pipeDefs` functions for the component definition of a\n * standalone component, which process `imports` and filter out directives and pipes. The use of\n * memoized functions here allows for the delayed resolution of any `forwardRef`s present in the\n * component's `imports`.\n */\nfunction getStandaloneDefFunctions(type, imports) {\n let cachedDirectiveDefs = null;\n let cachedPipeDefs = null;\n const directiveDefs = () => {\n if (cachedDirectiveDefs === null) {\n // Standalone components are always able to self-reference, so include the component's own\n // definition in its `directiveDefs`.\n cachedDirectiveDefs = [getComponentDef(type)];\n const seen = new Set();\n for (const rawDep of imports) {\n ngDevMode && verifyStandaloneImport(rawDep, type);\n const dep = resolveForwardRef(rawDep);\n if (seen.has(dep)) {\n continue;\n }\n seen.add(dep);\n if (!!getNgModuleDef(dep)) {\n const scope = transitiveScopesFor(dep);\n for (const dir of scope.exported.directives) {\n const def = getComponentDef(dir) || getDirectiveDef(dir);\n if (def && !seen.has(dir)) {\n seen.add(dir);\n cachedDirectiveDefs.push(def);\n }\n }\n }\n else {\n const def = getComponentDef(dep) || getDirectiveDef(dep);\n if (def) {\n cachedDirectiveDefs.push(def);\n }\n }\n }\n }\n return cachedDirectiveDefs;\n };\n const pipeDefs = () => {\n if (cachedPipeDefs === null) {\n cachedPipeDefs = [];\n const seen = new Set();\n for (const rawDep of imports) {\n const dep = resolveForwardRef(rawDep);\n if (seen.has(dep)) {\n continue;\n }\n seen.add(dep);\n if (!!getNgModuleDef(dep)) {\n const scope = transitiveScopesFor(dep);\n for (const pipe of scope.exported.pipes) {\n const def = getPipeDef$1(pipe);\n if (def && !seen.has(pipe)) {\n seen.add(pipe);\n cachedPipeDefs.push(def);\n }\n }\n }\n else {\n const def = getPipeDef$1(dep);\n if (def) {\n cachedPipeDefs.push(def);\n }\n }\n }\n }\n return cachedPipeDefs;\n };\n return {\n directiveDefs,\n pipeDefs,\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(type, directive || {});\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.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(type, metadata) {\n const name = type && type.name;\n const sourceMapUrl = `ng:///${name}/ɵdir.js`;\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.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(type, metadata);\n const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.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 isStandalone: !!metadata.standalone,\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 /* JitCompilerUsage.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 /* JitCompilerUsage.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 isStandalone: !!meta.standalone,\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 of the Directive metadata.\n *\n * @publicApi\n */\nconst Directive = makeDecorator('Directive', (dir = {}) => dir, undefined, undefined, (type, meta) => compileDirective(type, meta));\n/**\n * Component decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Component = makeDecorator('Component', (c = {}) => ({ changeDetection: ChangeDetectionStrategy.Default, ...c }), Directive, undefined, (type, meta) => compileComponent(type, meta));\n/**\n * @Annotation\n * @publicApi\n */\nconst Pipe = makeDecorator('Pipe', (p) => ({ pure: true, ...p }), undefined, undefined, (type, meta) => compilePipe(type, meta));\n/**\n * @Annotation\n * @publicApi\n */\nconst Input = makePropDecorator('Input', (bindingPropertyName) => ({ bindingPropertyName }));\n/**\n * @Annotation\n * @publicApi\n */\nconst Output = makePropDecorator('Output', (bindingPropertyName) => ({ bindingPropertyName }));\n/**\n * @Annotation\n * @publicApi\n */\nconst HostBinding = makePropDecorator('HostBinding', (hostPropertyName) => ({ hostPropertyName }));\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 `Enter` key-press\n * events on the global `window`.\n * ``` ts\n * import { HostListener, Component } from \"@angular/core\";\n *\n * @Component({\n * selector: 'app',\n * template: `<h1>Hello, you have pressed enter {{counter}} number of times!</h1> Press enter key\n * to increment the counter.\n * <button (click)=\"resetCounter()\">Reset Counter</button>`\n * })\n * class AppComponent {\n * counter = 0;\n * @HostListener('window:keydown.enter', ['$event'])\n * handleKeyDown(event: KeyboardEvent) {\n * this.counter++;\n * }\n * resetCounter() {\n * this.counter = 0;\n * }\n * }\n * ```\n * The list of valid key names for `keydown` and `keyup` events\n * can be found here:\n * https://www.w3.org/TR/DOM-Level-3-Events-key/#named-key-attribute-values\n *\n * Note that keys can also be combined, e.g. `@HostListener('keydown.shift.a')`.\n *\n * The global target names that can be used to prefix an event name are\n * `document:`, `window:` and `body:`.\n *\n * @Annotation\n * @publicApi\n */\nconst HostListener = makePropDecorator('HostListener', (eventName, args) => ({ eventName, args }));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * @Annotation\n * @publicApi\n */\nconst NgModule = makeDecorator('NgModule', (ngModule) => ngModule, undefined, undefined, \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) => compileNgModule(type, meta));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 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 * The existence of this constant (in this particular file) informs the Angular compiler that the\n * current program is actually @angular/core, which needs to be compiled specially.\n */\nconst ITS_JUST_ANGULAR = true;\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, providedIn: 'root' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\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', {\n providedIn: 'root',\n factory: _appIdRandomProviderFactory,\n});\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 providedIn: 'platform',\n factory: () => 'unknown', // set a default platform name, when none set explicitly\n});\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// We keep this token here, rather than the animations package, so that modules that only care\n// about which animations module is loaded (e.g. the CDK) can retrieve it without having to\n// include extra dependencies. See #44970 for more context.\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates which animations\n * module has been loaded.\n * @publicApi\n */\nconst ANIMATION_MODULE_TYPE = new InjectionToken('AnimationModuleType');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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, providedIn: 'platform' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Console, [{\n type: Injectable,\n args: [{ providedIn: 'platform' }]\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 * Work out the locale from the potential global properties.\n *\n * * Closure Compiler: use `goog.LOCALE`.\n * * Ivy enabled: use `$localize.locale`\n */\nfunction getGlobalLocale() {\n if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&\n typeof goog !== 'undefined' && goog.LOCALE !== 'en') {\n // * The default `goog.LOCALE` 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.LOCALE;\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 (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;\n }\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-common-locale-id) 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 = new InjectionToken('LocaleId', {\n providedIn: 'root',\n factory: () => inject(LOCALE_ID, InjectFlags.Optional | InjectFlags.SkipSelf) || getGlobalLocale(),\n});\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-common-locale-id) 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 providedIn: 'root',\n factory: () => USD_CURRENCY_CODE,\n});\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-common-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-common-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-common-merge#report-missing-translations) 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 */\n/**\n * Combination of NgModuleFactory and ComponentFactories.\n *\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for\n * additional context.\n */\nclass ModuleWithComponentFactories {\n constructor(ngModuleFactory, componentFactories) {\n this.ngModuleFactory = ngModuleFactory;\n this.componentFactories = componentFactories;\n }\n}\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 *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for\n * additional context.\n */\nclass Compiler {\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 compileModuleSync(moduleType) {\n return new NgModuleFactory(moduleType);\n }\n /**\n * Compiles the given NgModule and all of its components\n */\n compileModuleAsync(moduleType) {\n return Promise.resolve(this.compileModuleSync(moduleType));\n }\n /**\n * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n */\n compileModuleAndAllComponentsSync(moduleType) {\n const ngModuleFactory = this.compileModuleSync(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(componentDef));\n return factories;\n }, []);\n return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n }\n /**\n * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n */\n compileModuleAndAllComponentsAsync(moduleType) {\n return Promise.resolve(this.compileModuleAndAllComponentsSync(moduleType));\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, providedIn: 'root' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Compiler, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], null, 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 *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for\n * additional context.\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 */\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 //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$1() {\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$1);\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 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 RuntimeError(908 /* RuntimeErrorCode.MISSING_ZONEJS */, ngDevMode && `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['AsyncStackTaggingZoneSpec']) {\n const AsyncStackTaggingZoneSpec = Zone['AsyncStackTaggingZoneSpec'];\n self._inner = self._inner.fork(new AsyncStackTaggingZoneSpec('Angular'));\n }\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 // Zone needs to be checked, because this method might be called even when NoopNgZone is used.\n return typeof Zone !== 'undefined' && Zone.current.get('isAngularZone') === true;\n }\n static assertInAngularZone() {\n if (!NgZone.isInAngularZone()) {\n throw new RuntimeError(909 /* RuntimeErrorCode.UNEXPECTED_ZONE_STATE */, ngDevMode && 'Expected to be in Angular Zone, but it is not!');\n }\n }\n static assertNotInAngularZone() {\n if (NgZone.isInAngularZone()) {\n throw new RuntimeError(909 /* RuntimeErrorCode.UNEXPECTED_ZONE_STATE */, ngDevMode && '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 * Internal injection token that can used to access an instance of a Testability class.\n *\n * This token acts as a bridge between the core bootstrap code and the `Testability` class. This is\n * needed to ensure that there are no direct references to the `Testability` class, so it can be\n * tree-shaken away (if not referenced). For the environments/setups when the `Testability` class\n * should be available, this token is used to add a provider that references the `Testability`\n * class. Otherwise, only this token is retained in a bundle, but the `Testability` class is not.\n */\nconst TESTABILITY = new InjectionToken('');\n/**\n * Internal injection token to retrieve Testability getter class instance.\n */\nconst TESTABILITY_GETTER = new InjectionToken('');\n/**\n * The Testability service provides testing hooks that can be accessed from\n * the browser.\n *\n * Angular applications bootstrapped using an NgModule (via `@NgModule.bootstrap` field) will also\n * instantiate Testability by default (in both development and production modes).\n *\n * For applications bootstrapped using the `bootstrapApplication` function, Testability is not\n * included by default. You can include it into your applications by getting the list of necessary\n * providers using the `provideProtractorTestingSupport()` function and adding them into the\n * `options.providers` array. Example:\n *\n * ```typescript\n * import {provideProtractorTestingSupport} from '@angular/platform-browser';\n *\n * await bootstrapApplication(RootComponent, providers: [provideProtractorTestingSupport()]);\n * ```\n *\n * @publicApi\n */\nclass Testability {\n constructor(_ngZone, registry, testabilityGetter) {\n this._ngZone = _ngZone;\n this.registry = registry;\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 // If there was no Testability logic registered in the global scope\n // before, register the current testability getter as a global one.\n if (!_testabilityGetter) {\n setTestabilityGetter(testabilityGetter);\n testabilityGetter.addToWindow(registry);\n }\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 * Registers an application with a testability hook so that it can be tracked.\n * @param token token of application, root element\n *\n * @internal\n */\n registerApplication(token) {\n this.registry.registerApplication(token, this);\n }\n /**\n * Unregisters an application.\n * @param token token of application, root element\n *\n * @internal\n */\n unregisterApplication(token) {\n this.registry.unregisterApplication(token);\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), ɵɵinject(TestabilityRegistry), ɵɵinject(TESTABILITY_GETTER)); };\nTestability.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Testability, factory: Testability.ɵfac });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Testability, [{\n type: Injectable\n }], function () { return [{ type: NgZone }, { type: TestabilityRegistry }, { type: undefined, decorators: [{\n type: Inject,\n args: [TESTABILITY_GETTER]\n }] }]; }, 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 }\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) ?? null;\n }\n}\nTestabilityRegistry.ɵfac = function TestabilityRegistry_Factory(t) { return new (t || TestabilityRegistry)(); };\nTestabilityRegistry.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: TestabilityRegistry, factory: TestabilityRegistry.ɵfac, providedIn: 'platform' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(TestabilityRegistry, [{\n type: Injectable,\n args: [{ providedIn: 'platform' }]\n }], null, null); })();\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;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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 _platformInjector = null;\n/**\n * Internal token to indicate whether having multiple bootstrapped platform should be allowed (only\n * one bootstrapped platform is allowed by default). This token helps to support SSR scenarios.\n */\nconst ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');\n/**\n * Internal token that allows to register extra callbacks that should be invoked during the\n * `PlatformRef.destroy` operation. This token is needed to avoid a direct reference to the\n * `PlatformRef` class (i.e. register the callback via `PlatformRef.onDestroy`), thus making the\n * entire class tree-shakeable.\n */\nconst PLATFORM_DESTROY_LISTENERS = new InjectionToken('PlatformDestroyListeners');\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || ngDevMode;\nfunction compileNgModuleFactory(injector, options, moduleType) {\n ngDevMode && assertNgModuleType(moduleType);\n const moduleFactory = new NgModuleFactory(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 /* JitCompilerUsage.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}\nfunction publishDefaultGlobalUtils() {\n ngDevMode && publishDefaultGlobalUtils$1();\n}\nfunction isBoundToModule(cf) {\n return cf.isBoundToModule;\n}\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 (_platformInjector && !_platformInjector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n throw new RuntimeError(400 /* RuntimeErrorCode.MULTIPLE_PLATFORMS */, ngDevMode &&\n 'There can be only one platform. Destroy the previous one to create a new one.');\n }\n publishDefaultGlobalUtils();\n _platformInjector = injector;\n const platform = injector.get(PlatformRef);\n runPlatformInitializers(injector);\n return platform;\n}\n/**\n * The goal of this function is to bootstrap a platform injector,\n * but avoid referencing `PlatformRef` class.\n * This function is needed for bootstrapping a Standalone Component.\n */\nfunction createOrReusePlatformInjector(providers = []) {\n // If a platform injector already exists, it means that the platform\n // is already bootstrapped and no additional actions are required.\n if (_platformInjector)\n return _platformInjector;\n // Otherwise, setup a new platform injector and run platform initializers.\n const injector = createPlatformInjector(providers);\n _platformInjector = injector;\n publishDefaultGlobalUtils();\n runPlatformInitializers(injector);\n return injector;\n}\nfunction runPlatformInitializers(injector) {\n const inits = injector.get(PLATFORM_INITIALIZER, null);\n if (inits) {\n inits.forEach((init) => init());\n }\n}\n/**\n * Internal bootstrap application API that implements the core bootstrap logic.\n *\n * Platforms (such as `platform-browser`) may require different set of application and platform\n * providers for an application to function correctly. As a result, platforms may use this function\n * internally and supply the necessary providers during the bootstrap, while exposing\n * platform-specific APIs as a part of their public API.\n *\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n */\nfunction internalBootstrapApplication(config) {\n const { rootComponent, appProviders, platformProviders } = config;\n NG_DEV_MODE && assertStandaloneComponentType(rootComponent);\n const platformInjector = createOrReusePlatformInjector(platformProviders);\n const ngZone = new NgZone(getNgZoneOptions());\n return ngZone.run(() => {\n // Create root application injector based on a set of providers configured at the platform\n // bootstrap level as well as providers passed to the bootstrap call by a user.\n const allAppProviders = [\n { provide: NgZone, useValue: ngZone },\n ...(appProviders || []), //\n ];\n const appInjector = createEnvironmentInjector(allAppProviders, platformInjector, 'Environment Injector');\n const exceptionHandler = appInjector.get(ErrorHandler, null);\n if (NG_DEV_MODE && !exceptionHandler) {\n throw new RuntimeError(402 /* RuntimeErrorCode.ERROR_HANDLER_NOT_FOUND */, 'No `ErrorHandler` found in the Dependency Injection tree.');\n }\n let onErrorSubscription;\n ngZone.runOutsideAngular(() => {\n onErrorSubscription = ngZone.onError.subscribe({\n next: (error) => {\n exceptionHandler.handleError(error);\n }\n });\n });\n return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => {\n const initStatus = appInjector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n return initStatus.donePromise.then(() => {\n const localeId = appInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n setLocaleId(localeId || DEFAULT_LOCALE_ID);\n const appRef = appInjector.get(ApplicationRef);\n // If the whole platform is destroyed, invoke the `destroy` method\n // for all bootstrapped applications as well.\n const destroyListener = () => appRef.destroy();\n const onPlatformDestroyListeners = platformInjector.get(PLATFORM_DESTROY_LISTENERS, null);\n onPlatformDestroyListeners?.add(destroyListener);\n appRef.onDestroy(() => {\n onPlatformDestroyListeners?.delete(destroyListener);\n onErrorSubscription.unsubscribe();\n });\n appRef.bootstrap(rootComponent);\n return appRef;\n });\n });\n });\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 const platformProviders = [\n ...providers,\n ...extraProviders,\n { provide: marker, useValue: true }\n ];\n if (parentPlatformFactory) {\n parentPlatformFactory(platformProviders);\n }\n else {\n createPlatform(createPlatformInjector(platformProviders, 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 RuntimeError(401 /* RuntimeErrorCode.PLATFORM_NOT_FOUND */, ngDevMode && 'No platform exists!');\n }\n if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n !platform.injector.get(requiredToken, null)) {\n throw new RuntimeError(400 /* RuntimeErrorCode.MULTIPLE_PLATFORMS */, 'A platform with a different configuration has been created. Please destroy it first.');\n }\n return platform;\n}\n/**\n * Helper function to create an instance of a platform injector (that maintains the 'platform'\n * scope).\n */\nfunction createPlatformInjector(providers = [], name) {\n return Injector.create({\n name,\n providers: [\n { provide: INJECTOR_SCOPE, useValue: 'platform' },\n { provide: PLATFORM_DESTROY_LISTENERS, useValue: new Set([() => _platformInjector = null]) },\n ...providers\n ],\n });\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 getPlatform()?.destroy();\n}\n/**\n * Returns the current platform.\n *\n * @publicApi\n */\nfunction getPlatform() {\n return _platformInjector?.get(PlatformRef) ?? 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.\n *\n * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function\n * argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.\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 ngZone = getNgZone(options?.ngZone, getNgZoneOptions(options));\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 RuntimeError(402 /* RuntimeErrorCode.ERROR_HANDLER_NOT_FOUND */, ngDevMode && '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 the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy\n const localeId = moduleRef.injector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n setLocaleId(localeId || DEFAULT_LOCALE_ID);\n this._moduleDoBootstrap(moduleRef);\n return moduleRef;\n });\n });\n });\n }\n /**\n * Creates an instance of an `@NgModule` for a given platform.\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 RuntimeError(403 /* RuntimeErrorCode.BOOTSTRAP_COMPONENTS_NOT_FOUND */, ngDevMode &&\n `The module ${stringify(moduleRef.instance.constructor)} was bootstrapped, ` +\n `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 RuntimeError(404 /* RuntimeErrorCode.PLATFORM_ALREADY_DESTROYED */, ngDevMode && 'The platform has already been destroyed!');\n }\n this._modules.slice().forEach(module => module.destroy());\n this._destroyListeners.forEach(listener => listener());\n const destroyListeners = this._injector.get(PLATFORM_DESTROY_LISTENERS, null);\n if (destroyListeners) {\n destroyListeners.forEach(listener => listener());\n destroyListeners.clear();\n }\n this._destroyed = true;\n }\n /**\n * Indicates whether this instance was destroyed.\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, providedIn: 'platform' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(PlatformRef, [{\n type: Injectable,\n args: [{ providedIn: 'platform' }]\n }], function () { return [{ type: Injector }]; }, null); })();\n// Transforms a set of `BootstrapOptions` (supported by the NgModule-based bootstrap APIs) ->\n// `NgZoneOptions` that are recognized by the NgZone constructor. Passing no options will result in\n// a set of default options returned.\nfunction getNgZoneOptions(options) {\n return {\n enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode,\n shouldCoalesceEventChangeDetection: !!(options && options.ngZoneEventCoalescing) || false,\n shouldCoalesceRunChangeDetection: !!(options && options.ngZoneRunCoalescing) || false,\n };\n}\nfunction getNgZone(ngZoneToUse, options) {\n let ngZone;\n if (ngZoneToUse === 'noop') {\n ngZone = new NoopNgZone();\n }\n else {\n ngZone = (ngZoneToUse === 'zone.js' ? undefined : ngZoneToUse) || new NgZone(options);\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 = { ...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) {\n this._zone = _zone;\n this._injector = _injector;\n this._exceptionHandler = _exceptionHandler;\n /** @internal */\n this._bootstrapListeners = [];\n this._views = [];\n this._runningTick = false;\n this._stable = true;\n this._destroyed = false;\n this._destroyListeners = [];\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 * Indicates whether this instance was destroyed.\n */\n get destroyed() {\n return this._destroyed;\n }\n /**\n * The `EnvironmentInjector` used to create this application.\n */\n get injector() {\n return this._injector;\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 NG_DEV_MODE && this.warnIfDestroyed();\n const isComponentFactory = componentOrFactory instanceof ComponentFactory$1;\n const initStatus = this._injector.get(ApplicationInitStatus);\n if (!initStatus.done) {\n const standalone = !isComponentFactory && isStandalone(componentOrFactory);\n const errorMessage = 'Cannot bootstrap as there are still asynchronous initializers running.' +\n (standalone ? '' :\n ' Bootstrap components in the `ngDoBootstrap` method of the root module.');\n throw new RuntimeError(405 /* RuntimeErrorCode.ASYNC_INITIALIZERS_STILL_RUNNING */, NG_DEV_MODE && errorMessage);\n }\n let componentFactory;\n if (isComponentFactory) {\n componentFactory = componentOrFactory;\n }\n else {\n const resolver = this._injector.get(ComponentFactoryResolver$1);\n componentFactory = resolver.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$1);\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 testability?.registerApplication(nativeElement);\n compRef.onDestroy(() => {\n this.detachView(compRef.hostView);\n remove(this.components, compRef);\n testability?.unregisterApplication(nativeElement);\n });\n this._loadComponent(compRef);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\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 NG_DEV_MODE && this.warnIfDestroyed();\n if (this._runningTick) {\n throw new RuntimeError(101 /* RuntimeErrorCode.RECURSIVE_APPLICATION_REF_TICK */, ngDevMode && 'ApplicationRef.tick is called recursively');\n }\n try {\n this._runningTick = true;\n for (let view of this._views) {\n view.detectChanges();\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\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 NG_DEV_MODE && this.warnIfDestroyed();\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 NG_DEV_MODE && this.warnIfDestroyed();\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 if (this._destroyed)\n return;\n try {\n // Call all the lifecycle hooks.\n this._destroyListeners.forEach(listener => listener());\n // Destroy all registered views.\n this._views.slice().forEach((view) => view.destroy());\n this._onMicrotaskEmptySubscription.unsubscribe();\n }\n finally {\n // Indicate that this instance is destroyed.\n this._destroyed = true;\n // Release all references.\n this._views = [];\n this._bootstrapListeners = [];\n this._destroyListeners = [];\n }\n }\n /**\n * Registers a listener to be called when an instance is destroyed.\n *\n * @param callback A callback function to add as a listener.\n * @returns A function which unregisters a listener.\n *\n * @internal\n */\n onDestroy(callback) {\n NG_DEV_MODE && this.warnIfDestroyed();\n this._destroyListeners.push(callback);\n return () => remove(this._destroyListeners, callback);\n }\n /**\n * Destroys an Angular application represented by this `ApplicationRef`. Calling this function\n * will destroy the associated environment injectors as well as all the bootstrapped components\n * with their views.\n */\n destroy() {\n if (this._destroyed) {\n throw new RuntimeError(406 /* RuntimeErrorCode.APPLICATION_REF_ALREADY_DESTROYED */, ngDevMode && 'This instance of the `ApplicationRef` has already been destroyed.');\n }\n const injector = this._injector;\n // Check that this injector instance supports destroy operation.\n if (injector.destroy && !injector.destroyed) {\n // Destroying an underlying injector will trigger the `ngOnDestroy` lifecycle\n // hook, which invokes the remaining cleanup actions.\n injector.destroy();\n }\n }\n /**\n * Returns the number of attached views.\n */\n get viewCount() {\n return this._views.length;\n }\n warnIfDestroyed() {\n if (NG_DEV_MODE && this._destroyed) {\n console.warn(formatRuntimeError(406 /* RuntimeErrorCode.APPLICATION_REF_ALREADY_DESTROYED */, 'This instance of the `ApplicationRef` has already been destroyed.'));\n }\n }\n}\nApplicationRef.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(EnvironmentInjector), ɵɵinject(ErrorHandler)); };\nApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac, providedIn: 'root' });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationRef, [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], function () { return [{ type: NgZone }, { type: EnvironmentInjector }, { type: ErrorHandler }]; }, 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 * 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 */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 * Returns the NgModuleFactory with the given id (specified using [@NgModule.id\n * field](api/core/NgModule#id)), if it exists and has been loaded. Factories for NgModules that do\n * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.\n * @publicApi\n * @deprecated Use `getNgModuleById` instead.\n */\nfunction getModuleFactory(id) {\n const type = getRegisteredNgModuleType(id);\n if (!type)\n throw noModuleError(id);\n return new NgModuleFactory(type);\n}\n/**\n * Returns the NgModule class with the given id (specified using [@NgModule.id\n * field](api/core/NgModule#id)), if it exists and has been loaded. Classes for NgModules that do\n * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.\n * @publicApi\n */\nfunction getNgModuleById(id) {\n const type = getRegisteredNgModuleType(id);\n if (!type)\n throw noModuleError(id);\n return type;\n}\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 */\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__ = injectChangeDetectorRef;\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\nfunction injectChangeDetectorRef(flags) {\n return createViewRef(getCurrentTNode(), getLView(), (flags & 16 /* InternalInjectFlags.ForPipe */) === 16 /* InternalInjectFlags.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$1(componentView, componentView);\n }\n else if (tNode.type & (3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */ | 32 /* TNodeType.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$1(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 * Represents an Angular [view](guide/glossary#view \"Definition\").\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\nclass ViewRef 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 {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 exists for easily patching NgModuleFactoryLoader in g3\nvar ng_module_factory_loader_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 * @publicApi\n */\nclass DebugEventListener {\n constructor(name, callback) {\n this.name = name;\n this.callback = callback;\n }\n}\n/**\n * @publicApi\n */\nfunction asNativeElements(debugEls) {\n return debugEls.map((el) => el.nativeElement);\n}\n/**\n * @publicApi\n */\nclass DebugNode {\n constructor(nativeNode) {\n this.nativeNode = nativeNode;\n }\n /**\n * The `DebugElement` parent. Will be `null` if this is the root element.\n */\n get parent() {\n const parent = this.nativeNode.parentNode;\n return parent ? new DebugElement(parent) : null;\n }\n /**\n * The host dependency injector. For example, the root element's component instance injector.\n */\n get injector() {\n return getInjector(this.nativeNode);\n }\n /**\n * The element's own component instance, if it has one.\n */\n get componentInstance() {\n const nativeElement = this.nativeNode;\n return nativeElement &&\n (getComponent(nativeElement) || getOwningComponent(nativeElement));\n }\n /**\n * An object that provides parent context for this element. Often an ancestor component instance\n * that governs this element.\n *\n * When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`\n * property is the value of the row instance value. For example, the `hero` in `*ngFor=\"let hero\n * of heroes\"`.\n */\n get context() {\n return getComponent(this.nativeNode) || getContext(this.nativeNode);\n }\n /**\n * The callbacks attached to the component's @Output properties and/or the element's event\n * properties.\n */\n get listeners() {\n return getListeners(this.nativeNode).filter(listener => listener.type === 'dom');\n }\n /**\n * Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local\n * variable name.\n */\n get references() {\n return getLocalRefs(this.nativeNode);\n }\n /**\n * This component's injector lookup tokens. Includes the component itself plus the tokens that the\n * component lists in its providers metadata.\n */\n get providerTokens() {\n return getInjectionTokens(this.nativeNode);\n }\n}\n/**\n * @publicApi\n *\n * @see [Component testing scenarios](guide/testing-components-scenarios)\n * @see [Basics of testing components](guide/testing-components-basics)\n * @see [Testing utility APIs](guide/testing-utility-apis)\n */\nclass DebugElement extends DebugNode {\n constructor(nativeNode) {\n ngDevMode && assertDomNode(nativeNode);\n super(nativeNode);\n }\n /**\n * The underlying DOM element at the root of the component.\n */\n get nativeElement() {\n return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;\n }\n /**\n * The element tag name, if it is an element.\n */\n get name() {\n const context = getLContext(this.nativeNode);\n const lView = context ? context.lView : null;\n if (lView !== null) {\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 const lView = context ? context.lView : null;\n if (lView === null) {\n return {};\n }\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 /**\n * A map of attribute names to attribute values for an element.\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 const lView = context ? context.lView : null;\n if (lView === null) {\n return {};\n }\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 /**\n * The inline styles of the DOM element.\n *\n * Will be `null` if there is no `style` property on the underlying DOM element.\n *\n * @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)\n */\n get styles() {\n if (this.nativeElement && this.nativeElement.style) {\n return this.nativeElement.style;\n }\n return {};\n }\n /**\n * A map containing the class names on the element as keys.\n *\n * This map is derived from the `className` property of the DOM element.\n *\n * Note: The values of this object will always be `true`. The class key will not appear in the KV\n * object if it does not exist on the element.\n *\n * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)\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 = typeof className !== 'string' ? className.baseVal.split(' ') : className.split(' ');\n classes.forEach((value) => result[value] = true);\n return result;\n }\n /**\n * The `childNodes` of the DOM element as a `DebugNode` array.\n *\n * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)\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(element));\n }\n return children;\n }\n /**\n * The immediate `DebugElement` children. Walk the tree by descending through `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(element));\n }\n return children;\n }\n /**\n * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.\n */\n query(predicate) {\n const results = this.queryAll(predicate);\n return results[0] || null;\n }\n /**\n * @returns All `DebugElement` matches for the predicate at any depth in the subtree.\n */\n queryAll(predicate) {\n const matches = [];\n _queryAll(this, predicate, matches, true);\n return matches;\n }\n /**\n * @returns All `DebugNode` matches for the predicate at any depth in the subtree.\n */\n queryAllNodes(predicate) {\n const matches = [];\n _queryAll(this, predicate, matches, false);\n return matches;\n }\n /**\n * Triggers the event by its name if there is a corresponding listener in the element's\n * `listeners` collection.\n *\n * If the event lacks a listener or there's some other problem, consider\n * calling `nativeElement.dispatchEvent(eventObject)`.\n *\n * @param eventName The name of the event to trigger\n * @param eventObj The _event object_ expected by the handler\n *\n * @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)\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 _queryAll(parentElement, predicate, matches, elementsOnly) {\n const context = getLContext(parentElement.nativeNode);\n const lView = context ? context.lView : null;\n if (lView !== null) {\n const parentTNode = lView[TVIEW].data[context.nodeIndex];\n _queryNodeChildren(parentTNode, 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 _queryNodeChildren(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 /* TNodeType.AnyRNode */ | 8 /* TNodeType.ElementContainer */)) {\n // Case 1: the TNode is an element\n // The native node has to be checked.\n _addQueryMatch(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 _queryNodeChildren(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 _queryNodeChildren(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 dependency\n // from `Renderer2` to Ivy which could bring Ivy code into ViewEngine.\n // 2. 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 _queryNodeChildrenInContainer(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else if (tNode.type & 4 /* TNodeType.Container */) {\n // Case 2: the TNode is a container\n // The native node has to be checked.\n const lContainer = lView[tNode.index];\n _addQueryMatch(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);\n // Each view inside the container has to be processed.\n _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode);\n }\n else if (tNode.type & 16 /* TNodeType.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 _addQueryMatch(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 _queryNodeChildren(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else if (tNode.child) {\n // Case 4: the TNode is a view.\n _queryNodeChildren(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 /* TNodeFlags.isProjected */) ? tNode.projectionNext : tNode.next;\n if (nextTNode) {\n _queryNodeChildren(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 _queryNodeChildrenInContainer(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 _queryNodeChildren(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 _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {\n if (rootNativeNode !== nativeNode) {\n const debugNode = getDebugNode(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) && 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(node);\n if (debugNode) {\n if (elementsOnly && (debugNode instanceof DebugElement) && 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();\nconst NG_DEBUG_PROPERTY = '__ng_debug__';\n/**\n * @publicApi\n */\nfunction getDebugNode(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(nativeNode) :\n new DebugNode(nativeNode);\n }\n return nativeNode[NG_DEBUG_PROPERTY];\n }\n return null;\n}\n// TODO: cleanup all references to this function and remove it.\nfunction getDebugNodeR2(_nativeNode) {\n return null;\n}\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/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this 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;\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 RuntimeError(900 /* RuntimeErrorCode.INVALID_DIFFER_INPUT */, ngDevMode &&\n `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 RuntimeError(900 /* RuntimeErrorCode.INVALID_DIFFER_INPUT */, ngDevMode &&\n `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 RuntimeError(901 /* RuntimeErrorCode.NO_SUPPORTING_DIFFER_FACTORY */, ngDevMode &&\n `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 RuntimeError(901 /* RuntimeErrorCode.NO_SUPPORTING_DIFFER_FACTORY */, ngDevMode && `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 */\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 */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 platform has to be included in any other platform\n *\n * @publicApi\n */\nconst platformCore = createPlatformFactory(null, '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 * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command. Eagerly injects\n * `ApplicationRef` to instantiate it.\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({});\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationModule, [{\n type: NgModule\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 */\n/** Coerces a value (typically a string) to a boolean. */\nfunction coerceToBoolean(value) {\n return typeof value === 'boolean' ? value : (value != null && value !== '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// TODO(alxhub): allows tests to compile, can be removed when tests have been updated.\nconst ɵivyEnabled = true;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 /* JitCompilerUsage.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 setClassMetadata(decl.type, decl.decorators, decl.ctorParameters ?? null, decl.propDecorators ?? 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 /* JitCompilerUsage.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 /* JitCompilerUsage.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 /* JitCompilerUsage.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 /* JitCompilerUsage.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 /* JitCompilerUsage.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 /* JitCompilerUsage.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 * Creates a `ComponentRef` instance based on provided component type and a set of options.\n *\n * @usageNotes\n *\n * The example below demonstrates how the `createComponent` function can be used\n * to create an instance of a ComponentRef dynamically and attach it to an ApplicationRef,\n * so that it gets included into change detection cycles.\n *\n * Note: the example uses standalone components, but the function can also be used for\n * non-standalone components (declared in an NgModule) as well.\n *\n * ```typescript\n * @Component({\n * standalone: true,\n * template: `Hello {{ name }}!`\n * })\n * class HelloComponent {\n * name = 'Angular';\n * }\n *\n * @Component({\n * standalone: true,\n * template: `<div id=\"hello-component-host\"></div>`\n * })\n * class RootComponent {}\n *\n * // Bootstrap an application.\n * const applicationRef = await bootstrapApplication(RootComponent);\n *\n * // Locate a DOM node that would be used as a host.\n * const host = document.getElementById('hello-component-host');\n *\n * // Get an `EnvironmentInjector` instance from the `ApplicationRef`.\n * const environmentInjector = applicationRef.injector;\n *\n * // We can now create a `ComponentRef` instance.\n * const componentRef = createComponent(HelloComponent, {host, environmentInjector});\n *\n * // Last step is to register the newly created ref using the `ApplicationRef` instance\n * // to include the component view into change detection cycles.\n * applicationRef.attachView(componentRef.hostView);\n * ```\n *\n * @param component Component class reference.\n * @param options Set of options to use:\n * * `environmentInjector`: An `EnvironmentInjector` instance to be used for the component, see\n * additional info about it at https://angular.io/guide/standalone-components#environment-injectors.\n * * `hostElement` (optional): A DOM node that should act as a host node for the component. If not\n * provided, Angular creates one based on the tag name used in the component selector (and falls\n * back to using `div` if selector doesn't have tag name info).\n * * `elementInjector` (optional): An `ElementInjector` instance, see additional info about it at\n * https://angular.io/guide/hierarchical-dependency-injection#elementinjector.\n * * `projectableNodes` (optional): A list of DOM nodes that should be projected through\n * [`<ng-content>`](api/core/ng-content) of the new component instance.\n * @returns ComponentRef instance that represents a given Component.\n *\n * @publicApi\n */\nfunction createComponent(component, options) {\n ngDevMode && assertComponentDef(component);\n const componentDef = getComponentDef(component);\n const elementInjector = options.elementInjector || getNullInjector();\n const factory = new ComponentFactory(componentDef);\n return factory.create(elementInjector, options.projectableNodes, options.hostElement, options.environmentInjector);\n}\n/**\n * Creates an object that allows to retrieve component metadata.\n *\n * @usageNotes\n *\n * The example below demonstrates how to use the function and how the fields\n * of the returned object map to the component metadata.\n *\n * ```typescript\n * @Component({\n * standalone: true,\n * selector: 'foo-component',\n * template: `\n * <ng-content></ng-content>\n * <ng-content select=\"content-selector-a\"></ng-content>\n * `,\n * })\n * class FooComponent {\n * @Input('inputName') inputPropName: string;\n * @Output('outputName') outputPropName = new EventEmitter<void>();\n * }\n *\n * const mirror = reflectComponentType(FooComponent);\n * expect(mirror.type).toBe(FooComponent);\n * expect(mirror.selector).toBe('foo-component');\n * expect(mirror.isStandalone).toBe(true);\n * expect(mirror.inputs).toEqual([{propName: 'inputName', templateName: 'inputPropName'}]);\n * expect(mirror.outputs).toEqual([{propName: 'outputName', templateName: 'outputPropName'}]);\n * expect(mirror.ngContentSelectors).toEqual([\n * '*', // first `<ng-content>` in a template, the selector defaults to `*`\n * 'content-selector-a' // second `<ng-content>` in a template\n * ]);\n * ```\n *\n * @param component Component class reference.\n * @returns An object that allows to retrieve component metadata.\n *\n * @publicApi\n */\nfunction reflectComponentType(component) {\n const componentDef = getComponentDef(component);\n if (!componentDef)\n return null;\n const factory = new ComponentFactory(componentDef);\n return {\n get selector() {\n return factory.selector;\n },\n get type() {\n return factory.componentType;\n },\n get inputs() {\n return factory.inputs;\n },\n get outputs() {\n return factory.outputs;\n },\n get ngContentSelectors() {\n return factory.ngContentSelectors;\n },\n get isStandalone() {\n return componentDef.standalone;\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 */\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, ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver$1 as ComponentFactoryResolver, ComponentRef$1 as ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ENVIRONMENT_INITIALIZER, ElementRef, EmbeddedViewRef, EnvironmentInjector, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as 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, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, asNativeElements, assertPlatform, createComponent, createEnvironmentInjector, createNgModule, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, importProvidersFrom, inject, isDevMode, platformCore, reflectComponentType, resolveForwardRef, setTestabilityGetter, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, ChangeDetectorStatus as ɵChangeDetectorStatus, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, LContext as ɵLContext, 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 as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, TESTABILITY as ɵTESTABILITY, TESTABILITY_GETTER as ɵTESTABILITY_GETTER, ViewRef$1 as ɵViewRef, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, coerceToBoolean as ɵcoerceToBoolean, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory as ɵcompileNgModuleFactory, compilePipe as ɵcompilePipe, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, getDebugNode as ɵgetDebugNode, getDebugNodeR2 as ɵgetDebugNodeR2, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, internalBootstrapApplication as ɵinternalBootstrapApplication, isBoundToModule as ɵisBoundToModule, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, isListLikeIterable as ɵisListLikeIterable, isObservable as ɵisObservable, isPromise as ɵisPromise, isStandalone as ɵisStandalone, isSubscribable as ɵisSubscribable, ɵivyEnabled, makeDecorator as ɵmakeDecorator, markDirty as ɵmarkDirty, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishDefaultGlobalUtils$1 as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, registerLocaleData as ɵregisterLocaleData, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, setClassMetadata as ɵsetClassMetadata, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setLocaleId as ɵsetLocaleId, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, whenRendered as ɵwhenRendered, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵStandaloneFeature, ɵɵ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, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵresetView, ɵɵ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","import * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, Inject, NgModule } from '@angular/core';\nimport * as i2 from '@ngrx/store';\nimport { INIT, UPDATE, ActionsSubject, INITIAL_STATE, StateObservable, ReducerManagerDispatcher } from '@ngrx/store';\nimport { EMPTY, Observable, of, merge, queueScheduler, ReplaySubject } from 'rxjs';\nimport { share, filter, map, concatMap, timeout, debounceTime, catchError, take, takeUntil, switchMap, skip, observeOn, withLatestFrom, scan } from 'rxjs/operators';\n\n/**\n * Chrome extension documentation\n * @see https://github.com/reduxjs/redux-devtools/blob/main/extension/docs/API/Arguments.md\n * Firefox extension documentation\n * @see https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md\n */\nclass StoreDevtoolsConfig {\n constructor() {\n /**\n * Maximum allowed actions to be stored in the history tree (default: `false`)\n */\n this.maxAge = false;\n }\n}\nconst STORE_DEVTOOLS_CONFIG = new InjectionToken('@ngrx/store-devtools Options');\n/**\n * Used to provide a `StoreDevtoolsConfig` for the store-devtools.\n */\nconst INITIAL_OPTIONS = new InjectionToken('@ngrx/store-devtools Initial Config');\nfunction noMonitor() {\n return null;\n}\nconst DEFAULT_NAME = 'NgRx Store DevTools';\nfunction createConfig(optionsInput) {\n const DEFAULT_OPTIONS = {\n maxAge: false,\n monitor: noMonitor,\n actionSanitizer: undefined,\n stateSanitizer: undefined,\n name: DEFAULT_NAME,\n serialize: false,\n logOnly: false,\n autoPause: false,\n // Add all features explicitly. This prevent buggy behavior for\n // options like \"lock\" which might otherwise not show up.\n features: {\n pause: true,\n lock: true,\n persist: true,\n export: true,\n import: 'custom',\n jump: true,\n skip: true,\n reorder: true,\n dispatch: true,\n test: true, // Generate tests for the selected actions\n },\n };\n const options = typeof optionsInput === 'function' ? optionsInput() : optionsInput;\n const logOnly = options.logOnly\n ? { pause: true, export: true, test: true }\n : false;\n const features = options.features || logOnly || DEFAULT_OPTIONS.features;\n const config = Object.assign({}, DEFAULT_OPTIONS, { features }, options);\n if (config.maxAge && config.maxAge < 2) {\n throw new Error(`Devtools 'maxAge' cannot be less than 2, got ${config.maxAge}`);\n }\n return config;\n}\n\nconst PERFORM_ACTION = 'PERFORM_ACTION';\nconst REFRESH = 'REFRESH';\nconst RESET = 'RESET';\nconst ROLLBACK = 'ROLLBACK';\nconst COMMIT = 'COMMIT';\nconst SWEEP = 'SWEEP';\nconst TOGGLE_ACTION = 'TOGGLE_ACTION';\nconst SET_ACTIONS_ACTIVE = 'SET_ACTIONS_ACTIVE';\nconst JUMP_TO_STATE = 'JUMP_TO_STATE';\nconst JUMP_TO_ACTION = 'JUMP_TO_ACTION';\nconst IMPORT_STATE = 'IMPORT_STATE';\nconst LOCK_CHANGES = 'LOCK_CHANGES';\nconst PAUSE_RECORDING = 'PAUSE_RECORDING';\nclass PerformAction {\n constructor(action, timestamp) {\n this.action = action;\n this.timestamp = timestamp;\n this.type = PERFORM_ACTION;\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' +\n 'Have you misspelled a constant?');\n }\n }\n}\nclass Refresh {\n constructor() {\n this.type = REFRESH;\n }\n}\nclass Reset {\n constructor(timestamp) {\n this.timestamp = timestamp;\n this.type = RESET;\n }\n}\nclass Rollback {\n constructor(timestamp) {\n this.timestamp = timestamp;\n this.type = ROLLBACK;\n }\n}\nclass Commit {\n constructor(timestamp) {\n this.timestamp = timestamp;\n this.type = COMMIT;\n }\n}\nclass Sweep {\n constructor() {\n this.type = SWEEP;\n }\n}\nclass ToggleAction {\n constructor(id) {\n this.id = id;\n this.type = TOGGLE_ACTION;\n }\n}\nclass SetActionsActive {\n constructor(start, end, active = true) {\n this.start = start;\n this.end = end;\n this.active = active;\n this.type = SET_ACTIONS_ACTIVE;\n }\n}\nclass JumpToState {\n constructor(index) {\n this.index = index;\n this.type = JUMP_TO_STATE;\n }\n}\nclass JumpToAction {\n constructor(actionId) {\n this.actionId = actionId;\n this.type = JUMP_TO_ACTION;\n }\n}\nclass ImportState {\n constructor(nextLiftedState) {\n this.nextLiftedState = nextLiftedState;\n this.type = IMPORT_STATE;\n }\n}\nclass LockChanges {\n constructor(status) {\n this.status = status;\n this.type = LOCK_CHANGES;\n }\n}\nclass PauseRecording {\n constructor(status) {\n this.status = status;\n this.type = PAUSE_RECORDING;\n }\n}\n\nfunction difference(first, second) {\n return first.filter((item) => second.indexOf(item) < 0);\n}\n/**\n * Provides an app's view into the state of the lifted store.\n */\nfunction unliftState(liftedState) {\n const { computedStates, currentStateIndex } = liftedState;\n // At start up NgRx dispatches init actions,\n // When these init actions are being filtered out by the predicate or safe/block list options\n // we don't have a complete computed states yet.\n // At this point it could happen that we're out of bounds, when this happens we fall back to the last known state\n if (currentStateIndex >= computedStates.length) {\n const { state } = computedStates[computedStates.length - 1];\n return state;\n }\n const { state } = computedStates[currentStateIndex];\n return state;\n}\nfunction unliftAction(liftedState) {\n return liftedState.actionsById[liftedState.nextActionId - 1];\n}\n/**\n * Lifts an app's action into an action on the lifted store.\n */\nfunction liftAction(action) {\n return new PerformAction(action, +Date.now());\n}\n/**\n * Sanitizes given actions with given function.\n */\nfunction sanitizeActions(actionSanitizer, actions) {\n return Object.keys(actions).reduce((sanitizedActions, actionIdx) => {\n const idx = Number(actionIdx);\n sanitizedActions[idx] = sanitizeAction(actionSanitizer, actions[idx], idx);\n return sanitizedActions;\n }, {});\n}\n/**\n * Sanitizes given action with given function.\n */\nfunction sanitizeAction(actionSanitizer, action, actionIdx) {\n return {\n ...action,\n action: actionSanitizer(action.action, actionIdx),\n };\n}\n/**\n * Sanitizes given states with given function.\n */\nfunction sanitizeStates(stateSanitizer, states) {\n return states.map((computedState, idx) => ({\n state: sanitizeState(stateSanitizer, computedState.state, idx),\n error: computedState.error,\n }));\n}\n/**\n * Sanitizes given state with given function.\n */\nfunction sanitizeState(stateSanitizer, state, stateIdx) {\n return stateSanitizer(state, stateIdx);\n}\n/**\n * Read the config and tell if actions should be filtered\n */\nfunction shouldFilterActions(config) {\n return config.predicate || config.actionsSafelist || config.actionsBlocklist;\n}\n/**\n * Return a full filtered lifted state\n */\nfunction filterLiftedState(liftedState, predicate, safelist, blocklist) {\n const filteredStagedActionIds = [];\n const filteredActionsById = {};\n const filteredComputedStates = [];\n liftedState.stagedActionIds.forEach((id, idx) => {\n const liftedAction = liftedState.actionsById[id];\n if (!liftedAction)\n return;\n if (idx &&\n isActionFiltered(liftedState.computedStates[idx], liftedAction, predicate, safelist, blocklist)) {\n return;\n }\n filteredActionsById[id] = liftedAction;\n filteredStagedActionIds.push(id);\n filteredComputedStates.push(liftedState.computedStates[idx]);\n });\n return {\n ...liftedState,\n stagedActionIds: filteredStagedActionIds,\n actionsById: filteredActionsById,\n computedStates: filteredComputedStates,\n };\n}\n/**\n * Return true is the action should be ignored\n */\nfunction isActionFiltered(state, action, predicate, safelist, blockedlist) {\n const predicateMatch = predicate && !predicate(state, action.action);\n const safelistMatch = safelist &&\n !action.action.type.match(safelist.map((s) => escapeRegExp(s)).join('|'));\n const blocklistMatch = blockedlist &&\n action.action.type.match(blockedlist.map((s) => escapeRegExp(s)).join('|'));\n return predicateMatch || safelistMatch || blocklistMatch;\n}\n/**\n * Return string with escaped RegExp special characters\n * https://stackoverflow.com/a/6969486/1337347\n */\nfunction escapeRegExp(s) {\n return s.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nconst INIT_ACTION = { type: INIT };\nconst RECOMPUTE = '@ngrx/store-devtools/recompute';\nconst RECOMPUTE_ACTION = { type: RECOMPUTE };\n/**\n * Computes the next entry in the log by applying an action.\n */\nfunction computeNextEntry(reducer, action, state, error, errorHandler) {\n if (error) {\n return {\n state,\n error: 'Interrupted by an error up the chain',\n };\n }\n let nextState = state;\n let nextError;\n try {\n nextState = reducer(state, action);\n }\n catch (err) {\n nextError = err.toString();\n errorHandler.handleError(err);\n }\n return {\n state: nextState,\n error: nextError,\n };\n}\n/**\n * Runs the reducer on invalidated actions to get a fresh computation log.\n */\nfunction recomputeStates(computedStates, minInvalidatedStateIndex, reducer, committedState, actionsById, stagedActionIds, skippedActionIds, errorHandler, isPaused) {\n // Optimization: exit early and return the same reference\n // if we know nothing could have changed.\n if (minInvalidatedStateIndex >= computedStates.length &&\n computedStates.length === stagedActionIds.length) {\n return computedStates;\n }\n const nextComputedStates = computedStates.slice(0, minInvalidatedStateIndex);\n // If the recording is paused, recompute all states up until the pause state,\n // else recompute all states.\n const lastIncludedActionId = stagedActionIds.length - (isPaused ? 1 : 0);\n for (let i = minInvalidatedStateIndex; i < lastIncludedActionId; i++) {\n const actionId = stagedActionIds[i];\n const action = actionsById[actionId].action;\n const previousEntry = nextComputedStates[i - 1];\n const previousState = previousEntry ? previousEntry.state : committedState;\n const previousError = previousEntry ? previousEntry.error : undefined;\n const shouldSkip = skippedActionIds.indexOf(actionId) > -1;\n const entry = shouldSkip\n ? previousEntry\n : computeNextEntry(reducer, action, previousState, previousError, errorHandler);\n nextComputedStates.push(entry);\n }\n // If the recording is paused, the last state will not be recomputed,\n // because it's essentially not part of the state history.\n if (isPaused) {\n nextComputedStates.push(computedStates[computedStates.length - 1]);\n }\n return nextComputedStates;\n}\nfunction liftInitialState(initialCommittedState, monitorReducer) {\n return {\n monitorState: monitorReducer(undefined, {}),\n nextActionId: 1,\n actionsById: { 0: liftAction(INIT_ACTION) },\n stagedActionIds: [0],\n skippedActionIds: [],\n committedState: initialCommittedState,\n currentStateIndex: 0,\n computedStates: [],\n isLocked: false,\n isPaused: false,\n };\n}\n/**\n * Creates a history state reducer from an app's reducer.\n */\nfunction liftReducerWith(initialCommittedState, initialLiftedState, errorHandler, monitorReducer, options = {}) {\n /**\n * Manages how the history actions modify the history state.\n */\n return (reducer) => (liftedState, liftedAction) => {\n let { monitorState, actionsById, nextActionId, stagedActionIds, skippedActionIds, committedState, currentStateIndex, computedStates, isLocked, isPaused, } = liftedState || initialLiftedState;\n if (!liftedState) {\n // Prevent mutating initialLiftedState\n actionsById = Object.create(actionsById);\n }\n function commitExcessActions(n) {\n // Auto-commits n-number of excess actions.\n let excess = n;\n let idsToDelete = stagedActionIds.slice(1, excess + 1);\n for (let i = 0; i < idsToDelete.length; i++) {\n if (computedStates[i + 1].error) {\n // Stop if error is found. Commit actions up to error.\n excess = i;\n idsToDelete = stagedActionIds.slice(1, excess + 1);\n break;\n }\n else {\n delete actionsById[idsToDelete[i]];\n }\n }\n skippedActionIds = skippedActionIds.filter((id) => idsToDelete.indexOf(id) === -1);\n stagedActionIds = [0, ...stagedActionIds.slice(excess + 1)];\n committedState = computedStates[excess].state;\n computedStates = computedStates.slice(excess);\n currentStateIndex =\n currentStateIndex > excess ? currentStateIndex - excess : 0;\n }\n function commitChanges() {\n // Consider the last committed state the new starting point.\n // Squash any staged actions into a single committed state.\n actionsById = { 0: liftAction(INIT_ACTION) };\n nextActionId = 1;\n stagedActionIds = [0];\n skippedActionIds = [];\n committedState = computedStates[currentStateIndex].state;\n currentStateIndex = 0;\n computedStates = [];\n }\n // By default, aggressively recompute every state whatever happens.\n // This has O(n) performance, so we'll override this to a sensible\n // value whenever we feel like we don't have to recompute the states.\n let minInvalidatedStateIndex = 0;\n switch (liftedAction.type) {\n case LOCK_CHANGES: {\n isLocked = liftedAction.status;\n minInvalidatedStateIndex = Infinity;\n break;\n }\n case PAUSE_RECORDING: {\n isPaused = liftedAction.status;\n if (isPaused) {\n // Add a pause action to signal the devtools-user the recording is paused.\n // The corresponding state will be overwritten on each update to always contain\n // the latest state (see Actions.PERFORM_ACTION).\n stagedActionIds = [...stagedActionIds, nextActionId];\n actionsById[nextActionId] = new PerformAction({\n type: '@ngrx/devtools/pause',\n }, +Date.now());\n nextActionId++;\n minInvalidatedStateIndex = stagedActionIds.length - 1;\n computedStates = computedStates.concat(computedStates[computedStates.length - 1]);\n if (currentStateIndex === stagedActionIds.length - 2) {\n currentStateIndex++;\n }\n minInvalidatedStateIndex = Infinity;\n }\n else {\n commitChanges();\n }\n break;\n }\n case RESET: {\n // Get back to the state the store was created with.\n actionsById = { 0: liftAction(INIT_ACTION) };\n nextActionId = 1;\n stagedActionIds = [0];\n skippedActionIds = [];\n committedState = initialCommittedState;\n currentStateIndex = 0;\n computedStates = [];\n break;\n }\n case COMMIT: {\n commitChanges();\n break;\n }\n case ROLLBACK: {\n // Forget about any staged actions.\n // Start again from the last committed state.\n actionsById = { 0: liftAction(INIT_ACTION) };\n nextActionId = 1;\n stagedActionIds = [0];\n skippedActionIds = [];\n currentStateIndex = 0;\n computedStates = [];\n break;\n }\n case TOGGLE_ACTION: {\n // Toggle whether an action with given ID is skipped.\n // Being skipped means it is a no-op during the computation.\n const { id: actionId } = liftedAction;\n const index = skippedActionIds.indexOf(actionId);\n if (index === -1) {\n skippedActionIds = [actionId, ...skippedActionIds];\n }\n else {\n skippedActionIds = skippedActionIds.filter((id) => id !== actionId);\n }\n // Optimization: we know history before this action hasn't changed\n minInvalidatedStateIndex = stagedActionIds.indexOf(actionId);\n break;\n }\n case SET_ACTIONS_ACTIVE: {\n // Toggle whether an action with given ID is skipped.\n // Being skipped means it is a no-op during the computation.\n const { start, end, active } = liftedAction;\n const actionIds = [];\n for (let i = start; i < end; i++)\n actionIds.push(i);\n if (active) {\n skippedActionIds = difference(skippedActionIds, actionIds);\n }\n else {\n skippedActionIds = [...skippedActionIds, ...actionIds];\n }\n // Optimization: we know history before this action hasn't changed\n minInvalidatedStateIndex = stagedActionIds.indexOf(start);\n break;\n }\n case JUMP_TO_STATE: {\n // Without recomputing anything, move the pointer that tell us\n // which state is considered the current one. Useful for sliders.\n currentStateIndex = liftedAction.index;\n // Optimization: we know the history has not changed.\n minInvalidatedStateIndex = Infinity;\n break;\n }\n case JUMP_TO_ACTION: {\n // Jumps to a corresponding state to a specific action.\n // Useful when filtering actions.\n const index = stagedActionIds.indexOf(liftedAction.actionId);\n if (index !== -1)\n currentStateIndex = index;\n minInvalidatedStateIndex = Infinity;\n break;\n }\n case SWEEP: {\n // Forget any actions that are currently being skipped.\n stagedActionIds = difference(stagedActionIds, skippedActionIds);\n skippedActionIds = [];\n currentStateIndex = Math.min(currentStateIndex, stagedActionIds.length - 1);\n break;\n }\n case PERFORM_ACTION: {\n // Ignore action and return state as is if recording is locked\n if (isLocked) {\n return liftedState || initialLiftedState;\n }\n if (isPaused ||\n (liftedState &&\n isActionFiltered(liftedState.computedStates[currentStateIndex], liftedAction, options.predicate, options.actionsSafelist, options.actionsBlocklist))) {\n // If recording is paused or if the action should be ignored, overwrite the last state\n // (corresponds to the pause action) and keep everything else as is.\n // This way, the app gets the new current state while the devtools\n // do not record another action.\n const lastState = computedStates[computedStates.length - 1];\n computedStates = [\n ...computedStates.slice(0, -1),\n computeNextEntry(reducer, liftedAction.action, lastState.state, lastState.error, errorHandler),\n ];\n minInvalidatedStateIndex = Infinity;\n break;\n }\n // Auto-commit as new actions come in.\n if (options.maxAge && stagedActionIds.length === options.maxAge) {\n commitExcessActions(1);\n }\n if (currentStateIndex === stagedActionIds.length - 1) {\n currentStateIndex++;\n }\n const actionId = nextActionId++;\n // Mutation! This is the hottest path, and we optimize on purpose.\n // It is safe because we set a new key in a cache dictionary.\n actionsById[actionId] = liftedAction;\n stagedActionIds = [...stagedActionIds, actionId];\n // Optimization: we know that only the new action needs computing.\n minInvalidatedStateIndex = stagedActionIds.length - 1;\n break;\n }\n case IMPORT_STATE: {\n // Completely replace everything.\n ({\n monitorState,\n actionsById,\n nextActionId,\n stagedActionIds,\n skippedActionIds,\n committedState,\n currentStateIndex,\n computedStates,\n isLocked,\n isPaused,\n } = liftedAction.nextLiftedState);\n break;\n }\n case INIT: {\n // Always recompute states on hot reload and init.\n minInvalidatedStateIndex = 0;\n if (options.maxAge && stagedActionIds.length > options.maxAge) {\n // States must be recomputed before committing excess.\n computedStates = recomputeStates(computedStates, minInvalidatedStateIndex, reducer, committedState, actionsById, stagedActionIds, skippedActionIds, errorHandler, isPaused);\n commitExcessActions(stagedActionIds.length - options.maxAge);\n // Avoid double computation.\n minInvalidatedStateIndex = Infinity;\n }\n break;\n }\n case UPDATE: {\n const stateHasErrors = computedStates.filter((state) => state.error).length > 0;\n if (stateHasErrors) {\n // Recompute all states\n minInvalidatedStateIndex = 0;\n if (options.maxAge && stagedActionIds.length > options.maxAge) {\n // States must be recomputed before committing excess.\n computedStates = recomputeStates(computedStates, minInvalidatedStateIndex, reducer, committedState, actionsById, stagedActionIds, skippedActionIds, errorHandler, isPaused);\n commitExcessActions(stagedActionIds.length - options.maxAge);\n // Avoid double computation.\n minInvalidatedStateIndex = Infinity;\n }\n }\n else {\n // If not paused/locked, add a new action to signal devtools-user\n // that there was a reducer update.\n if (!isPaused && !isLocked) {\n if (currentStateIndex === stagedActionIds.length - 1) {\n currentStateIndex++;\n }\n // Add a new action to only recompute state\n const actionId = nextActionId++;\n actionsById[actionId] = new PerformAction(liftedAction, +Date.now());\n stagedActionIds = [...stagedActionIds, actionId];\n minInvalidatedStateIndex = stagedActionIds.length - 1;\n computedStates = recomputeStates(computedStates, minInvalidatedStateIndex, reducer, committedState, actionsById, stagedActionIds, skippedActionIds, errorHandler, isPaused);\n }\n // Recompute state history with latest reducer and update action\n computedStates = computedStates.map((cmp) => ({\n ...cmp,\n state: reducer(cmp.state, RECOMPUTE_ACTION),\n }));\n currentStateIndex = stagedActionIds.length - 1;\n if (options.maxAge && stagedActionIds.length > options.maxAge) {\n commitExcessActions(stagedActionIds.length - options.maxAge);\n }\n // Avoid double computation.\n minInvalidatedStateIndex = Infinity;\n }\n break;\n }\n default: {\n // If the action is not recognized, it's a monitor action.\n // Optimization: a monitor action can't change history.\n minInvalidatedStateIndex = Infinity;\n break;\n }\n }\n computedStates = recomputeStates(computedStates, minInvalidatedStateIndex, reducer, committedState, actionsById, stagedActionIds, skippedActionIds, errorHandler, isPaused);\n monitorState = monitorReducer(monitorState, liftedAction);\n return {\n monitorState,\n actionsById,\n nextActionId,\n stagedActionIds,\n skippedActionIds,\n committedState,\n currentStateIndex,\n computedStates,\n isLocked,\n isPaused,\n };\n };\n}\n\nclass DevtoolsDispatcher extends ActionsSubject {\n}\n/** @nocollapse */ DevtoolsDispatcher.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: DevtoolsDispatcher, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ DevtoolsDispatcher.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: DevtoolsDispatcher });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: DevtoolsDispatcher, decorators: [{\n type: Injectable\n }] });\n\nconst ExtensionActionTypes = {\n START: 'START',\n DISPATCH: 'DISPATCH',\n STOP: 'STOP',\n ACTION: 'ACTION',\n};\nconst REDUX_DEVTOOLS_EXTENSION = new InjectionToken('@ngrx/store-devtools Redux Devtools Extension');\nclass DevtoolsExtension {\n constructor(devtoolsExtension, config, dispatcher) {\n this.config = config;\n this.dispatcher = dispatcher;\n this.devtoolsExtension = devtoolsExtension;\n this.createActionStreams();\n }\n notify(action, state) {\n if (!this.devtoolsExtension) {\n return;\n }\n // Check to see if the action requires a full update of the liftedState.\n // If it is a simple action generated by the user's app and the recording\n // is not locked/paused, only send the action and the current state (fast).\n //\n // A full liftedState update (slow: serializes the entire liftedState) is\n // only required when:\n // a) redux-devtools-extension fires the @@Init action (ignored by\n // @ngrx/store-devtools)\n // b) an action is generated by an @ngrx module (e.g. @ngrx/effects/init\n // or @ngrx/store/update-reducers)\n // c) the state has been recomputed due to time-traveling\n // d) any action that is not a PerformAction to err on the side of\n // caution.\n if (action.type === PERFORM_ACTION) {\n if (state.isLocked || state.isPaused) {\n return;\n }\n const currentState = unliftState(state);\n if (shouldFilterActions(this.config) &&\n isActionFiltered(currentState, action, this.config.predicate, this.config.actionsSafelist, this.config.actionsBlocklist)) {\n return;\n }\n const sanitizedState = this.config.stateSanitizer\n ? sanitizeState(this.config.stateSanitizer, currentState, state.currentStateIndex)\n : currentState;\n const sanitizedAction = this.config.actionSanitizer\n ? sanitizeAction(this.config.actionSanitizer, action, state.nextActionId)\n : action;\n this.sendToReduxDevtools(() => this.extensionConnection.send(sanitizedAction, sanitizedState));\n }\n else {\n // Requires full state update\n const sanitizedLiftedState = {\n ...state,\n stagedActionIds: state.stagedActionIds,\n actionsById: this.config.actionSanitizer\n ? sanitizeActions(this.config.actionSanitizer, state.actionsById)\n : state.actionsById,\n computedStates: this.config.stateSanitizer\n ? sanitizeStates(this.config.stateSanitizer, state.computedStates)\n : state.computedStates,\n };\n this.sendToReduxDevtools(() => this.devtoolsExtension.send(null, sanitizedLiftedState, this.getExtensionConfig(this.config)));\n }\n }\n createChangesObservable() {\n if (!this.devtoolsExtension) {\n return EMPTY;\n }\n return new Observable((subscriber) => {\n const connection = this.devtoolsExtension.connect(this.getExtensionConfig(this.config));\n this.extensionConnection = connection;\n connection.init();\n connection.subscribe((change) => subscriber.next(change));\n return connection.unsubscribe;\n });\n }\n createActionStreams() {\n // Listens to all changes\n const changes$ = this.createChangesObservable().pipe(share());\n // Listen for the start action\n const start$ = changes$.pipe(filter((change) => change.type === ExtensionActionTypes.START));\n // Listen for the stop action\n const stop$ = changes$.pipe(filter((change) => change.type === ExtensionActionTypes.STOP));\n // Listen for lifted actions\n const liftedActions$ = changes$.pipe(filter((change) => change.type === ExtensionActionTypes.DISPATCH), map((change) => this.unwrapAction(change.payload)), concatMap((action) => {\n if (action.type === IMPORT_STATE) {\n // State imports may happen in two situations:\n // 1. Explicitly by user\n // 2. User activated the \"persist state accross reloads\" option\n // and now the state is imported during reload.\n // Because of option 2, we need to give possible\n // lazy loaded reducers time to instantiate.\n // As soon as there is no UPDATE action within 1 second,\n // it is assumed that all reducers are loaded.\n return this.dispatcher.pipe(filter((action) => action.type === UPDATE), timeout(1000), debounceTime(1000), map(() => action), catchError(() => of(action)), take(1));\n }\n else {\n return of(action);\n }\n }));\n // Listen for unlifted actions\n const actions$ = changes$.pipe(filter((change) => change.type === ExtensionActionTypes.ACTION), map((change) => this.unwrapAction(change.payload)));\n const actionsUntilStop$ = actions$.pipe(takeUntil(stop$));\n const liftedUntilStop$ = liftedActions$.pipe(takeUntil(stop$));\n this.start$ = start$.pipe(takeUntil(stop$));\n // Only take the action sources between the start/stop events\n this.actions$ = this.start$.pipe(switchMap(() => actionsUntilStop$));\n this.liftedActions$ = this.start$.pipe(switchMap(() => liftedUntilStop$));\n }\n unwrapAction(action) {\n return typeof action === 'string' ? eval(`(${action})`) : action;\n }\n getExtensionConfig(config) {\n const extensionOptions = {\n name: config.name,\n features: config.features,\n serialize: config.serialize,\n autoPause: config.autoPause ?? false,\n // The action/state sanitizers are not added to the config\n // because sanitation is done in this class already.\n // It is done before sending it to the devtools extension for consistency:\n // - If we call extensionConnection.send(...),\n // the extension would call the sanitizers.\n // - If we call devtoolsExtension.send(...) (aka full state update),\n // the extension would NOT call the sanitizers, so we have to do it ourselves.\n };\n if (config.maxAge !== false /* support === 0 */) {\n extensionOptions.maxAge = config.maxAge;\n }\n return extensionOptions;\n }\n sendToReduxDevtools(send) {\n try {\n send();\n }\n catch (err) {\n console.warn('@ngrx/store-devtools: something went wrong inside the redux devtools', err);\n }\n }\n}\n/** @nocollapse */ DevtoolsExtension.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: DevtoolsExtension, deps: [{ token: REDUX_DEVTOOLS_EXTENSION }, { token: STORE_DEVTOOLS_CONFIG }, { token: DevtoolsDispatcher }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ DevtoolsExtension.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: DevtoolsExtension });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: DevtoolsExtension, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [REDUX_DEVTOOLS_EXTENSION]\n }] }, { type: StoreDevtoolsConfig, decorators: [{\n type: Inject,\n args: [STORE_DEVTOOLS_CONFIG]\n }] }, { type: DevtoolsDispatcher }]; } });\n\nclass StoreDevtools {\n constructor(dispatcher, actions$, reducers$, extension, scannedActions, errorHandler, initialState, config) {\n const liftedInitialState = liftInitialState(initialState, config.monitor);\n const liftReducer = liftReducerWith(initialState, liftedInitialState, errorHandler, config.monitor, config);\n const liftedAction$ = merge(merge(actions$.asObservable().pipe(skip(1)), extension.actions$).pipe(map(liftAction)), dispatcher, extension.liftedActions$).pipe(observeOn(queueScheduler));\n const liftedReducer$ = reducers$.pipe(map(liftReducer));\n const liftedStateSubject = new ReplaySubject(1);\n const liftedStateSubscription = liftedAction$\n .pipe(withLatestFrom(liftedReducer$), scan(({ state: liftedState }, [action, reducer]) => {\n let reducedLiftedState = reducer(liftedState, action);\n // On full state update\n // If we have actions filters, we must filter completely our lifted state to be sync with the extension\n if (action.type !== PERFORM_ACTION && shouldFilterActions(config)) {\n reducedLiftedState = filterLiftedState(reducedLiftedState, config.predicate, config.actionsSafelist, config.actionsBlocklist);\n }\n // Extension should be sent the sanitized lifted state\n extension.notify(action, reducedLiftedState);\n return { state: reducedLiftedState, action };\n }, { state: liftedInitialState, action: null }))\n .subscribe(({ state, action }) => {\n liftedStateSubject.next(state);\n if (action.type === PERFORM_ACTION) {\n const unliftedAction = action.action;\n scannedActions.next(unliftedAction);\n }\n });\n const extensionStartSubscription = extension.start$.subscribe(() => {\n this.refresh();\n });\n const liftedState$ = liftedStateSubject.asObservable();\n const state$ = liftedState$.pipe(map(unliftState));\n this.extensionStartSubscription = extensionStartSubscription;\n this.stateSubscription = liftedStateSubscription;\n this.dispatcher = dispatcher;\n this.liftedState = liftedState$;\n this.state = state$;\n }\n dispatch(action) {\n this.dispatcher.next(action);\n }\n next(action) {\n this.dispatcher.next(action);\n }\n error(error) { }\n complete() { }\n performAction(action) {\n this.dispatch(new PerformAction(action, +Date.now()));\n }\n refresh() {\n this.dispatch(new Refresh());\n }\n reset() {\n this.dispatch(new Reset(+Date.now()));\n }\n rollback() {\n this.dispatch(new Rollback(+Date.now()));\n }\n commit() {\n this.dispatch(new Commit(+Date.now()));\n }\n sweep() {\n this.dispatch(new Sweep());\n }\n toggleAction(id) {\n this.dispatch(new ToggleAction(id));\n }\n jumpToAction(actionId) {\n this.dispatch(new JumpToAction(actionId));\n }\n jumpToState(index) {\n this.dispatch(new JumpToState(index));\n }\n importState(nextLiftedState) {\n this.dispatch(new ImportState(nextLiftedState));\n }\n lockChanges(status) {\n this.dispatch(new LockChanges(status));\n }\n pauseRecording(status) {\n this.dispatch(new PauseRecording(status));\n }\n}\n/** @nocollapse */ StoreDevtools.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreDevtools, deps: [{ token: DevtoolsDispatcher }, { token: i2.ActionsSubject }, { token: i2.ReducerObservable }, { token: DevtoolsExtension }, { token: i2.ScannedActionsSubject }, { token: i0.ErrorHandler }, { token: INITIAL_STATE }, { token: STORE_DEVTOOLS_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ StoreDevtools.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreDevtools });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreDevtools, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: DevtoolsDispatcher }, { type: i2.ActionsSubject }, { type: i2.ReducerObservable }, { type: DevtoolsExtension }, { type: i2.ScannedActionsSubject }, { type: i0.ErrorHandler }, { type: undefined, decorators: [{\n type: Inject,\n args: [INITIAL_STATE]\n }] }, { type: StoreDevtoolsConfig, decorators: [{\n type: Inject,\n args: [STORE_DEVTOOLS_CONFIG]\n }] }]; } });\n\nconst IS_EXTENSION_OR_MONITOR_PRESENT = new InjectionToken('@ngrx/store-devtools Is Devtools Extension or Monitor Present');\nfunction createIsExtensionOrMonitorPresent(extension, config) {\n return Boolean(extension) || config.monitor !== noMonitor;\n}\nfunction createReduxDevtoolsExtension() {\n const extensionKey = '__REDUX_DEVTOOLS_EXTENSION__';\n if (typeof window === 'object' &&\n typeof window[extensionKey] !== 'undefined') {\n return window[extensionKey];\n }\n else {\n return null;\n }\n}\nfunction createStateObservable(devtools) {\n return devtools.state;\n}\nclass StoreDevtoolsModule {\n static instrument(options = {}) {\n return {\n ngModule: StoreDevtoolsModule,\n providers: [\n DevtoolsExtension,\n DevtoolsDispatcher,\n StoreDevtools,\n {\n provide: INITIAL_OPTIONS,\n useValue: options,\n },\n {\n provide: IS_EXTENSION_OR_MONITOR_PRESENT,\n deps: [REDUX_DEVTOOLS_EXTENSION, STORE_DEVTOOLS_CONFIG],\n useFactory: createIsExtensionOrMonitorPresent,\n },\n {\n provide: REDUX_DEVTOOLS_EXTENSION,\n useFactory: createReduxDevtoolsExtension,\n },\n {\n provide: STORE_DEVTOOLS_CONFIG,\n deps: [INITIAL_OPTIONS],\n useFactory: createConfig,\n },\n {\n provide: StateObservable,\n deps: [StoreDevtools],\n useFactory: createStateObservable,\n },\n {\n provide: ReducerManagerDispatcher,\n useExisting: DevtoolsDispatcher,\n },\n ],\n };\n }\n}\n/** @nocollapse */ StoreDevtoolsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ StoreDevtoolsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreDevtoolsModule });\n/** @nocollapse */ StoreDevtoolsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreDevtoolsModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreDevtoolsModule, decorators: [{\n type: NgModule,\n args: [{}]\n }] });\n\n/**\n * DO NOT EDIT\n *\n * This file is automatically generated at build\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { INITIAL_OPTIONS, RECOMPUTE, REDUX_DEVTOOLS_EXTENSION, StoreDevtools, StoreDevtoolsConfig, StoreDevtoolsModule };\n","import * as i0 from '@angular/core';\nimport { Injectable, InjectionToken, Inject, isDevMode, NgModule, Optional, SkipSelf, Injector } from '@angular/core';\nimport { BehaviorSubject, Observable, Subject, queueScheduler } from 'rxjs';\nimport { observeOn, withLatestFrom, scan, pluck, map, distinctUntilChanged } from 'rxjs/operators';\n\nconst REGISTERED_ACTION_TYPES = {};\nfunction resetRegisteredActionTypes() {\n for (const key of Object.keys(REGISTERED_ACTION_TYPES)) {\n delete REGISTERED_ACTION_TYPES[key];\n }\n}\n\n/**\n * @description\n * Creates a configured `Creator` function that, when called, returns an object in the shape of the `Action` interface.\n *\n * Action creators reduce the explicitness of class-based action creators.\n *\n * @param type Describes the action that will be dispatched\n * @param config Additional metadata needed for the handling of the action. See {@link createAction#usage-notes Usage Notes}.\n *\n * @usageNotes\n *\n * **Declaring an action creator**\n *\n * Without additional metadata:\n * ```ts\n * export const increment = createAction('[Counter] Increment');\n * ```\n * With additional metadata:\n * ```ts\n * export const loginSuccess = createAction(\n * '[Auth/API] Login Success',\n * props<{ user: User }>()\n * );\n * ```\n * With a function:\n * ```ts\n * export const loginSuccess = createAction(\n * '[Auth/API] Login Success',\n * (response: Response) => response.user\n * );\n * ```\n *\n * **Dispatching an action**\n *\n * Without additional metadata:\n * ```ts\n * store.dispatch(increment());\n * ```\n * With additional metadata:\n * ```ts\n * store.dispatch(loginSuccess({ user: newUser }));\n * ```\n *\n * **Referencing an action in a reducer**\n *\n * Using a switch statement:\n * ```ts\n * switch (action.type) {\n * // ...\n * case AuthApiActions.loginSuccess.type: {\n * return {\n * ...state,\n * user: action.user\n * };\n * }\n * }\n * ```\n * Using a reducer creator:\n * ```ts\n * on(AuthApiActions.loginSuccess, (state, { user }) => ({ ...state, user }))\n * ```\n *\n * **Referencing an action in an effect**\n * ```ts\n * effectName$ = createEffect(\n * () => this.actions$.pipe(\n * ofType(AuthApiActions.loginSuccess),\n * // ...\n * )\n * );\n * ```\n */\nfunction createAction(type, config) {\n REGISTERED_ACTION_TYPES[type] = (REGISTERED_ACTION_TYPES[type] || 0) + 1;\n if (typeof config === 'function') {\n return defineType(type, (...args) => ({\n ...config(...args),\n type,\n }));\n }\n const as = config ? config._as : 'empty';\n switch (as) {\n case 'empty':\n return defineType(type, () => ({ type }));\n case 'props':\n return defineType(type, (props) => ({\n ...props,\n type,\n }));\n default:\n throw new Error('Unexpected config.');\n }\n}\nfunction props() {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return { _as: 'props', _p: undefined };\n}\nfunction union(creators) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return undefined;\n}\nfunction defineType(type, creator) {\n return Object.defineProperty(creator, 'type', {\n value: type,\n writable: false,\n });\n}\n\nfunction capitalize(text) {\n return (text.charAt(0).toUpperCase() + text.substring(1));\n}\n\n/**\n * @description\n * A function that creates a group of action creators with the same source.\n *\n * @param config An object that contains a source and dictionary of events.\n * An event is a key-value pair of an event name and event props.\n * @returns A dictionary of action creators.\n * The name of each action creator is created by camel casing the event name.\n * The type of each action is created using the \"[Source] Event Name\" pattern.\n *\n * @usageNotes\n *\n * ```ts\n * const authApiActions = createActionGroup({\n * source: 'Auth API',\n * events: {\n * // defining events with payload using the `props` function\n * 'Login Success': props<{ userId: number; token: string }>(),\n * 'Login Failure': props<{ error: string }>(),\n *\n * // defining an event without payload using the `emptyProps` function\n * 'Logout Success': emptyProps(),\n *\n * // defining an event with payload using the props factory\n * 'Logout Failure': (error: Error) => ({ error }),\n * },\n * });\n *\n * // action type: \"[Auth API] Login Success\"\n * authApiActions.loginSuccess({ userId: 10, token: 'ngrx' });\n *\n * // action type: \"[Auth API] Login Failure\"\n * authApiActions.loginFailure({ error: 'Login Failure!' });\n *\n * // action type: \"[Auth API] Logout Success\"\n * authApiActions.logoutSuccess();\n *\n * // action type: \"[Auth API] Logout Failure\";\n * authApiActions.logoutFailure(new Error('Logout Failure!'));\n * ```\n */\nfunction createActionGroup(config) {\n const { source, events } = config;\n return Object.keys(events).reduce((actionGroup, eventName) => ({\n ...actionGroup,\n [toActionName(eventName)]: createAction(toActionType(source, eventName), events[eventName]),\n }), {});\n}\nfunction emptyProps() {\n return props();\n}\nfunction toActionName(eventName) {\n return eventName\n .trim()\n .toLowerCase()\n .split(' ')\n .map((word, i) => (i === 0 ? word : capitalize(word)))\n .join('');\n}\nfunction toActionType(source, eventName) {\n return `[${source}] ${eventName}`;\n}\n\nconst INIT = '@ngrx/store/init';\nclass ActionsSubject extends BehaviorSubject {\n constructor() {\n super({ type: INIT });\n }\n next(action) {\n if (typeof action === 'function') {\n throw new TypeError(`\n Dispatch expected an object, instead it received a function.\n If you're using the createAction function, make sure to invoke the function\n before dispatching the action. For example, someAction should be someAction().`);\n }\n else if (typeof action === 'undefined') {\n throw new TypeError(`Actions must be objects`);\n }\n else if (typeof action.type === 'undefined') {\n throw new TypeError(`Actions must have a type property`);\n }\n super.next(action);\n }\n complete() {\n /* noop */\n }\n ngOnDestroy() {\n super.complete();\n }\n}\n/** @nocollapse */ ActionsSubject.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: ActionsSubject, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ ActionsSubject.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: ActionsSubject });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: ActionsSubject, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return []; } });\nconst ACTIONS_SUBJECT_PROVIDERS = [ActionsSubject];\n\nconst _ROOT_STORE_GUARD = new InjectionToken('@ngrx/store Internal Root Guard');\nconst _INITIAL_STATE = new InjectionToken('@ngrx/store Internal Initial State');\nconst INITIAL_STATE = new InjectionToken('@ngrx/store Initial State');\nconst REDUCER_FACTORY = new InjectionToken('@ngrx/store Reducer Factory');\nconst _REDUCER_FACTORY = new InjectionToken('@ngrx/store Internal Reducer Factory Provider');\nconst INITIAL_REDUCERS = new InjectionToken('@ngrx/store Initial Reducers');\nconst _INITIAL_REDUCERS = new InjectionToken('@ngrx/store Internal Initial Reducers');\nconst STORE_FEATURES = new InjectionToken('@ngrx/store Store Features');\nconst _STORE_REDUCERS = new InjectionToken('@ngrx/store Internal Store Reducers');\nconst _FEATURE_REDUCERS = new InjectionToken('@ngrx/store Internal Feature Reducers');\nconst _FEATURE_CONFIGS = new InjectionToken('@ngrx/store Internal Feature Configs');\nconst _STORE_FEATURES = new InjectionToken('@ngrx/store Internal Store Features');\nconst _FEATURE_REDUCERS_TOKEN = new InjectionToken('@ngrx/store Internal Feature Reducers Token');\nconst FEATURE_REDUCERS = new InjectionToken('@ngrx/store Feature Reducers');\n/**\n * User-defined meta reducers from StoreModule.forRoot()\n */\nconst USER_PROVIDED_META_REDUCERS = new InjectionToken('@ngrx/store User Provided Meta Reducers');\n/**\n * Meta reducers defined either internally by @ngrx/store or by library authors\n */\nconst META_REDUCERS = new InjectionToken('@ngrx/store Meta Reducers');\n/**\n * Concats the user provided meta reducers and the meta reducers provided on the multi\n * injection token\n */\nconst _RESOLVED_META_REDUCERS = new InjectionToken('@ngrx/store Internal Resolved Meta Reducers');\n/**\n * Runtime checks defined by the user via an InjectionToken\n * Defaults to `_USER_RUNTIME_CHECKS`\n */\nconst USER_RUNTIME_CHECKS = new InjectionToken('@ngrx/store User Runtime Checks Config');\n/**\n * Runtime checks defined by the user via forRoot()\n */\nconst _USER_RUNTIME_CHECKS = new InjectionToken('@ngrx/store Internal User Runtime Checks Config');\n/**\n * Runtime checks currently in use\n */\nconst ACTIVE_RUNTIME_CHECKS = new InjectionToken('@ngrx/store Internal Runtime Checks');\nconst _ACTION_TYPE_UNIQUENESS_CHECK = new InjectionToken('@ngrx/store Check if Action types are unique');\n\n/**\n * @description\n * Combines reducers for individual features into a single reducer.\n *\n * You can use this function to delegate handling of state transitions to multiple reducers, each acting on their\n * own sub-state within the root state.\n *\n * @param reducers An object mapping keys of the root state to their corresponding feature reducer.\n * @param initialState Provides a state value if the current state is `undefined`, as it is initially.\n * @returns A reducer function.\n *\n * @usageNotes\n *\n * **Example combining two feature reducers into one \"root\" reducer**\n *\n * ```ts\n * export const reducer = combineReducers({\n * featureA: featureAReducer,\n * featureB: featureBReducer\n * });\n * ```\n *\n * You can also override the initial states of the sub-features:\n * ```ts\n * export const reducer = combineReducers({\n * featureA: featureAReducer,\n * featureB: featureBReducer\n * }, {\n * featureA: { counterA: 13 },\n * featureB: { counterB: 37 }\n * });\n * ```\n */\nfunction combineReducers(reducers, initialState = {}) {\n const reducerKeys = Object.keys(reducers);\n const finalReducers = {};\n for (let i = 0; i < reducerKeys.length; i++) {\n const key = reducerKeys[i];\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n const finalReducerKeys = Object.keys(finalReducers);\n return function combination(state, action) {\n state = state === undefined ? initialState : state;\n let hasChanged = false;\n const nextState = {};\n for (let i = 0; i < finalReducerKeys.length; i++) {\n const key = finalReducerKeys[i];\n const reducer = finalReducers[key];\n const previousStateForKey = state[key];\n const nextStateForKey = reducer(previousStateForKey, action);\n nextState[key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n return hasChanged ? nextState : state;\n };\n}\nfunction omit(object, keyToRemove) {\n return Object.keys(object)\n .filter((key) => key !== keyToRemove)\n .reduce((result, key) => Object.assign(result, { [key]: object[key] }), {});\n}\nfunction compose(...functions) {\n return function (arg) {\n if (functions.length === 0) {\n return arg;\n }\n const last = functions[functions.length - 1];\n const rest = functions.slice(0, -1);\n return rest.reduceRight((composed, fn) => fn(composed), last(arg));\n };\n}\nfunction createReducerFactory(reducerFactory, metaReducers) {\n if (Array.isArray(metaReducers) && metaReducers.length > 0) {\n reducerFactory = compose.apply(null, [\n ...metaReducers,\n reducerFactory,\n ]);\n }\n return (reducers, initialState) => {\n const reducer = reducerFactory(reducers);\n return (state, action) => {\n state = state === undefined ? initialState : state;\n return reducer(state, action);\n };\n };\n}\nfunction createFeatureReducerFactory(metaReducers) {\n const reducerFactory = Array.isArray(metaReducers) && metaReducers.length > 0\n ? compose(...metaReducers)\n : (r) => r;\n return (reducer, initialState) => {\n reducer = reducerFactory(reducer);\n return (state, action) => {\n state = state === undefined ? initialState : state;\n return reducer(state, action);\n };\n };\n}\n\nclass ReducerObservable extends Observable {\n}\nclass ReducerManagerDispatcher extends ActionsSubject {\n}\nconst UPDATE = '@ngrx/store/update-reducers';\nclass ReducerManager extends BehaviorSubject {\n constructor(dispatcher, initialState, reducers, reducerFactory) {\n super(reducerFactory(reducers, initialState));\n this.dispatcher = dispatcher;\n this.initialState = initialState;\n this.reducers = reducers;\n this.reducerFactory = reducerFactory;\n }\n get currentReducers() {\n return this.reducers;\n }\n addFeature(feature) {\n this.addFeatures([feature]);\n }\n addFeatures(features) {\n const reducers = features.reduce((reducerDict, { reducers, reducerFactory, metaReducers, initialState, key }) => {\n const reducer = typeof reducers === 'function'\n ? createFeatureReducerFactory(metaReducers)(reducers, initialState)\n : createReducerFactory(reducerFactory, metaReducers)(reducers, initialState);\n reducerDict[key] = reducer;\n return reducerDict;\n }, {});\n this.addReducers(reducers);\n }\n removeFeature(feature) {\n this.removeFeatures([feature]);\n }\n removeFeatures(features) {\n this.removeReducers(features.map((p) => p.key));\n }\n addReducer(key, reducer) {\n this.addReducers({ [key]: reducer });\n }\n addReducers(reducers) {\n this.reducers = { ...this.reducers, ...reducers };\n this.updateReducers(Object.keys(reducers));\n }\n removeReducer(featureKey) {\n this.removeReducers([featureKey]);\n }\n removeReducers(featureKeys) {\n featureKeys.forEach((key) => {\n this.reducers = omit(this.reducers, key) /*TODO(#823)*/;\n });\n this.updateReducers(featureKeys);\n }\n updateReducers(featureKeys) {\n this.next(this.reducerFactory(this.reducers, this.initialState));\n this.dispatcher.next({\n type: UPDATE,\n features: featureKeys,\n });\n }\n ngOnDestroy() {\n this.complete();\n }\n}\n/** @nocollapse */ ReducerManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: ReducerManager, deps: [{ token: ReducerManagerDispatcher }, { token: INITIAL_STATE }, { token: INITIAL_REDUCERS }, { token: REDUCER_FACTORY }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ ReducerManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: ReducerManager });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: ReducerManager, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: ReducerManagerDispatcher }, { type: undefined, decorators: [{\n type: Inject,\n args: [INITIAL_STATE]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [INITIAL_REDUCERS]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [REDUCER_FACTORY]\n }] }]; } });\nconst REDUCER_MANAGER_PROVIDERS = [\n ReducerManager,\n { provide: ReducerObservable, useExisting: ReducerManager },\n { provide: ReducerManagerDispatcher, useExisting: ActionsSubject },\n];\n\nclass ScannedActionsSubject extends Subject {\n ngOnDestroy() {\n this.complete();\n }\n}\n/** @nocollapse */ ScannedActionsSubject.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: ScannedActionsSubject, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ ScannedActionsSubject.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: ScannedActionsSubject });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: ScannedActionsSubject, decorators: [{\n type: Injectable\n }] });\nconst SCANNED_ACTIONS_SUBJECT_PROVIDERS = [\n ScannedActionsSubject,\n];\n\nclass StateObservable extends Observable {\n}\nclass State extends BehaviorSubject {\n constructor(actions$, reducer$, scannedActions, initialState) {\n super(initialState);\n const actionsOnQueue$ = actions$.pipe(observeOn(queueScheduler));\n const withLatestReducer$ = actionsOnQueue$.pipe(withLatestFrom(reducer$));\n const seed = { state: initialState };\n const stateAndAction$ = withLatestReducer$.pipe(scan(reduceState, seed));\n this.stateSubscription = stateAndAction$.subscribe(({ state, action }) => {\n this.next(state);\n scannedActions.next(action);\n });\n }\n ngOnDestroy() {\n this.stateSubscription.unsubscribe();\n this.complete();\n }\n}\nState.INIT = INIT;\n/** @nocollapse */ State.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: State, deps: [{ token: ActionsSubject }, { token: ReducerObservable }, { token: ScannedActionsSubject }, { token: INITIAL_STATE }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ State.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: State });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: State, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: ActionsSubject }, { type: ReducerObservable }, { type: ScannedActionsSubject }, { type: undefined, decorators: [{\n type: Inject,\n args: [INITIAL_STATE]\n }] }]; } });\nfunction reduceState(stateActionPair = { state: undefined }, [action, reducer]) {\n const { state } = stateActionPair;\n return { state: reducer(state, action), action };\n}\nconst STATE_PROVIDERS = [\n State,\n { provide: StateObservable, useExisting: State },\n];\n\n// disabled because we have lowercase generics for `select`\nclass Store extends Observable {\n constructor(state$, actionsObserver, reducerManager) {\n super();\n this.actionsObserver = actionsObserver;\n this.reducerManager = reducerManager;\n this.source = state$;\n }\n select(pathOrMapFn, ...paths) {\n return select.call(null, pathOrMapFn, ...paths)(this);\n }\n lift(operator) {\n const store = new Store(this, this.actionsObserver, this.reducerManager);\n store.operator = operator;\n return store;\n }\n dispatch(action) {\n this.actionsObserver.next(action);\n }\n next(action) {\n this.actionsObserver.next(action);\n }\n error(err) {\n this.actionsObserver.error(err);\n }\n complete() {\n this.actionsObserver.complete();\n }\n addReducer(key, reducer) {\n this.reducerManager.addReducer(key, reducer);\n }\n removeReducer(key) {\n this.reducerManager.removeReducer(key);\n }\n}\n/** @nocollapse */ Store.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: Store, deps: [{ token: StateObservable }, { token: ActionsSubject }, { token: ReducerManager }], target: i0.ɵɵFactoryTarget.Injectable });\n/** @nocollapse */ Store.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: Store });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: Store, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: StateObservable }, { type: ActionsSubject }, { type: ReducerManager }]; } });\nconst STORE_PROVIDERS = [Store];\nfunction select(pathOrMapFn, propsOrPath, ...paths) {\n return function selectOperator(source$) {\n let mapped$;\n if (typeof pathOrMapFn === 'string') {\n const pathSlices = [propsOrPath, ...paths].filter(Boolean);\n mapped$ = source$.pipe(pluck(pathOrMapFn, ...pathSlices));\n }\n else if (typeof pathOrMapFn === 'function') {\n mapped$ = source$.pipe(map((source) => pathOrMapFn(source, propsOrPath)));\n }\n else {\n throw new TypeError(`Unexpected type '${typeof pathOrMapFn}' in select operator,` +\n ` expected 'string' or 'function'`);\n }\n return mapped$.pipe(distinctUntilChanged());\n };\n}\n\nconst RUNTIME_CHECK_URL = 'https://ngrx.io/guide/store/configuration/runtime-checks';\nfunction isUndefined(target) {\n return target === undefined;\n}\nfunction isNull(target) {\n return target === null;\n}\nfunction isArray(target) {\n return Array.isArray(target);\n}\nfunction isString(target) {\n return typeof target === 'string';\n}\nfunction isBoolean(target) {\n return typeof target === 'boolean';\n}\nfunction isNumber(target) {\n return typeof target === 'number';\n}\nfunction isObjectLike(target) {\n return typeof target === 'object' && target !== null;\n}\nfunction isObject(target) {\n return isObjectLike(target) && !isArray(target);\n}\nfunction isPlainObject(target) {\n if (!isObject(target)) {\n return false;\n }\n const targetPrototype = Object.getPrototypeOf(target);\n return targetPrototype === Object.prototype || targetPrototype === null;\n}\nfunction isFunction(target) {\n return typeof target === 'function';\n}\nfunction isComponent(target) {\n return isFunction(target) && target.hasOwnProperty('ɵcmp');\n}\nfunction hasOwnProperty(target, propertyName) {\n return Object.prototype.hasOwnProperty.call(target, propertyName);\n}\n\nlet _ngrxMockEnvironment = false;\nfunction setNgrxMockEnvironment(value) {\n _ngrxMockEnvironment = value;\n}\nfunction isNgrxMockEnvironment() {\n return _ngrxMockEnvironment;\n}\n\nfunction isEqualCheck(a, b) {\n return a === b;\n}\nfunction isArgumentsChanged(args, lastArguments, comparator) {\n for (let i = 0; i < args.length; i++) {\n if (!comparator(args[i], lastArguments[i])) {\n return true;\n }\n }\n return false;\n}\nfunction resultMemoize(projectionFn, isResultEqual) {\n return defaultMemoize(projectionFn, isEqualCheck, isResultEqual);\n}\nfunction defaultMemoize(projectionFn, isArgumentsEqual = isEqualCheck, isResultEqual = isEqualCheck) {\n let lastArguments = null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, , , , ,\n let lastResult = null;\n let overrideResult;\n function reset() {\n lastArguments = null;\n lastResult = null;\n }\n function setResult(result = undefined) {\n overrideResult = { result };\n }\n function clearResult() {\n overrideResult = undefined;\n }\n /* eslint-disable prefer-rest-params, prefer-spread */\n // disabled because of the use of `arguments`\n function memoized() {\n if (overrideResult !== undefined) {\n return overrideResult.result;\n }\n if (!lastArguments) {\n lastResult = projectionFn.apply(null, arguments);\n lastArguments = arguments;\n return lastResult;\n }\n if (!isArgumentsChanged(arguments, lastArguments, isArgumentsEqual)) {\n return lastResult;\n }\n const newResult = projectionFn.apply(null, arguments);\n lastArguments = arguments;\n if (isResultEqual(lastResult, newResult)) {\n return lastResult;\n }\n lastResult = newResult;\n return newResult;\n }\n return { memoized, reset, setResult, clearResult };\n}\nfunction createSelector(...input) {\n return createSelectorFactory(defaultMemoize)(...input);\n}\nfunction defaultStateFn(state, selectors, props, memoizedProjector) {\n if (props === undefined) {\n const args = selectors.map((fn) => fn(state));\n return memoizedProjector.memoized.apply(null, args);\n }\n const args = selectors.map((fn) => fn(state, props));\n return memoizedProjector.memoized.apply(null, [...args, props]);\n}\n/**\n *\n * @param memoize The function used to memoize selectors\n * @param options Config Object that may include a `stateFn` function defining how to return the selector's value, given the entire `Store`'s state, parent `Selector`s, `Props`, and a `MemoizedProjection`\n *\n * @usageNotes\n *\n * **Creating a Selector Factory Where Array Order Does Not Matter**\n *\n * ```ts\n * function removeMatch(arr: string[], target: string): string[] {\n * const matchIndex = arr.indexOf(target);\n * return [...arr.slice(0, matchIndex), ...arr.slice(matchIndex + 1)];\n * }\n *\n * function orderDoesNotMatterComparer(a: any, b: any): boolean {\n * if (!Array.isArray(a) || !Array.isArray(b)) {\n * return a === b;\n * }\n * if (a.length !== b.length) {\n * return false;\n * }\n * let tempB = [...b];\n * function reduceToDetermineIfArraysContainSameContents(\n * previousCallResult: boolean,\n * arrayMember: any\n * ): boolean {\n * if (previousCallResult === false) {\n * return false;\n * }\n * if (tempB.includes(arrayMember)) {\n * tempB = removeMatch(tempB, arrayMember);\n * return true;\n * }\n * return false;\n * }\n * return a.reduce(reduceToDetermineIfArraysContainSameContents, true);\n * }\n *\n * export const creactOrderDoesNotMatterSelector = createSelectorFactory(\n * (projectionFun) => defaultMemoize(\n * projectionFun,\n * orderDoesNotMatterComparer,\n * orderDoesNotMatterComparer\n * )\n * );\n * ```\n *\n * **Creating an Alternative Memoization Strategy**\n *\n * ```ts\n * function serialize(x: any): string {\n * return JSON.stringify(x);\n * }\n *\n * export const createFullHistorySelector = createSelectorFactory(\n * (projectionFunction) => {\n * const cache = {};\n *\n * function memoized() {\n * const serializedArguments = serialize(...arguments);\n * if (cache[serializedArguments] != null) {\n * cache[serializedArguments] = projectionFunction.apply(null, arguments);\n * }\n * return cache[serializedArguments];\n * }\n * return {\n * memoized,\n * reset: () => {},\n * setResult: () => {},\n * clearResult: () => {},\n * };\n * }\n * );\n * ```\n *\n *\n */\nfunction createSelectorFactory(memoize, options = {\n stateFn: defaultStateFn,\n}) {\n return function (...input) {\n let args = input;\n if (Array.isArray(args[0])) {\n const [head, ...tail] = args;\n args = [...head, ...tail];\n }\n const selectors = args.slice(0, args.length - 1);\n const projector = args[args.length - 1];\n const memoizedSelectors = selectors.filter((selector) => selector.release && typeof selector.release === 'function');\n const memoizedProjector = memoize(function (...selectors) {\n return projector.apply(null, selectors);\n });\n const memoizedState = defaultMemoize(function (state, props) {\n return options.stateFn.apply(null, [\n state,\n selectors,\n props,\n memoizedProjector,\n ]);\n });\n function release() {\n memoizedState.reset();\n memoizedProjector.reset();\n memoizedSelectors.forEach((selector) => selector.release());\n }\n return Object.assign(memoizedState.memoized, {\n release,\n projector: memoizedProjector.memoized,\n setResult: memoizedState.setResult,\n clearResult: memoizedState.clearResult,\n });\n };\n}\nfunction createFeatureSelector(featureName) {\n return createSelector((state) => {\n const featureState = state[featureName];\n if (!isNgrxMockEnvironment() && isDevMode() && !(featureName in state)) {\n console.warn(`@ngrx/store: The feature name \"${featureName}\" does ` +\n 'not exist in the state, therefore createFeatureSelector ' +\n 'cannot access it. Be sure it is imported in a loaded module ' +\n `using StoreModule.forRoot('${featureName}', ...) or ` +\n `StoreModule.forFeature('${featureName}', ...). If the default ` +\n 'state is intended to be undefined, as is the case with router ' +\n 'state, this development-only warning message can be ignored.');\n }\n return featureState;\n }, (featureState) => featureState);\n}\n\n/**\n * @description\n * A function that accepts a feature name and a feature reducer, and creates\n * a feature selector and a selector for each feature state property.\n *\n * @param featureConfig An object that contains a feature name and a feature reducer.\n * @returns An object that contains a feature name, a feature reducer,\n * a feature selector, and a selector for each feature state property.\n *\n * @usageNotes\n *\n * **With Application State**\n *\n * ```ts\n * interface AppState {\n * products: ProductsState;\n * }\n *\n * interface ProductsState {\n * products: Product[];\n * selectedId: string | null;\n * }\n *\n * const initialState: ProductsState = {\n * products: [],\n * selectedId: null,\n * };\n *\n * // AppState is passed as a generic argument\n * const productsFeature = createFeature<AppState>({\n * name: 'products',\n * reducer: createReducer(\n * initialState,\n * on(ProductsApiActions.loadSuccess(state, { products }) => ({\n * ...state,\n * products,\n * }),\n * ),\n * });\n *\n * const {\n * selectProductsState, // type: MemoizedSelector<AppState, ProductsState>\n * selectProducts, // type: MemoizedSelector<AppState, Product[]>\n * selectSelectedId, // type: MemoizedSelector<AppState, string | null>\n * } = productsFeature;\n * ```\n *\n * **Without Application State**\n *\n * ```ts\n * const productsFeature = createFeature({\n * name: 'products',\n * reducer: createReducer(initialState),\n * });\n *\n * const {\n * selectProductsState, // type: MemoizedSelector<Record<string, any>, ProductsState>\n * selectProducts, // type: MemoizedSelector<Record<string, any>, Product[]>\n * selectSelectedId, // type: MemoizedSelector<Record<string, any, string | null>\n * } = productsFeature;\n * ```\n */\nfunction createFeature(featureConfig) {\n const { name, reducer } = featureConfig;\n const featureSelector = createFeatureSelector(name);\n const nestedSelectors = createNestedSelectors(featureSelector, reducer);\n return {\n name,\n reducer,\n [`select${capitalize(name)}State`]: featureSelector,\n ...nestedSelectors,\n };\n}\nfunction createNestedSelectors(featureSelector, reducer) {\n const initialState = getInitialState(reducer);\n const nestedKeys = (isPlainObject(initialState) ? Object.keys(initialState) : []);\n return nestedKeys.reduce((nestedSelectors, nestedKey) => ({\n ...nestedSelectors,\n [`select${capitalize(nestedKey)}`]: createSelector(featureSelector, (parentState) => parentState?.[nestedKey]),\n }), {});\n}\nfunction getInitialState(reducer) {\n return reducer(undefined, { type: '@ngrx/feature/init' });\n}\n\nfunction immutabilityCheckMetaReducer(reducer, checks) {\n return function (state, action) {\n const act = checks.action(action) ? freeze(action) : action;\n const nextState = reducer(state, act);\n return checks.state() ? freeze(nextState) : nextState;\n };\n}\nfunction freeze(target) {\n Object.freeze(target);\n const targetIsFunction = isFunction(target);\n Object.getOwnPropertyNames(target).forEach((prop) => {\n // Ignore Ivy properties, ref: https://github.com/ngrx/platform/issues/2109#issuecomment-582689060\n if (prop.startsWith('ɵ')) {\n return;\n }\n if (hasOwnProperty(target, prop) &&\n (targetIsFunction\n ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments'\n : true)) {\n const propValue = target[prop];\n if ((isObjectLike(propValue) || isFunction(propValue)) &&\n !Object.isFrozen(propValue)) {\n freeze(propValue);\n }\n }\n });\n return target;\n}\n\nfunction serializationCheckMetaReducer(reducer, checks) {\n return function (state, action) {\n if (checks.action(action)) {\n const unserializableAction = getUnserializable(action);\n throwIfUnserializable(unserializableAction, 'action');\n }\n const nextState = reducer(state, action);\n if (checks.state()) {\n const unserializableState = getUnserializable(nextState);\n throwIfUnserializable(unserializableState, 'state');\n }\n return nextState;\n };\n}\nfunction getUnserializable(target, path = []) {\n // Guard against undefined and null, e.g. a reducer that returns undefined\n if ((isUndefined(target) || isNull(target)) && path.length === 0) {\n return {\n path: ['root'],\n value: target,\n };\n }\n const keys = Object.keys(target);\n return keys.reduce((result, key) => {\n if (result) {\n return result;\n }\n const value = target[key];\n // Ignore Ivy components\n if (isComponent(value)) {\n return result;\n }\n if (isUndefined(value) ||\n isNull(value) ||\n isNumber(value) ||\n isBoolean(value) ||\n isString(value) ||\n isArray(value)) {\n return false;\n }\n if (isPlainObject(value)) {\n return getUnserializable(value, [...path, key]);\n }\n return {\n path: [...path, key],\n value,\n };\n }, false);\n}\nfunction throwIfUnserializable(unserializable, context) {\n if (unserializable === false) {\n return;\n }\n const unserializablePath = unserializable.path.join('.');\n const error = new Error(`Detected unserializable ${context} at \"${unserializablePath}\". ${RUNTIME_CHECK_URL}#strict${context}serializability`);\n error.value = unserializable.value;\n error.unserializablePath = unserializablePath;\n throw error;\n}\n\nfunction inNgZoneAssertMetaReducer(reducer, checks) {\n return function (state, action) {\n if (checks.action(action) && !i0.NgZone.isInAngularZone()) {\n throw new Error(`Action '${action.type}' running outside NgZone. ${RUNTIME_CHECK_URL}#strictactionwithinngzone`);\n }\n return reducer(state, action);\n };\n}\n\nfunction createActiveRuntimeChecks(runtimeChecks) {\n if (isDevMode()) {\n return {\n strictStateSerializability: false,\n strictActionSerializability: false,\n strictStateImmutability: true,\n strictActionImmutability: true,\n strictActionWithinNgZone: false,\n strictActionTypeUniqueness: false,\n ...runtimeChecks,\n };\n }\n return {\n strictStateSerializability: false,\n strictActionSerializability: false,\n strictStateImmutability: false,\n strictActionImmutability: false,\n strictActionWithinNgZone: false,\n strictActionTypeUniqueness: false,\n };\n}\nfunction createSerializationCheckMetaReducer({ strictActionSerializability, strictStateSerializability, }) {\n return (reducer) => strictActionSerializability || strictStateSerializability\n ? serializationCheckMetaReducer(reducer, {\n action: (action) => strictActionSerializability && !ignoreNgrxAction(action),\n state: () => strictStateSerializability,\n })\n : reducer;\n}\nfunction createImmutabilityCheckMetaReducer({ strictActionImmutability, strictStateImmutability, }) {\n return (reducer) => strictActionImmutability || strictStateImmutability\n ? immutabilityCheckMetaReducer(reducer, {\n action: (action) => strictActionImmutability && !ignoreNgrxAction(action),\n state: () => strictStateImmutability,\n })\n : reducer;\n}\nfunction ignoreNgrxAction(action) {\n return action.type.startsWith('@ngrx');\n}\nfunction createInNgZoneCheckMetaReducer({ strictActionWithinNgZone, }) {\n return (reducer) => strictActionWithinNgZone\n ? inNgZoneAssertMetaReducer(reducer, {\n action: (action) => strictActionWithinNgZone && !ignoreNgrxAction(action),\n })\n : reducer;\n}\nfunction provideRuntimeChecks(runtimeChecks) {\n return [\n {\n provide: _USER_RUNTIME_CHECKS,\n useValue: runtimeChecks,\n },\n {\n provide: USER_RUNTIME_CHECKS,\n useFactory: _runtimeChecksFactory,\n deps: [_USER_RUNTIME_CHECKS],\n },\n {\n provide: ACTIVE_RUNTIME_CHECKS,\n deps: [USER_RUNTIME_CHECKS],\n useFactory: createActiveRuntimeChecks,\n },\n {\n provide: META_REDUCERS,\n multi: true,\n deps: [ACTIVE_RUNTIME_CHECKS],\n useFactory: createImmutabilityCheckMetaReducer,\n },\n {\n provide: META_REDUCERS,\n multi: true,\n deps: [ACTIVE_RUNTIME_CHECKS],\n useFactory: createSerializationCheckMetaReducer,\n },\n {\n provide: META_REDUCERS,\n multi: true,\n deps: [ACTIVE_RUNTIME_CHECKS],\n useFactory: createInNgZoneCheckMetaReducer,\n },\n ];\n}\nfunction checkForActionTypeUniqueness() {\n return [\n {\n provide: _ACTION_TYPE_UNIQUENESS_CHECK,\n multi: true,\n deps: [ACTIVE_RUNTIME_CHECKS],\n useFactory: _actionTypeUniquenessCheck,\n },\n ];\n}\nfunction _runtimeChecksFactory(runtimeChecks) {\n return runtimeChecks;\n}\nfunction _actionTypeUniquenessCheck(config) {\n if (!config.strictActionTypeUniqueness) {\n return;\n }\n const duplicates = Object.entries(REGISTERED_ACTION_TYPES)\n .filter(([, registrations]) => registrations > 1)\n .map(([type]) => type);\n if (duplicates.length) {\n throw new Error(`Action types are registered more than once, ${duplicates\n .map((type) => `\"${type}\"`)\n .join(', ')}. ${RUNTIME_CHECK_URL}#strictactiontypeuniqueness`);\n }\n}\n\nclass StoreRootModule {\n constructor(actions$, reducer$, scannedActions$, store, guard, actionCheck) { }\n}\n/** @nocollapse */ StoreRootModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreRootModule, deps: [{ token: ActionsSubject }, { token: ReducerObservable }, { token: ScannedActionsSubject }, { token: Store }, { token: _ROOT_STORE_GUARD, optional: true }, { token: _ACTION_TYPE_UNIQUENESS_CHECK, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ StoreRootModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreRootModule });\n/** @nocollapse */ StoreRootModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreRootModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreRootModule, decorators: [{\n type: NgModule,\n args: [{}]\n }], ctorParameters: function () { return [{ type: ActionsSubject }, { type: ReducerObservable }, { type: ScannedActionsSubject }, { type: Store }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [_ROOT_STORE_GUARD]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [_ACTION_TYPE_UNIQUENESS_CHECK]\n }] }]; } });\nclass StoreFeatureModule {\n constructor(features, featureReducers, reducerManager, root, actionCheck) {\n this.features = features;\n this.featureReducers = featureReducers;\n this.reducerManager = reducerManager;\n const feats = features.map((feature, index) => {\n const featureReducerCollection = featureReducers.shift();\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const reducers = featureReducerCollection /*TODO(#823)*/[index];\n return {\n ...feature,\n reducers,\n initialState: _initialStateFactory(feature.initialState),\n };\n });\n reducerManager.addFeatures(feats);\n }\n // eslint-disable-next-line @angular-eslint/contextual-lifecycle\n ngOnDestroy() {\n this.reducerManager.removeFeatures(this.features);\n }\n}\n/** @nocollapse */ StoreFeatureModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreFeatureModule, deps: [{ token: _STORE_FEATURES }, { token: FEATURE_REDUCERS }, { token: ReducerManager }, { token: StoreRootModule }, { token: _ACTION_TYPE_UNIQUENESS_CHECK, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ StoreFeatureModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreFeatureModule });\n/** @nocollapse */ StoreFeatureModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreFeatureModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreFeatureModule, decorators: [{\n type: NgModule,\n args: [{}]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [_STORE_FEATURES]\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [FEATURE_REDUCERS]\n }] }, { type: ReducerManager }, { type: StoreRootModule }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [_ACTION_TYPE_UNIQUENESS_CHECK]\n }] }]; } });\nclass StoreModule {\n static forRoot(reducers, config = {}) {\n return {\n ngModule: StoreRootModule,\n providers: [\n {\n provide: _ROOT_STORE_GUARD,\n useFactory: _provideForRootGuard,\n deps: [[Store, new Optional(), new SkipSelf()]],\n },\n { provide: _INITIAL_STATE, useValue: config.initialState },\n {\n provide: INITIAL_STATE,\n useFactory: _initialStateFactory,\n deps: [_INITIAL_STATE],\n },\n { provide: _INITIAL_REDUCERS, useValue: reducers },\n {\n provide: _STORE_REDUCERS,\n useExisting: reducers instanceof InjectionToken ? reducers : _INITIAL_REDUCERS,\n },\n {\n provide: INITIAL_REDUCERS,\n deps: [Injector, _INITIAL_REDUCERS, [new Inject(_STORE_REDUCERS)]],\n useFactory: _createStoreReducers,\n },\n {\n provide: USER_PROVIDED_META_REDUCERS,\n useValue: config.metaReducers ? config.metaReducers : [],\n },\n {\n provide: _RESOLVED_META_REDUCERS,\n deps: [META_REDUCERS, USER_PROVIDED_META_REDUCERS],\n useFactory: _concatMetaReducers,\n },\n {\n provide: _REDUCER_FACTORY,\n useValue: config.reducerFactory\n ? config.reducerFactory\n : combineReducers,\n },\n {\n provide: REDUCER_FACTORY,\n deps: [_REDUCER_FACTORY, _RESOLVED_META_REDUCERS],\n useFactory: createReducerFactory,\n },\n ACTIONS_SUBJECT_PROVIDERS,\n REDUCER_MANAGER_PROVIDERS,\n SCANNED_ACTIONS_SUBJECT_PROVIDERS,\n STATE_PROVIDERS,\n STORE_PROVIDERS,\n provideRuntimeChecks(config.runtimeChecks),\n checkForActionTypeUniqueness(),\n ],\n };\n }\n static forFeature(featureNameOrSlice, reducers, config = {}) {\n return {\n ngModule: StoreFeatureModule,\n providers: [\n {\n provide: _FEATURE_CONFIGS,\n multi: true,\n useValue: featureNameOrSlice instanceof Object ? {} : config,\n },\n {\n provide: STORE_FEATURES,\n multi: true,\n useValue: {\n key: featureNameOrSlice instanceof Object\n ? featureNameOrSlice.name\n : featureNameOrSlice,\n reducerFactory: !(config instanceof InjectionToken) && config.reducerFactory\n ? config.reducerFactory\n : combineReducers,\n metaReducers: !(config instanceof InjectionToken) && config.metaReducers\n ? config.metaReducers\n : [],\n initialState: !(config instanceof InjectionToken) && config.initialState\n ? config.initialState\n : undefined,\n },\n },\n {\n provide: _STORE_FEATURES,\n deps: [Injector, _FEATURE_CONFIGS, STORE_FEATURES],\n useFactory: _createFeatureStore,\n },\n {\n provide: _FEATURE_REDUCERS,\n multi: true,\n useValue: featureNameOrSlice instanceof Object\n ? featureNameOrSlice.reducer\n : reducers,\n },\n {\n provide: _FEATURE_REDUCERS_TOKEN,\n multi: true,\n useExisting: reducers instanceof InjectionToken ? reducers : _FEATURE_REDUCERS,\n },\n {\n provide: FEATURE_REDUCERS,\n multi: true,\n deps: [\n Injector,\n _FEATURE_REDUCERS,\n [new Inject(_FEATURE_REDUCERS_TOKEN)],\n ],\n useFactory: _createFeatureReducers,\n },\n checkForActionTypeUniqueness(),\n ],\n };\n }\n}\n/** @nocollapse */ StoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n/** @nocollapse */ StoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreModule });\n/** @nocollapse */ StoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreModule });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"14.0.0-rc.1\", ngImport: i0, type: StoreModule, decorators: [{\n type: NgModule,\n args: [{}]\n }] });\nfunction _createStoreReducers(injector, reducers) {\n return reducers instanceof InjectionToken ? injector.get(reducers) : reducers;\n}\nfunction _createFeatureStore(injector, configs, featureStores) {\n return featureStores.map((feat, index) => {\n if (configs[index] instanceof InjectionToken) {\n const conf = injector.get(configs[index]);\n return {\n key: feat.key,\n reducerFactory: conf.reducerFactory\n ? conf.reducerFactory\n : combineReducers,\n metaReducers: conf.metaReducers ? conf.metaReducers : [],\n initialState: conf.initialState,\n };\n }\n return feat;\n });\n}\nfunction _createFeatureReducers(injector, reducerCollection) {\n const reducers = reducerCollection.map((reducer) => {\n return reducer instanceof InjectionToken ? injector.get(reducer) : reducer;\n });\n return reducers;\n}\nfunction _initialStateFactory(initialState) {\n if (typeof initialState === 'function') {\n return initialState();\n }\n return initialState;\n}\nfunction _concatMetaReducers(metaReducers, userProvidedMetaReducers) {\n return metaReducers.concat(userProvidedMetaReducers);\n}\nfunction _provideForRootGuard(store) {\n if (store) {\n throw new TypeError(`StoreModule.forRoot() called twice. Feature modules should use StoreModule.forFeature() instead.`);\n }\n return 'guarded';\n}\n\n/**\n * @description\n * Associates actions with a given state change function.\n * A state change function must be provided as the last parameter.\n *\n * @param args `ActionCreator`'s followed by a state change function.\n *\n * @returns an association of action types with a state change function.\n *\n * @usageNotes\n * ```ts\n * on(AuthApiActions.loginSuccess, (state, { user }) => ({ ...state, user }))\n * ```\n */\nfunction on(...args) {\n // This could be refactored when TS releases the version with this fix:\n // https://github.com/microsoft/TypeScript/pull/41544\n const reducer = args.pop();\n const types = args.map((creator) => creator.type);\n return { reducer, types };\n}\n/**\n * @description\n * Creates a reducer function to handle state transitions.\n *\n * Reducer creators reduce the explicitness of reducer functions with switch statements.\n *\n * @param initialState Provides a state value if the current state is `undefined`, as it is initially.\n * @param ons Associations between actions and state changes.\n * @returns A reducer function.\n *\n * @usageNotes\n *\n * - Must be used with `ActionCreator`'s (returned by `createAction`). Cannot be used with class-based action creators.\n * - The returned `ActionReducer` should additionally be wrapped with another function, if you are using View Engine AOT.\n * In case you are using Ivy (or only JIT View Engine) the extra wrapper function is not required.\n *\n * **Declaring a reducer creator**\n *\n * ```ts\n * export const reducer = createReducer(\n * initialState,\n * on(\n * featureActions.actionOne,\n * featureActions.actionTwo,\n * (state, { updatedValue }) => ({ ...state, prop: updatedValue })\n * ),\n * on(featureActions.actionThree, () => initialState);\n * );\n * ```\n *\n * **Declaring a reducer creator using a wrapper function (Only needed if using View Engine AOT)**\n *\n * ```ts\n * const featureReducer = createReducer(\n * initialState,\n * on(\n * featureActions.actionOne,\n * featureActions.actionTwo,\n * (state, { updatedValue }) => ({ ...state, prop: updatedValue })\n * ),\n * on(featureActions.actionThree, () => initialState);\n * );\n *\n * export function reducer(state: State | undefined, action: Action) {\n * return featureReducer(state, action);\n * }\n * ```\n */\nfunction createReducer(initialState, ...ons) {\n const map = new Map();\n for (const on of ons) {\n for (const type of on.types) {\n const existingReducer = map.get(type);\n if (existingReducer) {\n const newReducer = (state, action) => on.reducer(existingReducer(state, action), action);\n map.set(type, newReducer);\n }\n else {\n map.set(type, on.reducer);\n }\n }\n }\n return function (state = initialState, action) {\n const reducer = map.get(action.type);\n return reducer ? reducer(state, action) : state;\n };\n}\n\n/**\n * DO NOT EDIT\n *\n * This file is automatically generated at build\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ACTIVE_RUNTIME_CHECKS, ActionsSubject, FEATURE_REDUCERS, INIT, INITIAL_REDUCERS, INITIAL_STATE, META_REDUCERS, REDUCER_FACTORY, ReducerManager, ReducerManagerDispatcher, ReducerObservable, STORE_FEATURES, ScannedActionsSubject, State, StateObservable, Store, StoreFeatureModule, StoreModule, StoreRootModule, UPDATE, USER_PROVIDED_META_REDUCERS, USER_RUNTIME_CHECKS, combineReducers, compose, createAction, createActionGroup, createFeature, createFeatureSelector, createReducer, createReducerFactory, createSelector, createSelectorFactory, defaultMemoize, defaultStateFn, emptyProps, isNgrxMockEnvironment, on, props, reduceState, resultMemoize, select, setNgrxMockEnvironment, union };\n","import { map } from './map';\nexport function pluck(...properties) {\n const length = properties.length;\n if (length === 0) {\n throw new Error('list of properties cannot be empty.');\n }\n return map((x) => {\n let currentProp = x;\n for (let i = 0; i < length; i++) {\n const p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]];\n if (typeof p !== 'undefined') {\n currentProp = p;\n }\n else {\n return undefined;\n }\n }\n return currentProp;\n });\n}\n","import * as i0 from '@angular/core';\nimport { Injectable, Optional, Inject, NgModule, InjectionToken } from '@angular/core';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i1 from '@angular/common/http';\nimport { HttpHeaders, HttpParams, HTTP_INTERCEPTORS } from '@angular/common/http';\nimport { Subject, of, from, race, throwError, combineLatest, merge } from 'rxjs';\nimport { filter, tap, debounceTime, delay, switchMap, map, first, catchError, timeout, take, mergeMap } from 'rxjs/operators';\nimport fsha256 from 'fast-sha256';\n\nclass DateTimeProvider {\r\n}\r\nclass SystemDateTimeProvider extends DateTimeProvider {\r\n now() {\r\n return Date.now();\r\n }\r\n new() {\r\n return new Date();\r\n }\r\n}\r\nSystemDateTimeProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: SystemDateTimeProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\r\nSystemDateTimeProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: SystemDateTimeProvider });\r\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: SystemDateTimeProvider, decorators: [{\r\n type: Injectable\r\n }] });\n\n/**\r\n * Additional options that can be passed to tryLogin.\r\n */\r\nclass LoginOptions {\r\n constructor() {\r\n /**\r\n * Set this to true to disable the nonce\r\n * check which is used to avoid\r\n * replay attacks.\r\n * This flag should never be true in\r\n * production environments.\r\n */\r\n this.disableNonceCheck = false;\r\n /**\r\n * Normally, you want to clear your hash fragment after\r\n * the lib read the token(s) so that they are not displayed\r\n * anymore in the url. If not, set this to true. For code flow\r\n * this controls removing query string values.\r\n */\r\n this.preventClearHashAfterLogin = false;\r\n }\r\n}\r\n/**\r\n * Defines the logging interface the OAuthService uses\r\n * internally. Is compatible with the `console` object,\r\n * but you can provide your own implementation as well\r\n * through dependency injection.\r\n */\r\nclass OAuthLogger {\r\n}\r\n/**\r\n * Defines a simple storage that can be used for\r\n * storing the tokens at client side.\r\n * Is compatible to localStorage and sessionStorage,\r\n * but you can also create your own implementations.\r\n */\r\nclass OAuthStorage {\r\n}\r\nclass MemoryStorage {\r\n constructor() {\r\n this.data = new Map();\r\n }\r\n getItem(key) {\r\n return this.data.get(key);\r\n }\r\n removeItem(key) {\r\n this.data.delete(key);\r\n }\r\n setItem(key, data) {\r\n this.data.set(key, data);\r\n }\r\n}\r\nMemoryStorage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: MemoryStorage, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\r\nMemoryStorage.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: MemoryStorage });\r\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: MemoryStorage, decorators: [{\r\n type: Injectable\r\n }] });\r\n/**\r\n * Represents the received tokens, the received state\r\n * and the parsed claims from the id-token.\r\n */\r\nclass ReceivedTokens {\r\n}\n\nclass OAuthEvent {\r\n constructor(type) {\r\n this.type = type;\r\n }\r\n}\r\nclass OAuthSuccessEvent extends OAuthEvent {\r\n constructor(type, info = null) {\r\n super(type);\r\n this.info = info;\r\n }\r\n}\r\nclass OAuthInfoEvent extends OAuthEvent {\r\n constructor(type, info = null) {\r\n super(type);\r\n this.info = info;\r\n }\r\n}\r\nclass OAuthErrorEvent extends OAuthEvent {\r\n constructor(type, reason, params = null) {\r\n super(type);\r\n this.reason = reason;\r\n this.params = params;\r\n }\r\n}\n\n// see: https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_.22Unicode_Problem.22\r\nfunction b64DecodeUnicode(str) {\r\n const base64 = str.replace(/\\-/g, '+').replace(/\\_/g, '/');\r\n return decodeURIComponent(atob(base64)\r\n .split('')\r\n .map(function (c) {\r\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);\r\n })\r\n .join(''));\r\n}\r\nfunction base64UrlEncode(str) {\r\n const base64 = btoa(str);\r\n return base64.replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=/g, '');\r\n}\n\nclass AuthConfig {\r\n constructor(json) {\r\n /**\r\n * The client's id as registered with the auth server\r\n */\r\n this.clientId = '';\r\n /**\r\n * The client's redirectUri as registered with the auth server\r\n */\r\n this.redirectUri = '';\r\n /**\r\n * An optional second redirectUri where the auth server\r\n * redirects the user to after logging out.\r\n */\r\n this.postLogoutRedirectUri = '';\r\n /**\r\n * Defines whether to use 'redirectUri' as a replacement\r\n * of 'postLogoutRedirectUri' if the latter is not set.\r\n */\r\n this.redirectUriAsPostLogoutRedirectUriFallback = true;\r\n /**\r\n * The auth server's endpoint that allows to log\r\n * the user in when using implicit flow.\r\n */\r\n this.loginUrl = '';\r\n /**\r\n * The requested scopes\r\n */\r\n this.scope = 'openid profile';\r\n this.resource = '';\r\n this.rngUrl = '';\r\n /**\r\n * Defines whether to use OpenId Connect during\r\n * implicit flow.\r\n */\r\n this.oidc = true;\r\n /**\r\n * Defines whether to request an access token during\r\n * implicit flow.\r\n */\r\n this.requestAccessToken = true;\r\n this.options = null;\r\n /**\r\n * The issuer's uri.\r\n */\r\n this.issuer = '';\r\n /**\r\n * The logout url.\r\n */\r\n this.logoutUrl = '';\r\n /**\r\n * Defines whether to clear the hash fragment after logging in.\r\n */\r\n this.clearHashAfterLogin = true;\r\n /**\r\n * Url of the token endpoint as defined by OpenId Connect and OAuth 2.\r\n */\r\n this.tokenEndpoint = null;\r\n /**\r\n * Url of the revocation endpoint as defined by OpenId Connect and OAuth 2.\r\n */\r\n this.revocationEndpoint = null;\r\n /**\r\n * Names of known parameters sent out in the TokenResponse. https://tools.ietf.org/html/rfc6749#section-5.1\r\n */\r\n this.customTokenParameters = [];\r\n /**\r\n * Url of the userinfo endpoint as defined by OpenId Connect.\r\n */\r\n this.userinfoEndpoint = null;\r\n this.responseType = '';\r\n /**\r\n * Defines whether additional debug information should\r\n * be shown at the console. Note that in certain browsers\r\n * the verbosity of the console needs to be explicitly set\r\n * to include Debug level messages.\r\n */\r\n this.showDebugInformation = false;\r\n /**\r\n * The redirect uri used when doing silent refresh.\r\n */\r\n this.silentRefreshRedirectUri = '';\r\n this.silentRefreshMessagePrefix = '';\r\n /**\r\n * Set this to true to display the iframe used for\r\n * silent refresh for debugging.\r\n */\r\n this.silentRefreshShowIFrame = false;\r\n /**\r\n * Timeout for silent refresh.\r\n * @internal\r\n * depreacted b/c of typo, see silentRefreshTimeout\r\n */\r\n this.siletRefreshTimeout = 1000 * 20;\r\n /**\r\n * Timeout for silent refresh.\r\n */\r\n this.silentRefreshTimeout = 1000 * 20;\r\n /**\r\n * Some auth servers don't allow using password flow\r\n * w/o a client secret while the standards do not\r\n * demand for it. In this case, you can set a password\r\n * here. As this password is exposed to the public\r\n * it does not bring additional security and is therefore\r\n * as good as using no password.\r\n */\r\n this.dummyClientSecret = null;\r\n /**\r\n * Defines whether https is required.\r\n * The default value is remoteOnly which only allows\r\n * http for localhost, while every other domains need\r\n * to be used with https.\r\n */\r\n this.requireHttps = 'remoteOnly';\r\n /**\r\n * Defines whether every url provided by the discovery\r\n * document has to start with the issuer's url.\r\n */\r\n this.strictDiscoveryDocumentValidation = true;\r\n /**\r\n * JSON Web Key Set (https://tools.ietf.org/html/rfc7517)\r\n * with keys used to validate received id_tokens.\r\n * This is taken out of the disovery document. Can be set manually too.\r\n */\r\n this.jwks = null;\r\n /**\r\n * Map with additional query parameter that are appended to\r\n * the request when initializing implicit flow.\r\n */\r\n this.customQueryParams = null;\r\n this.silentRefreshIFrameName = 'angular-oauth-oidc-silent-refresh-iframe';\r\n /**\r\n * Defines when the token_timeout event should be raised.\r\n * If you set this to the default value 0.75, the event\r\n * is triggered after 75% of the token's life time.\r\n */\r\n this.timeoutFactor = 0.75;\r\n /**\r\n * If true, the lib will try to check whether the user\r\n * is still logged in on a regular basis as described\r\n * in http://openid.net/specs/openid-connect-session-1_0.html#ChangeNotification\r\n */\r\n this.sessionChecksEnabled = false;\r\n /**\r\n * Interval in msec for checking the session\r\n * according to http://openid.net/specs/openid-connect-session-1_0.html#ChangeNotification\r\n */\r\n this.sessionCheckIntervall = 3 * 1000;\r\n /**\r\n * Url for the iframe used for session checks\r\n */\r\n this.sessionCheckIFrameUrl = null;\r\n /**\r\n * Name of the iframe to use for session checks\r\n */\r\n this.sessionCheckIFrameName = 'angular-oauth-oidc-check-session-iframe';\r\n /**\r\n * This property has been introduced to disable at_hash checks\r\n * and is indented for Identity Provider that does not deliver\r\n * an at_hash EVEN THOUGH its recommended by the OIDC specs.\r\n * Of course, when disabling these checks then we are bypassing\r\n * a security check which means we are more vulnerable.\r\n */\r\n this.disableAtHashCheck = false;\r\n /**\r\n * Defines wether to check the subject of a refreshed token after silent refresh.\r\n * Normally, it should be the same as before.\r\n */\r\n this.skipSubjectCheck = false;\r\n this.useIdTokenHintForSilentRefresh = false;\r\n /**\r\n * Defined whether to skip the validation of the issuer in the discovery document.\r\n * Normally, the discovey document's url starts with the url of the issuer.\r\n */\r\n this.skipIssuerCheck = false;\r\n /**\r\n * final state sent to issuer is built as follows:\r\n * state = nonce + nonceStateSeparator + additional state\r\n * Default separator is ';' (encoded %3B).\r\n * In rare cases, this character might be forbidden or inconvenient to use by the issuer so it can be customized.\r\n */\r\n this.nonceStateSeparator = ';';\r\n /**\r\n * Set this to true to use HTTP BASIC auth for AJAX calls\r\n */\r\n this.useHttpBasicAuth = false;\r\n /**\r\n * The interceptors waits this time span if there is no token\r\n */\r\n this.waitForTokenInMsec = 0;\r\n /**\r\n * Code Flow is by defauld used together with PKCI which is also higly recommented.\r\n * You can disbale it here by setting this flag to true.\r\n * https://tools.ietf.org/html/rfc7636#section-1.1\r\n */\r\n this.disablePKCE = false;\r\n /**\r\n * Set this to true to preserve the requested route including query parameters after code flow login.\r\n * This setting enables deep linking for the code flow.\r\n */\r\n this.preserveRequestedRoute = false;\r\n /**\r\n * This property allows you to override the method that is used to open the login url,\r\n * allowing a way for implementations to specify their own method of routing to new\r\n * urls.\r\n */\r\n this.openUri = (uri) => {\r\n location.href = uri;\r\n };\r\n if (json) {\r\n Object.assign(this, json);\r\n }\r\n }\r\n}\n\n/**\r\n * This custom encoder allows charactes like +, % and / to be used in passwords\r\n */\r\nclass WebHttpUrlEncodingCodec {\r\n encodeKey(k) {\r\n return encodeURIComponent(k);\r\n }\r\n encodeValue(v) {\r\n return encodeURIComponent(v);\r\n }\r\n decodeKey(k) {\r\n return decodeURIComponent(k);\r\n }\r\n decodeValue(v) {\r\n return decodeURIComponent(v);\r\n }\r\n}\n\n/**\r\n * Interface for Handlers that are hooked in to\r\n * validate tokens.\r\n */\r\nclass ValidationHandler {\r\n}\r\n/**\r\n * This abstract implementation of ValidationHandler already implements\r\n * the method validateAtHash. However, to make use of it,\r\n * you have to override the method calcHash.\r\n */\r\nclass AbstractValidationHandler {\r\n /**\r\n * Validates the at_hash in an id_token against the received access_token.\r\n */\r\n async validateAtHash(params) {\r\n let hashAlg = this.inferHashAlgorithm(params.idTokenHeader);\r\n let tokenHash = await this.calcHash(params.accessToken, hashAlg); // sha256(accessToken, { asString: true });\r\n let leftMostHalf = tokenHash.substr(0, tokenHash.length / 2);\r\n let atHash = base64UrlEncode(leftMostHalf);\r\n let claimsAtHash = params.idTokenClaims['at_hash'].replace(/=/g, '');\r\n if (atHash !== claimsAtHash) {\r\n console.error('exptected at_hash: ' + atHash);\r\n console.error('actual at_hash: ' + claimsAtHash);\r\n }\r\n return atHash === claimsAtHash;\r\n }\r\n /**\r\n * Infers the name of the hash algorithm to use\r\n * from the alg field of an id_token.\r\n *\r\n * @param jwtHeader the id_token's parsed header\r\n */\r\n inferHashAlgorithm(jwtHeader) {\r\n let alg = jwtHeader['alg'];\r\n if (!alg.match(/^.S[0-9]{3}$/)) {\r\n throw new Error('Algorithm not supported: ' + alg);\r\n }\r\n return 'sha-' + alg.substr(2);\r\n }\r\n}\n\nclass UrlHelperService {\r\n getHashFragmentParams(customHashFragment) {\r\n let hash = customHashFragment || window.location.hash;\r\n hash = decodeURIComponent(hash);\r\n if (hash.indexOf('#') !== 0) {\r\n return {};\r\n }\r\n const questionMarkPosition = hash.indexOf('?');\r\n if (questionMarkPosition > -1) {\r\n hash = hash.substr(questionMarkPosition + 1);\r\n }\r\n else {\r\n hash = hash.substr(1);\r\n }\r\n return this.parseQueryString(hash);\r\n }\r\n parseQueryString(queryString) {\r\n const data = {};\r\n let pairs, pair, separatorIndex, escapedKey, escapedValue, key, value;\r\n if (queryString === null) {\r\n return data;\r\n }\r\n pairs = queryString.split('&');\r\n for (let i = 0; i < pairs.length; i++) {\r\n pair = pairs[i];\r\n separatorIndex = pair.indexOf('=');\r\n if (separatorIndex === -1) {\r\n escapedKey = pair;\r\n escapedValue = null;\r\n }\r\n else {\r\n escapedKey = pair.substr(0, separatorIndex);\r\n escapedValue = pair.substr(separatorIndex + 1);\r\n }\r\n key = decodeURIComponent(escapedKey);\r\n value = decodeURIComponent(escapedValue);\r\n if (key.substr(0, 1) === '/') {\r\n key = key.substr(1);\r\n }\r\n data[key] = value;\r\n }\r\n return data;\r\n }\r\n}\r\nUrlHelperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: UrlHelperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\r\nUrlHelperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: UrlHelperService });\r\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: UrlHelperService, decorators: [{\r\n type: Injectable\r\n }] });\n\n/**\r\n * [js-sha256]{@link https://github.com/emn178/js-sha256}\r\n *\r\n * @version 0.9.0\r\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\r\n * @copyright Chen, Yi-Cyuan 2014-2017\r\n * @license MIT\r\n */\r\n/*jslint bitwise: true */\r\nfunction factory() {\r\n var ERROR = 'input is invalid type';\r\n var WINDOW = typeof window === 'object';\r\n var root = WINDOW ? window : {};\r\n if (root.JS_SHA256_NO_WINDOW) {\r\n WINDOW = false;\r\n }\r\n var WEB_WORKER = !WINDOW && typeof self === 'object';\r\n var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\r\n if (NODE_JS) {\r\n root = global;\r\n }\r\n else if (WEB_WORKER) {\r\n root = self;\r\n }\r\n var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && typeof module === 'object' && module.exports;\r\n var AMD = typeof define === 'function' && define.amd;\r\n var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\r\n const HEX_CHARS = '0123456789abcdef'.split('');\r\n const EXTRA = [-2147483648, 8388608, 32768, 128];\r\n const SHIFT = [24, 16, 8, 0];\r\n const K = [\r\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\r\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\r\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\r\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\r\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\r\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\r\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\r\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\r\n ];\r\n const OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer'];\r\n var blocks = [];\r\n if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) {\r\n Array.isArray = function (obj) {\r\n return Object.prototype.toString.call(obj) === '[object Array]';\r\n };\r\n }\r\n if (ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\r\n ArrayBuffer.isView = function (obj) {\r\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\r\n };\r\n }\r\n var createOutputMethod = function (outputType, is224) {\r\n return function (message) {\r\n return new Sha256(is224, true).update(message)[outputType]();\r\n };\r\n };\r\n var createMethod = function (is224) {\r\n var method = createOutputMethod('hex', is224);\r\n if (NODE_JS) {\r\n method = nodeWrap(method, is224);\r\n }\r\n method.create = function () {\r\n return new Sha256(is224);\r\n };\r\n method.update = function (message) {\r\n return method.create().update(message);\r\n };\r\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\r\n var type = OUTPUT_TYPES[i];\r\n method[type] = createOutputMethod(type, is224);\r\n }\r\n return method;\r\n };\r\n var nodeWrap = function (method, is224) {\r\n var crypto = eval(\"require('crypto')\");\r\n var Buffer = eval(\"require('buffer').Buffer\");\r\n var algorithm = is224 ? 'sha224' : 'sha256';\r\n var nodeMethod = function (message) {\r\n if (typeof message === 'string') {\r\n return crypto.createHash(algorithm).update(message, 'utf8').digest('hex');\r\n }\r\n else {\r\n if (message === null || message === undefined) {\r\n throw new Error(ERROR);\r\n }\r\n else if (message.constructor === ArrayBuffer) {\r\n message = new Uint8Array(message);\r\n }\r\n }\r\n if (Array.isArray(message) || ArrayBuffer.isView(message) ||\r\n message.constructor === Buffer) {\r\n return crypto.createHash(algorithm).update(new Buffer(message)).digest('hex');\r\n }\r\n else {\r\n return method(message);\r\n }\r\n };\r\n return nodeMethod;\r\n };\r\n var createHmacOutputMethod = function (outputType, is224) {\r\n return function (key, message) {\r\n return new HmacSha256(key, is224, true).update(message)[outputType]();\r\n };\r\n };\r\n var createHmacMethod = function (is224) {\r\n var method = createHmacOutputMethod('hex', is224);\r\n method.create = function (key) {\r\n return new HmacSha256(key, is224);\r\n };\r\n method.update = function (key, message) {\r\n return method.create(key).update(message);\r\n };\r\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\r\n var type = OUTPUT_TYPES[i];\r\n method[type] = createHmacOutputMethod(type, is224);\r\n }\r\n return method;\r\n };\r\n function Sha256(is224, sharedMemory) {\r\n if (sharedMemory) {\r\n blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =\r\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\r\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\r\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\r\n this.blocks = blocks;\r\n }\r\n else {\r\n this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\r\n }\r\n if (is224) {\r\n this.h0 = 0xc1059ed8;\r\n this.h1 = 0x367cd507;\r\n this.h2 = 0x3070dd17;\r\n this.h3 = 0xf70e5939;\r\n this.h4 = 0xffc00b31;\r\n this.h5 = 0x68581511;\r\n this.h6 = 0x64f98fa7;\r\n this.h7 = 0xbefa4fa4;\r\n }\r\n else { // 256\r\n this.h0 = 0x6a09e667;\r\n this.h1 = 0xbb67ae85;\r\n this.h2 = 0x3c6ef372;\r\n this.h3 = 0xa54ff53a;\r\n this.h4 = 0x510e527f;\r\n this.h5 = 0x9b05688c;\r\n this.h6 = 0x1f83d9ab;\r\n this.h7 = 0x5be0cd19;\r\n }\r\n this.block = this.start = this.bytes = this.hBytes = 0;\r\n this.finalized = this.hashed = false;\r\n this.first = true;\r\n this.is224 = is224;\r\n }\r\n Sha256.prototype.update = function (message) {\r\n if (this.finalized) {\r\n return;\r\n }\r\n var notString, type = typeof message;\r\n if (type !== 'string') {\r\n if (type === 'object') {\r\n if (message === null) {\r\n throw new Error(ERROR);\r\n }\r\n else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\r\n message = new Uint8Array(message);\r\n }\r\n else if (!Array.isArray(message)) {\r\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\r\n throw new Error(ERROR);\r\n }\r\n }\r\n }\r\n else {\r\n throw new Error(ERROR);\r\n }\r\n notString = true;\r\n }\r\n var code, index = 0, i, length = message.length, blocks = this.blocks;\r\n while (index < length) {\r\n if (this.hashed) {\r\n this.hashed = false;\r\n blocks[0] = this.block;\r\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\r\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\r\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\r\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\r\n }\r\n if (notString) {\r\n for (i = this.start; index < length && i < 64; ++index) {\r\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\r\n }\r\n }\r\n else {\r\n for (i = this.start; index < length && i < 64; ++index) {\r\n code = message.charCodeAt(index);\r\n if (code < 0x80) {\r\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\r\n }\r\n else if (code < 0x800) {\r\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\r\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\r\n }\r\n else if (code < 0xd800 || code >= 0xe000) {\r\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\r\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\r\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\r\n }\r\n else {\r\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\r\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\r\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\r\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\r\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\r\n }\r\n }\r\n }\r\n this.lastByteIndex = i;\r\n this.bytes += i - this.start;\r\n if (i >= 64) {\r\n this.block = blocks[16];\r\n this.start = i - 64;\r\n this.hash();\r\n this.hashed = true;\r\n }\r\n else {\r\n this.start = i;\r\n }\r\n }\r\n if (this.bytes > 4294967295) {\r\n this.hBytes += this.bytes / 4294967296 << 0;\r\n this.bytes = this.bytes % 4294967296;\r\n }\r\n return this;\r\n };\r\n Sha256.prototype.finalize = function () {\r\n if (this.finalized) {\r\n return;\r\n }\r\n this.finalized = true;\r\n var blocks = this.blocks, i = this.lastByteIndex;\r\n blocks[16] = this.block;\r\n blocks[i >> 2] |= EXTRA[i & 3];\r\n this.block = blocks[16];\r\n if (i >= 56) {\r\n if (!this.hashed) {\r\n this.hash();\r\n }\r\n blocks[0] = this.block;\r\n blocks[16] = blocks[1] = blocks[2] = blocks[3] =\r\n blocks[4] = blocks[5] = blocks[6] = blocks[7] =\r\n blocks[8] = blocks[9] = blocks[10] = blocks[11] =\r\n blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;\r\n }\r\n blocks[14] = this.hBytes << 3 | this.bytes >>> 29;\r\n blocks[15] = this.bytes << 3;\r\n this.hash();\r\n };\r\n Sha256.prototype.hash = function () {\r\n var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6, h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc;\r\n for (j = 16; j < 64; ++j) {\r\n // rightrotate\r\n t1 = blocks[j - 15];\r\n s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3);\r\n t1 = blocks[j - 2];\r\n s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10);\r\n blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0;\r\n }\r\n bc = b & c;\r\n for (j = 0; j < 64; j += 4) {\r\n if (this.first) {\r\n if (this.is224) {\r\n ab = 300032;\r\n t1 = blocks[0] - 1413257819;\r\n h = t1 - 150054599 << 0;\r\n d = t1 + 24177077 << 0;\r\n }\r\n else {\r\n ab = 704751109;\r\n t1 = blocks[0] - 210244248;\r\n h = t1 - 1521486534 << 0;\r\n d = t1 + 143694565 << 0;\r\n }\r\n this.first = false;\r\n }\r\n else {\r\n s0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10));\r\n s1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7));\r\n ab = a & b;\r\n maj = ab ^ (a & c) ^ bc;\r\n ch = (e & f) ^ (~e & g);\r\n t1 = h + s1 + ch + K[j] + blocks[j];\r\n t2 = s0 + maj;\r\n h = d + t1 << 0;\r\n d = t1 + t2 << 0;\r\n }\r\n s0 = ((d >>> 2) | (d << 30)) ^ ((d >>> 13) | (d << 19)) ^ ((d >>> 22) | (d << 10));\r\n s1 = ((h >>> 6) | (h << 26)) ^ ((h >>> 11) | (h << 21)) ^ ((h >>> 25) | (h << 7));\r\n da = d & a;\r\n maj = da ^ (d & b) ^ ab;\r\n ch = (h & e) ^ (~h & f);\r\n t1 = g + s1 + ch + K[j + 1] + blocks[j + 1];\r\n t2 = s0 + maj;\r\n g = c + t1 << 0;\r\n c = t1 + t2 << 0;\r\n s0 = ((c >>> 2) | (c << 30)) ^ ((c >>> 13) | (c << 19)) ^ ((c >>> 22) | (c << 10));\r\n s1 = ((g >>> 6) | (g << 26)) ^ ((g >>> 11) | (g << 21)) ^ ((g >>> 25) | (g << 7));\r\n cd = c & d;\r\n maj = cd ^ (c & a) ^ da;\r\n ch = (g & h) ^ (~g & e);\r\n t1 = f + s1 + ch + K[j + 2] + blocks[j + 2];\r\n t2 = s0 + maj;\r\n f = b + t1 << 0;\r\n b = t1 + t2 << 0;\r\n s0 = ((b >>> 2) | (b << 30)) ^ ((b >>> 13) | (b << 19)) ^ ((b >>> 22) | (b << 10));\r\n s1 = ((f >>> 6) | (f << 26)) ^ ((f >>> 11) | (f << 21)) ^ ((f >>> 25) | (f << 7));\r\n bc = b & c;\r\n maj = bc ^ (b & d) ^ cd;\r\n ch = (f & g) ^ (~f & h);\r\n t1 = e + s1 + ch + K[j + 3] + blocks[j + 3];\r\n t2 = s0 + maj;\r\n e = a + t1 << 0;\r\n a = t1 + t2 << 0;\r\n }\r\n this.h0 = this.h0 + a << 0;\r\n this.h1 = this.h1 + b << 0;\r\n this.h2 = this.h2 + c << 0;\r\n this.h3 = this.h3 + d << 0;\r\n this.h4 = this.h4 + e << 0;\r\n this.h5 = this.h5 + f << 0;\r\n this.h6 = this.h6 + g << 0;\r\n this.h7 = this.h7 + h << 0;\r\n };\r\n Sha256.prototype.hex = function () {\r\n this.finalize();\r\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5, h6 = this.h6, h7 = this.h7;\r\n var hex = HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +\r\n HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +\r\n HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +\r\n HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +\r\n HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +\r\n HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +\r\n HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +\r\n HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +\r\n HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +\r\n HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +\r\n HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +\r\n HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +\r\n HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F] +\r\n HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +\r\n HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +\r\n HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +\r\n HEX_CHARS[(h4 >> 28) & 0x0F] + HEX_CHARS[(h4 >> 24) & 0x0F] +\r\n HEX_CHARS[(h4 >> 20) & 0x0F] + HEX_CHARS[(h4 >> 16) & 0x0F] +\r\n HEX_CHARS[(h4 >> 12) & 0x0F] + HEX_CHARS[(h4 >> 8) & 0x0F] +\r\n HEX_CHARS[(h4 >> 4) & 0x0F] + HEX_CHARS[h4 & 0x0F] +\r\n HEX_CHARS[(h5 >> 28) & 0x0F] + HEX_CHARS[(h5 >> 24) & 0x0F] +\r\n HEX_CHARS[(h5 >> 20) & 0x0F] + HEX_CHARS[(h5 >> 16) & 0x0F] +\r\n HEX_CHARS[(h5 >> 12) & 0x0F] + HEX_CHARS[(h5 >> 8) & 0x0F] +\r\n HEX_CHARS[(h5 >> 4) & 0x0F] + HEX_CHARS[h5 & 0x0F] +\r\n HEX_CHARS[(h6 >> 28) & 0x0F] + HEX_CHARS[(h6 >> 24) & 0x0F] +\r\n HEX_CHARS[(h6 >> 20) & 0x0F] + HEX_CHARS[(h6 >> 16) & 0x0F] +\r\n HEX_CHARS[(h6 >> 12) & 0x0F] + HEX_CHARS[(h6 >> 8) & 0x0F] +\r\n HEX_CHARS[(h6 >> 4) & 0x0F] + HEX_CHARS[h6 & 0x0F];\r\n if (!this.is224) {\r\n hex += HEX_CHARS[(h7 >> 28) & 0x0F] + HEX_CHARS[(h7 >> 24) & 0x0F] +\r\n HEX_CHARS[(h7 >> 20) & 0x0F] + HEX_CHARS[(h7 >> 16) & 0x0F] +\r\n HEX_CHARS[(h7 >> 12) & 0x0F] + HEX_CHARS[(h7 >> 8) & 0x0F] +\r\n HEX_CHARS[(h7 >> 4) & 0x0F] + HEX_CHARS[h7 & 0x0F];\r\n }\r\n return hex;\r\n };\r\n Sha256.prototype.toString = Sha256.prototype.hex;\r\n Sha256.prototype.digest = function () {\r\n this.finalize();\r\n var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5, h6 = this.h6, h7 = this.h7;\r\n var arr = [\r\n (h0 >> 24) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 8) & 0xFF, h0 & 0xFF,\r\n (h1 >> 24) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 8) & 0xFF, h1 & 0xFF,\r\n (h2 >> 24) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 8) & 0xFF, h2 & 0xFF,\r\n (h3 >> 24) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 8) & 0xFF, h3 & 0xFF,\r\n (h4 >> 24) & 0xFF, (h4 >> 16) & 0xFF, (h4 >> 8) & 0xFF, h4 & 0xFF,\r\n (h5 >> 24) & 0xFF, (h5 >> 16) & 0xFF, (h5 >> 8) & 0xFF, h5 & 0xFF,\r\n (h6 >> 24) & 0xFF, (h6 >> 16) & 0xFF, (h6 >> 8) & 0xFF, h6 & 0xFF\r\n ];\r\n if (!this.is224) {\r\n arr.push((h7 >> 24) & 0xFF, (h7 >> 16) & 0xFF, (h7 >> 8) & 0xFF, h7 & 0xFF);\r\n }\r\n return arr;\r\n };\r\n Sha256.prototype.array = Sha256.prototype.digest;\r\n Sha256.prototype.arrayBuffer = function () {\r\n this.finalize();\r\n var buffer = new ArrayBuffer(this.is224 ? 28 : 32);\r\n var dataView = new DataView(buffer);\r\n dataView.setUint32(0, this.h0);\r\n dataView.setUint32(4, this.h1);\r\n dataView.setUint32(8, this.h2);\r\n dataView.setUint32(12, this.h3);\r\n dataView.setUint32(16, this.h4);\r\n dataView.setUint32(20, this.h5);\r\n dataView.setUint32(24, this.h6);\r\n if (!this.is224) {\r\n dataView.setUint32(28, this.h7);\r\n }\r\n return buffer;\r\n };\r\n function HmacSha256(key, is224, sharedMemory) {\r\n var i, type = typeof key;\r\n if (type === 'string') {\r\n var bytes = [], length = key.length, index = 0, code;\r\n for (i = 0; i < length; ++i) {\r\n code = key.charCodeAt(i);\r\n if (code < 0x80) {\r\n bytes[index++] = code;\r\n }\r\n else if (code < 0x800) {\r\n bytes[index++] = (0xc0 | (code >> 6));\r\n bytes[index++] = (0x80 | (code & 0x3f));\r\n }\r\n else if (code < 0xd800 || code >= 0xe000) {\r\n bytes[index++] = (0xe0 | (code >> 12));\r\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\r\n bytes[index++] = (0x80 | (code & 0x3f));\r\n }\r\n else {\r\n code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));\r\n bytes[index++] = (0xf0 | (code >> 18));\r\n bytes[index++] = (0x80 | ((code >> 12) & 0x3f));\r\n bytes[index++] = (0x80 | ((code >> 6) & 0x3f));\r\n bytes[index++] = (0x80 | (code & 0x3f));\r\n }\r\n }\r\n key = bytes;\r\n }\r\n else {\r\n if (type === 'object') {\r\n if (key === null) {\r\n throw new Error(ERROR);\r\n }\r\n else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) {\r\n key = new Uint8Array(key);\r\n }\r\n else if (!Array.isArray(key)) {\r\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) {\r\n throw new Error(ERROR);\r\n }\r\n }\r\n }\r\n else {\r\n throw new Error(ERROR);\r\n }\r\n }\r\n if (key.length > 64) {\r\n key = (new Sha256(is224, true)).update(key).array();\r\n }\r\n var oKeyPad = [], iKeyPad = [];\r\n for (i = 0; i < 64; ++i) {\r\n var b = key[i] || 0;\r\n oKeyPad[i] = 0x5c ^ b;\r\n iKeyPad[i] = 0x36 ^ b;\r\n }\r\n Sha256.call(this, is224, sharedMemory);\r\n this.update(iKeyPad);\r\n this.oKeyPad = oKeyPad;\r\n this.inner = true;\r\n this.sharedMemory = sharedMemory;\r\n }\r\n HmacSha256.prototype = new Sha256();\r\n HmacSha256.prototype.finalize = function () {\r\n Sha256.prototype.finalize.call(this);\r\n if (this.inner) {\r\n this.inner = false;\r\n var innerHash = this.array();\r\n Sha256.call(this, this.is224, this.sharedMemory);\r\n this.update(this.oKeyPad);\r\n this.update(innerHash);\r\n Sha256.prototype.finalize.call(this);\r\n }\r\n };\r\n var exports = createMethod();\r\n exports.sha256 = exports;\r\n exports.sha224 = createMethod(true);\r\n exports.sha256.hmac = createHmacMethod();\r\n exports.sha224.hmac = createHmacMethod(true);\r\n return exports;\r\n}\n\nconst sha256 = factory();\r\n/**\r\n * Abstraction for crypto algorithms\r\n */\r\nclass HashHandler {\r\n}\r\nfunction decodeUTF8(s) {\r\n if (typeof s !== 'string')\r\n throw new TypeError('expected string');\r\n var i, d = s, b = new Uint8Array(d.length);\r\n for (i = 0; i < d.length; i++)\r\n b[i] = d.charCodeAt(i);\r\n return b;\r\n}\r\nfunction encodeUTF8(arr) {\r\n var i, s = [];\r\n for (i = 0; i < arr.length; i++)\r\n s.push(String.fromCharCode(arr[i]));\r\n return s.join('');\r\n}\r\nclass DefaultHashHandler {\r\n async calcHash(valueToHash, algorithm) {\r\n // const encoder = new TextEncoder();\r\n // const hashArray = await window.crypto.subtle.digest(algorithm, data);\r\n // const data = encoder.encode(valueToHash);\r\n // const fhash = fsha256(valueToHash);\r\n const candHash = encodeUTF8(fsha256(decodeUTF8(valueToHash)));\r\n // const hashArray = (sha256 as any).array(valueToHash);\r\n // // const hashString = this.toHashString(hashArray);\r\n // const hashString = this.toHashString2(hashArray);\r\n // console.debug('hash orig - cand', candHash, hashString);\r\n // alert(1);\r\n return candHash;\r\n }\r\n toHashString2(byteArray) {\r\n let result = '';\r\n for (let e of byteArray) {\r\n result += String.fromCharCode(e);\r\n }\r\n return result;\r\n }\r\n toHashString(buffer) {\r\n const byteArray = new Uint8Array(buffer);\r\n let result = '';\r\n for (let e of byteArray) {\r\n result += String.fromCharCode(e);\r\n }\r\n return result;\r\n }\r\n}\r\nDefaultHashHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: DefaultHashHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\r\nDefaultHashHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: DefaultHashHandler });\r\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: DefaultHashHandler, decorators: [{\r\n type: Injectable\r\n }] });\n\n/**\r\n * Service for logging in and logging out with\r\n * OIDC and OAuth2. Supports implicit flow and\r\n * password flow.\r\n */\r\nclass OAuthService extends AuthConfig {\r\n constructor(ngZone, http, storage, tokenValidationHandler, config, urlHelper, logger, crypto, document, dateTimeService) {\r\n super();\r\n this.ngZone = ngZone;\r\n this.http = http;\r\n this.config = config;\r\n this.urlHelper = urlHelper;\r\n this.logger = logger;\r\n this.crypto = crypto;\r\n this.dateTimeService = dateTimeService;\r\n /**\r\n * @internal\r\n * Deprecated: use property events instead\r\n */\r\n this.discoveryDocumentLoaded = false;\r\n /**\r\n * The received (passed around) state, when logging\r\n * in with implicit flow.\r\n */\r\n this.state = '';\r\n this.eventsSubject = new Subject();\r\n this.discoveryDocumentLoadedSubject = new Subject();\r\n this.grantTypesSupported = [];\r\n this.inImplicitFlow = false;\r\n this.saveNoncesInLocalStorage = false;\r\n this.debug('angular-oauth2-oidc v10');\r\n // See https://github.com/manfredsteyer/angular-oauth2-oidc/issues/773 for why this is needed\r\n this.document = document;\r\n if (!config) {\r\n config = {};\r\n }\r\n this.discoveryDocumentLoaded$ =\r\n this.discoveryDocumentLoadedSubject.asObservable();\r\n this.events = this.eventsSubject.asObservable();\r\n if (tokenValidationHandler) {\r\n this.tokenValidationHandler = tokenValidationHandler;\r\n }\r\n if (config) {\r\n this.configure(config);\r\n }\r\n try {\r\n if (storage) {\r\n this.setStorage(storage);\r\n }\r\n else if (typeof sessionStorage !== 'undefined') {\r\n this.setStorage(sessionStorage);\r\n }\r\n }\r\n catch (e) {\r\n console.error('No OAuthStorage provided and cannot access default (sessionStorage).' +\r\n 'Consider providing a custom OAuthStorage implementation in your module.', e);\r\n }\r\n // in IE, sessionStorage does not always survive a redirect\r\n if (this.checkLocalStorageAccessable()) {\r\n const ua = window?.navigator?.userAgent;\r\n const msie = ua?.includes('MSIE ') || ua?.includes('Trident');\r\n if (msie) {\r\n this.saveNoncesInLocalStorage = true;\r\n }\r\n }\r\n this.setupRefreshTimer();\r\n }\r\n checkLocalStorageAccessable() {\r\n if (typeof window === 'undefined')\r\n return false;\r\n const test = 'test';\r\n try {\r\n if (typeof window['localStorage'] === 'undefined')\r\n return false;\r\n localStorage.setItem(test, test);\r\n localStorage.removeItem(test);\r\n return true;\r\n }\r\n catch (e) {\r\n return false;\r\n }\r\n }\r\n /**\r\n * Use this method to configure the service\r\n * @param config the configuration\r\n */\r\n configure(config) {\r\n // For the sake of downward compatibility with\r\n // original configuration API\r\n Object.assign(this, new AuthConfig(), config);\r\n this.config = Object.assign({}, new AuthConfig(), config);\r\n if (this.sessionChecksEnabled) {\r\n this.setupSessionCheck();\r\n }\r\n this.configChanged();\r\n }\r\n configChanged() {\r\n this.setupRefreshTimer();\r\n }\r\n restartSessionChecksIfStillLoggedIn() {\r\n if (this.hasValidIdToken()) {\r\n this.initSessionCheck();\r\n }\r\n }\r\n restartRefreshTimerIfStillLoggedIn() {\r\n this.setupExpirationTimers();\r\n }\r\n setupSessionCheck() {\r\n this.events\r\n .pipe(filter((e) => e.type === 'token_received'))\r\n .subscribe((e) => {\r\n this.initSessionCheck();\r\n });\r\n }\r\n /**\r\n * Will setup up silent refreshing for when the token is\r\n * about to expire. When the user is logged out via this.logOut method, the\r\n * silent refreshing will pause and not refresh the tokens until the user is\r\n * logged back in via receiving a new token.\r\n * @param params Additional parameter to pass\r\n * @param listenTo Setup automatic refresh of a specific token type\r\n */\r\n setupAutomaticSilentRefresh(params = {}, listenTo, noPrompt = true) {\r\n let shouldRunSilentRefresh = true;\r\n this.clearAutomaticRefreshTimer();\r\n this.automaticRefreshSubscription = this.events\r\n .pipe(tap((e) => {\r\n if (e.type === 'token_received') {\r\n shouldRunSilentRefresh = true;\r\n }\r\n else if (e.type === 'logout') {\r\n shouldRunSilentRefresh = false;\r\n }\r\n }), filter((e) => e.type === 'token_expires' &&\r\n (listenTo == null || listenTo === 'any' || e.info === listenTo)), debounceTime(1000))\r\n .subscribe((_) => {\r\n if (shouldRunSilentRefresh) {\r\n // this.silentRefresh(params, noPrompt).catch(_ => {\r\n this.refreshInternal(params, noPrompt).catch((_) => {\r\n this.debug('Automatic silent refresh did not work');\r\n });\r\n }\r\n });\r\n this.restartRefreshTimerIfStillLoggedIn();\r\n }\r\n refreshInternal(params, noPrompt) {\r\n if (!this.useSilentRefresh && this.responseType === 'code') {\r\n return this.refreshToken();\r\n }\r\n else {\r\n return this.silentRefresh(params, noPrompt);\r\n }\r\n }\r\n /**\r\n * Convenience method that first calls `loadDiscoveryDocument(...)` and\r\n * directly chains using the `then(...)` part of the promise to call\r\n * the `tryLogin(...)` method.\r\n *\r\n * @param options LoginOptions to pass through to `tryLogin(...)`\r\n */\r\n loadDiscoveryDocumentAndTryLogin(options = null) {\r\n return this.loadDiscoveryDocument().then((doc) => {\r\n return this.tryLogin(options);\r\n });\r\n }\r\n /**\r\n * Convenience method that first calls `loadDiscoveryDocumentAndTryLogin(...)`\r\n * and if then chains to `initLoginFlow()`, but only if there is no valid\r\n * IdToken or no valid AccessToken.\r\n *\r\n * @param options LoginOptions to pass through to `tryLogin(...)`\r\n */\r\n loadDiscoveryDocumentAndLogin(options = null) {\r\n options = options || {};\r\n return this.loadDiscoveryDocumentAndTryLogin(options).then((_) => {\r\n if (!this.hasValidIdToken() || !this.hasValidAccessToken()) {\r\n const state = typeof options.state === 'string' ? options.state : '';\r\n this.initLoginFlow(state);\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n });\r\n }\r\n debug(...args) {\r\n if (this.showDebugInformation) {\r\n this.logger.debug.apply(this.logger, args);\r\n }\r\n }\r\n validateUrlFromDiscoveryDocument(url) {\r\n const errors = [];\r\n const httpsCheck = this.validateUrlForHttps(url);\r\n const issuerCheck = this.validateUrlAgainstIssuer(url);\r\n if (!httpsCheck) {\r\n errors.push('https for all urls required. Also for urls received by discovery.');\r\n }\r\n if (!issuerCheck) {\r\n errors.push('Every url in discovery document has to start with the issuer url.' +\r\n 'Also see property strictDiscoveryDocumentValidation.');\r\n }\r\n return errors;\r\n }\r\n validateUrlForHttps(url) {\r\n if (!url) {\r\n return true;\r\n }\r\n const lcUrl = url.toLowerCase();\r\n if (this.requireHttps === false) {\r\n return true;\r\n }\r\n if ((lcUrl.match(/^http:\\/\\/localhost($|[:\\/])/) ||\r\n lcUrl.match(/^http:\\/\\/localhost($|[:\\/])/)) &&\r\n this.requireHttps === 'remoteOnly') {\r\n return true;\r\n }\r\n return lcUrl.startsWith('https://');\r\n }\r\n assertUrlNotNullAndCorrectProtocol(url, description) {\r\n if (!url) {\r\n throw new Error(`'${description}' should not be null`);\r\n }\r\n if (!this.validateUrlForHttps(url)) {\r\n throw new Error(`'${description}' must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).`);\r\n }\r\n }\r\n validateUrlAgainstIssuer(url) {\r\n if (!this.strictDiscoveryDocumentValidation) {\r\n return true;\r\n }\r\n if (!url) {\r\n return true;\r\n }\r\n return url.toLowerCase().startsWith(this.issuer.toLowerCase());\r\n }\r\n setupRefreshTimer() {\r\n if (typeof window === 'undefined') {\r\n this.debug('timer not supported on this plattform');\r\n return;\r\n }\r\n if (this.hasValidIdToken() || this.hasValidAccessToken()) {\r\n this.clearAccessTokenTimer();\r\n this.clearIdTokenTimer();\r\n this.setupExpirationTimers();\r\n }\r\n if (this.tokenReceivedSubscription)\r\n this.tokenReceivedSubscription.unsubscribe();\r\n this.tokenReceivedSubscription = this.events\r\n .pipe(filter((e) => e.type === 'token_received'))\r\n .subscribe((_) => {\r\n this.clearAccessTokenTimer();\r\n this.clearIdTokenTimer();\r\n this.setupExpirationTimers();\r\n });\r\n }\r\n setupExpirationTimers() {\r\n if (this.hasValidAccessToken()) {\r\n this.setupAccessTokenTimer();\r\n }\r\n if (this.hasValidIdToken()) {\r\n this.setupIdTokenTimer();\r\n }\r\n }\r\n setupAccessTokenTimer() {\r\n const expiration = this.getAccessTokenExpiration();\r\n const storedAt = this.getAccessTokenStoredAt();\r\n const timeout = this.calcTimeout(storedAt, expiration);\r\n this.ngZone.runOutsideAngular(() => {\r\n this.accessTokenTimeoutSubscription = of(new OAuthInfoEvent('token_expires', 'access_token'))\r\n .pipe(delay(timeout))\r\n .subscribe((e) => {\r\n this.ngZone.run(() => {\r\n this.eventsSubject.next(e);\r\n });\r\n });\r\n });\r\n }\r\n setupIdTokenTimer() {\r\n const expiration = this.getIdTokenExpiration();\r\n const storedAt = this.getIdTokenStoredAt();\r\n const timeout = this.calcTimeout(storedAt, expiration);\r\n this.ngZone.runOutsideAngular(() => {\r\n this.idTokenTimeoutSubscription = of(new OAuthInfoEvent('token_expires', 'id_token'))\r\n .pipe(delay(timeout))\r\n .subscribe((e) => {\r\n this.ngZone.run(() => {\r\n this.eventsSubject.next(e);\r\n });\r\n });\r\n });\r\n }\r\n /**\r\n * Stops timers for automatic refresh.\r\n * To restart it, call setupAutomaticSilentRefresh again.\r\n */\r\n stopAutomaticRefresh() {\r\n this.clearAccessTokenTimer();\r\n this.clearIdTokenTimer();\r\n this.clearAutomaticRefreshTimer();\r\n }\r\n clearAccessTokenTimer() {\r\n if (this.accessTokenTimeoutSubscription) {\r\n this.accessTokenTimeoutSubscription.unsubscribe();\r\n }\r\n }\r\n clearIdTokenTimer() {\r\n if (this.idTokenTimeoutSubscription) {\r\n this.idTokenTimeoutSubscription.unsubscribe();\r\n }\r\n }\r\n clearAutomaticRefreshTimer() {\r\n if (this.automaticRefreshSubscription) {\r\n this.automaticRefreshSubscription.unsubscribe();\r\n }\r\n }\r\n calcTimeout(storedAt, expiration) {\r\n const now = this.dateTimeService.now();\r\n const delta = (expiration - storedAt) * this.timeoutFactor - (now - storedAt);\r\n return Math.max(0, delta);\r\n }\r\n /**\r\n * DEPRECATED. Use a provider for OAuthStorage instead:\r\n *\r\n * { provide: OAuthStorage, useFactory: oAuthStorageFactory }\r\n * export function oAuthStorageFactory(): OAuthStorage { return localStorage; }\r\n * Sets a custom storage used to store the received\r\n * tokens on client side. By default, the browser's\r\n * sessionStorage is used.\r\n * @ignore\r\n *\r\n * @param storage\r\n */\r\n setStorage(storage) {\r\n this._storage = storage;\r\n this.configChanged();\r\n }\r\n /**\r\n * Loads the discovery document to configure most\r\n * properties of this service. The url of the discovery\r\n * document is infered from the issuer's url according\r\n * to the OpenId Connect spec. To use another url you\r\n * can pass it to to optional parameter fullUrl.\r\n *\r\n * @param fullUrl\r\n */\r\n loadDiscoveryDocument(fullUrl = null) {\r\n return new Promise((resolve, reject) => {\r\n if (!fullUrl) {\r\n fullUrl = this.issuer || '';\r\n if (!fullUrl.endsWith('/')) {\r\n fullUrl += '/';\r\n }\r\n fullUrl += '.well-known/openid-configuration';\r\n }\r\n if (!this.validateUrlForHttps(fullUrl)) {\r\n reject(\"issuer must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).\");\r\n return;\r\n }\r\n this.http.get(fullUrl).subscribe((doc) => {\r\n if (!this.validateDiscoveryDocument(doc)) {\r\n this.eventsSubject.next(new OAuthErrorEvent('discovery_document_validation_error', null));\r\n reject('discovery_document_validation_error');\r\n return;\r\n }\r\n this.loginUrl = doc.authorization_endpoint;\r\n this.logoutUrl = doc.end_session_endpoint || this.logoutUrl;\r\n this.grantTypesSupported = doc.grant_types_supported;\r\n this.issuer = doc.issuer;\r\n this.tokenEndpoint = doc.token_endpoint;\r\n this.userinfoEndpoint =\r\n doc.userinfo_endpoint || this.userinfoEndpoint;\r\n this.jwksUri = doc.jwks_uri;\r\n this.sessionCheckIFrameUrl =\r\n doc.check_session_iframe || this.sessionCheckIFrameUrl;\r\n this.discoveryDocumentLoaded = true;\r\n this.discoveryDocumentLoadedSubject.next(doc);\r\n this.revocationEndpoint =\r\n doc.revocation_endpoint || this.revocationEndpoint;\r\n if (this.sessionChecksEnabled) {\r\n this.restartSessionChecksIfStillLoggedIn();\r\n }\r\n this.loadJwks()\r\n .then((jwks) => {\r\n const result = {\r\n discoveryDocument: doc,\r\n jwks: jwks,\r\n };\r\n const event = new OAuthSuccessEvent('discovery_document_loaded', result);\r\n this.eventsSubject.next(event);\r\n resolve(event);\r\n return;\r\n })\r\n .catch((err) => {\r\n this.eventsSubject.next(new OAuthErrorEvent('discovery_document_load_error', err));\r\n reject(err);\r\n return;\r\n });\r\n }, (err) => {\r\n this.logger.error('error loading discovery document', err);\r\n this.eventsSubject.next(new OAuthErrorEvent('discovery_document_load_error', err));\r\n reject(err);\r\n });\r\n });\r\n }\r\n loadJwks() {\r\n return new Promise((resolve, reject) => {\r\n if (this.jwksUri) {\r\n this.http.get(this.jwksUri).subscribe((jwks) => {\r\n this.jwks = jwks;\r\n this.eventsSubject.next(new OAuthSuccessEvent('discovery_document_loaded'));\r\n resolve(jwks);\r\n }, (err) => {\r\n this.logger.error('error loading jwks', err);\r\n this.eventsSubject.next(new OAuthErrorEvent('jwks_load_error', err));\r\n reject(err);\r\n });\r\n }\r\n else {\r\n resolve(null);\r\n }\r\n });\r\n }\r\n validateDiscoveryDocument(doc) {\r\n let errors;\r\n if (!this.skipIssuerCheck && doc.issuer !== this.issuer) {\r\n this.logger.error('invalid issuer in discovery document', 'expected: ' + this.issuer, 'current: ' + doc.issuer);\r\n return false;\r\n }\r\n errors = this.validateUrlFromDiscoveryDocument(doc.authorization_endpoint);\r\n if (errors.length > 0) {\r\n this.logger.error('error validating authorization_endpoint in discovery document', errors);\r\n return false;\r\n }\r\n errors = this.validateUrlFromDiscoveryDocument(doc.end_session_endpoint);\r\n if (errors.length > 0) {\r\n this.logger.error('error validating end_session_endpoint in discovery document', errors);\r\n return false;\r\n }\r\n errors = this.validateUrlFromDiscoveryDocument(doc.token_endpoint);\r\n if (errors.length > 0) {\r\n this.logger.error('error validating token_endpoint in discovery document', errors);\r\n }\r\n errors = this.validateUrlFromDiscoveryDocument(doc.revocation_endpoint);\r\n if (errors.length > 0) {\r\n this.logger.error('error validating revocation_endpoint in discovery document', errors);\r\n }\r\n errors = this.validateUrlFromDiscoveryDocument(doc.userinfo_endpoint);\r\n if (errors.length > 0) {\r\n this.logger.error('error validating userinfo_endpoint in discovery document', errors);\r\n return false;\r\n }\r\n errors = this.validateUrlFromDiscoveryDocument(doc.jwks_uri);\r\n if (errors.length > 0) {\r\n this.logger.error('error validating jwks_uri in discovery document', errors);\r\n return false;\r\n }\r\n if (this.sessionChecksEnabled && !doc.check_session_iframe) {\r\n this.logger.warn('sessionChecksEnabled is activated but discovery document' +\r\n ' does not contain a check_session_iframe field');\r\n }\r\n return true;\r\n }\r\n /**\r\n * Uses password flow to exchange userName and password for an\r\n * access_token. After receiving the access_token, this method\r\n * uses it to query the userinfo endpoint in order to get information\r\n * about the user in question.\r\n *\r\n * When using this, make sure that the property oidc is set to false.\r\n * Otherwise stricter validations take place that make this operation\r\n * fail.\r\n *\r\n * @param userName\r\n * @param password\r\n * @param headers Optional additional http-headers.\r\n */\r\n fetchTokenUsingPasswordFlowAndLoadUserProfile(userName, password, headers = new HttpHeaders()) {\r\n return this.fetchTokenUsingPasswordFlow(userName, password, headers).then(() => this.loadUserProfile());\r\n }\r\n /**\r\n * Loads the user profile by accessing the user info endpoint defined by OpenId Connect.\r\n *\r\n * When using this with OAuth2 password flow, make sure that the property oidc is set to false.\r\n * Otherwise stricter validations take place that make this operation fail.\r\n */\r\n loadUserProfile() {\r\n if (!this.hasValidAccessToken()) {\r\n throw new Error('Can not load User Profile without access_token');\r\n }\r\n if (!this.validateUrlForHttps(this.userinfoEndpoint)) {\r\n throw new Error(\"userinfoEndpoint must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).\");\r\n }\r\n return new Promise((resolve, reject) => {\r\n const headers = new HttpHeaders().set('Authorization', 'Bearer ' + this.getAccessToken());\r\n this.http\r\n .get(this.userinfoEndpoint, {\r\n headers,\r\n observe: 'response',\r\n responseType: 'text',\r\n })\r\n .subscribe((response) => {\r\n this.debug('userinfo received', JSON.stringify(response));\r\n if (response.headers\r\n .get('content-type')\r\n .startsWith('application/json')) {\r\n let info = JSON.parse(response.body);\r\n const existingClaims = this.getIdentityClaims() || {};\r\n if (!this.skipSubjectCheck) {\r\n if (this.oidc &&\r\n (!existingClaims['sub'] || info.sub !== existingClaims['sub'])) {\r\n const err = 'if property oidc is true, the received user-id (sub) has to be the user-id ' +\r\n 'of the user that has logged in with oidc.\\n' +\r\n 'if you are not using oidc but just oauth2 password flow set oidc to false';\r\n reject(err);\r\n return;\r\n }\r\n }\r\n info = Object.assign({}, existingClaims, info);\r\n this._storage.setItem('id_token_claims_obj', JSON.stringify(info));\r\n this.eventsSubject.next(new OAuthSuccessEvent('user_profile_loaded'));\r\n resolve({ info });\r\n }\r\n else {\r\n this.debug('userinfo is not JSON, treating it as JWE/JWS');\r\n this.eventsSubject.next(new OAuthSuccessEvent('user_profile_loaded'));\r\n resolve(JSON.parse(response.body));\r\n }\r\n }, (err) => {\r\n this.logger.error('error loading user info', err);\r\n this.eventsSubject.next(new OAuthErrorEvent('user_profile_load_error', err));\r\n reject(err);\r\n });\r\n });\r\n }\r\n /**\r\n * Uses password flow to exchange userName and password for an access_token.\r\n * @param userName\r\n * @param password\r\n * @param headers Optional additional http-headers.\r\n */\r\n fetchTokenUsingPasswordFlow(userName, password, headers = new HttpHeaders()) {\r\n const parameters = {\r\n username: userName,\r\n password: password,\r\n };\r\n return this.fetchTokenUsingGrant('password', parameters, headers);\r\n }\r\n /**\r\n * Uses a custom grant type to retrieve tokens.\r\n * @param grantType Grant type.\r\n * @param parameters Parameters to pass.\r\n * @param headers Optional additional HTTP headers.\r\n */\r\n fetchTokenUsingGrant(grantType, parameters, headers = new HttpHeaders()) {\r\n this.assertUrlNotNullAndCorrectProtocol(this.tokenEndpoint, 'tokenEndpoint');\r\n /**\r\n * A `HttpParameterCodec` that uses `encodeURIComponent` and `decodeURIComponent` to\r\n * serialize and parse URL parameter keys and values.\r\n *\r\n * @stable\r\n */\r\n let params = new HttpParams({ encoder: new WebHttpUrlEncodingCodec() })\r\n .set('grant_type', grantType)\r\n .set('scope', this.scope);\r\n if (this.useHttpBasicAuth) {\r\n const header = btoa(`${this.clientId}:${this.dummyClientSecret}`);\r\n headers = headers.set('Authorization', 'Basic ' + header);\r\n }\r\n if (!this.useHttpBasicAuth) {\r\n params = params.set('client_id', this.clientId);\r\n }\r\n if (!this.useHttpBasicAuth && this.dummyClientSecret) {\r\n params = params.set('client_secret', this.dummyClientSecret);\r\n }\r\n if (this.customQueryParams) {\r\n for (const key of Object.getOwnPropertyNames(this.customQueryParams)) {\r\n params = params.set(key, this.customQueryParams[key]);\r\n }\r\n }\r\n // set explicit parameters last, to allow overwriting\r\n for (const key of Object.keys(parameters)) {\r\n params = params.set(key, parameters[key]);\r\n }\r\n headers = headers.set('Content-Type', 'application/x-www-form-urlencoded');\r\n return new Promise((resolve, reject) => {\r\n this.http\r\n .post(this.tokenEndpoint, params, { headers })\r\n .subscribe((tokenResponse) => {\r\n this.debug('tokenResponse', tokenResponse);\r\n this.storeAccessTokenResponse(tokenResponse.access_token, tokenResponse.refresh_token, tokenResponse.expires_in ||\r\n this.fallbackAccessTokenExpirationTimeInSec, tokenResponse.scope, this.extractRecognizedCustomParameters(tokenResponse));\r\n if (this.oidc && tokenResponse.id_token) {\r\n this.processIdToken(tokenResponse.id_token, tokenResponse.access_token).then((result) => {\r\n this.storeIdToken(result);\r\n resolve(tokenResponse);\r\n });\r\n }\r\n this.eventsSubject.next(new OAuthSuccessEvent('token_received'));\r\n resolve(tokenResponse);\r\n }, (err) => {\r\n this.logger.error('Error performing ${grantType} flow', err);\r\n this.eventsSubject.next(new OAuthErrorEvent('token_error', err));\r\n reject(err);\r\n });\r\n });\r\n }\r\n /**\r\n * Refreshes the token using a refresh_token.\r\n * This does not work for implicit flow, b/c\r\n * there is no refresh_token in this flow.\r\n * A solution for this is provided by the\r\n * method silentRefresh.\r\n */\r\n refreshToken() {\r\n this.assertUrlNotNullAndCorrectProtocol(this.tokenEndpoint, 'tokenEndpoint');\r\n return new Promise((resolve, reject) => {\r\n let params = new HttpParams({ encoder: new WebHttpUrlEncodingCodec() })\r\n .set('grant_type', 'refresh_token')\r\n .set('scope', this.scope)\r\n .set('refresh_token', this._storage.getItem('refresh_token'));\r\n let headers = new HttpHeaders().set('Content-Type', 'application/x-www-form-urlencoded');\r\n if (this.useHttpBasicAuth) {\r\n const header = btoa(`${this.clientId}:${this.dummyClientSecret}`);\r\n headers = headers.set('Authorization', 'Basic ' + header);\r\n }\r\n if (!this.useHttpBasicAuth) {\r\n params = params.set('client_id', this.clientId);\r\n }\r\n if (!this.useHttpBasicAuth && this.dummyClientSecret) {\r\n params = params.set('client_secret', this.dummyClientSecret);\r\n }\r\n if (this.customQueryParams) {\r\n for (const key of Object.getOwnPropertyNames(this.customQueryParams)) {\r\n params = params.set(key, this.customQueryParams[key]);\r\n }\r\n }\r\n this.http\r\n .post(this.tokenEndpoint, params, { headers })\r\n .pipe(switchMap((tokenResponse) => {\r\n if (tokenResponse.id_token) {\r\n return from(this.processIdToken(tokenResponse.id_token, tokenResponse.access_token, true)).pipe(tap((result) => this.storeIdToken(result)), map((_) => tokenResponse));\r\n }\r\n else {\r\n return of(tokenResponse);\r\n }\r\n }))\r\n .subscribe((tokenResponse) => {\r\n this.debug('refresh tokenResponse', tokenResponse);\r\n this.storeAccessTokenResponse(tokenResponse.access_token, tokenResponse.refresh_token, tokenResponse.expires_in ||\r\n this.fallbackAccessTokenExpirationTimeInSec, tokenResponse.scope, this.extractRecognizedCustomParameters(tokenResponse));\r\n this.eventsSubject.next(new OAuthSuccessEvent('token_received'));\r\n this.eventsSubject.next(new OAuthSuccessEvent('token_refreshed'));\r\n resolve(tokenResponse);\r\n }, (err) => {\r\n this.logger.error('Error refreshing token', err);\r\n this.eventsSubject.next(new OAuthErrorEvent('token_refresh_error', err));\r\n reject(err);\r\n });\r\n });\r\n }\r\n removeSilentRefreshEventListener() {\r\n if (this.silentRefreshPostMessageEventListener) {\r\n window.removeEventListener('message', this.silentRefreshPostMessageEventListener);\r\n this.silentRefreshPostMessageEventListener = null;\r\n }\r\n }\r\n setupSilentRefreshEventListener() {\r\n this.removeSilentRefreshEventListener();\r\n this.silentRefreshPostMessageEventListener = (e) => {\r\n const message = this.processMessageEventMessage(e);\r\n this.tryLogin({\r\n customHashFragment: message,\r\n preventClearHashAfterLogin: true,\r\n customRedirectUri: this.silentRefreshRedirectUri || this.redirectUri,\r\n }).catch((err) => this.debug('tryLogin during silent refresh failed', err));\r\n };\r\n window.addEventListener('message', this.silentRefreshPostMessageEventListener);\r\n }\r\n /**\r\n * Performs a silent refresh for implicit flow.\r\n * Use this method to get new tokens when/before\r\n * the existing tokens expire.\r\n */\r\n silentRefresh(params = {}, noPrompt = true) {\r\n const claims = this.getIdentityClaims() || {};\r\n if (this.useIdTokenHintForSilentRefresh && this.hasValidIdToken()) {\r\n params['id_token_hint'] = this.getIdToken();\r\n }\r\n if (!this.validateUrlForHttps(this.loginUrl)) {\r\n throw new Error(\"loginUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).\");\r\n }\r\n if (typeof this.document === 'undefined') {\r\n throw new Error('silent refresh is not supported on this platform');\r\n }\r\n const existingIframe = this.document.getElementById(this.silentRefreshIFrameName);\r\n if (existingIframe) {\r\n this.document.body.removeChild(existingIframe);\r\n }\r\n this.silentRefreshSubject = claims['sub'];\r\n const iframe = this.document.createElement('iframe');\r\n iframe.id = this.silentRefreshIFrameName;\r\n this.setupSilentRefreshEventListener();\r\n const redirectUri = this.silentRefreshRedirectUri || this.redirectUri;\r\n this.createLoginUrl(null, null, redirectUri, noPrompt, params).then((url) => {\r\n iframe.setAttribute('src', url);\r\n if (!this.silentRefreshShowIFrame) {\r\n iframe.style['display'] = 'none';\r\n }\r\n this.document.body.appendChild(iframe);\r\n });\r\n const errors = this.events.pipe(filter((e) => e instanceof OAuthErrorEvent), first());\r\n const success = this.events.pipe(filter((e) => e.type === 'token_received'), first());\r\n const timeout = of(new OAuthErrorEvent('silent_refresh_timeout', null)).pipe(delay(this.silentRefreshTimeout));\r\n return race([errors, success, timeout])\r\n .pipe(map((e) => {\r\n if (e instanceof OAuthErrorEvent) {\r\n if (e.type === 'silent_refresh_timeout') {\r\n this.eventsSubject.next(e);\r\n }\r\n else {\r\n e = new OAuthErrorEvent('silent_refresh_error', e);\r\n this.eventsSubject.next(e);\r\n }\r\n throw e;\r\n }\r\n else if (e.type === 'token_received') {\r\n e = new OAuthSuccessEvent('silently_refreshed');\r\n this.eventsSubject.next(e);\r\n }\r\n return e;\r\n }))\r\n .toPromise();\r\n }\r\n /**\r\n * This method exists for backwards compatibility.\r\n * {@link OAuthService#initLoginFlowInPopup} handles both code\r\n * and implicit flows.\r\n */\r\n initImplicitFlowInPopup(options) {\r\n return this.initLoginFlowInPopup(options);\r\n }\r\n initLoginFlowInPopup(options) {\r\n options = options || {};\r\n return this.createLoginUrl(null, null, this.silentRefreshRedirectUri, false, {\r\n display: 'popup',\r\n }).then((url) => {\r\n return new Promise((resolve, reject) => {\r\n /**\r\n * Error handling section\r\n */\r\n const checkForPopupClosedInterval = 500;\r\n let windowRef = null;\r\n // If we got no window reference we open a window\r\n // else we are using the window already opened\r\n if (!options.windowRef) {\r\n windowRef = window.open(url, 'ngx-oauth2-oidc-login', this.calculatePopupFeatures(options));\r\n }\r\n else if (options.windowRef && !options.windowRef.closed) {\r\n windowRef = options.windowRef;\r\n windowRef.location.href = url;\r\n }\r\n let checkForPopupClosedTimer;\r\n const tryLogin = (hash) => {\r\n this.tryLogin({\r\n customHashFragment: hash,\r\n preventClearHashAfterLogin: true,\r\n customRedirectUri: this.silentRefreshRedirectUri,\r\n }).then(() => {\r\n cleanup();\r\n resolve(true);\r\n }, (err) => {\r\n cleanup();\r\n reject(err);\r\n });\r\n };\r\n const checkForPopupClosed = () => {\r\n if (!windowRef || windowRef.closed) {\r\n cleanup();\r\n reject(new OAuthErrorEvent('popup_closed', {}));\r\n }\r\n };\r\n if (!windowRef) {\r\n reject(new OAuthErrorEvent('popup_blocked', {}));\r\n }\r\n else {\r\n checkForPopupClosedTimer = window.setInterval(checkForPopupClosed, checkForPopupClosedInterval);\r\n }\r\n const cleanup = () => {\r\n window.clearInterval(checkForPopupClosedTimer);\r\n window.removeEventListener('storage', storageListener);\r\n window.removeEventListener('message', listener);\r\n if (windowRef !== null) {\r\n windowRef.close();\r\n }\r\n windowRef = null;\r\n };\r\n const listener = (e) => {\r\n const message = this.processMessageEventMessage(e);\r\n if (message && message !== null) {\r\n window.removeEventListener('storage', storageListener);\r\n tryLogin(message);\r\n }\r\n else {\r\n console.log('false event firing');\r\n }\r\n };\r\n const storageListener = (event) => {\r\n if (event.key === 'auth_hash') {\r\n window.removeEventListener('message', listener);\r\n tryLogin(event.newValue);\r\n }\r\n };\r\n window.addEventListener('message', listener);\r\n window.addEventListener('storage', storageListener);\r\n });\r\n });\r\n }\r\n calculatePopupFeatures(options) {\r\n // Specify an static height and width and calculate centered position\r\n const height = options.height || 470;\r\n const width = options.width || 500;\r\n const left = window.screenLeft + (window.outerWidth - width) / 2;\r\n const top = window.screenTop + (window.outerHeight - height) / 2;\r\n return `location=no,toolbar=no,width=${width},height=${height},top=${top},left=${left}`;\r\n }\r\n processMessageEventMessage(e) {\r\n let expectedPrefix = '#';\r\n if (this.silentRefreshMessagePrefix) {\r\n expectedPrefix += this.silentRefreshMessagePrefix;\r\n }\r\n if (!e || !e.data || typeof e.data !== 'string') {\r\n return;\r\n }\r\n const prefixedMessage = e.data;\r\n if (!prefixedMessage.startsWith(expectedPrefix)) {\r\n return;\r\n }\r\n return '#' + prefixedMessage.substr(expectedPrefix.length);\r\n }\r\n canPerformSessionCheck() {\r\n if (!this.sessionChecksEnabled) {\r\n return false;\r\n }\r\n if (!this.sessionCheckIFrameUrl) {\r\n console.warn('sessionChecksEnabled is activated but there is no sessionCheckIFrameUrl');\r\n return false;\r\n }\r\n const sessionState = this.getSessionState();\r\n if (!sessionState) {\r\n console.warn('sessionChecksEnabled is activated but there is no session_state');\r\n return false;\r\n }\r\n if (typeof this.document === 'undefined') {\r\n return false;\r\n }\r\n return true;\r\n }\r\n setupSessionCheckEventListener() {\r\n this.removeSessionCheckEventListener();\r\n this.sessionCheckEventListener = (e) => {\r\n const origin = e.origin.toLowerCase();\r\n const issuer = this.issuer.toLowerCase();\r\n this.debug('sessionCheckEventListener');\r\n if (!issuer.startsWith(origin)) {\r\n this.debug('sessionCheckEventListener', 'wrong origin', origin, 'expected', issuer, 'event', e);\r\n return;\r\n }\r\n // only run in Angular zone if it is 'changed' or 'error'\r\n switch (e.data) {\r\n case 'unchanged':\r\n this.ngZone.run(() => {\r\n this.handleSessionUnchanged();\r\n });\r\n break;\r\n case 'changed':\r\n this.ngZone.run(() => {\r\n this.handleSessionChange();\r\n });\r\n break;\r\n case 'error':\r\n this.ngZone.run(() => {\r\n this.handleSessionError();\r\n });\r\n break;\r\n }\r\n this.debug('got info from session check inframe', e);\r\n };\r\n // prevent Angular from refreshing the view on every message (runs in intervals)\r\n this.ngZone.runOutsideAngular(() => {\r\n window.addEventListener('message', this.sessionCheckEventListener);\r\n });\r\n }\r\n handleSessionUnchanged() {\r\n this.debug('session check', 'session unchanged');\r\n this.eventsSubject.next(new OAuthInfoEvent('session_unchanged'));\r\n }\r\n handleSessionChange() {\r\n this.eventsSubject.next(new OAuthInfoEvent('session_changed'));\r\n this.stopSessionCheckTimer();\r\n if (!this.useSilentRefresh && this.responseType === 'code') {\r\n this.refreshToken()\r\n .then((_) => {\r\n this.debug('token refresh after session change worked');\r\n })\r\n .catch((_) => {\r\n this.debug('token refresh did not work after session changed');\r\n this.eventsSubject.next(new OAuthInfoEvent('session_terminated'));\r\n this.logOut(true);\r\n });\r\n }\r\n else if (this.silentRefreshRedirectUri) {\r\n this.silentRefresh().catch((_) => this.debug('silent refresh failed after session changed'));\r\n this.waitForSilentRefreshAfterSessionChange();\r\n }\r\n else {\r\n this.eventsSubject.next(new OAuthInfoEvent('session_terminated'));\r\n this.logOut(true);\r\n }\r\n }\r\n waitForSilentRefreshAfterSessionChange() {\r\n this.events\r\n .pipe(filter((e) => e.type === 'silently_refreshed' ||\r\n e.type === 'silent_refresh_timeout' ||\r\n e.type === 'silent_refresh_error'), first())\r\n .subscribe((e) => {\r\n if (e.type !== 'silently_refreshed') {\r\n this.debug('silent refresh did not work after session changed');\r\n this.eventsSubject.next(new OAuthInfoEvent('session_terminated'));\r\n this.logOut(true);\r\n }\r\n });\r\n }\r\n handleSessionError() {\r\n this.stopSessionCheckTimer();\r\n this.eventsSubject.next(new OAuthInfoEvent('session_error'));\r\n }\r\n removeSessionCheckEventListener() {\r\n if (this.sessionCheckEventListener) {\r\n window.removeEventListener('message', this.sessionCheckEventListener);\r\n this.sessionCheckEventListener = null;\r\n }\r\n }\r\n initSessionCheck() {\r\n if (!this.canPerformSessionCheck()) {\r\n return;\r\n }\r\n const existingIframe = this.document.getElementById(this.sessionCheckIFrameName);\r\n if (existingIframe) {\r\n this.document.body.removeChild(existingIframe);\r\n }\r\n const iframe = this.document.createElement('iframe');\r\n iframe.id = this.sessionCheckIFrameName;\r\n this.setupSessionCheckEventListener();\r\n const url = this.sessionCheckIFrameUrl;\r\n iframe.setAttribute('src', url);\r\n iframe.style.display = 'none';\r\n this.document.body.appendChild(iframe);\r\n this.startSessionCheckTimer();\r\n }\r\n startSessionCheckTimer() {\r\n this.stopSessionCheckTimer();\r\n this.ngZone.runOutsideAngular(() => {\r\n this.sessionCheckTimer = setInterval(this.checkSession.bind(this), this.sessionCheckIntervall);\r\n });\r\n }\r\n stopSessionCheckTimer() {\r\n if (this.sessionCheckTimer) {\r\n clearInterval(this.sessionCheckTimer);\r\n this.sessionCheckTimer = null;\r\n }\r\n }\r\n checkSession() {\r\n const iframe = this.document.getElementById(this.sessionCheckIFrameName);\r\n if (!iframe) {\r\n this.logger.warn('checkSession did not find iframe', this.sessionCheckIFrameName);\r\n }\r\n const sessionState = this.getSessionState();\r\n if (!sessionState) {\r\n this.stopSessionCheckTimer();\r\n }\r\n const message = this.clientId + ' ' + sessionState;\r\n iframe.contentWindow.postMessage(message, this.issuer);\r\n }\r\n async createLoginUrl(state = '', loginHint = '', customRedirectUri = '', noPrompt = false, params = {}) {\r\n const that = this;\r\n let redirectUri;\r\n if (customRedirectUri) {\r\n redirectUri = customRedirectUri;\r\n }\r\n else {\r\n redirectUri = this.redirectUri;\r\n }\r\n const nonce = await this.createAndSaveNonce();\r\n if (state) {\r\n state =\r\n nonce + this.config.nonceStateSeparator + encodeURIComponent(state);\r\n }\r\n else {\r\n state = nonce;\r\n }\r\n if (!this.requestAccessToken && !this.oidc) {\r\n throw new Error('Either requestAccessToken or oidc or both must be true');\r\n }\r\n if (this.config.responseType) {\r\n this.responseType = this.config.responseType;\r\n }\r\n else {\r\n if (this.oidc && this.requestAccessToken) {\r\n this.responseType = 'id_token token';\r\n }\r\n else if (this.oidc && !this.requestAccessToken) {\r\n this.responseType = 'id_token';\r\n }\r\n else {\r\n this.responseType = 'token';\r\n }\r\n }\r\n const seperationChar = that.loginUrl.indexOf('?') > -1 ? '&' : '?';\r\n let scope = that.scope;\r\n if (this.oidc && !scope.match(/(^|\\s)openid($|\\s)/)) {\r\n scope = 'openid ' + scope;\r\n }\r\n let url = that.loginUrl +\r\n seperationChar +\r\n 'response_type=' +\r\n encodeURIComponent(that.responseType) +\r\n '&client_id=' +\r\n encodeURIComponent(that.clientId) +\r\n '&state=' +\r\n encodeURIComponent(state) +\r\n '&redirect_uri=' +\r\n encodeURIComponent(redirectUri) +\r\n '&scope=' +\r\n encodeURIComponent(scope);\r\n if (this.responseType.includes('code') && !this.disablePKCE) {\r\n const [challenge, verifier] = await this.createChallangeVerifierPairForPKCE();\r\n if (this.saveNoncesInLocalStorage &&\r\n typeof window['localStorage'] !== 'undefined') {\r\n localStorage.setItem('PKCE_verifier', verifier);\r\n }\r\n else {\r\n this._storage.setItem('PKCE_verifier', verifier);\r\n }\r\n url += '&code_challenge=' + challenge;\r\n url += '&code_challenge_method=S256';\r\n }\r\n if (loginHint) {\r\n url += '&login_hint=' + encodeURIComponent(loginHint);\r\n }\r\n if (that.resource) {\r\n url += '&resource=' + encodeURIComponent(that.resource);\r\n }\r\n if (that.oidc) {\r\n url += '&nonce=' + encodeURIComponent(nonce);\r\n }\r\n if (noPrompt) {\r\n url += '&prompt=none';\r\n }\r\n for (const key of Object.keys(params)) {\r\n url +=\r\n '&' + encodeURIComponent(key) + '=' + encodeURIComponent(params[key]);\r\n }\r\n if (this.customQueryParams) {\r\n for (const key of Object.getOwnPropertyNames(this.customQueryParams)) {\r\n url +=\r\n '&' + key + '=' + encodeURIComponent(this.customQueryParams[key]);\r\n }\r\n }\r\n return url;\r\n }\r\n initImplicitFlowInternal(additionalState = '', params = '') {\r\n if (this.inImplicitFlow) {\r\n return;\r\n }\r\n this.inImplicitFlow = true;\r\n if (!this.validateUrlForHttps(this.loginUrl)) {\r\n throw new Error(\"loginUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).\");\r\n }\r\n let addParams = {};\r\n let loginHint = null;\r\n if (typeof params === 'string') {\r\n loginHint = params;\r\n }\r\n else if (typeof params === 'object') {\r\n addParams = params;\r\n }\r\n this.createLoginUrl(additionalState, loginHint, null, false, addParams)\r\n .then(this.config.openUri)\r\n .catch((error) => {\r\n console.error('Error in initImplicitFlow', error);\r\n this.inImplicitFlow = false;\r\n });\r\n }\r\n /**\r\n * Starts the implicit flow and redirects to user to\r\n * the auth servers' login url.\r\n *\r\n * @param additionalState Optional state that is passed around.\r\n * You'll find this state in the property `state` after `tryLogin` logged in the user.\r\n * @param params Hash with additional parameter. If it is a string, it is used for the\r\n * parameter loginHint (for the sake of compatibility with former versions)\r\n */\r\n initImplicitFlow(additionalState = '', params = '') {\r\n if (this.loginUrl !== '') {\r\n this.initImplicitFlowInternal(additionalState, params);\r\n }\r\n else {\r\n this.events\r\n .pipe(filter((e) => e.type === 'discovery_document_loaded'))\r\n .subscribe((_) => this.initImplicitFlowInternal(additionalState, params));\r\n }\r\n }\r\n /**\r\n * Reset current implicit flow\r\n *\r\n * @description This method allows resetting the current implict flow in order to be initialized again.\r\n */\r\n resetImplicitFlow() {\r\n this.inImplicitFlow = false;\r\n }\r\n callOnTokenReceivedIfExists(options) {\r\n const that = this;\r\n if (options.onTokenReceived) {\r\n const tokenParams = {\r\n idClaims: that.getIdentityClaims(),\r\n idToken: that.getIdToken(),\r\n accessToken: that.getAccessToken(),\r\n state: that.state,\r\n };\r\n options.onTokenReceived(tokenParams);\r\n }\r\n }\r\n storeAccessTokenResponse(accessToken, refreshToken, expiresIn, grantedScopes, customParameters) {\r\n this._storage.setItem('access_token', accessToken);\r\n if (grantedScopes && !Array.isArray(grantedScopes)) {\r\n this._storage.setItem('granted_scopes', JSON.stringify(grantedScopes.split(' ')));\r\n }\r\n else if (grantedScopes && Array.isArray(grantedScopes)) {\r\n this._storage.setItem('granted_scopes', JSON.stringify(grantedScopes));\r\n }\r\n this._storage.setItem('access_token_stored_at', '' + this.dateTimeService.now());\r\n if (expiresIn) {\r\n const expiresInMilliSeconds = expiresIn * 1000;\r\n const now = this.dateTimeService.new();\r\n const expiresAt = now.getTime() + expiresInMilliSeconds;\r\n this._storage.setItem('expires_at', '' + expiresAt);\r\n }\r\n if (refreshToken) {\r\n this._storage.setItem('refresh_token', refreshToken);\r\n }\r\n if (customParameters) {\r\n customParameters.forEach((value, key) => {\r\n this._storage.setItem(key, value);\r\n });\r\n }\r\n }\r\n /**\r\n * Delegates to tryLoginImplicitFlow for the sake of competability\r\n * @param options Optional options.\r\n */\r\n tryLogin(options = null) {\r\n if (this.config.responseType === 'code') {\r\n return this.tryLoginCodeFlow(options).then((_) => true);\r\n }\r\n else {\r\n return this.tryLoginImplicitFlow(options);\r\n }\r\n }\r\n parseQueryString(queryString) {\r\n if (!queryString || queryString.length === 0) {\r\n return {};\r\n }\r\n if (queryString.charAt(0) === '?') {\r\n queryString = queryString.substr(1);\r\n }\r\n return this.urlHelper.parseQueryString(queryString);\r\n }\r\n async tryLoginCodeFlow(options = null) {\r\n options = options || {};\r\n const querySource = options.customHashFragment\r\n ? options.customHashFragment.substring(1)\r\n : window.location.search;\r\n const parts = this.getCodePartsFromUrl(querySource);\r\n const code = parts['code'];\r\n const state = parts['state'];\r\n const sessionState = parts['session_state'];\r\n if (!options.preventClearHashAfterLogin) {\r\n const href = location.origin +\r\n location.pathname +\r\n location.search\r\n .replace(/code=[^&\\$]*/, '')\r\n .replace(/scope=[^&\\$]*/, '')\r\n .replace(/state=[^&\\$]*/, '')\r\n .replace(/session_state=[^&\\$]*/, '')\r\n .replace(/^\\?&/, '?')\r\n .replace(/&$/, '')\r\n .replace(/^\\?$/, '')\r\n .replace(/&+/g, '&')\r\n .replace(/\\?&/, '?')\r\n .replace(/\\?$/, '') +\r\n location.hash;\r\n history.replaceState(null, window.name, href);\r\n }\r\n let [nonceInState, userState] = this.parseState(state);\r\n this.state = userState;\r\n if (parts['error']) {\r\n this.debug('error trying to login');\r\n this.handleLoginError(options, parts);\r\n const err = new OAuthErrorEvent('code_error', {}, parts);\r\n this.eventsSubject.next(err);\r\n return Promise.reject(err);\r\n }\r\n if (!options.disableNonceCheck) {\r\n if (!nonceInState) {\r\n this.saveRequestedRoute();\r\n return Promise.resolve();\r\n }\r\n if (!options.disableOAuth2StateCheck) {\r\n const success = this.validateNonce(nonceInState);\r\n if (!success) {\r\n const event = new OAuthErrorEvent('invalid_nonce_in_state', null);\r\n this.eventsSubject.next(event);\r\n return Promise.reject(event);\r\n }\r\n }\r\n this.storeSessionState(sessionState);\r\n if (code) {\r\n await this.getTokenFromCode(code, options);\r\n this.restoreRequestedRoute();\r\n return Promise.resolve();\r\n }\r\n else {\r\n return Promise.resolve();\r\n }\r\n }\r\n return Promise.reject();\r\n }\r\n saveRequestedRoute() {\r\n if (this.config.preserveRequestedRoute) {\r\n this._storage.setItem('requested_route', window.location.pathname + window.location.search);\r\n }\r\n }\r\n restoreRequestedRoute() {\r\n const requestedRoute = this._storage.getItem('requested_route');\r\n if (requestedRoute) {\r\n history.replaceState(null, '', window.location.origin + requestedRoute);\r\n }\r\n }\r\n /**\r\n * Retrieve the returned auth code from the redirect uri that has been called.\r\n * If required also check hash, as we could use hash location strategy.\r\n */\r\n getCodePartsFromUrl(queryString) {\r\n if (!queryString || queryString.length === 0) {\r\n return this.urlHelper.getHashFragmentParams();\r\n }\r\n // normalize query string\r\n if (queryString.charAt(0) === '?') {\r\n queryString = queryString.substr(1);\r\n }\r\n return this.urlHelper.parseQueryString(queryString);\r\n }\r\n /**\r\n * Get token using an intermediate code. Works for the Authorization Code flow.\r\n */\r\n getTokenFromCode(code, options) {\r\n let params = new HttpParams({ encoder: new WebHttpUrlEncodingCodec() })\r\n .set('grant_type', 'authorization_code')\r\n .set('code', code)\r\n .set('redirect_uri', options.customRedirectUri || this.redirectUri);\r\n if (!this.disablePKCE) {\r\n let PKCEVerifier;\r\n if (this.saveNoncesInLocalStorage &&\r\n typeof window['localStorage'] !== 'undefined') {\r\n PKCEVerifier = localStorage.getItem('PKCE_verifier');\r\n }\r\n else {\r\n PKCEVerifier = this._storage.getItem('PKCE_verifier');\r\n }\r\n if (!PKCEVerifier) {\r\n console.warn('No PKCE verifier found in oauth storage!');\r\n }\r\n else {\r\n params = params.set('code_verifier', PKCEVerifier);\r\n }\r\n }\r\n return this.fetchAndProcessToken(params, options);\r\n }\r\n fetchAndProcessToken(params, options) {\r\n options = options || {};\r\n this.assertUrlNotNullAndCorrectProtocol(this.tokenEndpoint, 'tokenEndpoint');\r\n let headers = new HttpHeaders().set('Content-Type', 'application/x-www-form-urlencoded');\r\n if (this.useHttpBasicAuth) {\r\n const header = btoa(`${this.clientId}:${this.dummyClientSecret}`);\r\n headers = headers.set('Authorization', 'Basic ' + header);\r\n }\r\n if (!this.useHttpBasicAuth) {\r\n params = params.set('client_id', this.clientId);\r\n }\r\n if (!this.useHttpBasicAuth && this.dummyClientSecret) {\r\n params = params.set('client_secret', this.dummyClientSecret);\r\n }\r\n return new Promise((resolve, reject) => {\r\n if (this.customQueryParams) {\r\n for (let key of Object.getOwnPropertyNames(this.customQueryParams)) {\r\n params = params.set(key, this.customQueryParams[key]);\r\n }\r\n }\r\n this.http\r\n .post(this.tokenEndpoint, params, { headers })\r\n .subscribe((tokenResponse) => {\r\n this.debug('refresh tokenResponse', tokenResponse);\r\n this.storeAccessTokenResponse(tokenResponse.access_token, tokenResponse.refresh_token, tokenResponse.expires_in ||\r\n this.fallbackAccessTokenExpirationTimeInSec, tokenResponse.scope, this.extractRecognizedCustomParameters(tokenResponse));\r\n if (this.oidc && tokenResponse.id_token) {\r\n this.processIdToken(tokenResponse.id_token, tokenResponse.access_token, options.disableNonceCheck)\r\n .then((result) => {\r\n this.storeIdToken(result);\r\n this.eventsSubject.next(new OAuthSuccessEvent('token_received'));\r\n this.eventsSubject.next(new OAuthSuccessEvent('token_refreshed'));\r\n resolve(tokenResponse);\r\n })\r\n .catch((reason) => {\r\n this.eventsSubject.next(new OAuthErrorEvent('token_validation_error', reason));\r\n console.error('Error validating tokens');\r\n console.error(reason);\r\n reject(reason);\r\n });\r\n }\r\n else {\r\n this.eventsSubject.next(new OAuthSuccessEvent('token_received'));\r\n this.eventsSubject.next(new OAuthSuccessEvent('token_refreshed'));\r\n resolve(tokenResponse);\r\n }\r\n }, (err) => {\r\n console.error('Error getting token', err);\r\n this.eventsSubject.next(new OAuthErrorEvent('token_refresh_error', err));\r\n reject(err);\r\n });\r\n });\r\n }\r\n /**\r\n * Checks whether there are tokens in the hash fragment\r\n * as a result of the implicit flow. These tokens are\r\n * parsed, validated and used to sign the user in to the\r\n * current client.\r\n *\r\n * @param options Optional options.\r\n */\r\n tryLoginImplicitFlow(options = null) {\r\n options = options || {};\r\n let parts;\r\n if (options.customHashFragment) {\r\n parts = this.urlHelper.getHashFragmentParams(options.customHashFragment);\r\n }\r\n else {\r\n parts = this.urlHelper.getHashFragmentParams();\r\n }\r\n this.debug('parsed url', parts);\r\n const state = parts['state'];\r\n let [nonceInState, userState] = this.parseState(state);\r\n this.state = userState;\r\n if (parts['error']) {\r\n this.debug('error trying to login');\r\n this.handleLoginError(options, parts);\r\n const err = new OAuthErrorEvent('token_error', {}, parts);\r\n this.eventsSubject.next(err);\r\n return Promise.reject(err);\r\n }\r\n const accessToken = parts['access_token'];\r\n const idToken = parts['id_token'];\r\n const sessionState = parts['session_state'];\r\n const grantedScopes = parts['scope'];\r\n if (!this.requestAccessToken && !this.oidc) {\r\n return Promise.reject('Either requestAccessToken or oidc (or both) must be true.');\r\n }\r\n if (this.requestAccessToken && !accessToken) {\r\n return Promise.resolve(false);\r\n }\r\n if (this.requestAccessToken && !options.disableOAuth2StateCheck && !state) {\r\n return Promise.resolve(false);\r\n }\r\n if (this.oidc && !idToken) {\r\n return Promise.resolve(false);\r\n }\r\n if (this.sessionChecksEnabled && !sessionState) {\r\n this.logger.warn('session checks (Session Status Change Notification) ' +\r\n 'were activated in the configuration but the id_token ' +\r\n 'does not contain a session_state claim');\r\n }\r\n if (this.requestAccessToken && !options.disableNonceCheck) {\r\n const success = this.validateNonce(nonceInState);\r\n if (!success) {\r\n const event = new OAuthErrorEvent('invalid_nonce_in_state', null);\r\n this.eventsSubject.next(event);\r\n return Promise.reject(event);\r\n }\r\n }\r\n if (this.requestAccessToken) {\r\n this.storeAccessTokenResponse(accessToken, null, parts['expires_in'] || this.fallbackAccessTokenExpirationTimeInSec, grantedScopes);\r\n }\r\n if (!this.oidc) {\r\n this.eventsSubject.next(new OAuthSuccessEvent('token_received'));\r\n if (this.clearHashAfterLogin && !options.preventClearHashAfterLogin) {\r\n this.clearLocationHash();\r\n }\r\n this.callOnTokenReceivedIfExists(options);\r\n return Promise.resolve(true);\r\n }\r\n return this.processIdToken(idToken, accessToken, options.disableNonceCheck)\r\n .then((result) => {\r\n if (options.validationHandler) {\r\n return options\r\n .validationHandler({\r\n accessToken: accessToken,\r\n idClaims: result.idTokenClaims,\r\n idToken: result.idToken,\r\n state: state,\r\n })\r\n .then((_) => result);\r\n }\r\n return result;\r\n })\r\n .then((result) => {\r\n this.storeIdToken(result);\r\n this.storeSessionState(sessionState);\r\n if (this.clearHashAfterLogin && !options.preventClearHashAfterLogin) {\r\n this.clearLocationHash();\r\n }\r\n this.eventsSubject.next(new OAuthSuccessEvent('token_received'));\r\n this.callOnTokenReceivedIfExists(options);\r\n this.inImplicitFlow = false;\r\n return true;\r\n })\r\n .catch((reason) => {\r\n this.eventsSubject.next(new OAuthErrorEvent('token_validation_error', reason));\r\n this.logger.error('Error validating tokens');\r\n this.logger.error(reason);\r\n return Promise.reject(reason);\r\n });\r\n }\r\n parseState(state) {\r\n let nonce = state;\r\n let userState = '';\r\n if (state) {\r\n const idx = state.indexOf(this.config.nonceStateSeparator);\r\n if (idx > -1) {\r\n nonce = state.substr(0, idx);\r\n userState = state.substr(idx + this.config.nonceStateSeparator.length);\r\n }\r\n }\r\n return [nonce, userState];\r\n }\r\n validateNonce(nonceInState) {\r\n let savedNonce;\r\n if (this.saveNoncesInLocalStorage &&\r\n typeof window['localStorage'] !== 'undefined') {\r\n savedNonce = localStorage.getItem('nonce');\r\n }\r\n else {\r\n savedNonce = this._storage.getItem('nonce');\r\n }\r\n if (savedNonce !== nonceInState) {\r\n const err = 'Validating access_token failed, wrong state/nonce.';\r\n console.error(err, savedNonce, nonceInState);\r\n return false;\r\n }\r\n return true;\r\n }\r\n storeIdToken(idToken) {\r\n this._storage.setItem('id_token', idToken.idToken);\r\n this._storage.setItem('id_token_claims_obj', idToken.idTokenClaimsJson);\r\n this._storage.setItem('id_token_expires_at', '' + idToken.idTokenExpiresAt);\r\n this._storage.setItem('id_token_stored_at', '' + this.dateTimeService.now());\r\n }\r\n storeSessionState(sessionState) {\r\n this._storage.setItem('session_state', sessionState);\r\n }\r\n getSessionState() {\r\n return this._storage.getItem('session_state');\r\n }\r\n handleLoginError(options, parts) {\r\n if (options.onLoginError) {\r\n options.onLoginError(parts);\r\n }\r\n if (this.clearHashAfterLogin && !options.preventClearHashAfterLogin) {\r\n this.clearLocationHash();\r\n }\r\n }\r\n getClockSkewInMsec(defaultSkewMsc = 600000) {\r\n if (!this.clockSkewInSec) {\r\n return defaultSkewMsc;\r\n }\r\n return this.clockSkewInSec * 1000;\r\n }\r\n /**\r\n * @ignore\r\n */\r\n processIdToken(idToken, accessToken, skipNonceCheck = false) {\r\n const tokenParts = idToken.split('.');\r\n const headerBase64 = this.padBase64(tokenParts[0]);\r\n const headerJson = b64DecodeUnicode(headerBase64);\r\n const header = JSON.parse(headerJson);\r\n const claimsBase64 = this.padBase64(tokenParts[1]);\r\n const claimsJson = b64DecodeUnicode(claimsBase64);\r\n const claims = JSON.parse(claimsJson);\r\n let savedNonce;\r\n if (this.saveNoncesInLocalStorage &&\r\n typeof window['localStorage'] !== 'undefined') {\r\n savedNonce = localStorage.getItem('nonce');\r\n }\r\n else {\r\n savedNonce = this._storage.getItem('nonce');\r\n }\r\n if (Array.isArray(claims.aud)) {\r\n if (claims.aud.every((v) => v !== this.clientId)) {\r\n const err = 'Wrong audience: ' + claims.aud.join(',');\r\n this.logger.warn(err);\r\n return Promise.reject(err);\r\n }\r\n }\r\n else {\r\n if (claims.aud !== this.clientId) {\r\n const err = 'Wrong audience: ' + claims.aud;\r\n this.logger.warn(err);\r\n return Promise.reject(err);\r\n }\r\n }\r\n if (!claims.sub) {\r\n const err = 'No sub claim in id_token';\r\n this.logger.warn(err);\r\n return Promise.reject(err);\r\n }\r\n /* For now, we only check whether the sub against\r\n * silentRefreshSubject when sessionChecksEnabled is on\r\n * We will reconsider in a later version to do this\r\n * in every other case too.\r\n */\r\n if (this.sessionChecksEnabled &&\r\n this.silentRefreshSubject &&\r\n this.silentRefreshSubject !== claims['sub']) {\r\n const err = 'After refreshing, we got an id_token for another user (sub). ' +\r\n `Expected sub: ${this.silentRefreshSubject}, received sub: ${claims['sub']}`;\r\n this.logger.warn(err);\r\n return Promise.reject(err);\r\n }\r\n if (!claims.iat) {\r\n const err = 'No iat claim in id_token';\r\n this.logger.warn(err);\r\n return Promise.reject(err);\r\n }\r\n if (!this.skipIssuerCheck && claims.iss !== this.issuer) {\r\n const err = 'Wrong issuer: ' + claims.iss;\r\n this.logger.warn(err);\r\n return Promise.reject(err);\r\n }\r\n if (!skipNonceCheck && claims.nonce !== savedNonce) {\r\n const err = 'Wrong nonce: ' + claims.nonce;\r\n this.logger.warn(err);\r\n return Promise.reject(err);\r\n }\r\n // at_hash is not applicable to authorization code flow\r\n // addressing https://github.com/manfredsteyer/angular-oauth2-oidc/issues/661\r\n // i.e. Based on spec the at_hash check is only true for implicit code flow on Ping Federate\r\n // https://www.pingidentity.com/developer/en/resources/openid-connect-developers-guide.html\r\n if (this.hasOwnProperty('responseType') &&\r\n (this.responseType === 'code' || this.responseType === 'id_token')) {\r\n this.disableAtHashCheck = true;\r\n }\r\n if (!this.disableAtHashCheck &&\r\n this.requestAccessToken &&\r\n !claims['at_hash']) {\r\n const err = 'An at_hash is needed!';\r\n this.logger.warn(err);\r\n return Promise.reject(err);\r\n }\r\n const now = this.dateTimeService.now();\r\n const issuedAtMSec = claims.iat * 1000;\r\n const expiresAtMSec = claims.exp * 1000;\r\n const clockSkewInMSec = this.getClockSkewInMsec(); // (this.getClockSkewInMsec() || 600) * 1000;\r\n if (issuedAtMSec - clockSkewInMSec >= now ||\r\n expiresAtMSec + clockSkewInMSec <= now) {\r\n const err = 'Token has expired';\r\n console.error(err);\r\n console.error({\r\n now: now,\r\n issuedAtMSec: issuedAtMSec,\r\n expiresAtMSec: expiresAtMSec,\r\n });\r\n return Promise.reject(err);\r\n }\r\n const validationParams = {\r\n accessToken: accessToken,\r\n idToken: idToken,\r\n jwks: this.jwks,\r\n idTokenClaims: claims,\r\n idTokenHeader: header,\r\n loadKeys: () => this.loadJwks(),\r\n };\r\n if (this.disableAtHashCheck) {\r\n return this.checkSignature(validationParams).then((_) => {\r\n const result = {\r\n idToken: idToken,\r\n idTokenClaims: claims,\r\n idTokenClaimsJson: claimsJson,\r\n idTokenHeader: header,\r\n idTokenHeaderJson: headerJson,\r\n idTokenExpiresAt: expiresAtMSec,\r\n };\r\n return result;\r\n });\r\n }\r\n return this.checkAtHash(validationParams).then((atHashValid) => {\r\n if (!this.disableAtHashCheck && this.requestAccessToken && !atHashValid) {\r\n const err = 'Wrong at_hash';\r\n this.logger.warn(err);\r\n return Promise.reject(err);\r\n }\r\n return this.checkSignature(validationParams).then((_) => {\r\n const atHashCheckEnabled = !this.disableAtHashCheck;\r\n const result = {\r\n idToken: idToken,\r\n idTokenClaims: claims,\r\n idTokenClaimsJson: claimsJson,\r\n idTokenHeader: header,\r\n idTokenHeaderJson: headerJson,\r\n idTokenExpiresAt: expiresAtMSec,\r\n };\r\n if (atHashCheckEnabled) {\r\n return this.checkAtHash(validationParams).then((atHashValid) => {\r\n if (this.requestAccessToken && !atHashValid) {\r\n const err = 'Wrong at_hash';\r\n this.logger.warn(err);\r\n return Promise.reject(err);\r\n }\r\n else {\r\n return result;\r\n }\r\n });\r\n }\r\n else {\r\n return result;\r\n }\r\n });\r\n });\r\n }\r\n /**\r\n * Returns the received claims about the user.\r\n */\r\n getIdentityClaims() {\r\n const claims = this._storage.getItem('id_token_claims_obj');\r\n if (!claims) {\r\n return null;\r\n }\r\n return JSON.parse(claims);\r\n }\r\n /**\r\n * Returns the granted scopes from the server.\r\n */\r\n getGrantedScopes() {\r\n const scopes = this._storage.getItem('granted_scopes');\r\n if (!scopes) {\r\n return null;\r\n }\r\n return JSON.parse(scopes);\r\n }\r\n /**\r\n * Returns the current id_token.\r\n */\r\n getIdToken() {\r\n return this._storage ? this._storage.getItem('id_token') : null;\r\n }\r\n padBase64(base64data) {\r\n while (base64data.length % 4 !== 0) {\r\n base64data += '=';\r\n }\r\n return base64data;\r\n }\r\n /**\r\n * Returns the current access_token.\r\n */\r\n getAccessToken() {\r\n return this._storage ? this._storage.getItem('access_token') : null;\r\n }\r\n getRefreshToken() {\r\n return this._storage ? this._storage.getItem('refresh_token') : null;\r\n }\r\n /**\r\n * Returns the expiration date of the access_token\r\n * as milliseconds since 1970.\r\n */\r\n getAccessTokenExpiration() {\r\n if (!this._storage.getItem('expires_at')) {\r\n return null;\r\n }\r\n return parseInt(this._storage.getItem('expires_at'), 10);\r\n }\r\n getAccessTokenStoredAt() {\r\n return parseInt(this._storage.getItem('access_token_stored_at'), 10);\r\n }\r\n getIdTokenStoredAt() {\r\n return parseInt(this._storage.getItem('id_token_stored_at'), 10);\r\n }\r\n /**\r\n * Returns the expiration date of the id_token\r\n * as milliseconds since 1970.\r\n */\r\n getIdTokenExpiration() {\r\n if (!this._storage.getItem('id_token_expires_at')) {\r\n return null;\r\n }\r\n return parseInt(this._storage.getItem('id_token_expires_at'), 10);\r\n }\r\n /**\r\n * Checkes, whether there is a valid access_token.\r\n */\r\n hasValidAccessToken() {\r\n if (this.getAccessToken()) {\r\n const expiresAt = this._storage.getItem('expires_at');\r\n const now = this.dateTimeService.new();\r\n if (expiresAt &&\r\n parseInt(expiresAt, 10) < now.getTime() - this.getClockSkewInMsec()) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n /**\r\n * Checks whether there is a valid id_token.\r\n */\r\n hasValidIdToken() {\r\n if (this.getIdToken()) {\r\n const expiresAt = this._storage.getItem('id_token_expires_at');\r\n const now = this.dateTimeService.new();\r\n if (expiresAt &&\r\n parseInt(expiresAt, 10) < now.getTime() - this.getClockSkewInMsec()) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n /**\r\n * Retrieve a saved custom property of the TokenReponse object. Only if predefined in authconfig.\r\n */\r\n getCustomTokenResponseProperty(requestedProperty) {\r\n return this._storage &&\r\n this.config.customTokenParameters &&\r\n this.config.customTokenParameters.indexOf(requestedProperty) >= 0 &&\r\n this._storage.getItem(requestedProperty) !== null\r\n ? JSON.parse(this._storage.getItem(requestedProperty))\r\n : null;\r\n }\r\n /**\r\n * Returns the auth-header that can be used\r\n * to transmit the access_token to a service\r\n */\r\n authorizationHeader() {\r\n return 'Bearer ' + this.getAccessToken();\r\n }\r\n logOut(customParameters = {}, state = '') {\r\n let noRedirectToLogoutUrl = false;\r\n if (typeof customParameters === 'boolean') {\r\n noRedirectToLogoutUrl = customParameters;\r\n customParameters = {};\r\n }\r\n const id_token = this.getIdToken();\r\n this._storage.removeItem('access_token');\r\n this._storage.removeItem('id_token');\r\n this._storage.removeItem('refresh_token');\r\n if (this.saveNoncesInLocalStorage) {\r\n localStorage.removeItem('nonce');\r\n localStorage.removeItem('PKCE_verifier');\r\n }\r\n else {\r\n this._storage.removeItem('nonce');\r\n this._storage.removeItem('PKCE_verifier');\r\n }\r\n this._storage.removeItem('expires_at');\r\n this._storage.removeItem('id_token_claims_obj');\r\n this._storage.removeItem('id_token_expires_at');\r\n this._storage.removeItem('id_token_stored_at');\r\n this._storage.removeItem('access_token_stored_at');\r\n this._storage.removeItem('granted_scopes');\r\n this._storage.removeItem('session_state');\r\n if (this.config.customTokenParameters) {\r\n this.config.customTokenParameters.forEach((customParam) => this._storage.removeItem(customParam));\r\n }\r\n this.silentRefreshSubject = null;\r\n this.eventsSubject.next(new OAuthInfoEvent('logout'));\r\n if (!this.logoutUrl) {\r\n return;\r\n }\r\n if (noRedirectToLogoutUrl) {\r\n return;\r\n }\r\n if (!id_token && !this.postLogoutRedirectUri) {\r\n return;\r\n }\r\n let logoutUrl;\r\n if (!this.validateUrlForHttps(this.logoutUrl)) {\r\n throw new Error(\"logoutUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).\");\r\n }\r\n // For backward compatibility\r\n if (this.logoutUrl.indexOf('{{') > -1) {\r\n logoutUrl = this.logoutUrl\r\n .replace(/\\{\\{id_token\\}\\}/, encodeURIComponent(id_token))\r\n .replace(/\\{\\{client_id\\}\\}/, encodeURIComponent(this.clientId));\r\n }\r\n else {\r\n let params = new HttpParams({ encoder: new WebHttpUrlEncodingCodec() });\r\n if (id_token) {\r\n params = params.set('id_token_hint', id_token);\r\n }\r\n const postLogoutUrl = this.postLogoutRedirectUri ||\r\n (this.redirectUriAsPostLogoutRedirectUriFallback && this.redirectUri) ||\r\n '';\r\n if (postLogoutUrl) {\r\n params = params.set('post_logout_redirect_uri', postLogoutUrl);\r\n if (state) {\r\n params = params.set('state', state);\r\n }\r\n }\r\n for (let key in customParameters) {\r\n params = params.set(key, customParameters[key]);\r\n }\r\n logoutUrl =\r\n this.logoutUrl +\r\n (this.logoutUrl.indexOf('?') > -1 ? '&' : '?') +\r\n params.toString();\r\n }\r\n this.config.openUri(logoutUrl);\r\n }\r\n /**\r\n * @ignore\r\n */\r\n createAndSaveNonce() {\r\n const that = this;\r\n return this.createNonce().then(function (nonce) {\r\n // Use localStorage for nonce if possible\r\n // localStorage is the only storage who survives a\r\n // redirect in ALL browsers (also IE)\r\n // Otherwiese we'd force teams who have to support\r\n // IE into using localStorage for everything\r\n if (that.saveNoncesInLocalStorage &&\r\n typeof window['localStorage'] !== 'undefined') {\r\n localStorage.setItem('nonce', nonce);\r\n }\r\n else {\r\n that._storage.setItem('nonce', nonce);\r\n }\r\n return nonce;\r\n });\r\n }\r\n /**\r\n * @ignore\r\n */\r\n ngOnDestroy() {\r\n this.clearAccessTokenTimer();\r\n this.clearIdTokenTimer();\r\n this.removeSilentRefreshEventListener();\r\n const silentRefreshFrame = this.document.getElementById(this.silentRefreshIFrameName);\r\n if (silentRefreshFrame) {\r\n silentRefreshFrame.remove();\r\n }\r\n this.stopSessionCheckTimer();\r\n this.removeSessionCheckEventListener();\r\n const sessionCheckFrame = this.document.getElementById(this.sessionCheckIFrameName);\r\n if (sessionCheckFrame) {\r\n sessionCheckFrame.remove();\r\n }\r\n }\r\n createNonce() {\r\n return new Promise((resolve) => {\r\n if (this.rngUrl) {\r\n throw new Error('createNonce with rng-web-api has not been implemented so far');\r\n }\r\n /*\r\n * This alphabet is from:\r\n * https://tools.ietf.org/html/rfc7636#section-4.1\r\n *\r\n * [A-Z] / [a-z] / [0-9] / \"-\" / \".\" / \"_\" / \"~\"\r\n */\r\n const unreserved = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~';\r\n let size = 45;\r\n let id = '';\r\n const crypto = typeof self === 'undefined' ? null : self.crypto || self['msCrypto'];\r\n if (crypto) {\r\n let bytes = new Uint8Array(size);\r\n crypto.getRandomValues(bytes);\r\n // Needed for IE\r\n if (!bytes.map) {\r\n bytes.map = Array.prototype.map;\r\n }\r\n bytes = bytes.map((x) => unreserved.charCodeAt(x % unreserved.length));\r\n id = String.fromCharCode.apply(null, bytes);\r\n }\r\n else {\r\n while (0 < size--) {\r\n id += unreserved[(Math.random() * unreserved.length) | 0];\r\n }\r\n }\r\n resolve(base64UrlEncode(id));\r\n });\r\n }\r\n async checkAtHash(params) {\r\n if (!this.tokenValidationHandler) {\r\n this.logger.warn('No tokenValidationHandler configured. Cannot check at_hash.');\r\n return true;\r\n }\r\n return this.tokenValidationHandler.validateAtHash(params);\r\n }\r\n checkSignature(params) {\r\n if (!this.tokenValidationHandler) {\r\n this.logger.warn('No tokenValidationHandler configured. Cannot check signature.');\r\n return Promise.resolve(null);\r\n }\r\n return this.tokenValidationHandler.validateSignature(params);\r\n }\r\n /**\r\n * Start the implicit flow or the code flow,\r\n * depending on your configuration.\r\n */\r\n initLoginFlow(additionalState = '', params = {}) {\r\n if (this.responseType === 'code') {\r\n return this.initCodeFlow(additionalState, params);\r\n }\r\n else {\r\n return this.initImplicitFlow(additionalState, params);\r\n }\r\n }\r\n /**\r\n * Starts the authorization code flow and redirects to user to\r\n * the auth servers login url.\r\n */\r\n initCodeFlow(additionalState = '', params = {}) {\r\n if (this.loginUrl !== '') {\r\n this.initCodeFlowInternal(additionalState, params);\r\n }\r\n else {\r\n this.events\r\n .pipe(filter((e) => e.type === 'discovery_document_loaded'))\r\n .subscribe((_) => this.initCodeFlowInternal(additionalState, params));\r\n }\r\n }\r\n initCodeFlowInternal(additionalState = '', params = {}) {\r\n if (!this.validateUrlForHttps(this.loginUrl)) {\r\n throw new Error(\"loginUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).\");\r\n }\r\n let addParams = {};\r\n let loginHint = null;\r\n if (typeof params === 'string') {\r\n loginHint = params;\r\n }\r\n else if (typeof params === 'object') {\r\n addParams = params;\r\n }\r\n this.createLoginUrl(additionalState, loginHint, null, false, addParams)\r\n .then(this.config.openUri)\r\n .catch((error) => {\r\n console.error('Error in initAuthorizationCodeFlow');\r\n console.error(error);\r\n });\r\n }\r\n async createChallangeVerifierPairForPKCE() {\r\n if (!this.crypto) {\r\n throw new Error('PKCE support for code flow needs a CryptoHander. Did you import the OAuthModule using forRoot() ?');\r\n }\r\n const verifier = await this.createNonce();\r\n const challengeRaw = await this.crypto.calcHash(verifier, 'sha-256');\r\n const challenge = base64UrlEncode(challengeRaw);\r\n return [challenge, verifier];\r\n }\r\n extractRecognizedCustomParameters(tokenResponse) {\r\n let foundParameters = new Map();\r\n if (!this.config.customTokenParameters) {\r\n return foundParameters;\r\n }\r\n this.config.customTokenParameters.forEach((recognizedParameter) => {\r\n if (tokenResponse[recognizedParameter]) {\r\n foundParameters.set(recognizedParameter, JSON.stringify(tokenResponse[recognizedParameter]));\r\n }\r\n });\r\n return foundParameters;\r\n }\r\n /**\r\n * Revokes the auth token to secure the vulnarability\r\n * of the token issued allowing the authorization server to clean\r\n * up any security credentials associated with the authorization\r\n */\r\n revokeTokenAndLogout(customParameters = {}, ignoreCorsIssues = false) {\r\n let revokeEndpoint = this.revocationEndpoint;\r\n let accessToken = this.getAccessToken();\r\n let refreshToken = this.getRefreshToken();\r\n if (!accessToken) {\r\n return;\r\n }\r\n let params = new HttpParams({ encoder: new WebHttpUrlEncodingCodec() });\r\n let headers = new HttpHeaders().set('Content-Type', 'application/x-www-form-urlencoded');\r\n if (this.useHttpBasicAuth) {\r\n const header = btoa(`${this.clientId}:${this.dummyClientSecret}`);\r\n headers = headers.set('Authorization', 'Basic ' + header);\r\n }\r\n if (!this.useHttpBasicAuth) {\r\n params = params.set('client_id', this.clientId);\r\n }\r\n if (!this.useHttpBasicAuth && this.dummyClientSecret) {\r\n params = params.set('client_secret', this.dummyClientSecret);\r\n }\r\n if (this.customQueryParams) {\r\n for (const key of Object.getOwnPropertyNames(this.customQueryParams)) {\r\n params = params.set(key, this.customQueryParams[key]);\r\n }\r\n }\r\n return new Promise((resolve, reject) => {\r\n let revokeAccessToken;\r\n let revokeRefreshToken;\r\n if (accessToken) {\r\n let revokationParams = params\r\n .set('token', accessToken)\r\n .set('token_type_hint', 'access_token');\r\n revokeAccessToken = this.http.post(revokeEndpoint, revokationParams, { headers });\r\n }\r\n else {\r\n revokeAccessToken = of(null);\r\n }\r\n if (refreshToken) {\r\n let revokationParams = params\r\n .set('token', refreshToken)\r\n .set('token_type_hint', 'refresh_token');\r\n revokeRefreshToken = this.http.post(revokeEndpoint, revokationParams, { headers });\r\n }\r\n else {\r\n revokeRefreshToken = of(null);\r\n }\r\n if (ignoreCorsIssues) {\r\n revokeAccessToken = revokeAccessToken.pipe(catchError((err) => {\r\n if (err.status === 0) {\r\n return of(null);\r\n }\r\n return throwError(err);\r\n }));\r\n revokeRefreshToken = revokeRefreshToken.pipe(catchError((err) => {\r\n if (err.status === 0) {\r\n return of(null);\r\n }\r\n return throwError(err);\r\n }));\r\n }\r\n combineLatest([revokeAccessToken, revokeRefreshToken]).subscribe((res) => {\r\n this.logOut(customParameters);\r\n resolve(res);\r\n this.logger.info('Token successfully revoked');\r\n }, (err) => {\r\n this.logger.error('Error revoking token', err);\r\n this.eventsSubject.next(new OAuthErrorEvent('token_revoke_error', err));\r\n reject(err);\r\n });\r\n });\r\n }\r\n /**\r\n * Clear location.hash if it's present\r\n */\r\n clearLocationHash() {\r\n // Checking for empty hash is necessary for Firefox\r\n // as setting an empty hash to an empty string adds # to the URL\r\n if (location.hash != '') {\r\n location.hash = '';\r\n }\r\n }\r\n}\r\nOAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: OAuthService, deps: [{ token: i0.NgZone }, { token: i1.HttpClient }, { token: OAuthStorage, optional: true }, { token: ValidationHandler, optional: true }, { token: AuthConfig, optional: true }, { token: UrlHelperService }, { token: OAuthLogger }, { token: HashHandler, optional: true }, { token: DOCUMENT }, { token: DateTimeProvider }], target: i0.ɵɵFactoryTarget.Injectable });\r\nOAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: OAuthService });\r\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: OAuthService, decorators: [{\r\n type: Injectable\r\n }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.HttpClient }, { type: OAuthStorage, decorators: [{\r\n type: Optional\r\n }] }, { type: ValidationHandler, decorators: [{\r\n type: Optional\r\n }] }, { type: AuthConfig, decorators: [{\r\n type: Optional\r\n }] }, { type: UrlHelperService }, { type: OAuthLogger }, { type: HashHandler, decorators: [{\r\n type: Optional\r\n }] }, { type: undefined, decorators: [{\r\n type: Inject,\r\n args: [DOCUMENT]\r\n }] }, { type: DateTimeProvider }]; } });\n\nclass OAuthModuleConfig {\r\n}\r\nclass OAuthResourceServerConfig {\r\n}\n\nclass OAuthResourceServerErrorHandler {\r\n}\r\nclass OAuthNoopResourceServerErrorHandler {\r\n handleError(err) {\r\n return throwError(err);\r\n }\r\n}\n\nclass DefaultOAuthInterceptor {\r\n constructor(oAuthService, errorHandler, moduleConfig) {\r\n this.oAuthService = oAuthService;\r\n this.errorHandler = errorHandler;\r\n this.moduleConfig = moduleConfig;\r\n }\r\n checkUrl(url) {\r\n if (this.moduleConfig.resourceServer.customUrlValidation) {\r\n return this.moduleConfig.resourceServer.customUrlValidation(url);\r\n }\r\n if (this.moduleConfig.resourceServer.allowedUrls) {\r\n return !!this.moduleConfig.resourceServer.allowedUrls.find((u) => url.toLowerCase().startsWith(u.toLowerCase()));\r\n }\r\n return true;\r\n }\r\n intercept(req, next) {\r\n const url = req.url.toLowerCase();\r\n if (!this.moduleConfig ||\r\n !this.moduleConfig.resourceServer ||\r\n !this.checkUrl(url)) {\r\n return next.handle(req);\r\n }\r\n const sendAccessToken = this.moduleConfig.resourceServer.sendAccessToken;\r\n if (!sendAccessToken) {\r\n return next\r\n .handle(req)\r\n .pipe(catchError((err) => this.errorHandler.handleError(err)));\r\n }\r\n return merge(of(this.oAuthService.getAccessToken()).pipe(filter((token) => !!token)), this.oAuthService.events.pipe(filter((e) => e.type === 'token_received'), timeout(this.oAuthService.waitForTokenInMsec || 0), catchError((_) => of(null)), // timeout is not an error\r\n map((_) => this.oAuthService.getAccessToken()))).pipe(take(1), mergeMap((token) => {\r\n if (token) {\r\n const header = 'Bearer ' + token;\r\n const headers = req.headers.set('Authorization', header);\r\n req = req.clone({ headers });\r\n }\r\n return next\r\n .handle(req)\r\n .pipe(catchError((err) => this.errorHandler.handleError(err)));\r\n }));\r\n }\r\n}\r\nDefaultOAuthInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: DefaultOAuthInterceptor, deps: [{ token: OAuthService }, { token: OAuthResourceServerErrorHandler }, { token: OAuthModuleConfig, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\r\nDefaultOAuthInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: DefaultOAuthInterceptor });\r\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: DefaultOAuthInterceptor, decorators: [{\r\n type: Injectable\r\n }], ctorParameters: function () { return [{ type: OAuthService }, { type: OAuthResourceServerErrorHandler }, { type: OAuthModuleConfig, decorators: [{\r\n type: Optional\r\n }] }]; } });\n\n/**\r\n * A validation handler that isn't validating nothing.\r\n * Can be used to skip validation (at your own risk).\r\n */\r\nclass NullValidationHandler {\r\n validateSignature(validationParams) {\r\n return Promise.resolve(null);\r\n }\r\n validateAtHash(validationParams) {\r\n return Promise.resolve(true);\r\n }\r\n}\n\nfunction createDefaultLogger() {\r\n return console;\r\n}\r\nfunction createDefaultStorage() {\r\n return typeof sessionStorage !== 'undefined'\r\n ? sessionStorage\r\n : new MemoryStorage();\r\n}\n\nclass OAuthModule {\r\n static forRoot(config = null, validationHandlerClass = NullValidationHandler) {\r\n return {\r\n ngModule: OAuthModule,\r\n providers: [\r\n OAuthService,\r\n UrlHelperService,\r\n { provide: OAuthLogger, useFactory: createDefaultLogger },\r\n { provide: OAuthStorage, useFactory: createDefaultStorage },\r\n { provide: ValidationHandler, useClass: validationHandlerClass },\r\n { provide: HashHandler, useClass: DefaultHashHandler },\r\n {\r\n provide: OAuthResourceServerErrorHandler,\r\n useClass: OAuthNoopResourceServerErrorHandler,\r\n },\r\n { provide: OAuthModuleConfig, useValue: config },\r\n {\r\n provide: HTTP_INTERCEPTORS,\r\n useClass: DefaultOAuthInterceptor,\r\n multi: true,\r\n },\r\n { provide: DateTimeProvider, useClass: SystemDateTimeProvider },\r\n ],\r\n };\r\n }\r\n}\r\nOAuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: OAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\r\nOAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: OAuthModule, imports: [CommonModule] });\r\nOAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: OAuthModule, imports: [[CommonModule]] });\r\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.1\", ngImport: i0, type: OAuthModule, decorators: [{\r\n type: NgModule,\r\n args: [{\r\n imports: [CommonModule],\r\n declarations: [],\r\n exports: [],\r\n }]\r\n }] });\n\nconst err = `PLEASE READ THIS CAREFULLY:\n\nBeginning with angular-oauth2-oidc version 9, the JwksValidationHandler\nhas been moved to an library of its own. If you need it for implementing\nOAuth2/OIDC **implicit flow**, please install it using npm:\n\n npm i angular-oauth2-oidc-jwks --save\n\nAfter that, you can import it into your application:\n\n import { JwksValidationHandler } from 'angular-oauth2-oidc-jwks';\n\nPlease note, that this dependency is not needed for the **code flow**,\nwhich is nowadays the **recommented** one for single page applications.\nThis also results in smaller bundle sizes.\n`;\r\n/**\r\n * This is just a dummy of the JwksValidationHandler\r\n * telling the users that the real one has been moved\r\n * to an library of its own, namely angular-oauth2-oidc-utils\r\n */\r\nclass JwksValidationHandler extends NullValidationHandler {\r\n constructor() {\r\n super();\r\n console.error(err);\r\n }\r\n}\n\nconst AUTH_CONFIG = new InjectionToken('AUTH_CONFIG');\n\n/**\r\n * Generated bundle index. Do not edit.\r\n */\n\nexport { AUTH_CONFIG, AbstractValidationHandler, AuthConfig, DateTimeProvider, DefaultHashHandler, DefaultOAuthInterceptor, HashHandler, JwksValidationHandler, LoginOptions, MemoryStorage, NullValidationHandler, OAuthErrorEvent, OAuthEvent, OAuthInfoEvent, OAuthLogger, OAuthModule, OAuthModuleConfig, OAuthNoopResourceServerErrorHandler, OAuthResourceServerConfig, OAuthResourceServerErrorHandler, OAuthService, OAuthStorage, OAuthSuccessEvent, ReceivedTokens, SystemDateTimeProvider, UrlHelperService, ValidationHandler };\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,324,448,449,519,520,521,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772]}