@angular/router 20.0.0-next.1 → 20.0.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.1
2
+ * @license Angular v20.0.0-next.3
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import * as i0 from '@angular/core';
8
- import { ɵisPromise, ɵRuntimeError, Injectable, createEnvironmentInjector, ɵisNgModule, isStandalone, InjectionToken, EventEmitter, input, inject, ViewContainerRef, ChangeDetectorRef, Directive, Input, Output, reflectComponentType, ɵisInjectable, runInInjectionContext, Component, Compiler, NgModuleFactory, NgZone, afterNextRender, EnvironmentInjector, DestroyRef, ɵConsole, ɵPendingTasksInternal, ɵɵsanitizeUrlOrResourceUrl, booleanAttribute, Attribute, HostBinding, HostListener, Optional, ContentChildren, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, ENVIRONMENT_INITIALIZER, Injector, ApplicationRef, InjectFlags, APP_INITIALIZER, SkipSelf, NgModule, Version, ɵpublishExternalGlobalUtil } from '@angular/core';
8
+ import { ɵisPromise as _isPromise, ɵRuntimeError as _RuntimeError, Injectable, ɵisNgModule as _isNgModule, isStandalone, createEnvironmentInjector, InjectionToken, EventEmitter, input, inject, ViewContainerRef, ChangeDetectorRef, Output, Input, Directive, reflectComponentType, ɵisInjectable as _isInjectable, runInInjectionContext, Component, NgModuleFactory, Compiler, NgZone, afterNextRender, EnvironmentInjector, DestroyRef, ɵConsole as _Console, ɵPendingTasksInternal as _PendingTasksInternal, ɵINTERNAL_APPLICATION_ERROR_HANDLER as _INTERNAL_APPLICATION_ERROR_HANDLER, ɵɵsanitizeUrlOrResourceUrl as __sanitizeUrlOrResourceUrl, booleanAttribute, HostListener, HostBinding, Attribute, ContentChildren, Optional, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, ENVIRONMENT_INITIALIZER, Injector, ApplicationRef, APP_INITIALIZER, SkipSelf, NgModule, Version } from '@angular/core';
9
9
  import { isObservable, from, of, BehaviorSubject, combineLatest, EmptyError, concat, defer, pipe, throwError, EMPTY, ConnectableObservable, Subject, Subscription } from 'rxjs';
10
10
  import * as i3 from '@angular/common';
11
- import { DOCUMENT, Location, ViewportScroller, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';
11
+ import { DOCUMENT, Location, HashLocationStrategy, LocationStrategy, ViewportScroller, LOCATION_INITIALIZED, PathLocationStrategy } from '@angular/common';
12
12
  import { map, switchMap, take, startWith, filter, mergeMap, first, concatMap, tap, catchError, scan, defaultIfEmpty, last as last$1, takeLast, finalize, refCount, takeUntil, mergeAll } from 'rxjs/operators';
13
13
  import * as i1 from '@angular/platform-browser';
14
14
 
@@ -160,7 +160,7 @@ function wrapIntoObservable(value) {
160
160
  if (isObservable(value)) {
161
161
  return value;
162
162
  }
163
- if (ɵisPromise(value)) {
163
+ if (_isPromise(value)) {
164
164
  // Use `Promise.resolve()` to wrap promise-like instances.
165
165
  // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the
166
166
  // change detection.
@@ -300,7 +300,7 @@ class UrlTree {
300
300
  this.fragment = fragment;
301
301
  if (typeof ngDevMode === 'undefined' || ngDevMode) {
302
302
  if (root.segments.length > 0) {
303
- throw new ɵRuntimeError(4015 /* RuntimeErrorCode.INVALID_ROOT_URL_SEGMENT */, 'The root `UrlSegmentGroup` should not contain `segments`. ' +
303
+ throw new _RuntimeError(4015 /* RuntimeErrorCode.INVALID_ROOT_URL_SEGMENT */, 'The root `UrlSegmentGroup` should not contain `segments`. ' +
304
304
  'Instead, these segments belong in the `children` so they can be associated with a named outlet.');
305
305
  }
306
306
  }
@@ -433,10 +433,10 @@ function mapChildrenIntoArray(segment, fn) {
433
433
  * @publicApi
434
434
  */
435
435
  class UrlSerializer {
436
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
437
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
436
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
437
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
438
438
  }
439
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: UrlSerializer, decorators: [{
439
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: UrlSerializer, decorators: [{
440
440
  type: Injectable,
441
441
  args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]
442
442
  }] });
@@ -654,7 +654,7 @@ class UrlParser {
654
654
  parseSegment() {
655
655
  const path = matchSegments(this.remaining);
656
656
  if (path === '' && this.peekStartsWith(';')) {
657
- throw new ɵRuntimeError(4009 /* RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
657
+ throw new _RuntimeError(4009 /* RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
658
658
  `Empty path url segment cannot have parameters: '${this.remaining}'.`);
659
659
  }
660
660
  this.capture(path);
@@ -724,7 +724,7 @@ class UrlParser {
724
724
  // if is is not one of these characters, then the segment was unescaped
725
725
  // or the group was not closed
726
726
  if (next !== '/' && next !== ')' && next !== ';') {
727
- throw new ɵRuntimeError(4010 /* RuntimeErrorCode.UNPARSABLE_URL */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Cannot parse url '${this.url}'`);
727
+ throw new _RuntimeError(4010 /* RuntimeErrorCode.UNPARSABLE_URL */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Cannot parse url '${this.url}'`);
728
728
  }
729
729
  let outletName = undefined;
730
730
  if (path.indexOf(':') > -1) {
@@ -757,7 +757,7 @@ class UrlParser {
757
757
  }
758
758
  capture(str) {
759
759
  if (!this.consumeOptional(str)) {
760
- throw new ɵRuntimeError(4011 /* RuntimeErrorCode.UNEXPECTED_VALUE_IN_URL */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Expected "${str}".`);
760
+ throw new _RuntimeError(4011 /* RuntimeErrorCode.UNEXPECTED_VALUE_IN_URL */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Expected "${str}".`);
761
761
  }
762
762
  }
763
763
  }
@@ -963,12 +963,12 @@ class Navigation {
963
963
  this.numberOfDoubleDots = numberOfDoubleDots;
964
964
  this.commands = commands;
965
965
  if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {
966
- throw new ɵRuntimeError(4003 /* RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
966
+ throw new _RuntimeError(4003 /* RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
967
967
  'Root segment cannot have matrix parameters');
968
968
  }
969
969
  const cmdWithOutlet = commands.find(isCommandWithOutlets);
970
970
  if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {
971
- throw new ɵRuntimeError(4004 /* RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
971
+ throw new _RuntimeError(4004 /* RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
972
972
  '{outlets:{}} has to be the last command');
973
973
  }
974
974
  }
@@ -1001,9 +1001,7 @@ function computeNavigation(commands) {
1001
1001
  }
1002
1002
  if (cmdIdx === 0) {
1003
1003
  cmd.split('/').forEach((urlPart, partIndex) => {
1004
- if (partIndex == 0 && urlPart === '.') {
1005
- // skip './a'
1006
- }
1004
+ if (partIndex == 0 && urlPart === '.') ;
1007
1005
  else if (partIndex == 0 && urlPart === '') {
1008
1006
  // '/a'
1009
1007
  isAbsolute = true;
@@ -1058,7 +1056,7 @@ function createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {
1058
1056
  dd -= ci;
1059
1057
  g = g.parent;
1060
1058
  if (!g) {
1061
- throw new ɵRuntimeError(4005 /* RuntimeErrorCode.INVALID_DOUBLE_DOTS */, (typeof ngDevMode === 'undefined' || ngDevMode) && "Invalid number of '../'");
1059
+ throw new _RuntimeError(4005 /* RuntimeErrorCode.INVALID_DOUBLE_DOTS */, (typeof ngDevMode === 'undefined' || ngDevMode) && "Invalid number of '../'");
1062
1060
  }
1063
1061
  ci = g.segments.length;
1064
1062
  }
@@ -1882,18 +1880,6 @@ function getOrCreateRouteInjectorIfNeeded(route, currentInjector) {
1882
1880
  }
1883
1881
  return route._injector ?? currentInjector;
1884
1882
  }
1885
- function getLoadedRoutes$1(route) {
1886
- return route._loadedRoutes;
1887
- }
1888
- function getLoadedInjector(route) {
1889
- return route._loadedInjector;
1890
- }
1891
- function getLoadedComponent(route) {
1892
- return route._loadedComponent;
1893
- }
1894
- function getProvidersInjector(route) {
1895
- return route._injector;
1896
- }
1897
1883
  function validateConfig(config, parentPath = '', requireStandaloneComponents = false) {
1898
1884
  // forEach doesn't iterate undefined values
1899
1885
  for (let i = 0; i < config.length; i++) {
@@ -1903,18 +1889,18 @@ function validateConfig(config, parentPath = '', requireStandaloneComponents = f
1903
1889
  }
1904
1890
  }
1905
1891
  function assertStandalone(fullPath, component) {
1906
- if (component && ɵisNgModule(component)) {
1907
- throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. You are using 'loadComponent' with a module, ` +
1892
+ if (component && _isNgModule(component)) {
1893
+ throw new _RuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. You are using 'loadComponent' with a module, ` +
1908
1894
  `but it must be used with standalone components. Use 'loadChildren' instead.`);
1909
1895
  }
1910
1896
  else if (component && !isStandalone(component)) {
1911
- throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. The component must be standalone.`);
1897
+ throw new _RuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. The component must be standalone.`);
1912
1898
  }
1913
1899
  }
1914
1900
  function validateNode(route, fullPath, requireStandaloneComponents) {
1915
1901
  if (typeof ngDevMode === 'undefined' || ngDevMode) {
1916
1902
  if (!route) {
1917
- throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `
1903
+ throw new _RuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `
1918
1904
  Invalid configuration of route '${fullPath}': Encountered undefined route.
1919
1905
  The reason might be an extra comma.
1920
1906
 
@@ -1927,7 +1913,7 @@ function validateNode(route, fullPath, requireStandaloneComponents) {
1927
1913
  `);
1928
1914
  }
1929
1915
  if (Array.isArray(route)) {
1930
- throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': Array cannot be specified`);
1916
+ throw new _RuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': Array cannot be specified`);
1931
1917
  }
1932
1918
  if (!route.redirectTo &&
1933
1919
  !route.component &&
@@ -1936,46 +1922,46 @@ function validateNode(route, fullPath, requireStandaloneComponents) {
1936
1922
  !route.loadChildren &&
1937
1923
  route.outlet &&
1938
1924
  route.outlet !== PRIMARY_OUTLET) {
1939
- 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`);
1925
+ 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`);
1940
1926
  }
1941
1927
  if (route.redirectTo && route.children) {
1942
- throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);
1928
+ throw new _RuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);
1943
1929
  }
1944
1930
  if (route.redirectTo && route.loadChildren) {
1945
- throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);
1931
+ throw new _RuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);
1946
1932
  }
1947
1933
  if (route.children && route.loadChildren) {
1948
- throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);
1934
+ throw new _RuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);
1949
1935
  }
1950
1936
  if (route.redirectTo && (route.component || route.loadComponent)) {
1951
- throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and component/loadComponent cannot be used together`);
1937
+ throw new _RuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and component/loadComponent cannot be used together`);
1952
1938
  }
1953
1939
  if (route.component && route.loadComponent) {
1954
- throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': component and loadComponent cannot be used together`);
1940
+ throw new _RuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': component and loadComponent cannot be used together`);
1955
1941
  }
1956
1942
  if (route.redirectTo && route.canActivate) {
1957
- throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +
1943
+ throw new _RuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +
1958
1944
  `so canActivate will never be executed.`);
1959
1945
  }
1960
1946
  if (route.path && route.matcher) {
1961
- throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);
1947
+ throw new _RuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);
1962
1948
  }
1963
1949
  if (route.redirectTo === void 0 &&
1964
1950
  !route.component &&
1965
1951
  !route.loadComponent &&
1966
1952
  !route.children &&
1967
1953
  !route.loadChildren) {
1968
- 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`);
1954
+ 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`);
1969
1955
  }
1970
1956
  if (route.path === void 0 && route.matcher === void 0) {
1971
- throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`);
1957
+ throw new _RuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`);
1972
1958
  }
1973
1959
  if (typeof route.path === 'string' && route.path.charAt(0) === '/') {
1974
- throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': path cannot start with a slash`);
1960
+ throw new _RuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': path cannot start with a slash`);
1975
1961
  }
1976
1962
  if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {
1977
1963
  const exp = `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;
1978
- throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '{path: "${fullPath}", redirectTo: "${route.redirectTo}"}': please provide 'pathMatch'. ${exp}`);
1964
+ throw new _RuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '{path: "${fullPath}", redirectTo: "${route.redirectTo}"}': please provide 'pathMatch'. ${exp}`);
1979
1965
  }
1980
1966
  if (requireStandaloneComponents) {
1981
1967
  assertStandalone(fullPath, route.component);
@@ -2123,10 +2109,10 @@ class ChildrenOutletContexts {
2123
2109
  getContext(childName) {
2124
2110
  return this.contexts.get(childName) || null;
2125
2111
  }
2126
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: ChildrenOutletContexts, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
2127
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
2112
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: ChildrenOutletContexts, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
2113
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
2128
2114
  }
2129
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
2115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
2130
2116
  type: Injectable,
2131
2117
  args: [{ providedIn: 'root' }]
2132
2118
  }], ctorParameters: () => [{ type: i0.EnvironmentInjector }] });
@@ -2845,12 +2831,12 @@ class RouterOutlet {
2845
2831
  */
2846
2832
  get component() {
2847
2833
  if (!this.activated)
2848
- throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated');
2834
+ throw new _RuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated');
2849
2835
  return this.activated.instance;
2850
2836
  }
2851
2837
  get activatedRoute() {
2852
2838
  if (!this.activated)
2853
- throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated');
2839
+ throw new _RuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated');
2854
2840
  return this._activatedRoute;
2855
2841
  }
2856
2842
  get activatedRouteData() {
@@ -2864,7 +2850,7 @@ class RouterOutlet {
2864
2850
  */
2865
2851
  detach() {
2866
2852
  if (!this.activated)
2867
- throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated');
2853
+ throw new _RuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated');
2868
2854
  this.location.detach();
2869
2855
  const cmp = this.activated;
2870
2856
  this.activated = null;
@@ -2893,7 +2879,7 @@ class RouterOutlet {
2893
2879
  }
2894
2880
  activateWith(activatedRoute, environmentInjector) {
2895
2881
  if (this.isActivated) {
2896
- throw new ɵRuntimeError(4013 /* RuntimeErrorCode.OUTLET_ALREADY_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
2882
+ throw new _RuntimeError(4013 /* RuntimeErrorCode.OUTLET_ALREADY_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
2897
2883
  'Cannot activate an already activated outlet');
2898
2884
  }
2899
2885
  this._activatedRoute = activatedRoute;
@@ -2913,10 +2899,10 @@ class RouterOutlet {
2913
2899
  this.inputBinder?.bindActivatedRouteToOutletComponent(this);
2914
2900
  this.activateEvents.emit(this.activated.instance);
2915
2901
  }
2916
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2917
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.0-next.1", type: RouterOutlet, isStandalone: true, selector: "router-outlet", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, routerOutletData: { classPropertyName: "routerOutletData", publicName: "routerOutletData", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], usesOnChanges: true, ngImport: i0 });
2902
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2903
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.0-next.3", type: RouterOutlet, isStandalone: true, selector: "router-outlet", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, routerOutletData: { classPropertyName: "routerOutletData", publicName: "routerOutletData", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], usesOnChanges: true, ngImport: i0 });
2918
2904
  }
2919
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterOutlet, decorators: [{
2905
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterOutlet, decorators: [{
2920
2906
  type: Directive,
2921
2907
  args: [{
2922
2908
  selector: 'router-outlet',
@@ -3044,10 +3030,10 @@ class RoutedComponentInputBinder {
3044
3030
  });
3045
3031
  this.outletDataSubscriptions.set(outlet, dataSubscription);
3046
3032
  }
3047
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RoutedComponentInputBinder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3048
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RoutedComponentInputBinder });
3033
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RoutedComponentInputBinder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3034
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RoutedComponentInputBinder });
3049
3035
  }
3050
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RoutedComponentInputBinder, decorators: [{
3036
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RoutedComponentInputBinder, decorators: [{
3051
3037
  type: Injectable
3052
3038
  }] });
3053
3039
 
@@ -3372,7 +3358,7 @@ function getTokenOrFunctionIdentity(tokenOrFunction, injector) {
3372
3358
  const NOT_FOUND = Symbol();
3373
3359
  const result = injector.get(tokenOrFunction, NOT_FOUND);
3374
3360
  if (result === NOT_FOUND) {
3375
- if (typeof tokenOrFunction === 'function' && !ɵisInjectable(tokenOrFunction)) {
3361
+ if (typeof tokenOrFunction === 'function' && !_isInjectable(tokenOrFunction)) {
3376
3362
  // We think the token is just a function so return it as-is
3377
3363
  return tokenOrFunction;
3378
3364
  }
@@ -3710,11 +3696,8 @@ class AbsoluteRedirect extends Error {
3710
3696
  function noMatch$1(segmentGroup) {
3711
3697
  return throwError(new NoMatch(segmentGroup));
3712
3698
  }
3713
- function absoluteRedirect(newTree) {
3714
- return throwError(new AbsoluteRedirect(newTree));
3715
- }
3716
3699
  function namedOutletsRedirect(redirectTo) {
3717
- return throwError(new ɵRuntimeError(4000 /* RuntimeErrorCode.NAMED_OUTLET_REDIRECT */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
3700
+ return throwError(new _RuntimeError(4000 /* RuntimeErrorCode.NAMED_OUTLET_REDIRECT */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
3718
3701
  `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`));
3719
3702
  }
3720
3703
  function canLoadFails(route) {
@@ -3792,7 +3775,7 @@ class ApplyRedirects {
3792
3775
  findPosParam(redirectTo, redirectToUrlSegment, posParams) {
3793
3776
  const pos = posParams[redirectToUrlSegment.path.substring(1)];
3794
3777
  if (!pos)
3795
- throw new ɵRuntimeError(4001 /* RuntimeErrorCode.MISSING_REDIRECT */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
3778
+ throw new _RuntimeError(4001 /* RuntimeErrorCode.MISSING_REDIRECT */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
3796
3779
  `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);
3797
3780
  return pos;
3798
3781
  }
@@ -3955,7 +3938,7 @@ class Recognizer {
3955
3938
  this.applyRedirects = new ApplyRedirects(this.urlSerializer, this.urlTree);
3956
3939
  }
3957
3940
  noMatchError(e) {
3958
- return new ɵRuntimeError(4002 /* RuntimeErrorCode.NO_MATCH */, typeof ngDevMode === 'undefined' || ngDevMode
3941
+ return new _RuntimeError(4002 /* RuntimeErrorCode.NO_MATCH */, typeof ngDevMode === 'undefined' || ngDevMode
3959
3942
  ? `Cannot match any routes. URL Segment: '${e.segmentGroup}'`
3960
3943
  : `'${e.segmentGroup}'`);
3961
3944
  }
@@ -4094,7 +4077,7 @@ class Recognizer {
4094
4077
  this.absoluteRedirectCount++;
4095
4078
  if (this.absoluteRedirectCount > MAX_ALLOWED_REDIRECTS) {
4096
4079
  if (ngDevMode) {
4097
- throw new ɵRuntimeError(4016 /* RuntimeErrorCode.INFINITE_REDIRECT */, `Detected possible infinite redirect when redirecting from '${this.urlTree}' to '${route.redirectTo}'.\n` +
4080
+ throw new _RuntimeError(4016 /* RuntimeErrorCode.INFINITE_REDIRECT */, `Detected possible infinite redirect when redirecting from '${this.urlTree}' to '${route.redirectTo}'.\n` +
4098
4081
  `This is currently a dev mode only error but will become a` +
4099
4082
  ` call stack size exceeded error in production in a future major version.`);
4100
4083
  }
@@ -4232,7 +4215,7 @@ function checkOutletNameUniqueness(nodes) {
4232
4215
  if (routeWithSameOutletName) {
4233
4216
  const p = routeWithSameOutletName.url.map((s) => s.toString()).join('/');
4234
4217
  const c = n.value.url.map((s) => s.toString()).join('/');
4235
- throw new ɵRuntimeError(4006 /* RuntimeErrorCode.TWO_SEGMENTS_WITH_SAME_OUTLET */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
4218
+ throw new _RuntimeError(4006 /* RuntimeErrorCode.TWO_SEGMENTS_WITH_SAME_OUTLET */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
4236
4219
  `Two segments cannot have the same outlet name: '${p}' and '${c}'.`);
4237
4220
  }
4238
4221
  names[n.value.outlet] = n.value;
@@ -4386,10 +4369,10 @@ class TitleStrategy {
4386
4369
  getResolvedTitleForRoute(snapshot) {
4387
4370
  return snapshot.data[RouteTitleKey];
4388
4371
  }
4389
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4390
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
4372
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4373
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
4391
4374
  }
4392
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: TitleStrategy, decorators: [{
4375
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: TitleStrategy, decorators: [{
4393
4376
  type: Injectable,
4394
4377
  args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
4395
4378
  }] });
@@ -4413,10 +4396,10 @@ class DefaultTitleStrategy extends TitleStrategy {
4413
4396
  this.title.setTitle(title);
4414
4397
  }
4415
4398
  }
4416
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
4417
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
4399
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
4400
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
4418
4401
  }
4419
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
4402
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
4420
4403
  type: Injectable,
4421
4404
  args: [{ providedIn: 'root' }]
4422
4405
  }], ctorParameters: () => [{ type: i1.Title }] });
@@ -4441,10 +4424,10 @@ const ROUTER_CONFIGURATION = new InjectionToken(typeof ngDevMode === 'undefined'
4441
4424
  * to this `EmptyOutletComponent`.
4442
4425
  */
4443
4426
  class ɵEmptyOutletComponent {
4444
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4445
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0-next.1", type: ɵEmptyOutletComponent, isStandalone: true, selector: "ng-component", exportAs: ["emptyRouterOutlet"], ngImport: i0, template: `<router-outlet/>`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
4427
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4428
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0-next.3", type: ɵEmptyOutletComponent, isStandalone: true, selector: "ng-component", exportAs: ["emptyRouterOutlet"], ngImport: i0, template: `<router-outlet/>`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
4446
4429
  }
4447
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
4430
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
4448
4431
  type: Component,
4449
4432
  args: [{
4450
4433
  template: `<router-outlet/>`,
@@ -4530,10 +4513,10 @@ class RouterConfigLoader {
4530
4513
  this.childrenLoaders.set(route, loader);
4531
4514
  return loader;
4532
4515
  }
4533
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterConfigLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4534
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
4516
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterConfigLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4517
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
4535
4518
  }
4536
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterConfigLoader, decorators: [{
4519
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterConfigLoader, decorators: [{
4537
4520
  type: Injectable,
4538
4521
  args: [{ providedIn: 'root' }]
4539
4522
  }] });
@@ -4600,10 +4583,10 @@ function maybeUnwrapDefaultExport(input) {
4600
4583
  * @publicApi
4601
4584
  */
4602
4585
  class UrlHandlingStrategy {
4603
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4604
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });
4586
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4587
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });
4605
4588
  }
4606
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
4589
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
4607
4590
  type: Injectable,
4608
4591
  args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]
4609
4592
  }] });
@@ -4620,10 +4603,10 @@ class DefaultUrlHandlingStrategy {
4620
4603
  merge(newUrlPart, wholeUrl) {
4621
4604
  return newUrlPart;
4622
4605
  }
4623
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4624
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });
4606
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4607
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });
4625
4608
  }
4626
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
4609
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
4627
4610
  type: Injectable,
4628
4611
  args: [{ providedIn: 'root' }]
4629
4612
  }] });
@@ -4737,35 +4720,19 @@ class NavigationTransitions {
4737
4720
  }
4738
4721
  handleNavigationRequest(request) {
4739
4722
  const id = ++this.navigationId;
4740
- this.transitions?.next({ ...this.transitions.value, ...request, id });
4741
- }
4742
- setupNavigations(router, initialUrlTree, initialRouterState) {
4743
- this.transitions = new BehaviorSubject({
4744
- id: 0,
4745
- currentUrlTree: initialUrlTree,
4746
- currentRawUrl: initialUrlTree,
4747
- extractedUrl: this.urlHandlingStrategy.extract(initialUrlTree),
4748
- urlAfterRedirects: this.urlHandlingStrategy.extract(initialUrlTree),
4749
- rawUrl: initialUrlTree,
4750
- extras: {},
4751
- resolve: () => { },
4752
- reject: () => { },
4753
- promise: Promise.resolve(true),
4754
- source: IMPERATIVE_NAVIGATION,
4755
- restoredState: null,
4756
- currentSnapshot: initialRouterState.snapshot,
4723
+ this.transitions?.next({
4724
+ ...request,
4725
+ extractedUrl: this.urlHandlingStrategy.extract(request.rawUrl),
4757
4726
  targetSnapshot: null,
4758
- currentRouterState: initialRouterState,
4759
4727
  targetRouterState: null,
4760
4728
  guards: { canActivateChecks: [], canDeactivateChecks: [] },
4761
4729
  guardsResult: null,
4730
+ id,
4762
4731
  });
4763
- return this.transitions.pipe(filter((t) => t.id !== 0),
4764
- // Extract URL
4765
- map((t) => ({
4766
- ...t,
4767
- extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl),
4768
- })),
4732
+ }
4733
+ setupNavigations(router) {
4734
+ this.transitions = new BehaviorSubject(null);
4735
+ return this.transitions.pipe(filter((t) => t !== null),
4769
4736
  // Using switchMap so we cancel executing navigations when a new one comes in
4770
4737
  switchMap((overallTransitionState) => {
4771
4738
  let completed = false;
@@ -4814,9 +4781,8 @@ class NavigationTransitions {
4814
4781
  return of(t).pipe(
4815
4782
  // Fire NavigationStart event
4816
4783
  switchMap((t) => {
4817
- const transition = this.transitions?.getValue();
4818
4784
  this.events.next(new NavigationStart(t.id, this.urlSerializer.serialize(t.extractedUrl), t.source, t.restoredState));
4819
- if (transition !== this.transitions?.getValue()) {
4785
+ if (t.id !== this.navigationId) {
4820
4786
  return EMPTY;
4821
4787
  }
4822
4788
  // This delay is required to match old behavior that forced
@@ -4897,28 +4863,28 @@ class NavigationTransitions {
4897
4863
  }),
4898
4864
  // --- RESOLVE ---
4899
4865
  switchTap((t) => {
4900
- if (t.guards.canActivateChecks.length) {
4901
- return of(t).pipe(tap((t) => {
4902
- const resolveStart = new ResolveStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);
4903
- this.events.next(resolveStart);
4904
- }), switchMap((t) => {
4905
- let dataResolved = false;
4906
- return of(t).pipe(resolveData(this.paramsInheritanceStrategy, this.environmentInjector), tap({
4907
- next: () => (dataResolved = true),
4908
- complete: () => {
4909
- if (!dataResolved) {
4910
- this.cancelNavigationTransition(t, typeof ngDevMode === 'undefined' || ngDevMode
4911
- ? `At least one route resolver didn't emit any value.`
4912
- : '', NavigationCancellationCode.NoDataFromResolver);
4913
- }
4914
- },
4915
- }));
4916
- }), tap((t) => {
4917
- const resolveEnd = new ResolveEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);
4918
- this.events.next(resolveEnd);
4919
- }));
4866
+ if (t.guards.canActivateChecks.length === 0) {
4867
+ return undefined;
4920
4868
  }
4921
- return undefined;
4869
+ return of(t).pipe(tap((t) => {
4870
+ const resolveStart = new ResolveStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);
4871
+ this.events.next(resolveStart);
4872
+ }), switchMap((t) => {
4873
+ let dataResolved = false;
4874
+ return of(t).pipe(resolveData(this.paramsInheritanceStrategy, this.environmentInjector), tap({
4875
+ next: () => (dataResolved = true),
4876
+ complete: () => {
4877
+ if (!dataResolved) {
4878
+ this.cancelNavigationTransition(t, typeof ngDevMode === 'undefined' || ngDevMode
4879
+ ? `At least one route resolver didn't emit any value.`
4880
+ : '', NavigationCancellationCode.NoDataFromResolver);
4881
+ }
4882
+ },
4883
+ }));
4884
+ }), tap((t) => {
4885
+ const resolveEnd = new ResolveEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);
4886
+ this.events.next(resolveEnd);
4887
+ }));
4922
4888
  }),
4923
4889
  // --- LOAD COMPONENTS ---
4924
4890
  switchTap((t) => {
@@ -5088,10 +5054,10 @@ class NavigationTransitions {
5088
5054
  return (currentBrowserUrl.toString() !== targetBrowserUrl?.toString() &&
5089
5055
  !this.currentNavigation?.extras.skipLocationChange);
5090
5056
  }
5091
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5092
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });
5057
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5058
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });
5093
5059
  }
5094
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: NavigationTransitions, decorators: [{
5060
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: NavigationTransitions, decorators: [{
5095
5061
  type: Injectable,
5096
5062
  args: [{ providedIn: 'root' }]
5097
5063
  }], ctorParameters: () => [] });
@@ -5107,10 +5073,10 @@ function isBrowserTriggeredNavigation(source) {
5107
5073
  * @publicApi
5108
5074
  */
5109
5075
  class RouteReuseStrategy {
5110
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5111
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });
5076
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5077
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });
5112
5078
  }
5113
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouteReuseStrategy, decorators: [{
5079
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouteReuseStrategy, decorators: [{
5114
5080
  type: Injectable,
5115
5081
  args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]
5116
5082
  }] });
@@ -5161,19 +5127,19 @@ class BaseRouteReuseStrategy {
5161
5127
  }
5162
5128
  }
5163
5129
  class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
5164
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5165
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });
5130
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5131
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });
5166
5132
  }
5167
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
5133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
5168
5134
  type: Injectable,
5169
5135
  args: [{ providedIn: 'root' }]
5170
5136
  }] });
5171
5137
 
5172
5138
  class StateManager {
5173
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: StateManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5174
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: StateManager, providedIn: 'root', useFactory: () => inject(HistoryStateManager) });
5139
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: StateManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5140
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: StateManager, providedIn: 'root', useFactory: () => inject(HistoryStateManager) });
5175
5141
  }
5176
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: StateManager, decorators: [{
5142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: StateManager, decorators: [{
5177
5143
  type: Injectable,
5178
5144
  args: [{ providedIn: 'root', useFactory: () => inject(HistoryStateManager) }]
5179
5145
  }] });
@@ -5308,10 +5274,7 @@ class HistoryStateManager extends StateManager {
5308
5274
  this.resetState(navigation);
5309
5275
  this.resetUrlToCurrentUrlTree();
5310
5276
  }
5311
- else {
5312
- // The browser URL and router state was not updated before the navigation cancelled so
5313
- // there's no restoration needed.
5314
- }
5277
+ else ;
5315
5278
  }
5316
5279
  else if (this.canceledNavigationResolution === 'replace') {
5317
5280
  // TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op
@@ -5343,10 +5306,10 @@ class HistoryStateManager extends StateManager {
5343
5306
  }
5344
5307
  return { navigationId };
5345
5308
  }
5346
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: HistoryStateManager, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5347
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: HistoryStateManager, providedIn: 'root' });
5309
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: HistoryStateManager, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5310
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: HistoryStateManager, providedIn: 'root' });
5348
5311
  }
5349
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: HistoryStateManager, decorators: [{
5312
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: HistoryStateManager, decorators: [{
5350
5313
  type: Injectable,
5351
5314
  args: [{ providedIn: 'root' }]
5352
5315
  }] });
@@ -5423,15 +5386,16 @@ class Router {
5423
5386
  }
5424
5387
  disposed = false;
5425
5388
  nonRouterCurrentEntryChangeSubscription;
5426
- console = inject(ɵConsole);
5389
+ console = inject(_Console);
5427
5390
  stateManager = inject(StateManager);
5428
5391
  options = inject(ROUTER_CONFIGURATION, { optional: true }) || {};
5429
- pendingTasks = inject(ɵPendingTasksInternal);
5392
+ pendingTasks = inject(_PendingTasksInternal);
5430
5393
  urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';
5431
5394
  navigationTransitions = inject(NavigationTransitions);
5432
5395
  urlSerializer = inject(UrlSerializer);
5433
5396
  location = inject(Location);
5434
5397
  urlHandlingStrategy = inject(UrlHandlingStrategy);
5398
+ injector = inject(EnvironmentInjector);
5435
5399
  /**
5436
5400
  * The private `Subject` type for the public events exposed in the getter. This is used internally
5437
5401
  * to push events to. The separate field allows us to expose separate types in the public API
@@ -5486,9 +5450,7 @@ class Router {
5486
5450
  componentInputBindingEnabled = !!inject(INPUT_BINDER, { optional: true });
5487
5451
  constructor() {
5488
5452
  this.resetConfig(this.config);
5489
- this.navigationTransitions
5490
- .setupNavigations(this, this.currentUrlTree, this.routerState)
5491
- .subscribe({
5453
+ this.navigationTransitions.setupNavigations(this).subscribe({
5492
5454
  error: (e) => {
5493
5455
  this.console.warn(ngDevMode ? `Unhandled Navigation Error: ${e}` : e);
5494
5456
  },
@@ -5613,7 +5575,9 @@ class Router {
5613
5575
  }
5614
5576
  }
5615
5577
  const urlTree = this.parseUrl(url);
5616
- this.scheduleNavigation(urlTree, source, restoredState, extras);
5578
+ this.scheduleNavigation(urlTree, source, restoredState, extras).catch((e) => {
5579
+ this.injector.get(_INTERNAL_APPLICATION_ERROR_HANDLER)(e);
5580
+ });
5617
5581
  }
5618
5582
  /** The current URL. */
5619
5583
  get url() {
@@ -5911,10 +5875,10 @@ class Router {
5911
5875
  return Promise.reject(e);
5912
5876
  });
5913
5877
  }
5914
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5915
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: Router, providedIn: 'root' });
5878
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5879
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: Router, providedIn: 'root' });
5916
5880
  }
5917
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: Router, decorators: [{
5881
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: Router, decorators: [{
5918
5882
  type: Injectable,
5919
5883
  args: [{ providedIn: 'root' }]
5920
5884
  }], ctorParameters: () => [] });
@@ -5922,7 +5886,7 @@ function validateCommands(commands) {
5922
5886
  for (let i = 0; i < commands.length; i++) {
5923
5887
  const cmd = commands[i];
5924
5888
  if (cmd == null) {
5925
- throw new ɵRuntimeError(4008 /* RuntimeErrorCode.NULLISH_COMMAND */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
5889
+ throw new _RuntimeError(4008 /* RuntimeErrorCode.NULLISH_COMMAND */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
5926
5890
  `The requested path contains ${cmd} segment at index ${i}`);
5927
5891
  }
5928
5892
  }
@@ -6098,6 +6062,7 @@ class RouterLink {
6098
6062
  subscription;
6099
6063
  /** @internal */
6100
6064
  onChanges = new Subject();
6065
+ applicationErrorHandler = inject(_INTERNAL_APPLICATION_ERROR_HANDLER);
6101
6066
  constructor(router, route, tabIndexAttribute, renderer, el, locationStrategy) {
6102
6067
  this.router = router;
6103
6068
  this.route = route;
@@ -6159,7 +6124,7 @@ class RouterLink {
6159
6124
  this.queryParamsHandling ||
6160
6125
  this.preserveFragment ||
6161
6126
  this.relativeTo)) {
6162
- throw new ɵRuntimeError(4016 /* RuntimeErrorCode.INVALID_ROUTER_LINK_INPUTS */, 'Cannot configure queryParams or fragment when using a UrlTree as the routerLink input value.');
6127
+ throw new _RuntimeError(4016 /* RuntimeErrorCode.INVALID_ROUTER_LINK_INPUTS */, 'Cannot configure queryParams or fragment when using a UrlTree as the routerLink input value.');
6163
6128
  }
6164
6129
  if (this.isAnchorElement) {
6165
6130
  this.updateHref();
@@ -6215,7 +6180,10 @@ class RouterLink {
6215
6180
  state: this.state,
6216
6181
  info: this.info,
6217
6182
  };
6218
- this.router.navigateByUrl(urlTree, extras);
6183
+ // navigateByUrl is mocked frequently in tests... Reduce breakages when adding `catch`
6184
+ this.router.navigateByUrl(urlTree, extras)?.catch((e) => {
6185
+ this.applicationErrorHandler(e);
6186
+ });
6219
6187
  // Return `false` for `<a>` elements to prevent default action
6220
6188
  // and cancel the native behavior, since the navigation is handled
6221
6189
  // by the Router.
@@ -6243,7 +6211,7 @@ class RouterLink {
6243
6211
  // Note: we should investigate whether we can switch to using `@HostBinding('attr.href')`
6244
6212
  // instead of applying a value via a renderer, after a final merge of the
6245
6213
  // `RouterLinkWithHref` directive.
6246
- ɵɵsanitizeUrlOrResourceUrl(this.href, this.el.nativeElement.tagName.toLowerCase(), 'href');
6214
+ __sanitizeUrlOrResourceUrl(this.href, this.el.nativeElement.tagName.toLowerCase(), 'href');
6247
6215
  this.applyAttributeValue('href', sanitizedValue);
6248
6216
  }
6249
6217
  applyAttributeValue(attrName, attrValue) {
@@ -6273,10 +6241,10 @@ class RouterLink {
6273
6241
  preserveFragment: this.preserveFragment,
6274
6242
  });
6275
6243
  }
6276
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
6277
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.0.0-next.1", type: RouterLink, isStandalone: true, selector: "[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", state: "state", info: "info", relativeTo: "relativeTo", preserveFragment: ["preserveFragment", "preserveFragment", booleanAttribute], skipLocationChange: ["skipLocationChange", "skipLocationChange", booleanAttribute], replaceUrl: ["replaceUrl", "replaceUrl", booleanAttribute], routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.target": "this.target" } }, usesOnChanges: true, ngImport: i0 });
6244
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
6245
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.0.0-next.3", type: RouterLink, isStandalone: true, selector: "[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", state: "state", info: "info", relativeTo: "relativeTo", preserveFragment: ["preserveFragment", "preserveFragment", booleanAttribute], skipLocationChange: ["skipLocationChange", "skipLocationChange", booleanAttribute], replaceUrl: ["replaceUrl", "replaceUrl", booleanAttribute], routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.target": "this.target" } }, usesOnChanges: true, ngImport: i0 });
6278
6246
  }
6279
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterLink, decorators: [{
6247
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterLink, decorators: [{
6280
6248
  type: Directive,
6281
6249
  args: [{
6282
6250
  selector: '[routerLink]',
@@ -6529,10 +6497,10 @@ class RouterLinkActive {
6529
6497
  const isActiveCheckFn = this.isLinkActive(this.router);
6530
6498
  return (this.link && isActiveCheckFn(this.link)) || this.links.some(isActiveCheckFn);
6531
6499
  }
6532
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
6533
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.1", type: RouterLinkActive, isStandalone: true, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
6500
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
6501
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.3", type: RouterLinkActive, isStandalone: true, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
6534
6502
  }
6535
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterLinkActive, decorators: [{
6503
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterLinkActive, decorators: [{
6536
6504
  type: Directive,
6537
6505
  args: [{
6538
6506
  selector: '[routerLinkActive]',
@@ -6583,10 +6551,10 @@ class PreloadAllModules {
6583
6551
  preload(route, fn) {
6584
6552
  return fn().pipe(catchError(() => of(null)));
6585
6553
  }
6586
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6587
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6554
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6555
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
6588
6556
  }
6589
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: PreloadAllModules, decorators: [{
6557
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: PreloadAllModules, decorators: [{
6590
6558
  type: Injectable,
6591
6559
  args: [{ providedIn: 'root' }]
6592
6560
  }] });
@@ -6603,10 +6571,10 @@ class NoPreloading {
6603
6571
  preload(route, fn) {
6604
6572
  return of(null);
6605
6573
  }
6606
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6607
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6574
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6575
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: NoPreloading, providedIn: 'root' });
6608
6576
  }
6609
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: NoPreloading, decorators: [{
6577
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: NoPreloading, decorators: [{
6610
6578
  type: Injectable,
6611
6579
  args: [{ providedIn: 'root' }]
6612
6580
  }] });
@@ -6702,10 +6670,10 @@ class RouterPreloader {
6702
6670
  }
6703
6671
  });
6704
6672
  }
6705
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
6706
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
6673
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
6674
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
6707
6675
  }
6708
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterPreloader, decorators: [{
6676
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterPreloader, decorators: [{
6709
6677
  type: Injectable,
6710
6678
  args: [{ providedIn: 'root' }]
6711
6679
  }], ctorParameters: () => [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }] });
@@ -6814,10 +6782,10 @@ class RouterScroller {
6814
6782
  this.routerEventsSubscription?.unsubscribe();
6815
6783
  this.scrollEventsSubscription?.unsubscribe();
6816
6784
  }
6817
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6818
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterScroller });
6785
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
6786
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterScroller });
6819
6787
  }
6820
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterScroller, decorators: [{
6788
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterScroller, decorators: [{
6821
6789
  type: Injectable
6822
6790
  }], ctorParameters: () => [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }] });
6823
6791
 
@@ -6972,8 +6940,8 @@ function getBootstrapListener() {
6972
6940
  if (injector.get(INITIAL_NAVIGATION) === 1 /* InitialNavigation.EnabledNonBlocking */) {
6973
6941
  router.initialNavigation();
6974
6942
  }
6975
- injector.get(ROUTER_PRELOADER, null, InjectFlags.Optional)?.setUpPreloading();
6976
- injector.get(ROUTER_SCROLLER, null, InjectFlags.Optional)?.init();
6943
+ injector.get(ROUTER_PRELOADER, null, { optional: true })?.setUpPreloading();
6944
+ injector.get(ROUTER_SCROLLER, null, { optional: true })?.init();
6977
6945
  router.resetRootComponentType(ref.componentTypes[0]);
6978
6946
  if (!bootstrapDone.closed) {
6979
6947
  bootstrapDone.next();
@@ -7493,11 +7461,11 @@ class RouterModule {
7493
7461
  providers: [{ provide: ROUTES, multi: true, useValue: routes }],
7494
7462
  };
7495
7463
  }
7496
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
7497
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });
7498
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterModule });
7464
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
7465
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });
7466
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterModule });
7499
7467
  }
7500
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: RouterModule, decorators: [{
7468
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.3", ngImport: i0, type: RouterModule, decorators: [{
7501
7469
  type: NgModule,
7502
7470
  args: [{
7503
7471
  imports: ROUTER_DIRECTIVES,
@@ -7536,7 +7504,7 @@ function providePathLocationStrategy() {
7536
7504
  }
7537
7505
  function provideForRootGuard(router) {
7538
7506
  if (router) {
7539
- throw new ɵRuntimeError(4007 /* RuntimeErrorCode.FOR_ROOT_CALLED_TWICE */, `The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector.` +
7507
+ throw new _RuntimeError(4007 /* RuntimeErrorCode.FOR_ROOT_CALLED_TWICE */, `The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector.` +
7540
7508
  ` Lazy loaded modules should use RouterModule.forChild() instead.`);
7541
7509
  }
7542
7510
  return 'guarded';
@@ -7637,25 +7605,7 @@ function mapToResolve(provider) {
7637
7605
  /**
7638
7606
  * @publicApi
7639
7607
  */
7640
- const VERSION = new Version('20.0.0-next.1');
7641
-
7642
- function getLoadedRoutes(route) {
7643
- return route._loadedRoutes;
7644
- }
7645
- ɵpublishExternalGlobalUtil('ɵgetLoadedRoutes', getLoadedRoutes);
7646
-
7647
- /**
7648
- * @module
7649
- * @description
7650
- * Entry point for all public APIs of this package.
7651
- */
7652
- // This file only reexports content of the `src` folder. Keep it that way.
7653
-
7654
- // This file is not used to build this module. It is only used during editing
7655
-
7656
- /**
7657
- * Generated bundle index. Do not edit.
7658
- */
7608
+ const VERSION = new Version('20.0.0-next.3');
7659
7609
 
7660
7610
  export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, EventType, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationCancellationCode, NavigationEnd, NavigationError, NavigationSkipped, NavigationSkippedCode, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTER_OUTLET_DATA, ROUTES, RedirectCommand, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, mapToCanActivate, mapToCanActivateChild, mapToCanDeactivate, mapToCanMatch, mapToResolve, provideRouter, provideRoutes, withComponentInputBinding, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, withViewTransitions, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, afterNextNavigation as ɵafterNextNavigation, loadChildren as ɵloadChildren };
7661
7611
  //# sourceMappingURL=router.mjs.map