Index: trip-planner-front/node_modules/@angular/router/bundles/router-testing.umd.js
===================================================================
--- trip-planner-front/node_modules/@angular/router/bundles/router-testing.umd.js	(revision 6a3a178323fd905112b5392bd9d3cb83b66ef2d3)
+++ trip-planner-front/node_modules/@angular/router/bundles/router-testing.umd.js	(revision bdd64917749115bbdd228a9569a675d590c112e3)
@@ -1,4 +1,4 @@
 /**
- * @license Angular v12.2.9
+ * @license Angular v12.2.13
  * (c) 2010-2021 Google LLC. https://angular.io/
  * License: MIT
Index: trip-planner-front/node_modules/@angular/router/bundles/router-upgrade.umd.js
===================================================================
--- trip-planner-front/node_modules/@angular/router/bundles/router-upgrade.umd.js	(revision 6a3a178323fd905112b5392bd9d3cb83b66ef2d3)
+++ trip-planner-front/node_modules/@angular/router/bundles/router-upgrade.umd.js	(revision bdd64917749115bbdd228a9569a675d590c112e3)
@@ -1,4 +1,4 @@
 /**
- * @license Angular v12.2.9
+ * @license Angular v12.2.13
  * (c) 2010-2021 Google LLC. https://angular.io/
  * License: MIT
Index: trip-planner-front/node_modules/@angular/router/bundles/router.umd.js
===================================================================
--- trip-planner-front/node_modules/@angular/router/bundles/router.umd.js	(revision 6a3a178323fd905112b5392bd9d3cb83b66ef2d3)
+++ trip-planner-front/node_modules/@angular/router/bundles/router.umd.js	(revision bdd64917749115bbdd228a9569a675d590c112e3)
@@ -1,4 +1,4 @@
 /**
- * @license Angular v12.2.9
+ * @license Angular v12.2.13
  * (c) 2010-2021 Google LLC. https://angular.io/
  * License: MIT
@@ -4823,4 +4823,5 @@
                     }
                 }), operators.finalize(function () {
+                    var _a;
                     /* When the navigation stream finishes either through error or success, we
                      * set the `completed` or `errored` flag. However, there are some situations
@@ -4855,8 +4856,9 @@
                         }
                     }
-                    // currentNavigation should always be reset to null here. If navigation was
-                    // successful, lastSuccessfulTransition will have already been set. Therefore
-                    // we can safely set currentNavigation to null here.
-                    _this.currentNavigation = null;
+                    // Only clear current navigation if it is still set to the one that
+                    // finalized.
+                    if (((_a = _this.currentNavigation) === null || _a === void 0 ? void 0 : _a.id) === t.id) {
+                        _this.currentNavigation = null;
+                    }
                 }), operators.catchError(function (e) {
                     // TODO(atscott): The NavigationTransition `t` used here does not accurately
@@ -6768,5 +6770,5 @@
      * @publicApi
      */
-    var VERSION = new core.Version('12.2.9');
+    var VERSION = new core.Version('12.2.13');
 
     /**
Index: trip-planner-front/node_modules/@angular/router/bundles/router.umd.js.map
===================================================================
--- trip-planner-front/node_modules/@angular/router/bundles/router.umd.js.map	(revision 6a3a178323fd905112b5392bd9d3cb83b66ef2d3)
+++ trip-planner-front/node_modules/@angular/router/bundles/router.umd.js.map	(revision bdd64917749115bbdd228a9569a675d590c112e3)
@@ -1,1 +1,1 @@
-{"version":3,"file":"router.umd.js","sources":["../../../../../external/npm/node_modules/tslib/tslib.es6.js","../../../../../packages/router/src/events.ts","../../../../../packages/router/src/shared.ts","../../../../../packages/router/src/utils/collection.ts","../../../../../packages/router/src/url_tree.ts","../../../../../packages/router/src/utils/tree.ts","../../../../../packages/router/src/router_state.ts","../../../../../packages/router/src/create_router_state.ts","../../../../../packages/router/src/create_url_tree.ts","../../../../../packages/router/src/operators/activate_routes.ts","../../../../../packages/router/src/config.ts","../../../../../packages/router/src/utils/type_guards.ts","../../../../../packages/router/src/operators/prioritized_guard_value.ts","../../../../../packages/router/src/components/empty_outlet.ts","../../../../../packages/router/src/utils/config.ts","../../../../../packages/router/src/utils/config_matching.ts","../../../../../packages/router/src/apply_redirects.ts","../../../../../packages/router/src/operators/apply_redirects.ts","../../../../../packages/router/src/utils/preactivation.ts","../../../../../packages/router/src/operators/check_guards.ts","../../../../../packages/router/src/recognize.ts","../../../../../packages/router/src/operators/recognize.ts","../../../../../packages/router/src/operators/resolve_data.ts","../../../../../packages/router/src/operators/switch_tap.ts","../../../../../packages/router/src/route_reuse_strategy.ts","../../../../../packages/router/src/router_config_loader.ts","../../../../../packages/router/src/router_outlet_context.ts","../../../../../packages/router/src/url_handling_strategy.ts","../../../../../packages/router/src/router.ts","../../../../../packages/router/src/directives/router_link.ts","../../../../../packages/router/src/directives/router_link_active.ts","../../../../../packages/router/src/directives/router_outlet.ts","../../../../../packages/router/src/router_preloader.ts","../../../../../packages/router/src/router_scroller.ts","../../../../../packages/router/src/router_module.ts","../../../../../packages/router/src/version.ts","../../../../../packages/router/src/private_export.ts","../../../../../packages/router/src/index.ts","../../../../../packages/router/public_api.ts","../../../../../packages/router/index.ts","../../../../../packages/router/router.ts"],"sourcesContent":["/*! *****************************************************************************\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    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\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","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from './config';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\n\n/**\n * Identifies the call or event that triggered a navigation.\n *\n * * 'imperative': Triggered by `router.navigateByUrl()` or `router.navigate()`.\n * * 'popstate' : Triggered by a `popstate` event.\n * * 'hashchange'-: Triggered by a `hashchange` event.\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative'|'popstate'|'hashchange';\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 */\nexport class RouterEvent {\n  constructor(\n      /** A unique ID that the router assigns to every router navigation. */\n      public id: number,\n      /** The URL that is the destination for this navigation. */\n      public url: string) {}\n}\n\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n  /**\n   * Identifies the call or event that triggered the navigation.\n   * An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.\n   *\n   * @see `NavigationEnd`\n   * @see `NavigationCancel`\n   * @see `NavigationError`\n   */\n  navigationTrigger?: 'imperative'|'popstate'|'hashchange';\n\n  /**\n   * The navigation state that was previously supplied to the `pushState` call,\n   * when the navigation is triggered by a `popstate` event. Otherwise null.\n   *\n   * The state object is defined by `NavigationExtras`, and contains any\n   * developer-defined state value, as well as a unique ID that\n   * the router assigns to every router transition/navigation.\n   *\n   * From the perspective of the router, the router never \"goes back\".\n   * When the user clicks on the back button in the browser,\n   * a new navigation ID is created.\n   *\n   * Use the ID in this previous-state object to differentiate between a newly created\n   * state and one returned to by a `popstate` event, so that you can restore some\n   * remembered state, such as scroll position.\n   *\n   */\n  restoredState?: {[k: string]: any, navigationId: number}|null;\n\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      navigationTrigger: 'imperative'|'popstate'|'hashchange' = 'imperative',\n      /** @docsNotRequired */\n      restoredState: {[k: string]: any, navigationId: number}|null = null) {\n    super(id, url);\n    this.navigationTrigger = navigationTrigger;\n    this.restoredState = restoredState;\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n  }\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 */\nexport class NavigationEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}')`;\n  }\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 */\nexport class NavigationCancel extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public reason: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n  }\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 */\nexport class NavigationError extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public error: any) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n  }\n}\n\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see `GuardsCheckEnd`\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see `GuardsCheckStart`\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot,\n      /** @docsNotRequired */\n      public shouldActivate: boolean) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n  }\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 */\nexport class ResolveStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see `ResolveStart`.\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see `RouteConfigLoadEnd`\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadStart(path: ${this.route.path})`;\n  }\n}\n\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see `RouteConfigLoadStart`\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadEnd(path: ${this.route.path})`;\n  }\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 */\nexport class ChildActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationStart(path: '${path}')`;\n  }\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 */\nexport class ChildActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationEnd(path: '${path}')`;\n  }\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 */\nexport class ActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationStart(path: '${path}')`;\n  }\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 */\nexport class ActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nexport class Scroll {\n  constructor(\n      /** @docsNotRequired */\n      readonly routerEvent: NavigationEnd,\n\n      /** @docsNotRequired */\n      readonly position: [number, number]|null,\n\n      /** @docsNotRequired */\n      readonly anchor: string|null) {}\n\n  toString(): string {\n    const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n    return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n  }\n}\n\n/**\n * Router events that allow you to track the lifecycle of the router.\n *\n * The events occur in the following sequence:\n *\n * * [NavigationStart](api/router/NavigationStart): Navigation starts.\n * * [RouteConfigLoadStart](api/router/RouteConfigLoadStart): Before\n * the router [lazy loads](/guide/router#lazy-loading) a route configuration.\n * * [RouteConfigLoadEnd](api/router/RouteConfigLoadEnd): After a route has been lazy loaded.\n * * [RoutesRecognized](api/router/RoutesRecognized): When the router parses the URL\n * and the routes are recognized.\n * * [GuardsCheckStart](api/router/GuardsCheckStart): When the router begins the *guards*\n * phase of routing.\n * * [ChildActivationStart](api/router/ChildActivationStart): When the router\n * begins activating a route's children.\n * * [ActivationStart](api/router/ActivationStart): When the router begins activating a route.\n * * [GuardsCheckEnd](api/router/GuardsCheckEnd): When the router finishes the *guards*\n * phase of routing successfully.\n * * [ResolveStart](api/router/ResolveStart): When the router begins the *resolve*\n * phase of routing.\n * * [ResolveEnd](api/router/ResolveEnd): When the router finishes the *resolve*\n * phase of routing successfully.\n * * [ChildActivationEnd](api/router/ChildActivationEnd): When the router finishes\n * activating a route's children.\n * * [ActivationEnd](api/router/ActivationEnd): When the router finishes activating a route.\n * * [NavigationEnd](api/router/NavigationEnd): When navigation ends successfully.\n * * [NavigationCancel](api/router/NavigationCancel): When navigation is canceled.\n * * [NavigationError](api/router/NavigationError): When navigation fails\n * due to an unexpected error.\n * * [Scroll](api/router/Scroll): When the user scrolls.\n *\n * @publicApi\n */\nexport type Event = RouterEvent|RouteConfigLoadStart|RouteConfigLoadEnd|ChildActivationStart|\n    ChildActivationEnd|ActivationStart|ActivationEnd|Scroll;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route, UrlMatchResult} from './config';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A collection of matrix and query URL parameters.\n * @see `convertToParamMap()`\n * @see `ParamMap`\n *\n * @publicApi\n */\nexport type Params = {\n  [key: string]: any;\n};\n\n/**\n * A map that provides access to the required and optional parameters\n * specific to a route.\n * The map supports retrieving a single value with `get()`\n * or multiple values with `getAll()`.\n *\n * @see [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\n *\n * @publicApi\n */\nexport interface ParamMap {\n  /**\n   * Reports whether the map contains a given parameter.\n   * @param name The parameter name.\n   * @returns True if the map contains the given parameter, false otherwise.\n   */\n  has(name: string): boolean;\n  /**\n   * Retrieves a single value for a parameter.\n   * @param name The parameter name.\n   * @return The parameter's single value,\n   * or the first value if the parameter has multiple values,\n   * or `null` when there is no such parameter.\n   */\n  get(name: string): string|null;\n  /**\n   * Retrieves multiple values for a parameter.\n   * @param name The parameter name.\n   * @return An array containing one or more values,\n   * or an empty array if there is no such parameter.\n   *\n   */\n  getAll(name: string): string[];\n\n  /** Names of the parameters in the map. */\n  readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n  private params: Params;\n\n  constructor(params: Params) {\n    this.params = params || {};\n  }\n\n  has(name: string): boolean {\n    return Object.prototype.hasOwnProperty.call(this.params, name);\n  }\n\n  get(name: string): string|null {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v[0] : v;\n    }\n\n    return null;\n  }\n\n  getAll(name: string): string[] {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v : [v];\n    }\n\n    return [];\n  }\n\n  get keys(): string[] {\n    return Object.keys(this.params);\n  }\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 */\nexport function convertToParamMap(params: Params): ParamMap {\n  return new ParamsAsMap(params);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport function navigationCancelingError(message: string) {\n  const error = Error('NavigationCancelingError: ' + message);\n  (error as any)[NAVIGATION_CANCELING_ERROR] = true;\n  return error;\n}\n\nexport function isNavigationCancelingError(error: Error) {\n  return error && (error as any)[NAVIGATION_CANCELING_ERROR];\n}\n\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nexport function defaultUrlMatcher(\n    segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult|null {\n  const parts = route.path!.split('/');\n\n  if (parts.length > segments.length) {\n    // The actual URL is shorter than the config, no match\n    return null;\n  }\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\n  const posParams: {[key: string]: UrlSegment} = {};\n\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    } else if (part !== segment.path) {\n      // The actual URL part does not match the config, no match\n      return null;\n    }\n  }\n\n  return {consumed: segments.slice(0, parts.length), posParams};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {from, Observable, of} from 'rxjs';\n\nimport {Params} from '../shared';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n  if (a.length !== b.length) return false;\n  for (let i = 0; i < a.length; ++i) {\n    if (!shallowEqual(a[i], b[i])) return false;\n  }\n  return true;\n}\n\nexport function shallowEqual(a: Params, b: Params): boolean {\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: string;\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/**\n * Test equality for arrays of strings or a string.\n */\nexport function equalArraysOrString(a: string|string[], b: string|string[]) {\n  if (Array.isArray(a) && Array.isArray(b)) {\n    if (a.length !== b.length) return false;\n    const aSorted = [...a].sort();\n    const bSorted = [...b].sort();\n    return aSorted.every((val, index) => bSorted[index] === val);\n  } else {\n    return a === b;\n  }\n}\n\n/**\n * Flattens single-level nested arrays.\n */\nexport function flatten<T>(arr: T[][]): T[] {\n  return Array.prototype.concat.apply([], arr);\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T|null {\n  return a.length > 0 ? a[a.length - 1] : null;\n}\n\n/**\n * Verifys all booleans in an array are `true`.\n */\nexport function and(bools: boolean[]): boolean {\n  return !bools.some(v => !v);\n}\n\nexport function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {\n  for (const prop in map) {\n    if (map.hasOwnProperty(prop)) {\n      callback(map[prop], prop);\n    }\n  }\n}\n\nexport function wrapIntoObservable<T>(value: T|Promise<T>|Observable<T>): Observable<T> {\n  if (isObservable(value)) {\n    return value;\n  }\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\n  return of(value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalArraysOrString, forEach, shallowEqual} from './utils/collection';\n\nexport function createEmptyUrlTree() {\n  return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\n\n/**\n * A set of options which specify how to determine if a `UrlTree` is active, given the `UrlTree`\n * for the current router state.\n *\n * @publicApi\n * @see Router.isActive\n */\nexport interface IsActiveMatchOptions {\n  /**\n   * Defines the strategy for comparing the matrix parameters of two `UrlTree`s.\n   *\n   * The matrix parameter matching is dependent on the strategy for matching the\n   * segments. That is, if the `paths` option is set to `'subset'`, only\n   * the matrix parameters of the matching segments will be compared.\n   *\n   * - `'exact'`: Requires that matching segments also have exact matrix parameter\n   * matches.\n   * - `'subset'`: The matching segments in the router's active `UrlTree` may contain\n   * extra matrix parameters, but those that exist in the `UrlTree` in question must match.\n   * - `'ignored'`: When comparing `UrlTree`s, matrix params will be ignored.\n   */\n  matrixParams: 'exact'|'subset'|'ignored';\n  /**\n   * Defines the strategy for comparing the query parameters of two `UrlTree`s.\n   *\n   * - `'exact'`: the query parameters must match exactly.\n   * - `'subset'`: the active `UrlTree` may contain extra parameters,\n   * but must match the key and value of any that exist in the `UrlTree` in question.\n   * - `'ignored'`: When comparing `UrlTree`s, query params will be ignored.\n   */\n  queryParams: 'exact'|'subset'|'ignored';\n  /**\n   * Defines the strategy for comparing the `UrlSegment`s of the `UrlTree`s.\n   *\n   * - `'exact'`: all segments in each `UrlTree` must match.\n   * - `'subset'`: a `UrlTree` will be determined to be active if it\n   * is a subtree of the active route. That is, the active route may contain extra\n   * segments, but must at least have all the segements of the `UrlTree` in question.\n   */\n  paths: 'exact'|'subset';\n  /**\n   * - 'exact'`: indicates that the `UrlTree` fragments must be equal.\n   * - `'ignored'`: the fragments will not be compared when determining if a\n   * `UrlTree` is active.\n   */\n  fragment: 'exact'|'ignored';\n}\n\ntype ParamMatchOptions = 'exact'|'subset'|'ignored';\n\ntype PathCompareFn =\n    (container: UrlSegmentGroup, containee: UrlSegmentGroup, matrixParams: ParamMatchOptions) =>\n        boolean;\ntype ParamCompareFn = (container: Params, containee: Params) => boolean;\n\nconst pathCompareMap: Record<IsActiveMatchOptions['paths'], PathCompareFn> = {\n  'exact': equalSegmentGroups,\n  'subset': containsSegmentGroup,\n};\nconst paramCompareMap: Record<ParamMatchOptions, ParamCompareFn> = {\n  'exact': equalParams,\n  'subset': containsParams,\n  'ignored': () => true,\n};\n\nexport function containsTree(\n    container: UrlTree, containee: UrlTree, options: IsActiveMatchOptions): boolean {\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}\n\nfunction equalParams(container: Params, containee: Params): boolean {\n  // TODO: This does not handle array params correctly.\n  return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup,\n    matrixParams: ParamMatchOptions): boolean {\n  if (!equalPath(container.segments, containee.segments)) return false;\n  if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {\n    return false;\n  }\n  if (container.numberOfChildren !== containee.numberOfChildren) return false;\n  for (const c in containee.children) {\n    if (!container.children[c]) return false;\n    if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams))\n      return false;\n  }\n  return true;\n}\n\nfunction containsParams(container: Params, containee: Params): boolean {\n  return Object.keys(containee).length <= Object.keys(container).length &&\n      Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key]));\n}\n\nfunction containsSegmentGroup(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup,\n    matrixParams: ParamMatchOptions): boolean {\n  return containsSegmentGroupHelper(container, containee, containee.segments, matrixParams);\n}\n\nfunction containsSegmentGroupHelper(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[],\n    matrixParams: ParamMatchOptions): boolean {\n  if (container.segments.length > containeePaths.length) {\n    const current = container.segments.slice(0, containeePaths.length);\n    if (!equalPath(current, containeePaths)) return false;\n    if (containee.hasChildren()) return false;\n    if (!matrixParamsMatch(current, containeePaths, matrixParams)) return false;\n    return true;\n\n  } else if (container.segments.length === containeePaths.length) {\n    if (!equalPath(container.segments, containeePaths)) return false;\n    if (!matrixParamsMatch(container.segments, containeePaths, matrixParams)) return false;\n    for (const c in containee.children) {\n      if (!container.children[c]) 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)) return false;\n    if (!matrixParamsMatch(container.segments, current, matrixParams)) return false;\n    if (!container.children[PRIMARY_OUTLET]) return false;\n    return containsSegmentGroupHelper(\n        container.children[PRIMARY_OUTLET], containee, next, matrixParams);\n  }\n}\n\nfunction matrixParamsMatch(\n    containerPaths: UrlSegment[], containeePaths: UrlSegment[], options: ParamMatchOptions) {\n  return containeePaths.every((containeeSegment, i) => {\n    return paramCompareMap[options](containerPaths[i].parameters, containeeSegment.parameters);\n  });\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 */\nexport class UrlTree {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The root segment group of the URL tree */\n      public root: UrlSegmentGroup,\n      /** The query params of the URL */\n      public queryParams: Params,\n      /** The fragment of the URL */\n      public fragment: string|null) {}\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return DEFAULT_SERIALIZER.serialize(this);\n  }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n  /** @internal */\n  _sourceSegment?: UrlSegmentGroup;\n  /** @internal */\n  _segmentIndexShift?: number;\n  /** The parent node in the url tree */\n  parent: UrlSegmentGroup|null = null;\n\n  constructor(\n      /** The URL segments of this group. See `UrlSegment` for more information */\n      public segments: UrlSegment[],\n      /** The list of children of this group */\n      public children: {[key: string]: UrlSegmentGroup}) {\n    forEach(children, (v: any, k: any) => v.parent = this);\n  }\n\n  /** Whether the segment has child segments */\n  hasChildren(): boolean {\n    return this.numberOfChildren > 0;\n  }\n\n  /** Number of child segments */\n  get numberOfChildren(): number {\n    return Object.keys(this.children).length;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePaths(this);\n  }\n}\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 */\nexport class UrlSegment {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _parameterMap!: ParamMap;\n\n  constructor(\n      /** The path part of a URL segment */\n      public path: string,\n\n      /** The matrix parameters associated with a segment */\n      public parameters: {[name: string]: string}) {}\n\n  get parameterMap() {\n    if (!this._parameterMap) {\n      this._parameterMap = convertToParamMap(this.parameters);\n    }\n    return this._parameterMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePath(this);\n  }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  if (as.length !== bs.length) return false;\n  return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n    segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[] {\n  let res: T[] = [];\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet === PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet !== PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  return res;\n}\n\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 */\nexport abstract class UrlSerializer {\n  /** Parse a url into a `UrlTree` */\n  abstract parse(url: string): UrlTree;\n\n  /** Converts a `UrlTree` into a url */\n  abstract serialize(tree: UrlTree): string;\n}\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 */\nexport class DefaultUrlSerializer implements UrlSerializer {\n  /** Parses a url into a `UrlTree` */\n  parse(url: string): UrlTree {\n    const p = new UrlParser(url);\n    return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n  }\n\n  /** Converts a `UrlTree` into a url */\n  serialize(tree: UrlTree): string {\n    const segment = `/${serializeSegment(tree.root, true)}`;\n    const query = serializeQueryParams(tree.queryParams);\n    const fragment =\n        typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : '';\n\n    return `${segment}${query}${fragment}`;\n  }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n  return segment.segments.map(p => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n  if (!segment.hasChildren()) {\n    return serializePaths(segment);\n  }\n\n  if (root) {\n    const primary = segment.children[PRIMARY_OUTLET] ?\n        serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n        '';\n    const children: string[] = [];\n\n    forEach(segment.children, (v: UrlSegmentGroup, k: string) => {\n      if (k !== PRIMARY_OUTLET) {\n        children.push(`${k}:${serializeSegment(v, false)}`);\n      }\n    });\n\n    return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n\n  } else {\n    const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n      if (k === PRIMARY_OUTLET) {\n        return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n      }\n\n      return [`${k}:${serializeSegment(v, false)}`];\n    });\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\n    return `${serializePaths(segment)}/(${children.join('//')})`;\n  }\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: string): string {\n  return encodeURIComponent(s)\n      .replace(/%40/g, '@')\n      .replace(/%3A/gi, ':')\n      .replace(/%24/g, '$')\n      .replace(/%2C/gi, ',');\n}\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 */\nexport function encodeUriQuery(s: string): string {\n  return encodeUriString(s).replace(/%3B/gi, ';');\n}\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 */\nexport function encodeUriFragment(s: string): string {\n  return encodeURI(s);\n}\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 */\nexport function encodeUriSegment(s: string): string {\n  return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n  return decodeURIComponent(s);\n}\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.\nexport function decodeQuery(s: string): string {\n  return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n  return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n  return Object.keys(params)\n      .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n      .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n  const strParams: string[] =\n      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\n  return strParams.length ? `?${strParams.join('&')}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str: string): string {\n  const match = str.match(SEGMENT_RE);\n  return match ? match[0] : '';\n}\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: string): string {\n  const match = str.match(QUERY_PARAM_RE);\n  return match ? match[0] : '';\n}\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: string): string {\n  const match = str.match(QUERY_PARAM_VALUE_RE);\n  return match ? match[0] : '';\n}\n\nclass UrlParser {\n  private remaining: string;\n\n  constructor(private url: string) {\n    this.remaining = url;\n  }\n\n  parseRootSegment(): UrlSegmentGroup {\n    this.consumeOptional('/');\n\n    if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n      return new UrlSegmentGroup([], {});\n    }\n\n    // The root segment group never has segments\n    return new UrlSegmentGroup([], this.parseChildren());\n  }\n\n  parseQueryParams(): Params {\n    const params: Params = {};\n    if (this.consumeOptional('?')) {\n      do {\n        this.parseQueryParam(params);\n      } while (this.consumeOptional('&'));\n    }\n    return params;\n  }\n\n  parseFragment(): string|null {\n    return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n  }\n\n  private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n    if (this.remaining === '') {\n      return {};\n    }\n\n    this.consumeOptional('/');\n\n    const segments: UrlSegment[] = [];\n    if (!this.peekStartsWith('(')) {\n      segments.push(this.parseSegment());\n    }\n\n    while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n      this.capture('/');\n      segments.push(this.parseSegment());\n    }\n\n    let children: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('/(')) {\n      this.capture('/');\n      children = this.parseParens(true);\n    }\n\n    let res: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('(')) {\n      res = this.parseParens(false);\n    }\n\n    if (segments.length > 0 || Object.keys(children).length > 0) {\n      res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n    }\n\n    return res;\n  }\n\n  // parse a segment with its matrix parameters\n  // ie `name;k1=v1;k2`\n  private parseSegment(): UrlSegment {\n    const path = matchSegments(this.remaining);\n    if (path === '' && this.peekStartsWith(';')) {\n      throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n    }\n\n    this.capture(path);\n    return new UrlSegment(decode(path), this.parseMatrixParams());\n  }\n\n  private parseMatrixParams(): {[key: string]: string} {\n    const params: {[key: string]: string} = {};\n    while (this.consumeOptional(';')) {\n      this.parseParam(params);\n    }\n    return params;\n  }\n\n  private parseParam(params: {[key: string]: string}): void {\n    const key = matchSegments(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchSegments(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    params[decode(key)] = decode(value);\n  }\n\n  // Parse a single query parameter `name[=value]`\n  private parseQueryParam(params: Params): void {\n    const key = matchQueryParams(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchUrlQueryParamValue(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    const decodedKey = decodeQuery(key);\n    const decodedVal = decodeQuery(value);\n\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    } else {\n      // Create a new value\n      params[decodedKey] = decodedVal;\n    }\n  }\n\n  // parse `(a/b//outlet_name:c/d)`\n  private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n    const segments: {[key: string]: UrlSegmentGroup} = {};\n    this.capture('(');\n\n    while (!this.consumeOptional(')') && this.remaining.length > 0) {\n      const path = matchSegments(this.remaining);\n\n      const next = this.remaining[path.length];\n\n      // if is is not one of these characters, then the segment was unescaped\n      // or the group was not closed\n      if (next !== '/' && next !== ')' && next !== ';') {\n        throw new Error(`Cannot parse url '${this.url}'`);\n      }\n\n      let outletName: string = undefined!;\n      if (path.indexOf(':') > -1) {\n        outletName = path.substr(0, path.indexOf(':'));\n        this.capture(outletName);\n        this.capture(':');\n      } else if (allowPrimary) {\n        outletName = PRIMARY_OUTLET;\n      }\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\n    return segments;\n  }\n\n  private peekStartsWith(str: string): boolean {\n    return this.remaining.startsWith(str);\n  }\n\n  // Consumes the prefix when it is present and returns whether it has been consumed\n  private consumeOptional(str: string): boolean {\n    if (this.peekStartsWith(str)) {\n      this.remaining = this.remaining.substring(str.length);\n      return true;\n    }\n    return false;\n  }\n\n  private capture(str: string): void {\n    if (!this.consumeOptional(str)) {\n      throw new Error(`Expected \"${str}\".`);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 class Tree<T> {\n  /** @internal */\n  _root: TreeNode<T>;\n\n  constructor(root: TreeNode<T>) {\n    this._root = root;\n  }\n\n  get root(): T {\n    return this._root.value;\n  }\n\n  /**\n   * @internal\n   */\n  parent(t: T): T|null {\n    const p = this.pathFromRoot(t);\n    return p.length > 1 ? p[p.length - 2] : null;\n  }\n\n  /**\n   * @internal\n   */\n  children(t: T): T[] {\n    const n = findNode(t, this._root);\n    return n ? n.children.map(t => t.value) : [];\n  }\n\n  /**\n   * @internal\n   */\n  firstChild(t: T): T|null {\n    const n = findNode(t, this._root);\n    return n && n.children.length > 0 ? n.children[0].value : null;\n  }\n\n  /**\n   * @internal\n   */\n  siblings(t: T): T[] {\n    const p = findPath(t, this._root);\n    if (p.length < 2) return [];\n\n    const c = p[p.length - 2].children.map(c => c.value);\n    return c.filter(cc => cc !== t);\n  }\n\n  /**\n   * @internal\n   */\n  pathFromRoot(t: T): T[] {\n    return findPath(t, this._root).map(s => s.value);\n  }\n}\n\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T>|null {\n  if (value === node.value) return node;\n\n  for (const child of node.children) {\n    const node = findNode(value, child);\n    if (node) return node;\n  }\n\n  return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n  if (value === node.value) return [node];\n\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\n  return [];\n}\n\nexport class TreeNode<T> {\n  constructor(public value: T, public children: TreeNode<T>[]) {}\n\n  toString(): string {\n    return `TreeNode(${this.value})`;\n  }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends {outlet: string}>(node: TreeNode<T>|null) {\n  const map: {[outlet: string]: TreeNode<T>} = {};\n\n  if (node) {\n    node.children.forEach(child => map[child.value.outlet] = child);\n  }\n\n  return map;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './config';\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalSegments, UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n\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 */\nexport class RouterState extends Tree<ActivatedRoute> {\n  /** @internal */\n  constructor(\n      root: TreeNode<ActivatedRoute>,\n      /** The current snapshot of the router state */\n      public snapshot: RouterStateSnapshot) {\n    super(root);\n    setRouterState(<RouterState>this, root);\n  }\n\n  override toString(): string {\n    return this.snapshot.toString();\n  }\n}\n\nexport function createEmptyState(urlTree: UrlTree, rootComponent: Type<any>|null): RouterState {\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(\n      emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent,\n      snapshot.root);\n  activated.snapshot = snapshot.root;\n  return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(\n    urlTree: UrlTree, rootComponent: Type<any>|null): RouterStateSnapshot {\n  const emptyParams = {};\n  const emptyData = {};\n  const emptyQueryParams = {};\n  const fragment = '';\n  const activated = new ActivatedRouteSnapshot(\n      [], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null,\n      urlTree.root, -1, {});\n  return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\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 */\nexport class ActivatedRoute {\n  /** The current snapshot of this route */\n  snapshot!: ActivatedRouteSnapshot;\n  /** @internal */\n  _futureSnapshot: ActivatedRouteSnapshot;\n  /** @internal */\n  _routerState!: RouterState;\n  /** @internal */\n  _paramMap!: Observable<ParamMap>;\n  /** @internal */\n  _queryParamMap!: Observable<ParamMap>;\n\n  /** @internal */\n  constructor(\n      /** An observable of the URL segments matched by this route. */\n      public url: Observable<UrlSegment[]>,\n      /** An observable of the matrix parameters scoped to this route. */\n      public params: Observable<Params>,\n      /** An observable of the query parameters shared by all the routes. */\n      public queryParams: Observable<Params>,\n      /** An observable of the URL fragment shared by all the routes. */\n      public fragment: Observable<string|null>,\n      /** An observable of the static and resolved data of this route. */\n      public data: Observable<Data>,\n      /** The outlet name of the route, a constant. */\n      public outlet: string,\n      /** The component of the route, a constant. */\n      // TODO(vsavkin): remove |string\n      public component: Type<any>|string|null, futureSnapshot: ActivatedRouteSnapshot) {\n    this._futureSnapshot = futureSnapshot;\n  }\n\n  /** The configuration used to match this route. */\n  get routeConfig(): Route|null {\n    return this._futureSnapshot.routeConfig;\n  }\n\n  /** The root of the router state. */\n  get root(): ActivatedRoute {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree. */\n  get parent(): ActivatedRoute|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree. */\n  get firstChild(): ActivatedRoute|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree. */\n  get children(): ActivatedRoute[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route. */\n  get pathFromRoot(): ActivatedRoute[] {\n    return this._routerState.pathFromRoot(this);\n  }\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(): Observable<ParamMap> {\n    if (!this._paramMap) {\n      this._paramMap = this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._paramMap;\n  }\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(): Observable<ParamMap> {\n    if (!this._queryParamMap) {\n      this._queryParamMap =\n          this.queryParams.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n  }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly'|'always';\n\n/** @internal */\nexport type Inherited = {\n  params: Params,\n  data: Data,\n  resolve: Data,\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 */\nexport function inheritedParamsDataResolve(\n    route: ActivatedRouteSnapshot,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly'): Inherited {\n  const pathFromRoot = route.pathFromRoot;\n\n  let inheritingStartingFrom = 0;\n  if (paramsInheritanceStrategy !== 'always') {\n    inheritingStartingFrom = pathFromRoot.length - 1;\n\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\n        // parent is componentless => current route should inherit its params and data\n      } else if (!parent.component) {\n        inheritingStartingFrom--;\n\n      } else {\n        break;\n      }\n    }\n  }\n\n  return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n\n/** @internal */\nfunction flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {\n  return pathFromRoot.reduce((res, curr) => {\n    const params = {...res.params, ...curr.params};\n    const data = {...res.data, ...curr.data};\n    const resolve = {...res.resolve, ...curr._resolvedData};\n    return {params, data, resolve};\n  }, <any>{params: {}, data: {}, resolve: {}});\n}\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 */\nexport class ActivatedRouteSnapshot {\n  /** The configuration used to match this route **/\n  public readonly routeConfig: Route|null;\n  /** @internal **/\n  _urlSegment: UrlSegmentGroup;\n  /** @internal */\n  _lastPathIndex: number;\n  /** @internal */\n  _resolve: ResolveData;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _resolvedData!: Data;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _routerState!: RouterStateSnapshot;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _paramMap!: ParamMap;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The URL segments matched by this route */\n      public url: UrlSegment[],\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      public params: Params,\n      /** The query parameters shared by all the routes */\n      public queryParams: Params,\n      /** The URL fragment shared by all the routes */\n      public fragment: string|null,\n      /** The static and resolved data of this route */\n      public data: Data,\n      /** The outlet name of the route */\n      public outlet: string,\n      /** The component of the route */\n      public component: Type<any>|string|null, routeConfig: Route|null, urlSegment: UrlSegmentGroup,\n      lastPathIndex: number, resolve: ResolveData) {\n    this.routeConfig = routeConfig;\n    this._urlSegment = urlSegment;\n    this._lastPathIndex = lastPathIndex;\n    this._resolve = resolve;\n  }\n\n  /** The root of the router state */\n  get root(): ActivatedRouteSnapshot {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree */\n  get parent(): ActivatedRouteSnapshot|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree */\n  get firstChild(): ActivatedRouteSnapshot|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree */\n  get children(): ActivatedRouteSnapshot[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route */\n  get pathFromRoot(): ActivatedRouteSnapshot[] {\n    return this._routerState.pathFromRoot(this);\n  }\n\n  get paramMap(): ParamMap {\n    if (!this._paramMap) {\n      this._paramMap = convertToParamMap(this.params);\n    }\n    return this._paramMap;\n  }\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\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/**\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 */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n  /** @internal */\n  constructor(\n      /** The url from which this snapshot was created */\n      public url: string, root: TreeNode<ActivatedRouteSnapshot>) {\n    super(root);\n    setRouterState(<RouterStateSnapshot>this, root);\n  }\n\n  override toString(): string {\n    return serializeNode(this._root);\n  }\n}\n\nfunction setRouterState<U, T extends {_routerState: U}>(state: U, node: TreeNode<T>): void {\n  node.value._routerState = state;\n  node.children.forEach(c => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n  const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n  return `${node.value}${c}`;\n}\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 */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\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      (<any>route.queryParams).next(nextSnapshot.queryParams);\n    }\n    if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n      (<any>route.fragment).next(nextSnapshot.fragment);\n    }\n    if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n      (<any>route.params).next(nextSnapshot.params);\n    }\n    if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n      (<any>route.url).next(nextSnapshot.url);\n    }\n    if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n      (<any>route.data).next(nextSnapshot.data);\n    }\n  } else {\n    route.snapshot = route._futureSnapshot;\n\n    // this is for resolved data\n    (<any>route.data).next(route._futureSnapshot.data);\n  }\n}\n\n\nexport function equalParamsAndUrlSegments(\n    a: ActivatedRouteSnapshot, b: ActivatedRouteSnapshot): boolean {\n  const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n  const parentsMismatch = !a.parent !== !b.parent;\n\n  return equalUrlParams && !parentsMismatch &&\n      (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent!));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n    routeReuseStrategy: RouteReuseStrategy, curr: RouterStateSnapshot,\n    prevState: RouterState): RouterState {\n  const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n  return new RouterState(root, curr);\n}\n\nfunction createNode(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState?: TreeNode<ActivatedRoute>): TreeNode<ActivatedRoute> {\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<ActivatedRoute>(value, children);\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 as DetachedRouteHandleInternal).route;\n        setFutureSnapshotsOfActivatedRoutes(curr, tree);\n        return tree;\n      }\n    }\n\n    const value = createActivatedRoute(curr.value);\n    const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n    return new TreeNode<ActivatedRoute>(value, children);\n  }\n}\n\nfunction setFutureSnapshotsOfActivatedRoutes(\n    curr: TreeNode<ActivatedRouteSnapshot>, result: TreeNode<ActivatedRoute>): void {\n  if (curr.value.routeConfig !== result.value.routeConfig) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n  }\n  if (curr.children.length !== result.children.length) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n  }\n  result.value._futureSnapshot = curr.value;\n  for (let i = 0; i < curr.children.length; ++i) {\n    setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n  }\n}\n\nfunction createOrReuseChildren(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState: TreeNode<ActivatedRoute>) {\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}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n  return new ActivatedRoute(\n      new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams),\n      new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ActivatedRoute} from './router_state';\nimport {Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last, shallowEqual} from './utils/collection';\n\nexport function createUrlTree(\n    route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params|null,\n    fragment: string|null): UrlTree {\n  if (commands.length === 0) {\n    return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n  }\n\n  const nav = computeNavigation(commands);\n\n  if (nav.toRoot()) {\n    return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n  }\n\n  const startingPosition = findStartingPosition(nav, urlTree, route);\n\n  const segmentGroup = startingPosition.processChildren ?\n      updateSegmentGroupChildren(\n          startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n      updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n  return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n  return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\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: any): command is {outlets: {[key: string]: any}} {\n  return typeof command === 'object' && command != null && command.outlets;\n}\n\nfunction tree(\n    oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup, urlTree: UrlTree,\n    queryParams: Params|null, fragment: string|null): UrlTree {\n  let qp: any = {};\n  if (queryParams) {\n    forEach(queryParams, (value: any, name: any) => {\n      qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n    });\n  }\n\n  if (urlTree.root === oldSegmentGroup) {\n    return new UrlTree(newSegmentGroup, qp, fragment);\n  }\n\n  return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\n\nfunction replaceSegment(\n    current: UrlSegmentGroup, oldSegment: UrlSegmentGroup,\n    newSegment: UrlSegmentGroup): UrlSegmentGroup {\n  const children: {[key: string]: UrlSegmentGroup} = {};\n  forEach(current.children, (c: UrlSegmentGroup, outletName: string) => {\n    if (c === oldSegment) {\n      children[outletName] = newSegment;\n    } else {\n      children[outletName] = replaceSegment(c, oldSegment, newSegment);\n    }\n  });\n  return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n  constructor(\n      public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {\n    if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n      throw new Error('Root segment cannot have matrix parameters');\n    }\n\n    const cmdWithOutlet = commands.find(isCommandWithOutlets);\n    if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n      throw new Error('{outlets:{}} has to be the last command');\n    }\n  }\n\n  public toRoot(): boolean {\n    return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n  }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n  if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n    return new Navigation(true, 0, commands);\n  }\n\n  let numberOfDoubleDots = 0;\n  let isAbsolute = false;\n\n  const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n    if (typeof cmd === 'object' && cmd != null) {\n      if (cmd.outlets) {\n        const outlets: {[k: string]: any} = {};\n        forEach(cmd.outlets, (commands: any, name: string) => {\n          outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n        });\n        return [...res, {outlets}];\n      }\n\n      if (cmd.segmentPath) {\n        return [...res, cmd.segmentPath];\n      }\n    }\n\n    if (!(typeof cmd === 'string')) {\n      return [...res, cmd];\n    }\n\n    if (cmdIdx === 0) {\n      cmd.split('/').forEach((urlPart, partIndex) => {\n        if (partIndex == 0 && urlPart === '.') {\n          // skip './a'\n        } else if (partIndex == 0 && urlPart === '') {  //  '/a'\n          isAbsolute = true;\n        } else if (urlPart === '..') {  //  '../a'\n          numberOfDoubleDots++;\n        } else if (urlPart != '') {\n          res.push(urlPart);\n        }\n      });\n\n      return res;\n    }\n\n    return [...res, cmd];\n  }, []);\n\n  return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n  constructor(\n      public segmentGroup: UrlSegmentGroup, public processChildren: boolean, public index: number) {\n  }\n}\n\nfunction findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRoute): Position {\n  if (nav.isAbsolute) {\n    return new Position(tree.root, true, 0);\n  }\n\n  if (route.snapshot._lastPathIndex === -1) {\n    const segmentGroup = route.snapshot._urlSegment;\n    // Pathless ActivatedRoute has _lastPathIndex === -1 but should not process children\n    // see issue #26224, #13011, #35687\n    // However, if the ActivatedRoute is the root we should process children like above.\n    const processChildren = segmentGroup === tree.root;\n    return new Position(segmentGroup, processChildren, 0);\n  }\n\n  const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n  const index = route.snapshot._lastPathIndex + modifier;\n  return createPositionApplyingDoubleDots(\n      route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n    group: UrlSegmentGroup, index: number, numberOfDoubleDots: number): Position {\n  let g = group;\n  let ci = index;\n  let dd = numberOfDoubleDots;\n  while (dd > ci) {\n    dd -= ci;\n    g = g.parent!;\n    if (!g) {\n      throw new Error('Invalid number of \\'../\\'');\n    }\n    ci = g.segments.length;\n  }\n  return new Position(g, false, ci - dd);\n}\n\nfunction getOutlets(commands: unknown[]): {[k: string]: unknown[]|string} {\n  if (isCommandWithOutlets(commands[0])) {\n    return commands[0].outlets;\n  }\n\n  return {[PRIMARY_OUTLET]: commands};\n}\n\nfunction updateSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (!segmentGroup) {\n    segmentGroup = new UrlSegmentGroup([], {});\n  }\n  if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n    return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n  }\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  } else if (m.match && slicedCommands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else if (m.match && !segmentGroup.hasChildren()) {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  } else if (m.match) {\n    return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n  } else {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  }\n}\n\nfunction updateSegmentGroupChildren(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (commands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else {\n    const outlets = getOutlets(commands);\n    const children: {[key: string]: UrlSegmentGroup} = {};\n\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\n    forEach(segmentGroup.children, (child: UrlSegmentGroup, childOutlet: string) => {\n      if (outlets[childOutlet] === undefined) {\n        children[childOutlet] = child;\n      }\n    });\n    return new UrlSegmentGroup(segmentGroup.segments, children);\n  }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n  let currentCommandIndex = 0;\n  let currentPathIndex = startIndex;\n\n  const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n  while (currentPathIndex < segmentGroup.segments.length) {\n    if (currentCommandIndex >= commands.length) 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 =\n        currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n    if (currentPathIndex > 0 && curr === undefined) break;\n\n    if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n      if (!compare(curr, next, path)) return noMatch;\n      currentCommandIndex += 2;\n    } else {\n      if (!compare(curr, {}, path)) return noMatch;\n      currentCommandIndex++;\n    }\n    currentPathIndex++;\n  }\n\n  return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  const paths = segmentGroup.segments.slice(0, startIndex);\n\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\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\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    } else {\n      paths.push(new UrlSegment(curr, {}));\n      i++;\n    }\n  }\n  return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: unknown[]|string}):\n    {[outlet: string]: UrlSegmentGroup} {\n  const children: {[outlet: string]: UrlSegmentGroup} = {};\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}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n  const res: {[key: string]: string} = {};\n  forEach(params, (v: any, k: string) => res[k] = `${v}`);\n  return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n  return path == segment.path && shallowEqual(params, segment.parameters);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {LoadedRouterConfig} from '../config';\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {NavigationTransition} from '../router';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot, advanceActivatedRoute, RouterState} from '../router_state';\nimport {forEach} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport const activateRoutes =\n    (rootContexts: ChildrenOutletContexts, routeReuseStrategy: RouteReuseStrategy,\n     forwardEvent: (evt: Event) => void): MonoTypeOperatorFunction<NavigationTransition> =>\n        map(t => {\n          new ActivateRoutes(\n              routeReuseStrategy, t.targetRouterState!, t.currentRouterState, forwardEvent)\n              .activate(rootContexts);\n          return t;\n        });\n\nexport class ActivateRoutes {\n  constructor(\n      private routeReuseStrategy: RouteReuseStrategy, private futureState: RouterState,\n      private currState: RouterState, private forwardEvent: (evt: Event) => void) {}\n\n  activate(parentContexts: ChildrenOutletContexts): void {\n    const futureRoot = this.futureState._root;\n    const currRoot = this.currState ? this.currState._root : null;\n\n    this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n    advanceActivatedRoute(this.futureState.root);\n    this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n  }\n\n  // De-activate the child route that are not re-used for the future state\n  private deactivateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\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\n    // De-activate the routes that will not be re-used\n    forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {\n      this.deactivateRouteAndItsChildren(v, contexts);\n    });\n  }\n\n  private deactivateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContext: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\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      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.deactivateChildRoutes(futureNode, currNode, parentContext);\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\n  private deactivateRouteAndItsChildren(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n      this.detachAndStoreRouteSubtree(route, parentContexts);\n    } else {\n      this.deactivateRouteAndOutlet(route, parentContexts);\n    }\n  }\n\n  private detachAndStoreRouteSubtree(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n    if (context && context.outlet) {\n      const componentRef = context.outlet.detach();\n      const contexts = context.children.onOutletDeactivated();\n      this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n    }\n  }\n\n  private deactivateRouteAndOutlet(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\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: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(route);\n\n    for (const childOutlet of Object.keys(children)) {\n      this.deactivateRouteAndItsChildren(children[childOutlet], contexts);\n    }\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\n  private activateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outlet: string]: TreeNode<ActivatedRoute>} = 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\n  private activateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContexts: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    advanceActivatedRoute(future);\n\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      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, currNode, parentContexts);\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\n        if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n          const stored =\n              (<DetachedRouteHandleInternal>this.routeReuseStrategy.retrieve(future.snapshot));\n          this.routeReuseStrategy.store(future.snapshot, null);\n          context.children.onOutletReAttached(stored.contexts);\n          context.attachRef = stored.componentRef;\n          context.route = stored.route.value;\n          if (context.outlet) {\n            // Attach right away when the outlet has already been instantiated\n            // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n            context.outlet.attach(stored.componentRef, stored.route.value);\n          }\n          advanceActivatedRouteNodeAndItsChildren(stored.route);\n        } else {\n          const config = parentLoadedConfig(future.snapshot);\n          const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n\n          context.attachRef = null;\n          context.route = future;\n          context.resolver = cmpFactoryResolver;\n          if (context.outlet) {\n            // Activate the outlet when it has already been instantiated\n            // Otherwise it will get activated from its `ngOnInit` when instantiated\n            context.outlet.activateWith(future, cmpFactoryResolver);\n          }\n\n          this.activateChildRoutes(futureNode, null, context.children);\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\nfunction advanceActivatedRouteNodeAndItsChildren(node: TreeNode<ActivatedRoute>): void {\n  advanceActivatedRoute(node.value);\n  node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\n\nfunction parentLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n    if (route && route.component) return null;\n  }\n\n  return 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\nimport {NgModuleFactory, NgModuleRef, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * Represents a route configuration for the Router service.\n * An array of `Route` objects, used in `Router.config` and for nested route configurations\n * in `Route.children`.\n *\n * @see `Route`\n * @see `Router`\n * @see [Router configuration guide](guide/router-reference#configuration)\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * Represents the result of matching URLs with a custom matching function.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @see `UrlMatcher()`\n * @publicApi\n */\nexport type UrlMatchResult = {\n  consumed: UrlSegment[];\n  posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * A function for matching a route against URLs. Implement a custom URL matcher\n * for `Route.matcher` when a combination of `path` and `pathMatch`\n * is not expressive enough. Cannot be used together with `path` and `pathMatch`.\n *\n * The function takes the following arguments and returns a `UrlMatchResult` object.\n * * *segments* : An array of URL segments.\n * * *group* : A segment group.\n * * *route* : The route to match against.\n *\n * The following example implementation matches HTML files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n *   return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) =>\n    UrlMatchResult|null;\n\n/**\n *\n * Represents static data associated with a particular route.\n *\n * @see `Route#data`\n *\n * @publicApi\n */\nexport type Data = {\n  [name: string]: any\n};\n\n/**\n *\n * Represents the resolved data associated with a particular route.\n *\n * @see `Route#resolve`.\n *\n * @publicApi\n */\nexport type ResolveData = {\n  [name: string]: any\n};\n\n/**\n *\n * A function that is called to resolve a collection of lazy-loaded routes.\n * Must be an arrow function of the following form:\n * `() => import('...').then(mod => mod.MODULE)`\n *\n * For example:\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @see [Route.loadChildren](api/router/Route#loadChildren)\n * @publicApi\n */\nexport type LoadChildrenCallback = () => Type<any>|NgModuleFactory<any>|Observable<Type<any>>|\n    Promise<NgModuleFactory<any>|Type<any>|any>;\n\n/**\n *\n * A function that returns a set of routes to load.\n *\n * The string form of `LoadChildren` is deprecated (see `DeprecatedLoadChildren`). The function\n * form (`LoadChildrenCallback`) should be used instead.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n */\nexport type LoadChildren = LoadChildrenCallback|DeprecatedLoadChildren;\n\n/**\n * A string of the form `path/to/file#exportName` that acts as a URL for a set of routes to load.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n * @deprecated The `string` form of `loadChildren` is deprecated in favor of the\n * `LoadChildrenCallback` function which uses the ES dynamic `import()` expression.\n * This offers a more natural and standards-based mechanism to dynamically\n * load an ES module at runtime.\n */\nexport type DeprecatedLoadChildren = string;\n\n/**\n *\n * How to handle query parameters in a router link.\n * One of:\n * - `merge` : Merge new with current parameters.\n * - `preserve` : Preserve current parameters.\n *\n * @see `UrlCreationOptions#queryParamsHandling`\n * @see `RouterLink`\n * @publicApi\n */\nexport type QueryParamsHandling = 'merge'|'preserve'|'';\n\n/**\n *\n * A policy for when to run guards and resolvers on a route.\n *\n * @see [Route.runGuardsAndResolvers](api/router/Route#runGuardsAndResolvers)\n * @publicApi\n */\nexport type RunGuardsAndResolvers =\n    'pathParamsChange'|'pathParamsOrQueryParamsChange'|'paramsChange'|'paramsOrQueryParamsChange'|\n    'always'|((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * A configuration object that defines a single route.\n * A set of routes are collected in a `Routes` array to define a `Router` configuration.\n * The router attempts to match segments of a given URL against each route,\n * using the configuration options defined in this object.\n *\n * Supports static, parameterized, redirect, and wildcard routes, as well as\n * custom route data and resolve methods.\n *\n * For detailed usage information, see the [Routing Guide](guide/router).\n *\n * @usageNotes\n *\n * ### Simple Configuration\n *\n * The following route specifies that when navigating to, for example,\n * `/team/11/user/bob`, the router creates the 'Team' component\n * with the 'User' child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n  *  component: Team,\n *   children: [{\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * ### Multiple Outlets\n *\n * The following route creates sibling components with multiple outlets.\n * When navigating to `/team/11(aux:chat/jim)`, the router creates the 'Team' component next to\n * the 'Chat' component. The 'Chat' component is placed into the 'aux' outlet.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team\n * }, {\n *   path: 'chat/:user',\n *   component: Chat\n *   outlet: 'aux'\n * }]\n * ```\n *\n * ### Wild Cards\n *\n * The following route uses wild-card notation to specify a component\n * that is always instantiated regardless of where you navigate to.\n *\n * ```\n * [{\n *   path: '**',\n *   component: WildcardComponent\n * }]\n * ```\n *\n * ### Redirects\n *\n * The following route uses the `redirectTo` property to ignore a segment of\n * a given URL when looking for a child path.\n *\n * When navigating to '/team/11/legacy/user/jim', the router changes the URL segment\n * '/team/11/legacy/user/jim' to '/team/11/user/jim', and then instantiates\n * the Team component with the User child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: 'legacy/user/:name',\n *     redirectTo: 'user/:name'\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * The redirect path can be relative, as shown in this example, or absolute.\n * If we change the `redirectTo` value in the example to the absolute URL segment '/user/:name',\n * the result URL is also absolute, '/user/jim'.\n\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any URL segments.\n *\n * In the following configuration, when navigating to\n * `/team/11`, the router instantiates the 'AllUsers' component.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: AllUsers\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * Empty-path routes can have children. In the following example, when navigating\n * to `/team/11/user/jim`, the router instantiates the wrapper component with\n * the user component in it.\n *\n * Note that an empty path route inherits its parent's parameters and data.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: WrapperCmp,\n *     children: [{\n *       path: 'user/:name',\n *       component: User\n *     }]\n *   }]\n * }]\n * ```\n *\n * ### Matching Strategy\n *\n * The default path-match strategy is 'prefix', which means that the router\n * checks URL elements from the left to see if the URL matches a specified path.\n * For example, '/team/11/user' matches 'team/:id'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'prefix', //default\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * You can specify the path-match strategy 'full' to make sure that the path\n * covers the whole unconsumed URL. It is important to do this when redirecting\n * empty-path routes. Otherwise, because an empty path is a prefix of any URL,\n * the router would apply the redirect even when navigating to the redirect destination,\n * creating an endless loop.\n *\n * In the following example, supplying the 'full' `pathMatch` strategy ensures\n * that the router applies the redirect if and only if navigating to '/'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'full',\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * You can share parameters between sibling components.\n * For example, suppose that two sibling components should go next to each other,\n * and both of them require an ID parameter. You can accomplish this using a route\n * that does not specify a component at the top level.\n *\n * In the following example, 'MainChild' and 'AuxChild' are siblings.\n * When navigating to 'parent/10/(a//aux:b)', the route instantiates\n * the main child and aux child components next to each other.\n * For this to work, the application component must have the primary and aux outlets defined.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: 'a', component: MainChild },\n *      { path: 'b', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * The router merges the parameters, data, and resolve of the componentless\n * parent into the parameters, data, and resolve of the children.\n *\n * This is especially useful when child components are defined\n * with an empty path string, as in the following example.\n * With this configuration, navigating to '/parent/10' creates\n * the main child and aux components.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: '', component: MainChild },\n *      { path: '', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up application load time by splitting the application\n * into multiple bundles and loading them on demand.\n * To use lazy loading, provide the `loadChildren` property in the `Route` object,\n * instead of the `children` property.\n *\n * Given the following example route, the router will lazy load\n * the associated module on demand using the browser native import system.\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @publicApi\n */\nexport interface Route {\n  /**\n   * The path to match against. Cannot be used together with a custom `matcher` function.\n   * A URL string that uses router matching notation.\n   * Can be a wild card (`**`) that matches any URL (see Usage Notes below).\n   * Default is \"/\" (the root path).\n   *\n   */\n  path?: string;\n  /**\n   * The path-matching strategy, one of 'prefix' or 'full'.\n   * Default is 'prefix'.\n   *\n   * By default, the router checks URL elements from the left to see if the URL\n   * matches a given path and stops when there is a config match. Importantly there must still be a\n   * config match for each segment of the URL. For example, '/team/11/user' matches the prefix\n   * 'team/:id' if one of the route's children matches the segment 'user'. That is, the URL\n   * '/team/11/user` matches the config\n   * `{path: 'team/:id', children: [{path: ':user', component: User}]}`\n   * but does not match when there are no children as in `{path: 'team/:id', component: Team}`.\n   *\n   * The path-match strategy 'full' matches against the entire URL.\n   * It is important to do this when redirecting empty-path routes.\n   * Otherwise, because an empty path is a prefix of any URL,\n   * the router would apply the redirect even when navigating\n   * to the redirect destination, creating an endless loop.\n   *\n   */\n  pathMatch?: string;\n  /**\n   * A custom URL-matching function. Cannot be used together with `path`.\n   */\n  matcher?: UrlMatcher;\n  /**\n   * The component to instantiate when the path matches.\n   * Can be empty if child routes specify components.\n   */\n  component?: Type<any>;\n  /**\n   * A URL to redirect to when the path matches.\n   *\n   * Absolute if the URL begins with a slash (/), otherwise relative to the path URL.\n   * Note that no further redirects are evaluated after an absolute redirect.\n   *\n   * When not present, router does not redirect.\n   */\n  redirectTo?: string;\n  /**\n   * Name of a `RouterOutlet` object where the component can be placed\n   * when the path matches.\n   */\n  outlet?: string;\n  /**\n   * An array of dependency-injection tokens used to look up `CanActivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * activate the component. By default, any user can activate.\n   */\n  canActivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanActivateChild()` handlers,\n   * in order to determine if the current user is allowed to activate\n   * a child of the component. By default, any user can activate a child.\n   */\n  canActivateChild?: any[];\n  /**\n   * An array of DI tokens used to look up `CanDeactivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * deactivate the component. By default, any user can deactivate.\n   *\n   */\n  canDeactivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanLoad()`\n   * handlers, in order to determine if the current user is allowed to\n   * load the component. By default, any user can load.\n   */\n  canLoad?: any[];\n  /**\n   * Additional developer-defined data provided to the component via\n   * `ActivatedRoute`. By default, no additional data is passed.\n   */\n  data?: Data;\n  /**\n   * A map of DI tokens used to look up data resolvers. See `Resolve`.\n   */\n  resolve?: ResolveData;\n  /**\n   * An array of child `Route` objects that specifies a nested route\n   * configuration.\n   */\n  children?: Routes;\n  /**\n   * An object specifying lazy-loaded child routes.\n   */\n  loadChildren?: LoadChildren;\n  /**\n   * Defines when guards and resolvers will be run. One of\n   * - `paramsOrQueryParamsChange` : Run when query parameters change.\n   * - `always` : Run on every execution.\n   * By default, guards and resolvers run only when the matrix\n   * parameters of the route change.\n   */\n  runGuardsAndResolvers?: RunGuardsAndResolvers;\n  /**\n   * Filled for routes with `loadChildren` once the module has been loaded\n   * @internal\n   */\n  _loadedConfig?: LoadedRouterConfig;\n  /**\n   * Filled for routes with `loadChildren` during load\n   * @internal\n   */\n  _loader$?: Observable<LoadedRouterConfig>;\n}\n\nexport class LoadedRouterConfig {\n  constructor(public routes: Route[], public module: NgModuleRef<any>) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CanActivate, CanActivateChild, CanDeactivate, CanLoad} from '../interfaces';\nimport {UrlTree} from '../url_tree';\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 */\nexport function isFunction<T>(v: any): v is T {\n  return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n  return typeof v === 'boolean';\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n  return v instanceof UrlTree;\n}\n\nexport function isCanLoad(guard: any): guard is CanLoad {\n  return guard && isFunction<CanLoad>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is CanActivate {\n  return guard && isFunction<CanActivate>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is CanActivateChild {\n  return guard && isFunction<CanActivateChild>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is CanDeactivate<T> {\n  return guard && isFunction<CanDeactivate<T>>(guard.canDeactivate);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {combineLatest, Observable, OperatorFunction} from 'rxjs';\nimport {filter, map, scan, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {UrlTree} from '../url_tree';\nimport {isUrlTree} from '../utils/type_guards';\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | boolean | UrlTree;\n\nexport function prioritizedGuardValue():\n    OperatorFunction<Observable<boolean|UrlTree>[], boolean|UrlTree> {\n  return switchMap(obs => {\n    return combineLatest(obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))))\n               .pipe(\n                   scan(\n                       (acc: INTERIM_VALUES, list: INTERIM_VALUES[]) => {\n                         let isPending = false;\n                         return list.reduce((innerAcc, val, i: number) => {\n                           if (innerAcc !== INITIAL_VALUE) return innerAcc;\n\n                           // Toggle pending flag if any values haven't been set yet\n                           if (val === INITIAL_VALUE) isPending = true;\n\n                           // Any other return values are only valid if we haven't yet hit a pending\n                           // call. This guarantees that in the case of a guard at the bottom of the\n                           // tree that returns a redirect, we will wait for the higher priority\n                           // guard at the top to finish before performing the redirect.\n                           if (!isPending) {\n                             // Early return when we hit a `false` value as that should always\n                             // cancel navigation\n                             if (val === false) return val;\n\n                             if (i === list.length - 1 || isUrlTree(val)) {\n                               return val;\n                             }\n                           }\n\n                           return innerAcc;\n                         }, acc);\n                       },\n                       INITIAL_VALUE),\n                   filter(item => item !== INITIAL_VALUE),\n                   map(item => isUrlTree(item) ? item : item === true),  //\n                   take(1)) as Observable<boolean|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 */\n\nimport {Component} from '@angular/core';\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 */\n@Component({template: `<router-outlet></router-outlet>`})\nexport class ɵEmptyOutletComponent {\n}\n\nexport {ɵEmptyOutletComponent as EmptyOutletComponent};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EmptyOutletComponent} from '../components/empty_outlet';\nimport {Route, Routes} from '../config';\nimport {PRIMARY_OUTLET} from '../shared';\n\nexport function validateConfig(config: Routes, parentPath: string = ''): void {\n  // forEach doesn't iterate undefined values\n  for (let i = 0; i < config.length; i++) {\n    const route: Route = config[i];\n    const fullPath: string = getFullPath(parentPath, route);\n    validateNode(route, fullPath);\n  }\n}\n\nfunction validateNode(route: Route, fullPath: string): void {\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    if (!route) {\n      throw new Error(`\n      Invalid configuration of route '${fullPath}': Encountered undefined route.\n      The reason might be an extra comma.\n\n      Example:\n      const routes: Routes = [\n        { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n        { path: 'dashboard',  component: DashboardComponent },, << two commas\n        { path: 'detail/:id', component: HeroDetailComponent }\n      ];\n    `);\n    }\n    if (Array.isArray(route)) {\n      throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n    }\n    if (!route.component && !route.children && !route.loadChildren &&\n        (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n    }\n    if (route.redirectTo && route.children) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and children cannot be used together`);\n    }\n    if (route.redirectTo && route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and loadChildren cannot be used together`);\n    }\n    if (route.children && route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': children and loadChildren cannot be used together`);\n    }\n    if (route.redirectTo && route.component) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and component cannot be used together`);\n    }\n    if (route.redirectTo && route.canActivate) {\n      throw new Error(\n          `Invalid configuration of route '${\n              fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +\n          `so canActivate will never be executed.`);\n    }\n    if (route.path && route.matcher) {\n      throw new Error(\n          `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n    }\n    if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n    }\n    if (route.path === void 0 && route.matcher === void 0) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': routes must have either a path or a matcher specified`);\n    }\n    if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n      throw new Error(\n          `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 =\n          `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n      throw new Error(`Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${\n          route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n    }\n    if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n    }\n  }\n  if (route.children) {\n    validateConfig(route.children, fullPath);\n  }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n  if (!currentRoute) {\n    return parentPath;\n  }\n  if (!parentPath && !currentRoute.path) {\n    return '';\n  } else if (parentPath && !currentRoute.path) {\n    return `${parentPath}/`;\n  } else if (!parentPath && currentRoute.path) {\n    return currentRoute.path;\n  } else {\n    return `${parentPath}/${currentRoute.path}`;\n  }\n}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n  const children = r.children && r.children.map(standardizeConfig);\n  const c = children ? {...r, children} : {...r};\n  if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n    c.component = EmptyOutletComponent;\n  }\n  return c;\n}\n\n/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */\nexport function getOutlet(route: Route): string {\n  return route.outlet || PRIMARY_OUTLET;\n}\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 */\nexport function sortByMatchingOutlets(routes: Routes, outletName: string): Routes {\n  const sortedConfig = routes.filter(r => getOutlet(r) === outletName);\n  sortedConfig.push(...routes.filter(r => getOutlet(r) !== outletName));\n  return sortedConfig;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from '../config';\nimport {defaultUrlMatcher, PRIMARY_OUTLET} from '../shared';\nimport {UrlSegment, UrlSegmentGroup} from '../url_tree';\n\nimport {forEach} from './collection';\nimport {getOutlet} from './config';\n\nexport interface MatchResult {\n  matched: boolean;\n  consumedSegments: UrlSegment[];\n  lastChild: number;\n  parameters: {[k: string]: string};\n  positionalParamSegments: {[k: string]: UrlSegment};\n}\n\nconst noMatch: MatchResult = {\n  matched: false,\n  consumedSegments: [],\n  lastChild: 0,\n  parameters: {},\n  positionalParamSegments: {}\n};\n\nexport function match(\n    segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): MatchResult {\n  if (route.path === '') {\n    if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n      return {...noMatch};\n    }\n\n    return {\n      matched: true,\n      consumedSegments: [],\n      lastChild: 0,\n      parameters: {},\n      positionalParamSegments: {}\n    };\n  }\n\n  const matcher = route.matcher || defaultUrlMatcher;\n  const res = matcher(segments, segmentGroup, route);\n  if (!res) return {...noMatch};\n\n  const posParams: {[n: string]: string} = {};\n  forEach(res.posParams!, (v: UrlSegment, k: string) => {\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\n  return {\n    matched: true,\n    consumedSegments: res.consumed,\n    lastChild: res.consumed.length,\n    // TODO(atscott): investigate combining parameters and positionalParamSegments\n    parameters,\n    positionalParamSegments: res.posParams ?? {}\n  };\n}\n\nexport function split(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    config: Route[], relativeLinkResolution: 'legacy'|'corrected' = 'corrected') {\n  if (slicedSegments.length > 0 &&\n      containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        consumedSegments,\n        createChildrenForEmptyPaths(\n            segmentGroup, consumedSegments, config,\n            new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments: []};\n  }\n\n  if (slicedSegments.length === 0 &&\n      containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        segmentGroup.segments,\n        addEmptyPathsToChildrenIfNeeded(\n            segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children,\n            relativeLinkResolution));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments};\n  }\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}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    routes: Route[], children: {[name: string]: UrlSegmentGroup},\n    relativeLinkResolution: 'legacy'|'corrected'): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\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      } else {\n        s._segmentIndexShift = consumedSegments.length;\n      }\n      res[getOutlet(r)] = s;\n    }\n  }\n  return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], routes: Route[],\n    primarySegment: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  res[PRIMARY_OUTLET] = primarySegment;\n  primarySegment._sourceSegment = segmentGroup;\n  primarySegment._segmentIndexShift = consumedSegments.length;\n\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}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(\n      r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathMatches(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nfunction emptyPathMatch(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], r: Route): boolean {\n  if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n    return false;\n  }\n\n  return r.path === '';\n}\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 */\nexport function isImmediateMatch(\n    route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[], outlet: string): boolean {\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}\n\nexport function noLeftoversInUrl(\n    segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string): boolean {\n  return segments.length === 0 && !segmentGroup.children[outlet];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModuleRef} from '@angular/core';\nimport {EmptyError, from, Observable, Observer, of} from 'rxjs';\nimport {catchError, concatMap, first, last, map, mergeMap, scan, tap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {CanLoadFn} from './interfaces';\nimport {prioritizedGuardValue} from './operators/prioritized_guard_value';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {navigationCancelingError, Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {forEach, wrapIntoObservable} from './utils/collection';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {isImmediateMatch, match, noLeftoversInUrl, split} from './utils/config_matching';\nimport {isCanLoad, isFunction, isUrlTree} from './utils/type_guards';\n\nclass NoMatch {\n  public segmentGroup: UrlSegmentGroup|null;\n\n  constructor(segmentGroup?: UrlSegmentGroup) {\n    this.segmentGroup = segmentGroup || null;\n  }\n}\n\nclass AbsoluteRedirect {\n  constructor(public urlTree: UrlTree) {}\n}\n\nfunction noMatch(segmentGroup: UrlSegmentGroup): Observable<UrlSegmentGroup> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new NoMatch(segmentGroup)));\n}\n\nfunction absoluteRedirect(newTree: UrlTree): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new AbsoluteRedirect(newTree)));\n}\n\nfunction namedOutletsRedirect(redirectTo: string): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new Error(\n          `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\n\nfunction canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n  return new Observable<LoadedRouterConfig>(\n      (obs: Observer<LoadedRouterConfig>) => obs.error(\n          navigationCancelingError(`Cannot load children because the guard of the route \"path: '${\n              route.path}'\" returned false`)));\n}\n\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    urlTree: UrlTree, config: Routes): Observable<UrlTree> {\n  return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\n\nclass ApplyRedirects {\n  private allowRedirects: boolean = true;\n  private ngModule: NgModuleRef<any>;\n\n  constructor(\n      moduleInjector: Injector, private configLoader: RouterConfigLoader,\n      private urlSerializer: UrlSerializer, private urlTree: UrlTree, private config: Routes) {\n    this.ngModule = moduleInjector.get(NgModuleRef);\n  }\n\n  apply(): Observable<UrlTree> {\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\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    const urlTrees$ = expanded$.pipe(map((rootSegmentGroup: UrlSegmentGroup) => {\n      return this.createUrlTree(\n          squashSegmentGroup(rootSegmentGroup), this.urlTree.queryParams, this.urlTree.fragment);\n    }));\n    return urlTrees$.pipe(catchError((e: any) => {\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\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private match(tree: UrlTree): Observable<UrlTree> {\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n    const mapped$ = expanded$.pipe(map((rootSegmentGroup: UrlSegmentGroup) => {\n      return this.createUrlTree(\n          squashSegmentGroup(rootSegmentGroup), tree.queryParams, tree.fragment);\n    }));\n    return mapped$.pipe(catchError((e: any): Observable<UrlTree> => {\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private noMatchError(e: NoMatch): any {\n    return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n  }\n\n  private createUrlTree(rootCandidate: UrlSegmentGroup, queryParams: Params, fragment: string|null):\n      UrlTree {\n    const root = rootCandidate.segments.length > 0 ?\n        new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate}) :\n        rootCandidate;\n    return new UrlTree(root, queryParams, fragment);\n  }\n\n  private expandSegmentGroup(\n      ngModule: NgModuleRef<any>, routes: Route[], segmentGroup: UrlSegmentGroup,\n      outlet: string): Observable<UrlSegmentGroup> {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.expandChildren(ngModule, routes, segmentGroup)\n          .pipe(map((children: any) => new UrlSegmentGroup([], children)));\n    }\n\n    return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n  }\n\n  // Recursively expand segment groups for all the child outlets\n  private expandChildren(\n      ngModule: NgModuleRef<any>, routes: Route[],\n      segmentGroup: UrlSegmentGroup): Observable<{[name: string]: UrlSegmentGroup}> {\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: string[] = [];\n    for (const child of Object.keys(segmentGroup.children)) {\n      if (child === 'primary') {\n        childOutlets.unshift(child);\n      } else {\n        childOutlets.push(child);\n      }\n    }\n\n    return from(childOutlets)\n        .pipe(\n            concatMap(childOutlet => {\n              const child = segmentGroup.children[childOutlet];\n              // Sort the routes so routes with outlets that match the segment appear\n              // first, followed by routes for other outlets, which might match if they have an\n              // empty path.\n              const sortedRoutes = sortByMatchingOutlets(routes, childOutlet);\n              return this.expandSegmentGroup(ngModule, sortedRoutes, child, childOutlet)\n                  .pipe(map(s => ({segment: s, outlet: childOutlet})));\n            }),\n            scan(\n                (children, expandedChild) => {\n                  children[expandedChild.outlet] = expandedChild.segment;\n                  return children;\n                },\n                {} as {[outlet: string]: UrlSegmentGroup}),\n            last(),\n        );\n  }\n\n  private expandSegment(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[],\n      segments: UrlSegment[], outlet: string,\n      allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    return from(routes).pipe(\n        concatMap((r: any) => {\n          const expanded$ = this.expandSegmentAgainstRoute(\n              ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n          return expanded$.pipe(catchError((e: any) => {\n            if (e instanceof NoMatch) {\n              return of(null);\n            }\n            throw e;\n          }));\n        }),\n        first((s): s is UrlSegmentGroup => !!s), catchError((e: any, _: any) => {\n          if (e instanceof EmptyError || e.name === 'EmptyError') {\n            if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n              return of(new UrlSegmentGroup([], {}));\n            }\n            throw new NoMatch(segmentGroup);\n          }\n          throw e;\n        }));\n  }\n\n  private expandSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      paths: UrlSegment[], outlet: string, allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    if (!isImmediateMatch(route, segmentGroup, paths, outlet)) {\n      return noMatch(segmentGroup);\n    }\n\n    if (route.redirectTo === undefined) {\n      return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths, outlet);\n    }\n\n    if (allowRedirects && this.allowRedirects) {\n      return this.expandSegmentAgainstRouteUsingRedirect(\n          ngModule, segmentGroup, routes, route, paths, outlet);\n    }\n\n    return noMatch(segmentGroup);\n  }\n\n  private expandSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      return this.expandWildCardWithParamsAgainstRouteUsingRedirect(\n          ngModule, routes, route, outlet);\n    }\n\n    return this.expandRegularSegmentAgainstRouteUsingRedirect(\n        ngModule, segmentGroup, routes, route, segments, outlet);\n  }\n\n  private expandWildCardWithParamsAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, routes: Route[], route: Route,\n      outlet: string): Observable<UrlSegmentGroup> {\n    const newTree = this.applyRedirectCommands([], route.redirectTo!, {});\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      const group = new UrlSegmentGroup(newSegments, {});\n      return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n    }));\n  }\n\n  private expandRegularSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    const {matched, consumedSegments, lastChild, positionalParamSegments} =\n        match(segmentGroup, route, segments);\n    if (!matched) return noMatch(segmentGroup);\n\n    const newTree =\n        this.applyRedirectCommands(consumedSegments, route.redirectTo!, positionalParamSegments);\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      return this.expandSegment(\n          ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet,\n          false);\n    }));\n  }\n\n  private matchSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, rawSegmentGroup: UrlSegmentGroup, route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      if (route.loadChildren) {\n        const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                                              this.configLoader.load(ngModule.injector, route);\n        return loaded$.pipe(map((cfg: LoadedRouterConfig) => {\n          route._loadedConfig = cfg;\n          return new UrlSegmentGroup(segments, {});\n        }));\n      }\n\n      return of(new UrlSegmentGroup(segments, {}));\n    }\n\n    const {matched, consumedSegments, lastChild} = match(rawSegmentGroup, route, segments);\n    if (!matched) return noMatch(rawSegmentGroup);\n\n    const rawSlicedSegments = segments.slice(lastChild);\n    const childConfig$ = this.getChildConfig(ngModule, route, segments);\n\n    return childConfig$.pipe(mergeMap((routerConfig: LoadedRouterConfig) => {\n      const childModule = routerConfig.module;\n      const childConfig = routerConfig.routes;\n\n      const {segmentGroup: splitSegmentGroup, slicedSegments} =\n          split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n      // See comment on the other call to `split` about why this is necessary.\n      const segmentGroup =\n          new UrlSegmentGroup(splitSegmentGroup.segments, splitSegmentGroup.children);\n\n      if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n        const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n        return expanded$.pipe(\n            map((children: any) => new UrlSegmentGroup(consumedSegments, children)));\n      }\n\n      if (childConfig.length === 0 && slicedSegments.length === 0) {\n        return of(new UrlSegmentGroup(consumedSegments, {}));\n      }\n\n      const matchedOnOutlet = getOutlet(route) === outlet;\n      const expanded$ = this.expandSegment(\n          childModule, segmentGroup, childConfig, slicedSegments,\n          matchedOnOutlet ? PRIMARY_OUTLET : outlet, true);\n      return expanded$.pipe(\n          map((cs: UrlSegmentGroup) =>\n                  new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n    }));\n  }\n\n  private getChildConfig(ngModule: NgModuleRef<any>, route: Route, segments: UrlSegment[]):\n      Observable<LoadedRouterConfig> {\n    if (route.children) {\n      // The children belong to the same module\n      return of(new LoadedRouterConfig(route.children, ngModule));\n    }\n\n    if (route.loadChildren) {\n      // lazy children belong to the loaded module\n      if (route._loadedConfig !== undefined) {\n        return of(route._loadedConfig);\n      }\n\n      return this.runCanLoadGuards(ngModule.injector, route, segments)\n          .pipe(mergeMap((shouldLoadResult: boolean) => {\n            if (shouldLoadResult) {\n              return this.configLoader.load(ngModule.injector, route)\n                  .pipe(map((cfg: LoadedRouterConfig) => {\n                    route._loadedConfig = cfg;\n                    return cfg;\n                  }));\n            }\n            return canLoadFails(route);\n          }));\n    }\n\n    return of(new LoadedRouterConfig([], ngModule));\n  }\n\n  private runCanLoadGuards(moduleInjector: Injector, route: Route, segments: UrlSegment[]):\n      Observable<boolean> {\n    const canLoad = route.canLoad;\n    if (!canLoad || canLoad.length === 0) return of(true);\n\n    const canLoadObservables = canLoad.map((injectionToken: any) => {\n      const guard = moduleInjector.get(injectionToken);\n      let guardVal;\n      if (isCanLoad(guard)) {\n        guardVal = guard.canLoad(route, segments);\n      } else if (isFunction<CanLoadFn>(guard)) {\n        guardVal = guard(route, segments);\n      } else {\n        throw new Error('Invalid CanLoad guard');\n      }\n      return wrapIntoObservable(guardVal);\n    });\n\n    return of(canLoadObservables)\n        .pipe(\n            prioritizedGuardValue(),\n            tap((result: UrlTree|boolean) => {\n              if (!isUrlTree(result)) return;\n\n              const error: Error&{url?: UrlTree} = navigationCancelingError(\n                  `Redirecting to \"${this.urlSerializer.serialize(result)}\"`);\n              error.url = result;\n              throw error;\n            }),\n            map(result => result === true),\n        );\n  }\n\n  private lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n    let res: UrlSegment[] = [];\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\n      if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n        return namedOutletsRedirect(route.redirectTo!);\n      }\n\n      c = c.children[PRIMARY_OUTLET];\n    }\n  }\n\n  private applyRedirectCommands(\n      segments: UrlSegment[], redirectTo: string, posParams: {[k: string]: UrlSegment}): UrlTree {\n    return this.applyRedirectCreatreUrlTree(\n        redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n  }\n\n  private applyRedirectCreatreUrlTree(\n      redirectTo: string, urlTree: UrlTree, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlTree {\n    const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n    return new UrlTree(\n        newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n        urlTree.fragment);\n  }\n\n  private createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n    const res: Params = {};\n    forEach(redirectToParams, (v: any, k: string) => {\n      const copySourceValue = typeof v === 'string' && v.startsWith(':');\n      if (copySourceValue) {\n        const sourceName = v.substring(1);\n        res[k] = actualParams[sourceName];\n      } else {\n        res[k] = v;\n      }\n    });\n    return res;\n  }\n\n  private createSegmentGroup(\n      redirectTo: string, group: UrlSegmentGroup, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegmentGroup {\n    const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n    let children: {[n: string]: UrlSegmentGroup} = {};\n    forEach(group.children, (child: UrlSegmentGroup, name: string) => {\n      children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n    });\n\n    return new UrlSegmentGroup(updatedSegments, children);\n  }\n\n  private createSegments(\n      redirectTo: string, redirectToSegments: UrlSegment[], actualSegments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegment[] {\n    return redirectToSegments.map(\n        s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n                                      this.findOrReturn(s, actualSegments));\n  }\n\n  private findPosParam(\n      redirectTo: string, redirectToUrlSegment: UrlSegment,\n      posParams: {[k: string]: UrlSegment}): UrlSegment {\n    const pos = posParams[redirectToUrlSegment.path.substring(1)];\n    if (!pos)\n      throw new Error(\n          `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n    return pos;\n  }\n\n  private findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\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 * 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: UrlSegmentGroup): UrlSegmentGroup {\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\n  return s;\n}\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: UrlSegmentGroup): UrlSegmentGroup {\n  const newChildren = {} as any;\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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {applyRedirects as applyRedirectsFn} from '../apply_redirects';\nimport {Routes} from '../config';\nimport {NavigationTransition} from '../router';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    config: Routes): MonoTypeOperatorFunction<NavigationTransition> {\n  return switchMap(\n      t => applyRedirectsFn(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n               .pipe(map(urlAfterRedirects => ({...t, urlAfterRedirects}))));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\nimport {LoadedRouterConfig, RunGuardsAndResolvers} from '../config';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {ActivatedRouteSnapshot, equalParamsAndUrlSegments, RouterStateSnapshot} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {forEach, shallowEqual} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport class CanActivate {\n  readonly route: ActivatedRouteSnapshot;\n  constructor(public path: ActivatedRouteSnapshot[]) {\n    this.route = this.path[this.path.length - 1];\n  }\n}\n\nexport class CanDeactivate {\n  constructor(public component: Object|null, public route: ActivatedRouteSnapshot) {}\n}\n\nexport declare type Checks = {\n  canDeactivateChecks: CanDeactivate[],\n  canActivateChecks: CanActivate[],\n};\n\nexport function getAllRouteGuards(\n    future: RouterStateSnapshot, curr: RouterStateSnapshot,\n    parentContexts: ChildrenOutletContexts) {\n  const futureRoot = future._root;\n  const currRoot = curr ? curr._root : null;\n\n  return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(p: ActivatedRouteSnapshot):\n    {node: ActivatedRouteSnapshot, guards: any[]}|null {\n  const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n  if (!canActivateChild || canActivateChild.length === 0) return null;\n  return {node: p, guards: canActivateChild};\n}\n\nexport function getToken(\n    token: any, snapshot: ActivatedRouteSnapshot, moduleInjector: Injector): any {\n  const config = getClosestLoadedConfig(snapshot);\n  const injector = config ? config.module.injector : moduleInjector;\n  return injector.get(token);\n}\n\nfunction getClosestLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  if (!snapshot) return null;\n\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n  }\n\n  return null;\n}\n\nfunction getChildRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>|null,\n    contexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[], checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const prevChildren = nodeChildrenAsMap(currNode);\n\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\n  // Process any children left from the current route (not active for the future route)\n  forEach(\n      prevChildren,\n      (v: TreeNode<ActivatedRouteSnapshot>, k: string) =>\n          deactivateRouteAndItsChildren(v, contexts!.getContext(k), checks));\n\n  return checks;\n}\n\nfunction getRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>,\n    parentContexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[],\n    checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const future = futureNode.value;\n  const curr = currNode ? currNode.value : null;\n  const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n  // reusing the node\n  if (curr && future.routeConfig === curr.routeConfig) {\n    const shouldRun =\n        shouldRunGuardsAndResolvers(curr, future, future.routeConfig!.runGuardsAndResolvers);\n    if (shouldRun) {\n      checks.canActivateChecks.push(new CanActivate(futurePath));\n    } else {\n      // we need to set the data\n      future.data = curr.data;\n      future._resolvedData = curr._resolvedData;\n    }\n\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(\n          futureNode, currNode, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n    }\n\n    if (shouldRun && context && context.outlet && context.outlet.isActivated) {\n      checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));\n    }\n  } else {\n    if (curr) {\n      deactivateRouteAndItsChildren(currNode, context, checks);\n    }\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\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n    }\n  }\n\n  return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n    curr: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,\n    mode: RunGuardsAndResolvers|undefined): boolean {\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\n    case 'pathParamsOrQueryParamsChange':\n      return !equalPath(curr.url, future.url) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'always':\n      return true;\n\n    case 'paramsOrQueryParamsChange':\n      return !equalParamsAndUrlSegments(curr, future) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'paramsChange':\n    default:\n      return !equalParamsAndUrlSegments(curr, future);\n  }\n}\n\nfunction deactivateRouteAndItsChildren(\n    route: TreeNode<ActivatedRouteSnapshot>, context: OutletContext|null, checks: Checks): void {\n  const children = nodeChildrenAsMap(route);\n  const r = route.value;\n\n  forEach(children, (node: TreeNode<ActivatedRouteSnapshot>, childName: string) => {\n    if (!r.component) {\n      deactivateRouteAndItsChildren(node, context, checks);\n    } else if (context) {\n      deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n    } else {\n      deactivateRouteAndItsChildren(node, null, checks);\n    }\n  });\n\n  if (!r.component) {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  } else if (context && context.outlet && context.outlet.isActivated) {\n    checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n  } else {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {concat, defer, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, first, map, mergeMap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn} from '../interfaces';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {CanActivate, CanDeactivate, getCanActivateChild, getToken} from '../utils/preactivation';\nimport {isBoolean, isCanActivate, isCanActivateChild, isCanDeactivate, isFunction} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(moduleInjector: Injector, forwardEvent?: (evt: Event) => void):\n    MonoTypeOperatorFunction<NavigationTransition> {\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\n    return runCanDeactivateChecks(\n               canDeactivateChecks, targetSnapshot!, currentSnapshot, moduleInjector)\n        .pipe(\n            mergeMap(canDeactivate => {\n              return canDeactivate && isBoolean(canDeactivate) ?\n                  runCanActivateChecks(\n                      targetSnapshot!, canActivateChecks, moduleInjector, forwardEvent) :\n                  of(canDeactivate);\n            }),\n            map(guardsResult => ({...t, guardsResult})));\n  });\n}\n\nfunction runCanDeactivateChecks(\n    checks: CanDeactivate[], futureRSS: RouterStateSnapshot, currRSS: RouterStateSnapshot,\n    moduleInjector: Injector) {\n  return from(checks).pipe(\n      mergeMap(\n          check =>\n              runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\n\nfunction runCanActivateChecks(\n    futureSnapshot: RouterStateSnapshot, checks: CanActivate[], moduleInjector: Injector,\n    forwardEvent?: (evt: Event) => void) {\n  return from(checks).pipe(\n      concatMap((check: CanActivate) => {\n        return concat(\n            fireChildActivationStart(check.route.parent, forwardEvent),\n            fireActivationStart(check.route, forwardEvent),\n            runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n            runCanActivate(futureSnapshot, check.route, moduleInjector));\n      }),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\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(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ActivationStart(snapshot));\n  }\n  return of(true);\n}\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(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ChildActivationStart(snapshot));\n  }\n  return of(true);\n}\n\nfunction runCanActivate(\n    futureRSS: RouterStateSnapshot, futureARS: ActivatedRouteSnapshot,\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n  if (!canActivate || canActivate.length === 0) return of(true);\n\n  const canActivateObservables = canActivate.map((c: any) => {\n    return defer(() => {\n      const guard = getToken(c, futureARS, moduleInjector);\n      let observable;\n      if (isCanActivate(guard)) {\n        observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n      } else if (isFunction<CanActivateFn>(guard)) {\n        observable = wrapIntoObservable(guard(futureARS, futureRSS));\n      } else {\n        throw new Error('Invalid CanActivate guard');\n      }\n      return observable.pipe(first());\n    });\n  });\n  return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n    futureRSS: RouterStateSnapshot, path: ActivatedRouteSnapshot[],\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const futureARS = path[path.length - 1];\n\n  const canActivateChildGuards = path.slice(0, path.length - 1)\n                                     .reverse()\n                                     .map(p => getCanActivateChild(p))\n                                     .filter(_ => _ !== null);\n\n  const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n    return defer(() => {\n      const guardsMapped = d.guards.map((c: any) => {\n        const guard = getToken(c, d.node, moduleInjector);\n        let observable;\n        if (isCanActivateChild(guard)) {\n          observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n        } else if (isFunction<CanActivateChildFn>(guard)) {\n          observable = wrapIntoObservable(guard(futureARS, futureRSS));\n        } else {\n          throw new Error('Invalid CanActivateChild guard');\n        }\n        return observable.pipe(first());\n      });\n      return of(guardsMapped).pipe(prioritizedGuardValue());\n    });\n  });\n  return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n    component: Object|null, currARS: ActivatedRouteSnapshot, currRSS: RouterStateSnapshot,\n    futureRSS: RouterStateSnapshot, moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n  if (!canDeactivate || canDeactivate.length === 0) return of(true);\n  const canDeactivateObservables = canDeactivate.map((c: any) => {\n    const guard = getToken(c, currARS, moduleInjector);\n    let observable;\n    if (isCanDeactivate(guard)) {\n      observable = wrapIntoObservable(guard.canDeactivate(component!, currARS, currRSS, futureRSS));\n    } else if (isFunction<CanDeactivateFn<any>>(guard)) {\n      observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n    } else {\n      throw new Error('Invalid CanDeactivate guard');\n    }\n    return observable.pipe(first());\n  });\n  return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {Observable, Observer, of} from 'rxjs';\n\nimport {Data, ResolveData, Route, Routes} from './config';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, ParamsInheritanceStrategy, RouterStateSnapshot} from './router_state';\nimport {PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {last} from './utils/collection';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {isImmediateMatch, match, noLeftoversInUrl, split} from './utils/config_matching';\nimport {TreeNode} from './utils/tree';\n\nclass NoMatch {}\n\nfunction newObservableError(e: unknown): Observable<RouterStateSnapshot> {\n  // TODO(atscott): This pattern is used throughout the router code and can be `throwError` instead.\n  return new Observable<RouterStateSnapshot>((obs: Observer<RouterStateSnapshot>) => obs.error(e));\n}\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Routes, urlTree: UrlTree, url: string,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n    relativeLinkResolution: 'legacy'|'corrected' = 'legacy'): Observable<RouterStateSnapshot> {\n  try {\n    const result = new Recognizer(\n                       rootComponentType, config, urlTree, url, paramsInheritanceStrategy,\n                       relativeLinkResolution)\n                       .recognize();\n    if (result === null) {\n      return newObservableError(new NoMatch());\n    } else {\n      return of(result);\n    }\n  } catch (e) {\n    // Catch the potential error from recognize due to duplicate outlet matches and return as an\n    // `Observable` error instead.\n    return newObservableError(e);\n  }\n}\n\nexport class Recognizer {\n  constructor(\n      private rootComponentType: Type<any>|null, private config: Routes, private urlTree: UrlTree,\n      private url: string, private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n      private relativeLinkResolution: 'legacy'|'corrected') {}\n\n  recognize(): RouterStateSnapshot|null {\n    const rootSegmentGroup =\n        split(\n            this.urlTree.root, [], [], this.config.filter(c => c.redirectTo === undefined),\n            this.relativeLinkResolution)\n            .segmentGroup;\n\n    const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    if (children === null) {\n      return null;\n    }\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(\n        [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment,\n        {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});\n\n    const rootNode = new TreeNode<ActivatedRouteSnapshot>(root, children);\n    const routeState = new RouterStateSnapshot(this.url, rootNode);\n    this.inheritParamsAndData(routeState._root);\n    return routeState;\n  }\n\n  inheritParamsAndData(routeNode: TreeNode<ActivatedRouteSnapshot>): void {\n    const route = routeNode.value;\n\n    const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n    route.params = Object.freeze(i.params);\n    route.data = Object.freeze(i.data);\n\n    routeNode.children.forEach(n => this.inheritParamsAndData(n));\n  }\n\n  processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):\n      TreeNode<ActivatedRouteSnapshot>[]|null {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.processChildren(config, segmentGroup);\n    }\n\n    return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n  }\n\n  /**\n   * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if\n   * we cannot find a match for _any_ of the children.\n   *\n   * @param config - The `Routes` to match against\n   * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the\n   *     config.\n   */\n  processChildren(config: Route[], segmentGroup: UrlSegmentGroup):\n      TreeNode<ActivatedRouteSnapshot>[]|null {\n    const children: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n    for (const childOutlet of Object.keys(segmentGroup.children)) {\n      const child = segmentGroup.children[childOutlet];\n      // Sort the config so that routes with outlets that match the one being activated appear\n      // first, followed by routes for other outlets, which might match if they have an empty path.\n      const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n      const outletChildren = this.processSegmentGroup(sortedConfig, child, childOutlet);\n      if (outletChildren === null) {\n        // Configs must match all segment children so because we did not find a match for this\n        // outlet, return `null`.\n        return null;\n      }\n      children.push(...outletChildren);\n    }\n    // Because we may have matched two outlets to the same empty path segment, we can have multiple\n    // activated results for the same outlet. We should merge the children of these results so the\n    // final return value is only one `TreeNode` per outlet.\n    const mergedChildren = mergeEmptyPathMatches(children);\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      // This should really never happen - we are only taking the first match for each outlet and\n      // merge the empty path matches.\n      checkOutletNameUniqueness(mergedChildren);\n    }\n    sortActivatedRouteSnapshots(mergedChildren);\n    return mergedChildren;\n  }\n\n  processSegment(\n      config: Route[], segmentGroup: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[]|null {\n    for (const r of config) {\n      const children = this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n      if (children !== null) {\n        return children;\n      }\n    }\n    if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n      return [];\n    }\n\n    return null;\n  }\n\n  processSegmentAgainstRoute(\n      route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[]|null {\n    if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet)) return null;\n\n    let snapshot: ActivatedRouteSnapshot;\n    let consumedSegments: UrlSegment[] = [];\n    let rawSlicedSegments: UrlSegment[] = [];\n\n    if (route.path === '**') {\n      const params = segments.length > 0 ? last(segments)!.parameters : {};\n      snapshot = new ActivatedRouteSnapshot(\n          segments, params, Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment,\n          getData(route), getOutlet(route), route.component!, route,\n          getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length,\n          getResolve(route));\n    } else {\n      const result = match(rawSegment, route, segments);\n      if (!result.matched) {\n        return null;\n      }\n      consumedSegments = result.consumedSegments;\n      rawSlicedSegments = segments.slice(result.lastChild);\n\n      snapshot = new ActivatedRouteSnapshot(\n          consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),\n          this.urlTree.fragment, getData(route), getOutlet(route), route.component!, route,\n          getSourceSegmentGroup(rawSegment),\n          getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n    }\n\n    const childConfig: Route[] = getChildConfig(route);\n\n    const {segmentGroup, slicedSegments} = split(\n        rawSegment, consumedSegments, rawSlicedSegments,\n        // Filter out routes with redirectTo because we are trying to create activated route\n        // snapshots and don't handle redirects here. That should have been done in\n        // `applyRedirects`.\n        childConfig.filter(c => c.redirectTo === undefined), this.relativeLinkResolution);\n\n    if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n      const children = this.processChildren(childConfig, segmentGroup);\n      if (children === null) {\n        return null;\n      }\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n    }\n\n    if (childConfig.length === 0 && slicedSegments.length === 0) {\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, [])];\n    }\n\n    const matchedOnOutlet = getOutlet(route) === outlet;\n    // If we matched a config due to empty path match on a different outlet, we need to continue\n    // passing the current outlet for the segment rather than switch to PRIMARY.\n    // Note that we switch to primary when we have a match because outlet configs look like this:\n    // {path: 'a', outlet: 'a', children: [\n    //  {path: 'b', component: B},\n    //  {path: 'c', component: C},\n    // ]}\n    // Notice that the children of the named outlet are configured with the primary outlet\n    const children = this.processSegment(\n        childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet);\n    if (children === null) {\n      return null;\n    }\n    return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n  }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  nodes.sort((a, b) => {\n    if (a.value.outlet === PRIMARY_OUTLET) return -1;\n    if (b.value.outlet === PRIMARY_OUTLET) return 1;\n    return a.value.outlet.localeCompare(b.value.outlet);\n  });\n}\n\nfunction getChildConfig(route: Route): Route[] {\n  if (route.children) {\n    return route.children;\n  }\n\n  if (route.loadChildren) {\n    return route._loadedConfig!.routes;\n  }\n\n  return [];\n}\n\nfunction hasEmptyPathConfig(node: TreeNode<ActivatedRouteSnapshot>) {\n  const config = node.value.routeConfig;\n  return config && config.path === '' && config.redirectTo === undefined;\n}\n\n/**\n * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with the\n * children from each duplicate. This is necessary because different outlets can match a single\n * empty path route config and the results need to then be merged.\n */\nfunction mergeEmptyPathMatches(nodes: Array<TreeNode<ActivatedRouteSnapshot>>):\n    Array<TreeNode<ActivatedRouteSnapshot>> {\n  const result: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n  // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n  const mergedNodes: Set<TreeNode<ActivatedRouteSnapshot>> = new Set();\n\n  for (const node of nodes) {\n    if (!hasEmptyPathConfig(node)) {\n      result.push(node);\n      continue;\n    }\n\n    const duplicateEmptyPathNode =\n        result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n    if (duplicateEmptyPathNode !== undefined) {\n      duplicateEmptyPathNode.children.push(...node.children);\n      mergedNodes.add(duplicateEmptyPathNode);\n    } else {\n      result.push(node);\n    }\n  }\n  // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n  // by also merging those children. This is necessary when there are multiple empty path configs in\n  // a row. Put another way: whenever we combine children of two nodes, we need to also check if any\n  // of those children can be combined into a single node as well.\n  for (const mergedNode of mergedNodes) {\n    const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n    result.push(new TreeNode(mergedNode.value, mergedChildren));\n  }\n  return result.filter(n => !mergedNodes.has(n));\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  const names: {[k: string]: ActivatedRouteSnapshot} = {};\n  nodes.forEach(n => {\n    const routeWithSameOutletName = names[n.value.outlet];\n    if (routeWithSameOutletName) {\n      const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n      const c = n.value.url.map(s => s.toString()).join('/');\n      throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n    }\n    names[n.value.outlet] = n.value;\n  });\n}\n\nfunction getSourceSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n  let s = segmentGroup;\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n  }\n  return s;\n}\n\nfunction getPathIndexShift(segmentGroup: UrlSegmentGroup): number {\n  let s = segmentGroup;\n  let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n    res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  }\n  return res - 1;\n}\n\nfunction getData(route: Route): Data {\n  return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n  return route.resolve || {};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../config';\nimport {recognize as recognizeFn} from '../recognize';\nimport {NavigationTransition} from '../router';\nimport {UrlTree} from '../url_tree';\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Route[], serializer: (url: UrlTree) => string,\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    relativeLinkResolution: 'legacy'|'corrected'): MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(\n      t => recognizeFn(\n               rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects),\n               paramsInheritanceStrategy, relativeLinkResolution)\n               .pipe(map(targetSnapshot => ({...t, targetSnapshot}))));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {EMPTY, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, map, mergeMap, takeLast, tap} from 'rxjs/operators';\n\nimport {ResolveData} from '../config';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, RouterStateSnapshot} from '../router_state';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {getToken} from '../utils/preactivation';\n\nexport function resolveData(\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    moduleInjector: Injector): MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(t => {\n    const {targetSnapshot, guards: {canActivateChecks}} = t;\n\n    if (!canActivateChecks.length) {\n      return of(t);\n    }\n    let canActivateChecksResolved = 0;\n    return from(canActivateChecks)\n        .pipe(\n            concatMap(\n                check => runResolve(\n                    check.route, targetSnapshot!, paramsInheritanceStrategy, moduleInjector)),\n            tap(() => canActivateChecksResolved++),\n            takeLast(1),\n            mergeMap(_ => canActivateChecksResolved === canActivateChecks.length ? of(t) : EMPTY),\n        );\n  });\n}\n\nfunction runResolve(\n    futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    paramsInheritanceStrategy: 'emptyOnly'|'always', moduleInjector: Injector) {\n  const resolve = futureARS._resolve;\n  return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n      .pipe(map((resolvedData: any) => {\n        futureARS._resolvedData = resolvedData;\n        futureARS.data = {\n          ...futureARS.data,\n          ...inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve\n        };\n        return null;\n      }));\n}\n\nfunction resolveNode(\n    resolve: ResolveData, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const keys = Object.keys(resolve);\n  if (keys.length === 0) {\n    return of({});\n  }\n  const data: {[k: string]: any} = {};\n  return from(keys).pipe(\n      mergeMap(\n          (key: string) => getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n                               .pipe(tap((value: any) => {\n                                 data[key] = value;\n                               }))),\n      takeLast(1),\n      mergeMap(() => {\n        // Ensure all resolvers returned values, otherwise don't emit any \"next\" and just complete\n        // the chain which will cancel navigation\n        if (Object.keys(data).length === keys.length) {\n          return of(data);\n        }\n        return EMPTY;\n      }),\n  );\n}\n\nfunction getResolver(\n    injectionToken: any, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const resolver = getToken(injectionToken, futureARS, moduleInjector);\n  return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n                            wrapIntoObservable(resolver(futureARS, futureRSS));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {from, MonoTypeOperatorFunction, ObservableInput, of} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\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 */\nexport function switchTap<T>(next: (x: T) => void|ObservableInput<any>):\n    MonoTypeOperatorFunction<T> {\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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n  contexts: Map<string, OutletContext>,\n  componentRef: ComponentRef<any>,\n  route: TreeNode<ActivatedRoute>,\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nexport abstract class RouteReuseStrategy {\n  /** Determines if this route (and its subtree) should be detached to be reused later */\n  abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n  /**\n   * Stores the detached route.\n   *\n   * Storing a `null` value should erase the previously stored value.\n   */\n  abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;\n\n  /** Determines if this route (and its subtree) should be reattached */\n  abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n  /** Retrieves the previously stored route */\n  abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null;\n\n  /** Determines if a route should be reused */\n  abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\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 */\nexport abstract class BaseRouteReuseStrategy implements RouteReuseStrategy {\n  /**\n   * Whether the given route should detach for later reuse.\n   * Always returns false for `BaseRouteReuseStrategy`.\n   * */\n  shouldDetach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\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: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n\n  /** Returns `false`, meaning the route (and its subtree) is never reattached */\n  shouldAttach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /** Returns `null` because this strategy does not store routes for later re-use. */\n  retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null {\n    return null;\n  }\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: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n    return future.routeConfig === curr.routeConfig;\n  }\n}\n\nexport class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, InjectFlags, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';\nimport {ConnectableObservable, from, Observable, of, Subject} from 'rxjs';\nimport {catchError, map, mergeMap, refCount, tap} from 'rxjs/operators';\n\nimport {LoadChildren, LoadedRouterConfig, Route} from './config';\nimport {flatten, wrapIntoObservable} from './utils/collection';\nimport {standardizeConfig} from './utils/config';\n\n/**\n * The [DI token](guide/glossary/#di-token) for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>('ROUTES');\n\nexport class RouterConfigLoader {\n  constructor(\n      private loader: NgModuleFactoryLoader, private compiler: Compiler,\n      private onLoadStartListener?: (r: Route) => void,\n      private onLoadEndListener?: (r: Route) => void) {}\n\n  load(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n    if (route._loader$) {\n      return route._loader$;\n    }\n\n    if (this.onLoadStartListener) {\n      this.onLoadStartListener(route);\n    }\n    const moduleFactory$ = this.loadModuleFactory(route.loadChildren!);\n    const loadRunner = moduleFactory$.pipe(\n        map((factory: NgModuleFactory<any>) => {\n          if (this.onLoadEndListener) {\n            this.onLoadEndListener(route);\n          }\n          const module = factory.create(parentInjector);\n          // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n          // will get stuck in an infinite loop. The child module's Injector will look to\n          // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n          // for it's parent module instead.\n          return new LoadedRouterConfig(\n              flatten(\n                  module.injector.get(ROUTES, undefined, InjectFlags.Self | InjectFlags.Optional))\n                  .map(standardizeConfig),\n              module);\n        }),\n        catchError((err) => {\n          route._loader$ = undefined;\n          throw err;\n        }),\n    );\n    // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n    route._loader$ = new ConnectableObservable(loadRunner, () => new Subject<LoadedRouterConfig>())\n                         .pipe(refCount());\n    return route._loader$;\n  }\n\n  private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {\n    if (typeof loadChildren === 'string') {\n      return from(this.loader.load(loadChildren));\n    } else {\n      return wrapIntoObservable(loadChildren()).pipe(mergeMap((t: any) => {\n        if (t instanceof NgModuleFactory) {\n          return of(t);\n        } else {\n          return from(this.compiler.compileModuleAsync(t));\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\nimport {ComponentFactoryResolver, ComponentRef} from '@angular/core';\n\nimport {RouterOutletContract} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\n\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n  outlet: RouterOutletContract|null = null;\n  route: ActivatedRoute|null = null;\n  resolver: ComponentFactoryResolver|null = null;\n  children = new ChildrenOutletContexts();\n  attachRef: ComponentRef<any>|null = null;\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nexport class ChildrenOutletContexts {\n  // contexts for child outlets, by name.\n  private contexts = new Map<string, OutletContext>();\n\n  /** Called when a `RouterOutlet` directive is instantiated */\n  onChildOutletCreated(childName: string, outlet: RouterOutletContract): void {\n    const context = this.getOrCreateContext(childName);\n    context.outlet = outlet;\n    this.contexts.set(childName, context);\n  }\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: string): void {\n    const context = this.getContext(childName);\n    if (context) {\n      context.outlet = null;\n      context.attachRef = null;\n    }\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(): Map<string, OutletContext> {\n    const contexts = this.contexts;\n    this.contexts = new Map();\n    return contexts;\n  }\n\n  onOutletReAttached(contexts: Map<string, OutletContext>) {\n    this.contexts = contexts;\n  }\n\n  getOrCreateContext(childName: string): OutletContext {\n    let context = this.getContext(childName);\n\n    if (!context) {\n      context = new OutletContext();\n      this.contexts.set(childName, context);\n    }\n\n    return context;\n  }\n\n  getContext(childName: string): OutletContext|null {\n    return this.contexts.get(childName) || 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\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nexport abstract class UrlHandlingStrategy {\n  /**\n   * Tells the router if this URL should be processed.\n   *\n   * When it returns true, the router will execute the regular navigation.\n   * When it returns false, the router will set the router state to an empty state.\n   * As a result, all the active components will be destroyed.\n   *\n   */\n  abstract shouldProcessUrl(url: UrlTree): boolean;\n\n  /**\n   * Extracts the part of the URL that should be handled by the router.\n   * The rest of the URL will remain untouched.\n   */\n  abstract extract(url: UrlTree): UrlTree;\n\n  /**\n   * Merges the URL fragment with the rest of the URL.\n   */\n  abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n  shouldProcessUrl(url: UrlTree): boolean {\n    return true;\n  }\n  extract(url: UrlTree): UrlTree {\n    return url;\n  }\n  merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree {\n    return newUrlPart;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, PopStateEvent} from '@angular/common';\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, NgZone, Type, ɵConsole as Console} from '@angular/core';\nimport {BehaviorSubject, EMPTY, Observable, of, Subject, SubscriptionLike} from 'rxjs';\nimport {catchError, filter, finalize, map, switchMap, tap} from 'rxjs/operators';\n\nimport {QueryParamsHandling, Route, Routes} from './config';\nimport {createRouterState} from './create_router_state';\nimport {createUrlTree} from './create_url_tree';\nimport {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events';\nimport {activateRoutes} from './operators/activate_routes';\nimport {applyRedirects} from './operators/apply_redirects';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ActivatedRoute, createEmptyState, RouterState, RouterStateSnapshot} from './router_state';\nimport {isNavigationCancelingError, navigationCancelingError, Params} from './shared';\nimport {DefaultUrlHandlingStrategy, UrlHandlingStrategy} from './url_handling_strategy';\nimport {containsTree, createEmptyUrlTree, IsActiveMatchOptions, UrlSerializer, UrlTree} from './url_tree';\nimport {standardizeConfig, validateConfig} from './utils/config';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {isUrlTree} from './utils/type_guards';\n\n\n/**\n * @description\n *\n * Options that modify the `Router` URL.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface UrlCreationOptions {\n  /**\n   * Specifies a root URI to use for relative navigation.\n   *\n   * For example, consider the following route configuration where the parent route\n   * has two children.\n   *\n   * ```\n   * [{\n   *   path: 'parent',\n   *   component: ParentComponent,\n   *   children: [{\n   *     path: 'list',\n   *     component: ListComponent\n   *   },{\n   *     path: 'child',\n   *     component: ChildComponent\n   *   }]\n   * }]\n   * ```\n   *\n   * The following `go()` function navigates to the `list` route by\n   * interpreting the destination URI as relative to the activated `child`  route\n   *\n   * ```\n   *  @Component({...})\n   *  class ChildComponent {\n   *    constructor(private router: Router, private route: ActivatedRoute) {}\n   *\n   *    go() {\n   *      this.router.navigate(['../list'], { relativeTo: this.route });\n   *    }\n   *  }\n   * ```\n   *\n   * A value of `null` or `undefined` indicates that the navigation commands should be applied\n   * relative to the root.\n   */\n  relativeTo?: ActivatedRoute|null;\n\n  /**\n   * Sets query parameters to the URL.\n   *\n   * ```\n   * // Navigate to /results?page=1\n   * this.router.navigate(['/results'], { queryParams: { page: 1 } });\n   * ```\n   */\n  queryParams?: Params|null;\n\n  /**\n   * Sets the hash fragment for the URL.\n   *\n   * ```\n   * // Navigate to /results#top\n   * this.router.navigate(['/results'], { fragment: 'top' });\n   * ```\n   */\n  fragment?: string;\n\n  /**\n   * How to handle query parameters in the router link for the next navigation.\n   * One of:\n   * * `preserve` : Preserve current parameters.\n   * * `merge` : Merge new with current parameters.\n   *\n   * The \"preserve\" option discards any new query params:\n   * ```\n   * // from /view1?page=1 to/view2?page=1\n   * this.router.navigate(['/view2'], { queryParams: { page: 2 },  queryParamsHandling: \"preserve\"\n   * });\n   * ```\n   * The \"merge\" option appends new query params to the params from the current URL:\n   * ```\n   * // from /view1?page=1 to/view2?page=1&otherKey=2\n   * this.router.navigate(['/view2'], { queryParams: { otherKey: 2 },  queryParamsHandling: \"merge\"\n   * });\n   * ```\n   * In case of a key collision between current parameters and those in the `queryParams` object,\n   * the new value is used.\n   *\n   */\n  queryParamsHandling?: QueryParamsHandling|null;\n\n  /**\n   * When true, preserves the URL fragment for the next navigation\n   *\n   * ```\n   * // Preserve fragment from /results#top to /view#top\n   * this.router.navigate(['/view'], { preserveFragment: true });\n   * ```\n   */\n  preserveFragment?: boolean;\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the navigation should be handled.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface NavigationBehaviorOptions {\n  /**\n   * When true, navigates without pushing a new state into history.\n   *\n   * ```\n   * // Navigate silently to /view\n   * this.router.navigate(['/view'], { skipLocationChange: true });\n   * ```\n   */\n  skipLocationChange?: boolean;\n\n  /**\n   * When true, navigates while replacing the current state in history.\n   *\n   * ```\n   * // Navigate to /view\n   * this.router.navigate(['/view'], { replaceUrl: true });\n   * ```\n   */\n  replaceUrl?: boolean;\n\n  /**\n   * Developer-defined state that can be passed to any navigation.\n   * Access this value through the `Navigation.extras` object\n   * returned from the [Router.getCurrentNavigation()\n   * method](api/router/Router#getcurrentnavigation) while a navigation is executing.\n   *\n   * After a navigation completes, the router writes an object containing this\n   * value together with a `navigationId` to `history.state`.\n   * The value is written when `location.go()` or `location.replaceState()`\n   * is called before activating this route.\n   *\n   * Note that `history.state` does not pass an object equality test because\n   * the router adds the `navigationId` on each navigation.\n   *\n   */\n  state?: {[k: string]: any};\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed or interpreted.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n * @see UrlCreationOptions\n * @see NavigationBehaviorOptions\n *\n * @publicApi\n */\nexport interface NavigationExtras extends UrlCreationOptions, NavigationBehaviorOptions {}\n\n/**\n * Error handler that is invoked when a navigation error occurs.\n *\n * If the handler returns a value, the navigation Promise is resolved with this value.\n * If the handler throws an exception, the navigation Promise is rejected with\n * the exception.\n *\n * @publicApi\n */\nexport type ErrorHandler = (error: any) => any;\n\nfunction defaultErrorHandler(error: any): any {\n  throw error;\n}\n\nfunction defaultMalformedUriErrorHandler(\n    error: URIError, urlSerializer: UrlSerializer, url: string): UrlTree {\n  return urlSerializer.parse('/');\n}\n\nexport type RestoredState = {\n  [k: string]: any,\n  // TODO(#27607): Remove `navigationId` and `ɵrouterPageId` and move to `ng` or `ɵ` namespace.\n  navigationId: number,\n  // The `ɵ` prefix is there to reduce the chance of colliding with any existing user properties on\n  // the history state.\n  ɵrouterPageId?: number,\n};\n\n/**\n * Information about a navigation operation.\n * Retrieve the most recent navigation object with the\n * [Router.getCurrentNavigation() method](api/router/Router#getcurrentnavigation) .\n *\n * * *id* : The unique identifier of the current navigation.\n * * *initialUrl* : The target URL passed into the `Router#navigateByUrl()` call before navigation.\n * This is the value before the router has parsed or applied redirects to it.\n * * *extractedUrl* : The initial target URL after being parsed with `UrlSerializer.extract()`.\n * * *finalUrl* : The extracted URL after redirects have been applied.\n * This URL may not be available immediately, therefore this property can be `undefined`.\n * It is guaranteed to be set after the `RoutesRecognized` event fires.\n * * *trigger* : Identifies how this navigation was triggered.\n * -- 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n * -- 'popstate'--Triggered by a popstate event.\n * -- 'hashchange'--Triggered by a hashchange event.\n * * *extras* : A `NavigationExtras` options object that controlled the strategy used for this\n * navigation.\n * * *previousNavigation* : The previously successful `Navigation` object. Only one previous\n * navigation is available, therefore this previous `Navigation` object has a `null` value for its\n * own `previousNavigation`.\n *\n * @publicApi\n */\nexport interface Navigation {\n  /**\n   * The unique identifier of the current navigation.\n   */\n  id: number;\n  /**\n   * The target URL passed into the `Router#navigateByUrl()` call before navigation. This is\n   * the value before the router has parsed or applied redirects to it.\n   */\n  initialUrl: string|UrlTree;\n  /**\n   * The initial target URL after being parsed with `UrlSerializer.extract()`.\n   */\n  extractedUrl: UrlTree;\n  /**\n   * The extracted URL after redirects have been applied.\n   * This URL may not be available immediately, therefore this property can be `undefined`.\n   * It is guaranteed to be set after the `RoutesRecognized` event fires.\n   */\n  finalUrl?: UrlTree;\n  /**\n   * Identifies how this navigation was triggered.\n   *\n   * * 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n   * * 'popstate'--Triggered by a popstate event.\n   * * 'hashchange'--Triggered by a hashchange event.\n   */\n  trigger: 'imperative'|'popstate'|'hashchange';\n  /**\n   * Options that controlled the strategy used for this navigation.\n   * See `NavigationExtras`.\n   */\n  extras: NavigationExtras;\n  /**\n   * The previously successful `Navigation` object. Only one previous navigation\n   * is available, therefore this previous `Navigation` object has a `null` value\n   * for its own `previousNavigation`.\n   */\n  previousNavigation: Navigation|null;\n}\n\nexport type NavigationTransition = {\n  id: number,\n  targetPageId: number,\n  currentUrlTree: UrlTree,\n  currentRawUrl: UrlTree,\n  extractedUrl: UrlTree,\n  urlAfterRedirects: UrlTree,\n  rawUrl: UrlTree,\n  extras: NavigationExtras,\n  resolve: any,\n  reject: any,\n  promise: Promise<boolean>,\n  source: NavigationTrigger,\n  restoredState: RestoredState|null,\n  currentSnapshot: RouterStateSnapshot,\n  targetSnapshot: RouterStateSnapshot|null,\n  currentRouterState: RouterState,\n  targetRouterState: RouterState|null,\n  guards: Checks,\n  guardsResult: boolean|UrlTree|null,\n};\n\n/**\n * @internal\n */\nexport type RouterHook = (snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}) => Observable<void>;\n\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}): Observable<void> {\n  return of(null) as any;\n}\n\n/**\n * Information related to a location change, necessary for scheduling follow-up Router navigations.\n */\ntype LocationChangeInfo = {\n  source: 'popstate'|'hashchange',\n  urlTree: UrlTree,\n  state: RestoredState|null,\n  transitionId: number\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `true`\n * (exact = true).\n */\nexport const exactMatchOptions: IsActiveMatchOptions = {\n  paths: 'exact',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'exact'\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `false`\n * (exact = false).\n */\nexport const subsetMatchOptions: IsActiveMatchOptions = {\n  paths: 'subset',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'subset'\n};\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 */\n@Injectable()\nexport class Router {\n  /**\n   * Represents the activated `UrlTree` that the `Router` is configured to handle (through\n   * `UrlHandlingStrategy`). That is, after we find the route config tree that we're going to\n   * activate, run guards, and are just about to activate the route, we set the currentUrlTree.\n   *\n   * This should match the `browserUrlTree` when a navigation succeeds. If the\n   * `UrlHandlingStrategy.shouldProcessUrl` is `false`, only the `browserUrlTree` is updated.\n   */\n  private currentUrlTree: UrlTree;\n  /**\n   * Meant to represent the entire browser url after a successful navigation. In the life of a\n   * navigation transition:\n   * 1. The rawUrl represents the full URL that's being navigated to\n   * 2. We apply redirects, which might only apply to _part_ of the URL (due to\n   * `UrlHandlingStrategy`).\n   * 3. Right before activation (because we assume activation will succeed), we update the\n   * rawUrlTree to be a combination of the urlAfterRedirects (again, this might only apply to part\n   * of the initial url) and the rawUrl of the transition (which was the original navigation url in\n   * its full form).\n   */\n  private rawUrlTree: UrlTree;\n  /**\n   * Meant to represent the part of the browser url that the `Router` is set up to handle (via the\n   * `UrlHandlingStrategy`). This value is updated immediately after the browser url is updated (or\n   * the browser url update is skipped via `skipLocationChange`). With that, note that\n   * `browserUrlTree` _may not_ reflect the actual browser URL for two reasons:\n   *\n   * 1. `UrlHandlingStrategy` only handles part of the URL\n   * 2. `skipLocationChange` does not update the browser url.\n   *\n   * So to reiterate, `browserUrlTree` only represents the Router's internal understanding of the\n   * current route, either before guards with `urlUpdateStrategy === 'eager'` or right before\n   * activation with `'deferred'`.\n   *\n   * This should match the `currentUrlTree` when the navigation succeeds.\n   */\n  private browserUrlTree: UrlTree;\n  private readonly transitions: BehaviorSubject<NavigationTransition>;\n  private navigations: Observable<NavigationTransition>;\n  private lastSuccessfulNavigation: Navigation|null = null;\n  private currentNavigation: Navigation|null = null;\n  private disposed = false;\n\n  private locationSubscription?: SubscriptionLike;\n  /**\n   * Tracks the previously seen location change from the location subscription so we can compare\n   * the two latest to see if they are duplicates. See setUpLocationChangeListener.\n   */\n  private lastLocationChangeInfo: LocationChangeInfo|null = null;\n  private navigationId: number = 0;\n\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  private currentPageId: number = 0;\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  private get browserPageId(): number|undefined {\n    return (this.location.getState() as RestoredState | null)?.ɵrouterPageId;\n  }\n  private configLoader: RouterConfigLoader;\n  private ngModule: NgModuleRef<any>;\n  private console: Console;\n  private isNgZoneEnabled: boolean = false;\n\n  /**\n   * An event stream for routing events in this NgModule.\n   */\n  public readonly events: Observable<Event> = new Subject<Event>();\n  /**\n   * The current state of routing in this NgModule.\n   */\n  public readonly routerState: RouterState;\n\n  /**\n   * A handler for navigation errors in this NgModule.\n   */\n  errorHandler: ErrorHandler = defaultErrorHandler;\n\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  malformedUriErrorHandler:\n      (error: URIError, urlSerializer: UrlSerializer,\n       url: string) => UrlTree = defaultMalformedUriErrorHandler;\n\n  /**\n   * True if at least one navigation event has occurred,\n   * false otherwise.\n   */\n  navigated: boolean = false;\n  private lastSuccessfulId: number = -1;\n\n  /**\n   * Hooks that enable you to pause navigation,\n   * either before or after the preactivation phase.\n   * Used by `RouterModule`.\n   *\n   * @internal\n   */\n  hooks: {\n    beforePreactivation: RouterHook,\n    afterPreactivation: RouterHook\n  } = {beforePreactivation: defaultRouterHook, afterPreactivation: defaultRouterHook};\n\n  /**\n   * A strategy for extracting and merging URLs.\n   * Used for AngularJS to Angular migrations.\n   */\n  urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();\n\n  /**\n   * A strategy for re-using routes.\n   */\n  routeReuseStrategy: RouteReuseStrategy = new DefaultRouteReuseStrategy();\n\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  onSameUrlNavigation: 'reload'|'ignore' = 'ignore';\n\n  /**\n   * How to merge parameters, data, and resolved data from parent to child\n   * routes. One of:\n   *\n   * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\n   * for path-less or component-less routes.\n   * - `'always'` : Inherit parent parameters, data, and resolved data\n   * for all child routes.\n   */\n  paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly';\n\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  urlUpdateStrategy: 'deferred'|'eager' = 'deferred';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * @see `RouterModule`\n   */\n  relativeLinkResolution: 'legacy'|'corrected' = 'corrected';\n\n  /**\n   * Configures how the Router attempts to restore state when a navigation is cancelled.\n   *\n   * 'replace' - Always uses `location.replaceState` to set the browser state to the state of the\n   * router before the navigation started.\n   *\n   * 'computed' - Will always return to the same state that corresponds to the actual Angular route\n   * when the navigation gets cancelled right after triggering a `popstate` event.\n   *\n   * The default value is `replace`\n   *\n   * @internal\n   */\n  // TODO(atscott): Determine how/when/if to make this public API\n  // This shouldn’t be an option at all but may need to be in order to allow migration without a\n  // breaking change. We need to determine if it should be made into public api (or if we forgo\n  // the option and release as a breaking change bug fix in a major version).\n  canceledNavigationResolution: 'replace'|'computed' = 'replace';\n\n  /**\n   * Creates the router service.\n   */\n  // TODO: vsavkin make internal after the final is out.\n  constructor(\n      private rootComponentType: Type<any>|null, private urlSerializer: UrlSerializer,\n      private rootContexts: ChildrenOutletContexts, private location: Location, injector: Injector,\n      loader: NgModuleFactoryLoader, compiler: Compiler, public config: Routes) {\n    const onLoadStart = (r: Route) => this.triggerEvent(new RouteConfigLoadStart(r));\n    const onLoadEnd = (r: Route) => this.triggerEvent(new RouteConfigLoadEnd(r));\n\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\n    this.resetConfig(config);\n    this.currentUrlTree = createEmptyUrlTree();\n    this.rawUrlTree = this.currentUrlTree;\n    this.browserUrlTree = this.currentUrlTree;\n\n    this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n    this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n\n    this.transitions = new BehaviorSubject<NavigationTransition>({\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\n    this.processNavigations();\n  }\n\n  private setupNavigations(transitions: Observable<NavigationTransition>):\n      Observable<NavigationTransition> {\n    const eventsSubject = (this.events as Subject<Event>);\n    return transitions.pipe(\n               filter(t => t.id !== 0),\n\n               // Extract URL\n               map(t =>\n                       ({...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)} as\n                        NavigationTransition)),\n\n               // Using switchMap so we cancel executing navigations when a new one comes in\n               switchMap(t => {\n                 let completed = false;\n                 let errored = false;\n                 return of(t).pipe(\n                     // Store the Navigation object\n                     tap(t => {\n                       this.currentNavigation = {\n                         id: t.id,\n                         initialUrl: t.currentRawUrl,\n                         extractedUrl: t.extractedUrl,\n                         trigger: t.source,\n                         extras: t.extras,\n                         previousNavigation: this.lastSuccessfulNavigation ?\n                             {...this.lastSuccessfulNavigation, previousNavigation: null} :\n                             null\n                       };\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 try\n                           // processing the URL again.\n                           browserUrlTree !== this.currentUrlTree.toString();\n                       const processCurrentUrl =\n                           (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n                           this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n\n\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(\n                                   t.id, this.serializeUrl(t.extractedUrl), t.source,\n                                   t.restoredState));\n                               if (transition !== this.transitions.getValue()) {\n                                 return EMPTY;\n                               }\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\n                             // ApplyRedirects\n                             applyRedirects(\n                                 this.ngModule.injector, this.configLoader, this.urlSerializer,\n                                 this.config),\n\n                             // Update the currentNavigation\n                             tap(t => {\n                               this.currentNavigation = {\n                                 ...this.currentNavigation!,\n                                 finalUrl: t.urlAfterRedirects\n                               };\n                             }),\n\n                             // Recognize\n                             recognize(\n                                 this.rootComponentType, this.config,\n                                 (url) => this.serializeUrl(url), this.paramsInheritanceStrategy,\n                                 this.relativeLinkResolution),\n\n                             // Update URL if in `eager` update mode\n                             tap(t => {\n                               if (this.urlUpdateStrategy === 'eager') {\n                                 if (!t.extras.skipLocationChange) {\n                                   this.setBrowserUrl(t.urlAfterRedirects, t);\n                                   // TODO(atscott): The above line is incorrect. It sets the url to\n                                   // only the part that is handled by the router. It should merge\n                                   // that with the rawUrl so the url includes segments not handled\n                                   // by the router:\n                                   //  const rawUrl = this.urlHandlingStrategy.merge(\n                                   //      t.urlAfterRedirects, t.rawUrl);\n                                   //  this.setBrowserUrl(rawUrl, t);\n                                 }\n                                 this.browserUrlTree = t.urlAfterRedirects;\n                               }\n\n                               // Fire RoutesRecognized\n                               const routesRecognized = new RoutesRecognized(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               eventsSubject.next(routesRecognized);\n                             }));\n                       } else {\n                         const processPreviousUrl = urlTransition && this.rawUrlTree &&\n                             this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n                         /* When the current URL shouldn't be processed, but the previous one was,\n                          * we handle this \"error condition\" by navigating to the previously\n                          * successful URL, but leaving the URL intact.*/\n                         if (processPreviousUrl) {\n                           const {id, extractedUrl, source, restoredState, extras} = t;\n                           const navStart = new NavigationStart(\n                               id, this.serializeUrl(extractedUrl), source, restoredState);\n                           eventsSubject.next(navStart);\n                           const targetSnapshot =\n                               createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n\n                           return of({\n                             ...t,\n                             targetSnapshot,\n                             urlAfterRedirects: extractedUrl,\n                             extras: {...extras, skipLocationChange: false, replaceUrl: false},\n                           });\n                         } else {\n                           /* When neither the current or previous URL can be processed, do nothing\n                            * other than update router's internal reference to the current \"settled\"\n                            * URL. This way the next navigation will be coming from the current URL\n                            * in the browser.\n                            */\n                           this.rawUrlTree = t.rawUrl;\n                           this.browserUrlTree = t.urlAfterRedirects;\n                           t.resolve(null);\n                           return EMPTY;\n                         }\n                       }\n                     }),\n\n                     // Before Preactivation\n                     switchTap(t => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.beforePreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     // --- GUARDS ---\n                     tap(t => {\n                       const guardsStart = new GuardsCheckStart(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                       this.triggerEvent(guardsStart);\n                     }),\n\n                     map(t => ({\n                           ...t,\n                           guards: getAllRouteGuards(\n                               t.targetSnapshot!, t.currentSnapshot, this.rootContexts)\n                         })),\n\n                     checkGuards(this.ngModule.injector, (evt: Event) => this.triggerEvent(evt)),\n                     tap(t => {\n                       if (isUrlTree(t.guardsResult)) {\n                         const error: Error&{url?: UrlTree} = navigationCancelingError(\n                             `Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n                         error.url = t.guardsResult;\n                         throw error;\n                       }\n\n                       const guardsEnd = new GuardsCheckEnd(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!,\n                           !!t.guardsResult);\n                       this.triggerEvent(guardsEnd);\n                     }),\n\n                     filter(t => {\n                       if (!t.guardsResult) {\n                         this.restoreHistory(t);\n                         this.cancelNavigationTransition(t, '');\n                         return false;\n                       }\n                       return true;\n                     }),\n\n                     // --- RESOLVE ---\n                     switchTap(t => {\n                       if (t.guards.canActivateChecks.length) {\n                         return of(t).pipe(\n                             tap(t => {\n                               const resolveStart = new ResolveStart(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveStart);\n                             }),\n                             switchMap(t => {\n                               let dataResolved = false;\n                               return of(t).pipe(\n                                   resolveData(\n                                       this.paramsInheritanceStrategy, this.ngModule.injector),\n                                   tap({\n                                     next: () => dataResolved = true,\n                                     complete: () => {\n                                       if (!dataResolved) {\n                                         this.restoreHistory(t);\n                                         this.cancelNavigationTransition(\n                                             t,\n                                             `At least one route resolver didn't emit any value.`);\n                                       }\n                                     }\n                                   }),\n                               );\n                             }),\n                             tap(t => {\n                               const resolveEnd = new ResolveEnd(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveEnd);\n                             }));\n                       }\n                       return undefined;\n                     }),\n\n                     // --- AFTER PREACTIVATION ---\n                     switchTap((t: NavigationTransition) => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.afterPreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     map((t: NavigationTransition) => {\n                       const targetRouterState = createRouterState(\n                           this.routeReuseStrategy, t.targetSnapshot!, t.currentRouterState);\n                       return ({...t, targetRouterState});\n                     }),\n\n                     /* Once here, we are about to activate syncronously. The assumption is this\n                        will succeed, and user code may read from the Router service. Therefore\n                        before activation, we need to update router properties storing the current\n                        URL and the RouterState, as well as updated the browser URL. All this should\n                        happen *before* activating. */\n                     tap((t: NavigationTransition) => {\n                       this.currentUrlTree = t.urlAfterRedirects;\n                       this.rawUrlTree =\n                           this.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);\n\n                       (this as {routerState: RouterState}).routerState = t.targetRouterState!;\n\n                       if (this.urlUpdateStrategy === 'deferred') {\n                         if (!t.extras.skipLocationChange) {\n                           this.setBrowserUrl(this.rawUrlTree, t);\n                         }\n                         this.browserUrlTree = t.urlAfterRedirects;\n                       }\n                     }),\n\n                     activateRoutes(\n                         this.rootContexts, this.routeReuseStrategy,\n                         (evt: Event) => this.triggerEvent(evt)),\n\n                     tap({\n                       next() {\n                         completed = true;\n                       },\n                       complete() {\n                         completed = true;\n                       }\n                     }),\n                     finalize(() => {\n                       /* When the navigation stream finishes either through error or success, we\n                        * set the `completed` or `errored` flag. However, there are some situations\n                        * where we could get here without either of those being set. For instance, a\n                        * redirect during NavigationStart. Therefore, this is a catch-all to make\n                        * sure the NavigationCancel\n                        * event is fired when a navigation gets cancelled but not caught by other\n                        * means. */\n                       if (!completed && !errored) {\n                         const cancelationReason = `Navigation ID ${\n                             t.id} is not equal to the current navigation id ${this.navigationId}`;\n                         if (this.canceledNavigationResolution === 'replace') {\n                           // Must reset to current URL tree here to ensure history.state is set. On\n                           // a fresh page load, if a new navigation comes in before a successful\n                           // navigation completes, there will be nothing in\n                           // history.state.navigationId. This can cause sync problems with\n                           // AngularJS sync code which looks for a value here in order to determine\n                           // whether or not to handle a given popstate event or to leave it to the\n                           // Angular router.\n                           this.restoreHistory(t);\n                           this.cancelNavigationTransition(t, cancelationReason);\n                         } else {\n                           // We cannot trigger a `location.historyGo` if the\n                           // cancellation was due to a new navigation before the previous could\n                           // complete. This is because `location.historyGo` triggers a `popstate`\n                           // which would also trigger another navigation. Instead, treat this as a\n                           // redirect and do not reset the state.\n                           this.cancelNavigationTransition(t, cancelationReason);\n                           // TODO(atscott): The same problem happens here with a fresh page load\n                           // and a new navigation before that completes where we won't set a page\n                           // id.\n                         }\n                       }\n                       // currentNavigation should always be reset to null here. If navigation was\n                       // successful, lastSuccessfulTransition will have already been set. Therefore\n                       // we can safely set currentNavigation to null here.\n                       this.currentNavigation = null;\n                     }),\n                     catchError((e) => {\n                       // TODO(atscott): The NavigationTransition `t` used here does not accurately\n                       // reflect the current state of the whole transition because some operations\n                       // return a new object rather than modifying the one in the outermost\n                       // `switchMap`.\n                       //  The fix can likely be to:\n                       //  1. Rename the outer `t` variable so it's not shadowed all the time and\n                       //  confusing\n                       //  2. Keep reassigning to the outer variable after each stage to ensure it\n                       //  gets updated. Or change the implementations to not return a copy.\n                       // Not changed yet because it affects existing code and would need to be\n                       // tested more thoroughly.\n                       errored = true;\n                       /* This error type is issued during Redirect, and is handled as a\n                        * cancellation rather than an error. */\n                       if (isNavigationCancelingError(e)) {\n                         const redirecting = isUrlTree(e.url);\n                         if (!redirecting) {\n                           // Set property only if we're not redirecting. If we landed on a page and\n                           // redirect to `/` route, the new navigation is going to see the `/`\n                           // isn't a change from the default currentUrlTree and won't navigate.\n                           // This is only applicable with initial navigation, so setting\n                           // `navigated` only when not redirecting resolves this scenario.\n                           this.navigated = true;\n                           this.restoreHistory(t, true);\n                         }\n                         const navCancel = new NavigationCancel(\n                             t.id, this.serializeUrl(t.extractedUrl), e.message);\n                         eventsSubject.next(navCancel);\n\n                         // When redirecting, we need to delay resolving the navigation\n                         // promise and push it to the redirect navigation\n                         if (!redirecting) {\n                           t.resolve(false);\n                         } else {\n                           // setTimeout is required so this navigation finishes with\n                           // the return EMPTY below. If it isn't allowed to finish\n                           // processing, there can be multiple navigations to the same\n                           // URL.\n                           setTimeout(() => {\n                             const mergedTree =\n                                 this.urlHandlingStrategy.merge(e.url, this.rawUrlTree);\n                             const extras = {\n                               skipLocationChange: t.extras.skipLocationChange,\n                               // The URL is already updated at this point if we have 'eager' URL\n                               // updates or if the navigation was triggered by the browser (back\n                               // button, URL bar, etc). We want to replace that item in history if\n                               // the navigation is rejected.\n                               replaceUrl: this.urlUpdateStrategy === 'eager' ||\n                                   isBrowserTriggeredNavigation(t.source)\n                             };\n\n                             this.scheduleNavigation(\n                                 mergedTree, 'imperative', null, extras,\n                                 {resolve: t.resolve, reject: t.reject, promise: t.promise});\n                           }, 0);\n                         }\n\n                         /* All other errors should reset to the router's internal URL reference to\n                          * the pre-error state. */\n                       } else {\n                         this.restoreHistory(t, true);\n                         const navError =\n                             new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n                         eventsSubject.next(navError);\n                         try {\n                           t.resolve(this.errorHandler(e));\n                         } catch (ee) {\n                           t.reject(ee);\n                         }\n                       }\n                       return EMPTY;\n                     }));\n                 // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n               })) as any as Observable<NavigationTransition>;\n  }\n\n  /**\n   * @internal\n   * TODO: this should be removed once the constructor of the router made internal\n   */\n  resetRootComponentType(rootComponentType: Type<any>): void {\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\n  private getTransition(): NavigationTransition {\n    const transition = this.transitions.value;\n    // TODO(atscott): This comment doesn't make it clear why this value needs to be set. In the case\n    // described below (where we don't handle previous or current url), the `browserUrlTree` is set\n    // to the `urlAfterRedirects` value. However, these values *are already the same* because of the\n    // line below. So it seems that we should be able to remove the line below and the line where\n    // `browserUrlTree` is updated when we aren't handling any part of the navigation url.\n    // Run TGP to confirm that this can be done.\n\n    // This value needs to be set. Other values such as extractedUrl are set on initial navigation\n    // but the urlAfterRedirects may not get set if we aren't processing the new URL *and* not\n    // processing the previous URL.\n    transition.urlAfterRedirects = this.browserUrlTree;\n    return transition;\n  }\n\n  private setTransition(t: Partial<NavigationTransition>): void {\n    this.transitions.next({...this.getTransition(), ...t});\n  }\n\n  /**\n   * Sets up the location change listener and performs the initial navigation.\n   */\n  initialNavigation(): void {\n    this.setUpLocationChangeListener();\n    if (this.navigationId === 0) {\n      this.navigateByUrl(this.location.path(true), {replaceUrl: true});\n    }\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(): void {\n    // Don't need to use Zone.wrap any more, because zone.js\n    // already patch onPopState, so location change callback will\n    // run into ngZone\n    if (!this.locationSubscription) {\n      this.locationSubscription = this.location.subscribe(event => {\n        const currentChange = this.extractLocationChangeInfoFromEvent(event);\n        // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n        // hybrid apps.\n        if (this.shouldScheduleNavigation(this.lastLocationChangeInfo, currentChange)) {\n          setTimeout(() => {\n            const {source, state, urlTree} = currentChange;\n            const extras: NavigationExtras = {replaceUrl: true};\n            if (state) {\n              const stateCopy = {...state} as Partial<RestoredState>;\n              delete stateCopy.navigationId;\n              delete stateCopy.ɵrouterPageId;\n              if (Object.keys(stateCopy).length !== 0) {\n                extras.state = stateCopy;\n              }\n            }\n            this.scheduleNavigation(urlTree, source, state, extras);\n          }, 0);\n        }\n        this.lastLocationChangeInfo = currentChange;\n      });\n    }\n  }\n\n  /** Extracts router-related information from a `PopStateEvent`. */\n  private extractLocationChangeInfoFromEvent(change: PopStateEvent): LocationChangeInfo {\n    return {\n      source: change['type'] === 'popstate' ? 'popstate' : 'hashchange',\n      urlTree: this.parseUrl(change['url']!),\n      // Navigations coming from Angular router have a navigationId state\n      // property. When this exists, restore the state.\n      state: change.state?.navigationId ? change.state : null,\n      transitionId: this.getTransition().id\n    } as const;\n  }\n\n  /**\n   * Determines whether two events triggered by the Location subscription are due to the same\n   * navigation. The location subscription can fire two events (popstate and hashchange) for a\n   * single navigation. The second one should be ignored, that is, we should not schedule another\n   * navigation in the Router.\n   */\n  private shouldScheduleNavigation(previous: LocationChangeInfo|null, current: LocationChangeInfo):\n      boolean {\n    if (!previous) return true;\n\n    const sameDestination = current.urlTree.toString() === previous.urlTree.toString();\n    const eventsOccurredAtSameTime = current.transitionId === previous.transitionId;\n    if (!eventsOccurredAtSameTime || !sameDestination) {\n      return true;\n    }\n\n    if ((current.source === 'hashchange' && previous.source === 'popstate') ||\n        (current.source === 'popstate' && previous.source === 'hashchange')) {\n      return false;\n    }\n\n    return true;\n  }\n\n  /** The current URL. */\n  get url(): string {\n    return this.serializeUrl(this.currentUrlTree);\n  }\n\n  /**\n   * Returns the current `Navigation` object when the router is navigating,\n   * and `null` when idle.\n   */\n  getCurrentNavigation(): Navigation|null {\n    return this.currentNavigation;\n  }\n\n  /** @internal */\n  triggerEvent(event: Event): void {\n    (this.events as Subject<Event>).next(event);\n  }\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: Routes): void {\n    validateConfig(config);\n    this.config = config.map(standardizeConfig);\n    this.navigated = false;\n    this.lastSuccessfulId = -1;\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.dispose();\n  }\n\n  /** Disposes of the router. */\n  dispose(): void {\n    this.transitions.complete();\n    if (this.locationSubscription) {\n      this.locationSubscription.unsubscribe();\n      this.locationSubscription = undefined;\n    }\n    this.disposed = true;\n  }\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: any[], navigationExtras: UrlCreationOptions = {}): UrlTree {\n    const {relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment} =\n        navigationExtras;\n    const a = relativeTo || this.routerState.root;\n    const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n    let q: Params|null = 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  /**\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: string|UrlTree, extras: NavigationBehaviorOptions = {\n    skipLocationChange: false\n  }): Promise<boolean> {\n    if (typeof ngDevMode === 'undefined' ||\n        ngDevMode && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n      this.console.warn(\n          `Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n    }\n\n    const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n    const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n    return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n  }\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: any[], extras: NavigationExtras = {skipLocationChange: false}):\n      Promise<boolean> {\n    validateCommands(commands);\n    return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n  }\n\n  /** Serializes a `UrlTree` into a string */\n  serializeUrl(url: UrlTree): string {\n    return this.urlSerializer.serialize(url);\n  }\n\n  /** Parses a string into a `UrlTree` */\n  parseUrl(url: string): UrlTree {\n    let urlTree: UrlTree;\n    try {\n      urlTree = this.urlSerializer.parse(url);\n    } catch (e) {\n      urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n    }\n    return urlTree;\n  }\n\n  /**\n   * Returns whether the url is activated.\n   *\n   * @deprecated\n   * Use `IsActiveMatchOptions` instead.\n   *\n   * - The equivalent `IsActiveMatchOptions` for `true` is\n   * `{paths: 'exact', queryParams: 'exact', fragment: 'ignored', matrixParams: 'ignored'}`.\n   * - The equivalent for `false` is\n   * `{paths: 'subset', queryParams: 'subset', fragment: 'ignored', matrixParams: 'ignored'}`.\n   */\n  isActive(url: string|UrlTree, exact: boolean): boolean;\n  /**\n   * Returns whether the url is activated.\n   */\n  isActive(url: string|UrlTree, matchOptions: IsActiveMatchOptions): boolean;\n  /** @internal */\n  isActive(url: string|UrlTree, matchOptions: boolean|IsActiveMatchOptions): boolean;\n  isActive(url: string|UrlTree, matchOptions: boolean|IsActiveMatchOptions): boolean {\n    let options: IsActiveMatchOptions;\n    if (matchOptions === true) {\n      options = {...exactMatchOptions};\n    } else if (matchOptions === false) {\n      options = {...subsetMatchOptions};\n    } else {\n      options = matchOptions;\n    }\n    if (isUrlTree(url)) {\n      return containsTree(this.currentUrlTree, url, options);\n    }\n\n    const urlTree = this.parseUrl(url);\n    return containsTree(this.currentUrlTree, urlTree, options);\n  }\n\n  private removeEmptyProps(params: Params): Params {\n    return Object.keys(params).reduce((result: Params, key: string) => {\n      const value: any = params[key];\n      if (value !== null && value !== undefined) {\n        result[key] = value;\n      }\n      return result;\n    }, {});\n  }\n\n  private processNavigations(): void {\n    this.navigations.subscribe(\n        t => {\n          this.navigated = true;\n          this.lastSuccessfulId = t.id;\n          this.currentPageId = t.targetPageId;\n          (this.events as Subject<Event>)\n              .next(new NavigationEnd(\n                  t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n          this.lastSuccessfulNavigation = this.currentNavigation;\n          t.resolve(true);\n        },\n        e => {\n          this.console.warn(`Unhandled Navigation Error: ${e}`);\n        });\n  }\n\n  private scheduleNavigation(\n      rawUrl: UrlTree, source: NavigationTrigger, restoredState: RestoredState|null,\n      extras: NavigationExtras,\n      priorPromise?: {resolve: any, reject: any, promise: Promise<boolean>}): Promise<boolean> {\n    if (this.disposed) {\n      return Promise.resolve(false);\n    }\n\n    // * Imperative navigations (router.navigate) might trigger additional navigations to the same\n    //   URL via a popstate event and the locationChangeListener. We should skip these duplicate\n    //   navs. Duplicates may also be triggered by attempts to sync AngularJS and Angular router\n    //   states.\n    // * Imperative navigations can be cancelled by router guards, meaning the URL won't change. If\n    //   the user follows that with a navigation using the back/forward button or manual URL change,\n    //   the destination may be the same as the previous imperative attempt. We should not skip\n    //   these navigations because it's a separate case from the one above -- it's not a duplicate\n    //   navigation.\n    const lastNavigation = this.getTransition();\n    // We don't want to skip duplicate successful navs if they're imperative because\n    // onSameUrlNavigation could be 'reload' (so the duplicate is intended).\n    const browserNavPrecededByRouterNav = isBrowserTriggeredNavigation(source) && lastNavigation &&\n        !isBrowserTriggeredNavigation(lastNavigation.source);\n    const lastNavigationSucceeded = this.lastSuccessfulId === lastNavigation.id;\n    // If the last navigation succeeded or is in flight, we can use the rawUrl as the comparison.\n    // However, if it failed, we should compare to the final result (urlAfterRedirects).\n    const lastNavigationUrl = (lastNavigationSucceeded || this.currentNavigation) ?\n        lastNavigation.rawUrl :\n        lastNavigation.urlAfterRedirects;\n    const duplicateNav = lastNavigationUrl.toString() === rawUrl.toString();\n    if (browserNavPrecededByRouterNav && duplicateNav) {\n      return Promise.resolve(true);  // return value is not used\n    }\n\n    let resolve: any;\n    let reject: any;\n    let promise: Promise<boolean>;\n    if (priorPromise) {\n      resolve = priorPromise.resolve;\n      reject = priorPromise.reject;\n      promise = priorPromise.promise;\n\n    } else {\n      promise = new Promise<boolean>((res, rej) => {\n        resolve = res;\n        reject = rej;\n      });\n    }\n\n    const id = ++this.navigationId;\n    let targetPageId: number;\n    if (this.canceledNavigationResolution === 'computed') {\n      const isInitialPage = this.currentPageId === 0;\n      if (isInitialPage) {\n        restoredState = this.location.getState() as RestoredState | null;\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      } 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        } else {\n          targetPageId = (this.browserPageId ?? 0) + 1;\n        }\n      }\n    } else {\n      // This is unused when `canceledNavigationResolution` is not computed.\n      targetPageId = 0;\n    }\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\n    // Make sure that the error is propagated even though `processNavigations` catch\n    // handler does not rethrow\n    return promise.catch((e: any) => {\n      return Promise.reject(e);\n    });\n  }\n\n  private setBrowserUrl(url: UrlTree, t: NavigationTransition) {\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    } else {\n      this.location.go(path, '', state);\n    }\n  }\n\n  /**\n   * Performs the necessary rollback action to restore the browser URL to the\n   * state before the transition.\n   */\n  private restoreHistory(t: NavigationTransition, 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 `urlUpdateSrategy` is `eager`; `setBrowserUrl` method is called\n      // before any verification.\n      const browserUrlUpdateOccurred =\n          (t.source === 'popstate' || this.urlUpdateStrategy === 'eager' ||\n           this.currentUrlTree === this.currentNavigation?.finalUrl);\n      if (browserUrlUpdateOccurred && targetPagePosition !== 0) {\n        this.location.historyGo(targetPagePosition);\n      } else if (\n          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      } else {\n        // The browser URL and router state was not updated before the navigation cancelled so\n        // there's no restoration needed.\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\n  private resetState(t: NavigationTransition): void {\n    (this as {routerState: RouterState}).routerState = t.currentRouterState;\n    this.currentUrlTree = t.currentUrlTree;\n    this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n  }\n\n  private resetUrlToCurrentUrlTree(): void {\n    this.location.replaceState(\n        this.urlSerializer.serialize(this.rawUrlTree), '',\n        this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));\n  }\n\n  private cancelNavigationTransition(t: NavigationTransition, reason: string) {\n    const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), reason);\n    this.triggerEvent(navCancel);\n    t.resolve(false);\n  }\n\n  private generateNgRouterState(navigationId: number, routerPageId?: number) {\n    if (this.canceledNavigationResolution === 'computed') {\n      return {navigationId, ɵrouterPageId: routerPageId};\n    }\n    return {navigationId};\n  }\n}\n\nfunction validateCommands(commands: string[]): void {\n  for (let i = 0; i < commands.length; i++) {\n    const cmd = commands[i];\n    if (cmd == null) {\n      throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n    }\n  }\n}\n\nfunction isBrowserTriggeredNavigation(source: 'imperative'|'popstate'|'hashchange') {\n  return source !== 'imperative';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, OnChanges, OnDestroy, Renderer2, SimpleChanges} from '@angular/core';\nimport {Subject, Subscription} from 'rxjs';\n\nimport {QueryParamsHandling} from '../config';\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {Params} from '../shared';\nimport {UrlTree} from '../url_tree';\n\n\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `<router-outlet>` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segements.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from the root of the\n *   app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\n *   looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n *   link to user component\n * </a>\n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n *  - `'merge'`: Merge the given `queryParams` into the current query params.\n *  - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n *   link to user component\n * </a>\n * ```\n *\n * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n *   link to user component\n * </a>\n * ```\n *\n * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n *   const navigation = router.getCurrentNavigation();\n *   tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: ':not(a):not(area)[routerLink]'})\nexport class RouterLink implements OnChanges {\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParams?: Params|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() fragment?: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  @Input() state?: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() relativeTo?: ActivatedRoute|null;\n\n  private commands: any[] = [];\n  private preserve!: boolean;\n\n  /** @internal */\n  onChanges = new Subject<RouterLink>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n    if (tabIndex == null) {\n      renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges) {\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  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /** @nodoc */\n  @HostListener('click')\n  onClick(): boolean {\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state,\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return true;\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n      // Otherwise, we should use the value provided by the user in the input.\n      relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\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 */\n@Directive({selector: 'a[routerLink],area[routerLink]'})\nexport class RouterLinkWithHref implements OnChanges, OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  @HostBinding('attr.target') @Input() target!: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParams?: Params|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() fragment?: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  @Input() state?: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() relativeTo?: ActivatedRoute|null;\n\n  private commands: any[] = [];\n  private subscription: Subscription;\n  // TODO(issue/24571): remove '!'.\n  private preserve!: boolean;\n\n  // the url displayed on the anchor element.\n  // TODO(issue/24571): remove '!'.\n  @HostBinding() href!: string;\n\n  /** @internal */\n  onChanges = new Subject<RouterLinkWithHref>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      private locationStrategy: LocationStrategy) {\n    this.subscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.updateTargetUrlAndHref();\n      }\n    });\n  }\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): any {\n    this.updateTargetUrlAndHref();\n    this.onChanges.next(this);\n  }\n  /** @nodoc */\n  ngOnDestroy(): any {\n    this.subscription.unsubscribe();\n  }\n\n  /** @nodoc */\n  @HostListener(\n      'click',\n      ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey'])\n  onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean):\n      boolean {\n    if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n      return true;\n    }\n\n    if (typeof this.target === 'string' && this.target != '_self') {\n      return true;\n    }\n\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return false;\n  }\n\n  private updateTargetUrlAndHref(): void {\n    this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n      // Otherwise, we should use the value provided by the user in the input.\n      relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\nfunction attrBoolValue(s: any): boolean {\n  return s === '' || !!s;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentInit, ChangeDetectorRef, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, Optional, QueryList, Renderer2, SimpleChanges} from '@angular/core';\nimport {from, of, Subscription} from 'rxjs';\nimport {mergeAll} from 'rxjs/operators';\n\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {IsActiveMatchOptions} from '../url_tree';\n\nimport {RouterLink, RouterLinkWithHref} from './router_link';\n\n\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n *   Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `<div>`  parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n *   <a routerLink=\"/user/jim\">Jim</a>\n *   <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n  selector: '[routerLinkActive]',\n  exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {\n  @ContentChildren(RouterLink, {descendants: true}) links!: QueryList<RouterLink>;\n  @ContentChildren(RouterLinkWithHref, {descendants: true})\n  linksWithHrefs!: QueryList<RouterLinkWithHref>;\n\n  private classes: string[] = [];\n  private routerEventsSubscription: Subscription;\n  private linkInputChangesSubscription?: Subscription;\n  public readonly isActive: boolean = false;\n\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  @Input() routerLinkActiveOptions: {exact: boolean}|IsActiveMatchOptions = {exact: false};\n\n\n  constructor(\n      private router: Router, private element: ElementRef, private renderer: Renderer2,\n      private readonly cdr: ChangeDetectorRef, @Optional() private link?: RouterLink,\n      @Optional() private linkWithHref?: RouterLinkWithHref) {\n    this.routerEventsSubscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.update();\n      }\n    });\n  }\n\n  /** @nodoc */\n  ngAfterContentInit(): void {\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\n  private subscribeToEachLinkOnChanges() {\n    this.linkInputChangesSubscription?.unsubscribe();\n    const allLinkChanges =\n        [...this.links.toArray(), ...this.linksWithHrefs.toArray(), this.link, this.linkWithHref]\n            .filter((link): link is RouterLink|RouterLinkWithHref => !!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\n  @Input()\n  set routerLinkActive(data: string[]|string) {\n    const classes = Array.isArray(data) ? data : data.split(' ');\n    this.classes = classes.filter(c => !!c);\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): void {\n    this.update();\n  }\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.routerEventsSubscription.unsubscribe();\n    this.linkInputChangesSubscription?.unsubscribe();\n  }\n\n  private update(): void {\n    if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;\n    Promise.resolve().then(() => {\n      const hasActiveLinks = this.hasActiveLinks();\n      if (this.isActive !== hasActiveLinks) {\n        (this as any).isActive = hasActiveLinks;\n        this.cdr.markForCheck();\n        this.classes.forEach((c) => {\n          if (hasActiveLinks) {\n            this.renderer.addClass(this.element.nativeElement, c);\n          } else {\n            this.renderer.removeClass(this.element.nativeElement, c);\n          }\n        });\n      }\n    });\n  }\n\n  private isLinkActive(router: Router): (link: (RouterLink|RouterLinkWithHref)) => boolean {\n    const options: boolean|IsActiveMatchOptions =\n        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: RouterLink|RouterLinkWithHref) => router.isActive(link.urlTree, options);\n  }\n\n  private hasActiveLinks(): boolean {\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}\n\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(options: {exact: boolean}|\n                              IsActiveMatchOptions): options is IsActiveMatchOptions {\n  return !!(options as IsActiveMatchOptions).paths;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef,} from '@angular/core';\nimport {Data} from '../config';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * An interface that defines the contract for developing a component outlet for the `Router`.\n *\n * An outlet acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * A router outlet should register itself with the `Router` via\n * `ChildrenOutletContexts#onChildOutletCreated` and unregister with\n * `ChildrenOutletContexts#onChildOutletDestroyed`. When the `Router` identifies a matched `Route`,\n * it looks for a registered outlet in the `ChildrenOutletContexts` and activates it.\n *\n * @see `ChildrenOutletContexts`\n * @publicApi\n */\nexport interface RouterOutletContract {\n  /**\n   * Whether the given outlet is activated.\n   *\n   * An outlet is considered \"activated\" if it has an active component.\n   */\n  isActivated: boolean;\n\n  /** The instance of the activated component or `null` if the outlet is not activated. */\n  component: Object|null;\n\n  /**\n   * The `Data` of the `ActivatedRoute` snapshot.\n   */\n  activatedRouteData: Data;\n\n  /**\n   * The `ActivatedRoute` for the outlet or `null` if the outlet is not activated.\n   */\n  activatedRoute: ActivatedRoute|null;\n\n  /**\n   * Called by the `Router` when the outlet should activate (create a component).\n   */\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null): void;\n\n  /**\n   * A request to destroy the currently activated component.\n   *\n   * When a `RouteReuseStrategy` indicates that an `ActivatedRoute` should be removed but stored for\n   * later re-use rather than destroyed, the `Router` will call `detach` instead.\n   */\n  deactivate(): void;\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree.\n   *\n   * This is similar to `deactivate`, but the activated component should _not_ be destroyed.\n   * Instead, it is returned so that it can be reattached later via the `attach` method.\n   */\n  detach(): ComponentRef<unknown>;\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree.\n   */\n  attach(ref: ComponentRef<unknown>, activatedRoute: ActivatedRoute): void;\n\n  /**\n   * Emits an activate event when a new component is instantiated\n   **/\n  activateEvents?: EventEmitter<unknown>;\n\n  /**\n   * Emits a deactivate event when a component is destroyed.\n   */\n  deactivateEvents?: EventEmitter<unknown>;\n}\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * and a deactivate event when a component is destroyed.\n *\n * ```\n * <router-outlet\n *   (activate)='onActivate($event)'\n *   (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n *\n * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets \"Example of a named\n * outlet and secondary route configuration\").\n * @see `RouterLink`\n * @see `Route`\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'router-outlet', exportAs: 'outlet'})\nexport class RouterOutlet implements OnDestroy, OnInit, RouterOutletContract {\n  private activated: ComponentRef<any>|null = null;\n  private _activatedRoute: ActivatedRoute|null = null;\n  private name: string;\n\n  @Output('activate') activateEvents = new EventEmitter<any>();\n  @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n  constructor(\n      private parentContexts: ChildrenOutletContexts, private location: ViewContainerRef,\n      private resolver: ComponentFactoryResolver, @Attribute('name') name: string,\n      private changeDetector: ChangeDetectorRef) {\n    this.name = name || PRIMARY_OUTLET;\n    parentContexts.onChildOutletCreated(this.name, this);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.parentContexts.onChildOutletDestroyed(this.name);\n  }\n\n  /** @nodoc */\n  ngOnInit(): void {\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        } else {\n          // otherwise the component defined in the configuration is created\n          this.activateWith(context.route, context.resolver || null);\n        }\n      }\n    }\n  }\n\n  get isActivated(): boolean {\n    return !!this.activated;\n  }\n\n  /**\n   * @returns The currently activated component instance.\n   * @throws An error if the outlet is not activated.\n   */\n  get component(): Object {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this.activated.instance;\n  }\n\n  get activatedRoute(): ActivatedRoute {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this._activatedRoute as ActivatedRoute;\n  }\n\n  get activatedRouteData(): Data {\n    if (this._activatedRoute) {\n      return this._activatedRoute.snapshot.data;\n    }\n    return {};\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree\n   */\n  detach(): ComponentRef<any> {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    this.location.detach();\n    const cmp = this.activated;\n    this.activated = null;\n    this._activatedRoute = null;\n    return cmp;\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n   */\n  attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n    this.activated = ref;\n    this._activatedRoute = activatedRoute;\n    this.location.insert(ref.hostView);\n  }\n\n  deactivate(): void {\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\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {\n    if (this.isActivated) {\n      throw new Error('Cannot activate an already activated outlet');\n    }\n    this._activatedRoute = activatedRoute;\n    const snapshot = activatedRoute._futureSnapshot;\n    const component = <any>snapshot.routeConfig!.component;\n    resolver = resolver || this.resolver;\n    const factory = resolver.resolveComponentFactory(component);\n    const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n    const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n    this.activated = this.location.createComponent(factory, this.location.length, injector);\n    // Calling `markForCheck` to make sure we will run the change detection when the\n    // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n    this.changeDetector.markForCheck();\n    this.activateEvents.emit(this.activated.instance);\n  }\n}\n\nclass OutletInjector implements Injector {\n  constructor(\n      private route: ActivatedRoute, private childContexts: ChildrenOutletContexts,\n      private parent: Injector) {}\n\n  get(token: any, notFoundValue?: any): any {\n    if (token === ActivatedRoute) {\n      return this.route;\n    }\n\n    if (token === ChildrenOutletContexts) {\n      return this.childContexts;\n    }\n\n    return this.parent.get(token, notFoundValue);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, OnDestroy} from '@angular/core';\nimport {from, Observable, of, Subscription} from 'rxjs';\nimport {catchError, concatMap, filter, map, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {Event, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart} from './events';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n  abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\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 */\nexport class PreloadAllModules implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return fn().pipe(catchError(() => of(null)));\n  }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nexport class NoPreloading implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return of(null);\n  }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable()\nexport class RouterPreloader implements OnDestroy {\n  private loader: RouterConfigLoader;\n  private subscription?: Subscription;\n\n  constructor(\n      private router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\n      private injector: Injector, private preloadingStrategy: PreloadingStrategy) {\n    const onStartLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadStart(r));\n    const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n  }\n\n  setUpPreloading(): void {\n    this.subscription =\n        this.router.events\n            .pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n            .subscribe(() => {});\n  }\n\n  preload(): Observable<any> {\n    const ngModule = this.injector.get(NgModuleRef);\n    return this.processRoutes(ngModule, this.router.config);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    if (this.subscription) {\n      this.subscription.unsubscribe();\n    }\n  }\n\n  private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {\n    const res: Observable<any>[] = [];\n    for (const route of routes) {\n      // we already have the config loaded, just recurse\n      if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n        const childConfig = route._loadedConfig;\n        res.push(this.processRoutes(childConfig.module, childConfig.routes));\n\n        // no config loaded, fetch the config\n      } else if (route.loadChildren && !route.canLoad) {\n        res.push(this.preloadConfig(ngModule, route));\n\n        // recurse into children\n      } else if (route.children) {\n        res.push(this.processRoutes(ngModule, route.children));\n      }\n    }\n    return from(res).pipe(mergeAll(), map((_) => void 0));\n  }\n\n  private preloadConfig(ngModule: NgModuleRef<any>, route: Route): Observable<void> {\n    return this.preloadingStrategy.preload(route, () => {\n      const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                                            this.loader.load(ngModule.injector, route);\n      return loaded$.pipe(mergeMap((config: LoadedRouterConfig) => {\n        route._loadedConfig = config;\n        return this.processRoutes(config.module, config.routes);\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\nimport {ViewportScroller} from '@angular/common';\nimport {Injectable, OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {NavigationEnd, NavigationStart, Scroll} from './events';\nimport {Router} from './router';\n\n@Injectable()\nexport class RouterScroller implements OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  private routerEventsSubscription!: Unsubscribable;\n  // TODO(issue/24571): remove '!'.\n  private scrollEventsSubscription!: Unsubscribable;\n\n  private lastId = 0;\n  private lastSource: 'imperative'|'popstate'|'hashchange'|undefined = 'imperative';\n  private restoredId = 0;\n  private store: {[key: string]: [number, number]} = {};\n\n  constructor(\n      private router: Router,\n      /** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {\n        scrollPositionRestoration?: 'disabled'|'enabled'|'top',\n        anchorScrolling?: 'disabled'|'enabled'\n      } = {}) {\n    // Default both options to 'disabled'\n    options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n    options.anchorScrolling = options.anchorScrolling || 'disabled';\n  }\n\n  init(): void {\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\n  private 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      } else if (e instanceof NavigationEnd) {\n        this.lastId = e.id;\n        this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n      }\n    });\n  }\n\n  private consumeScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (!(e instanceof Scroll)) 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        } else if (this.options.scrollPositionRestoration === 'enabled') {\n          this.viewportScroller.scrollToPosition(e.position);\n        }\n        // imperative navigation \"forward\"\n      } else {\n        if (e.anchor && this.options.anchorScrolling === 'enabled') {\n          this.viewportScroller.scrollToAnchor(e.anchor);\n        } else if (this.options.scrollPositionRestoration !== 'disabled') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        }\n      }\n    });\n  }\n\n  private scheduleScrollEvent(routerEvent: NavigationEnd, anchor: string|null): void {\n    this.router.triggerEvent(new Scroll(\n        routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n  }\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}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, Location, LOCATION_INITIALIZED, LocationStrategy, PathLocationStrategy, PlatformLocation, ViewportScroller} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, OnDestroy, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {of, Subject} from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {Event} from './events';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer, UrlTree} from './url_tree';\nimport {flatten} from './utils/collection';\n\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES =\n    [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router service.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>('ROUTER_FORROOT_GUARD');\n\nexport const ROUTER_PROVIDERS: Provider[] = [\n  Location,\n  {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n  {\n    provide: Router,\n    useFactory: setupRouter,\n    deps: [\n      UrlSerializer, ChildrenOutletContexts, Location, Injector, NgModuleFactoryLoader, Compiler,\n      ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],\n      [RouteReuseStrategy, new Optional()]\n    ]\n  },\n  ChildrenOutletContexts,\n  {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n  {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n  RouterPreloader,\n  NoPreloading,\n  PreloadAllModules,\n  {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n\nexport function routerNgProbeToken() {\n  return new NgProbeToken('Router', Router);\n}\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 */\n@NgModule({\n  declarations: ROUTER_DIRECTIVES,\n  exports: ROUTER_DIRECTIVES,\n  entryComponents: [EmptyOutletComponent]\n})\nexport class RouterModule {\n  // Note: We are injecting the Router so it gets created eagerly...\n  constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any, @Optional() router: Router) {}\n\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: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n    return {\n      ngModule: RouterModule,\n      providers: [\n        ROUTER_PROVIDERS,\n        provideRoutes(routes),\n        {\n          provide: ROUTER_FORROOT_GUARD,\n          useFactory: provideForRootGuard,\n          deps: [[Router, new Optional(), new SkipSelf()]]\n        },\n        {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n        {\n          provide: LocationStrategy,\n          useFactory: provideLocationStrategy,\n          deps:\n              [PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION]\n        },\n        {\n          provide: RouterScroller,\n          useFactory: createRouterScroller,\n          deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n        },\n        {\n          provide: PreloadingStrategy,\n          useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n                                                             NoPreloading\n        },\n        {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n        provideRouterInitializer(),\n      ],\n    };\n  }\n\n  /**\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: Routes): ModuleWithProviders<RouterModule> {\n    return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n  }\n}\n\nexport function createRouterScroller(\n    router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): RouterScroller {\n  if (config.scrollOffset) {\n    viewportScroller.setOffset(config.scrollOffset);\n  }\n  return new RouterScroller(router, viewportScroller, config);\n}\n\nexport function provideLocationStrategy(\n    platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n  return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n                           new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n\nexport function provideForRootGuard(router: Router): any {\n  if ((typeof ngDevMode === 'undefined' || ngDevMode) && router) {\n    throw new Error(\n        `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n  }\n  return 'guarded';\n}\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 */\nexport function provideRoutes(routes: Routes): any {\n  return [\n    {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n    {provide: ROUTES, multi: true, useValue: routes},\n  ];\n}\n\n/**\n * Allowed values in an `ExtraOptions` object that configure\n * when the router performs the initial navigation operation.\n *\n * * 'enabledNonBlocking' - (default) The initial navigation starts after the\n * root component has been created. The bootstrap is not blocked on the completion of the initial\n * navigation.\n * * 'enabledBlocking' - The initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete. This value is required\n * for [server-side rendering](guide/universal) to work.\n * * 'disabled' - The initial navigation is not performed. The location listener is set up before\n * the root component gets created. Use if there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic.\n *\n * The following values have been [deprecated](guide/releases#deprecation-practices) since v11,\n * and should not be used for new applications.\n *\n * * 'enabled' - This option is 1:1 replaceable with `enabledBlocking`.\n *\n * @see `forRoot()`\n *\n * @publicApi\n */\nexport type InitialNavigation = 'disabled'|'enabled'|'enabledBlocking'|'enabledNonBlocking';\n\n/**\n * A set of configuration options for a router module, provided in the\n * `forRoot()` method.\n *\n * @see `forRoot()`\n *\n *\n * @publicApi\n */\nexport interface ExtraOptions {\n  /**\n   * When true, log all internal navigation events to the console.\n   * Use for debugging.\n   */\n  enableTracing?: boolean;\n\n  /**\n   * When true, enable the location strategy that uses the URL fragment\n   * instead of the history API.\n   */\n  useHash?: boolean;\n\n  /**\n   * One of `enabled`, `enabledBlocking`, `enabledNonBlocking` or `disabled`.\n   * When set to `enabled` or `enabledBlocking`, the initial navigation starts before the root\n   * component is created. The bootstrap is blocked until the initial navigation is complete. This\n   * value is required for [server-side rendering](guide/universal) to work. When set to\n   * `enabledNonBlocking`, the initial navigation starts after the root component has been created.\n   * The bootstrap is not blocked on the completion of the initial navigation. When set to\n   * `disabled`, the initial navigation is not performed. The location listener is set up before the\n   * root component gets created. Use if there is a reason to have more control over when the router\n   * starts its initial navigation due to some complex initialization logic.\n   */\n  initialNavigation?: InitialNavigation;\n\n  /**\n   * A custom error handler for failed navigations.\n   * If the handler returns a value, the navigation Promise is resolved with this value.\n   * If the handler throws an exception, the navigation Promise is rejected with the exception.\n   *\n   */\n  errorHandler?: ErrorHandler;\n\n  /**\n   * Configures a preloading strategy.\n   * One of `PreloadAllModules` or `NoPreloading` (the default).\n   */\n  preloadingStrategy?: any;\n\n  /**\n   * Define what the router should do if it receives a navigation request to the current URL.\n   * Default is `ignore`, which causes the router ignores the navigation.\n   * This can disable features such as a \"refresh\" button.\n   * Use this option to configure the behavior when navigating to the\n   * current URL. Default is 'ignore'.\n   */\n  onSameUrlNavigation?: 'reload'|'ignore';\n\n  /**\n   * Configures if the scroll position needs to be restored when navigating back.\n   *\n   * * 'disabled'- (Default) Does nothing. Scroll position is maintained on navigation.\n   * * 'top'- Sets the scroll position to x = 0, y = 0 on all navigation.\n   * * 'enabled'- Restores the previous scroll position on backward navigation, else sets the\n   * position to the anchor if one is provided, or sets the scroll position to [0, 0] (forward\n   * navigation). This option will be the default in the future.\n   *\n   * You can implement custom scroll restoration behavior by adapting the enabled behavior as\n   * in the following example.\n   *\n   * ```typescript\n   * class AppModule {\n   *   constructor(router: Router, viewportScroller: ViewportScroller) {\n   *     router.events.pipe(\n   *       filter((e: Event): e is Scroll => e instanceof Scroll)\n   *     ).subscribe(e => {\n   *       if (e.position) {\n   *         // backward navigation\n   *         viewportScroller.scrollToPosition(e.position);\n   *       } else if (e.anchor) {\n   *         // anchor navigation\n   *         viewportScroller.scrollToAnchor(e.anchor);\n   *       } else {\n   *         // forward navigation\n   *         viewportScroller.scrollToPosition([0, 0]);\n   *       }\n   *     });\n   *   }\n   * }\n   * ```\n   */\n  scrollPositionRestoration?: 'disabled'|'enabled'|'top';\n\n  /**\n   * When set to 'enabled', scrolls to the anchor element when the URL has a fragment.\n   * Anchor scrolling is disabled by default.\n   *\n   * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n   * that we stored or scroll to the top.\n   */\n  anchorScrolling?: 'disabled'|'enabled';\n\n  /**\n   * Configures the scroll offset the router will use when scrolling to an element.\n   *\n   * When given a tuple with x and y position value,\n   * the router uses that offset each time it scrolls.\n   * When given a function, the router invokes the function every time\n   * it restores scroll position.\n   */\n  scrollOffset?: [number, number]|(() => [number, number]);\n\n  /**\n   * Defines how the router merges parameters, data, and resolved data from parent to child\n   * routes. By default ('emptyOnly'), inherits parent parameters only for\n   * path-less or component-less routes.\n   *\n   * Set to 'always' to enable unconditional inheritance of parent parameters.\n   *\n   * Note that when dealing with matrix parameters, \"parent\" refers to the parent `Route`\n   * config which does not necessarily mean the \"URL segment to the left\". When the `Route` `path`\n   * contains multiple segments, the matrix parameters must appear on the last segment. For example,\n   * matrix parameters for `{path: 'a/b', component: MyComp}` should appear as `a/b;foo=bar` and not\n   * `a;foo=bar/b`.\n   *\n   */\n  paramsInheritanceStrategy?: 'emptyOnly'|'always';\n\n  /**\n   * A custom handler for malformed URI errors. The handler is invoked when `encodedURI` contains\n   * invalid character sequences.\n   * The default implementation is to redirect to the root URL, dropping\n   * any path or parameter information. The function takes three parameters:\n   *\n   * - `'URIError'` - Error thrown when parsing a bad URL.\n   * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\n   * - `'url'` -  The malformed URL that caused the URIError\n   * */\n  malformedUriErrorHandler?:\n      (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\n\n  /**\n   * Defines when the router updates the browser URL. By default ('deferred'),\n   * update after successful navigation.\n   * Set to 'eager' if prefer to update the URL at the beginning of navigation.\n   * Updating the URL early allows you to handle a failure of navigation by\n   * showing an error message with the URL that failed.\n   */\n  urlUpdateStrategy?: 'deferred'|'eager';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * Example:\n   *\n   * ```\n   * const routes = [\n   *   {\n   *     path: '',\n   *     component: ContainerComponent,\n   *     children: [\n   *       { path: 'a', component: AComponent },\n   *       { path: 'b', component: BComponent },\n   *     ]\n   *   }\n   * ];\n   * ```\n   *\n   * From the `ContainerComponent`, you should be able to navigate to `AComponent` using\n   * the following `routerLink`, but it will not work if `relativeLinkResolution` is set\n   * to `'legacy'`:\n   *\n   * `<a [routerLink]=\"['./a']\">Link to A</a>`\n   *\n   * However, this will work:\n   *\n   * `<a [routerLink]=\"['../a']\">Link to A</a>`\n   *\n   * In other words, you're required to use `../` rather than `./` when the relative link\n   * resolution is set to `'legacy'`.\n   *\n   * The default in v11 is `corrected`.\n   */\n  relativeLinkResolution?: 'legacy'|'corrected';\n}\n\nexport function setupRouter(\n    urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n    injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Route[][],\n    opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n    routeReuseStrategy?: RouteReuseStrategy) {\n  const router = new Router(\n      null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n\n  if (urlHandlingStrategy) {\n    router.urlHandlingStrategy = urlHandlingStrategy;\n  }\n\n  if (routeReuseStrategy) {\n    router.routeReuseStrategy = routeReuseStrategy;\n  }\n\n  assignExtraOptionsToRouter(opts, router);\n\n  if (opts.enableTracing) {\n    router.events.subscribe((e: Event) => {\n      // tslint:disable:no-console\n      console.group?.(`Router Event: ${(<any>e.constructor).name}`);\n      console.log(e.toString());\n      console.log(e);\n      console.groupEnd?.();\n      // tslint:enable:no-console\n    });\n  }\n\n  return router;\n}\n\nexport function assignExtraOptionsToRouter(opts: ExtraOptions, router: Router): void {\n  if (opts.errorHandler) {\n    router.errorHandler = opts.errorHandler;\n  }\n\n  if (opts.malformedUriErrorHandler) {\n    router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n  }\n\n  if (opts.onSameUrlNavigation) {\n    router.onSameUrlNavigation = opts.onSameUrlNavigation;\n  }\n\n  if (opts.paramsInheritanceStrategy) {\n    router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n  }\n\n  if (opts.relativeLinkResolution) {\n    router.relativeLinkResolution = opts.relativeLinkResolution;\n  }\n\n  if (opts.urlUpdateStrategy) {\n    router.urlUpdateStrategy = opts.urlUpdateStrategy;\n  }\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n  return router.routerState.root;\n}\n\n/**\n * Router initialization requires two steps:\n *\n * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if\n * a resolver or a guard executes asynchronously.\n *\n * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the\n * `afterPreactivation` hook provided by the router.\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n@Injectable()\nexport class RouterInitializer implements OnDestroy {\n  private initNavigation = false;\n  private destroyed = false;\n  private resultOfPreactivationDone = new Subject<void>();\n\n  constructor(private injector: Injector) {}\n\n  appInitializer(): Promise<any> {\n    const p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n    return p.then(() => {\n      // If the injector was destroyed, the DI lookups below will fail.\n      if (this.destroyed) {\n        return Promise.resolve(true);\n      }\n\n      let resolve: Function = null!;\n      const res = new Promise(r => resolve = r);\n      const router = this.injector.get(Router);\n      const opts = this.injector.get(ROUTER_CONFIGURATION);\n\n      if (opts.initialNavigation === 'disabled') {\n        router.setUpLocationChangeListener();\n        resolve(true);\n      } else if (\n          // TODO: enabled is deprecated as of v11, can be removed in v13\n          opts.initialNavigation === 'enabled' || opts.initialNavigation === 'enabledBlocking') {\n        router.hooks.afterPreactivation = () => {\n          // only the initial navigation should be delayed\n          if (!this.initNavigation) {\n            this.initNavigation = true;\n            resolve(true);\n            return this.resultOfPreactivationDone;\n\n            // subsequent navigations should not be delayed\n          } else {\n            return of(null) as any;\n          }\n        };\n        router.initialNavigation();\n      } else {\n        resolve(true);\n      }\n\n      return res;\n    });\n  }\n\n  bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n    const opts = this.injector.get(ROUTER_CONFIGURATION);\n    const preloader = this.injector.get(RouterPreloader);\n    const routerScroller = this.injector.get(RouterScroller);\n    const router = this.injector.get(Router);\n    const ref = this.injector.get<ApplicationRef>(ApplicationRef);\n\n    if (bootstrappedComponentRef !== ref.components[0]) {\n      return;\n    }\n\n    // Default case\n    if (opts.initialNavigation === 'enabledNonBlocking' || opts.initialNavigation === undefined) {\n      router.initialNavigation();\n    }\n\n    preloader.setUpPreloading();\n    routerScroller.init();\n    router.resetRootComponentType(ref.componentTypes[0]);\n    this.resultOfPreactivationDone.next(null!);\n    this.resultOfPreactivationDone.complete();\n  }\n\n  ngOnDestroy() {\n    this.destroyed = true;\n  }\n}\n\nexport function getAppInitializer(r: RouterInitializer) {\n  return r.appInitializer.bind(r);\n}\n\nexport function getBootstrapListener(r: RouterInitializer) {\n  return r.bootstrapListener.bind(r);\n}\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER =\n    new InjectionToken<(compRef: ComponentRef<any>) => void>('Router Initializer');\n\nexport function provideRouterInitializer(): ReadonlyArray<Provider> {\n  return [\n    RouterInitializer,\n    {\n      provide: APP_INITIALIZER,\n      multi: true,\n      useFactory: getAppInitializer,\n      deps: [RouterInitializer]\n    },\n    {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n    {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n  ];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code 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 * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('12.2.9');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {ɵEmptyOutletComponent} from './components/empty_outlet';\nexport {assignExtraOptionsToRouter as ɵassignExtraOptionsToRouter, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module';\nexport {flatten as ɵflatten} from './utils/collection';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {Data, DeprecatedLoadChildren, LoadChildren, LoadChildrenCallback, QueryParamsHandling, ResolveData, Route, Routes, RunGuardsAndResolvers, UrlMatcher, UrlMatchResult} from './config';\nexport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nexport {RouterLinkActive} from './directives/router_link_active';\nexport {RouterOutlet, RouterOutletContract} from './directives/router_outlet';\nexport {ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, Scroll} from './events';\nexport {CanActivate, CanActivateChild, CanDeactivate, CanLoad, Resolve} from './interfaces';\nexport {BaseRouteReuseStrategy, DetachedRouteHandle, RouteReuseStrategy} from './route_reuse_strategy';\nexport {Navigation, NavigationBehaviorOptions, NavigationExtras, Router, UrlCreationOptions} from './router';\nexport {ROUTES} from './router_config_loader';\nexport {ExtraOptions, InitialNavigation, provideRoutes, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, RouterModule} from './router_module';\nexport {ChildrenOutletContexts, OutletContext} from './router_outlet_context';\nexport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nexport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nexport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nexport {UrlHandlingStrategy} from './url_handling_strategy';\nexport {DefaultUrlSerializer, IsActiveMatchOptions, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nexport {VERSION} from './version';\n\nexport * from './private_export';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code 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 * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/index';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code 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 not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {EmptyOutletComponent as ɵangular_packages_router_router_l} from './src/components/empty_outlet';\nexport {ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a,RouterInitializer as ɵangular_packages_router_router_h,createRouterScroller as ɵangular_packages_router_router_c,getAppInitializer as ɵangular_packages_router_router_i,getBootstrapListener as ɵangular_packages_router_router_j,provideForRootGuard as ɵangular_packages_router_router_e,provideLocationStrategy as ɵangular_packages_router_router_d,provideRouterInitializer as ɵangular_packages_router_router_k,rootRoute as ɵangular_packages_router_router_g,routerNgProbeToken as ɵangular_packages_router_router_b,setupRouter as ɵangular_packages_router_router_f} from './src/router_module';\nexport {RouterScroller as ɵangular_packages_router_router_o} from './src/router_scroller';\nexport {Tree as ɵangular_packages_router_router_m,TreeNode as ɵangular_packages_router_router_n} from './src/utils/tree';"],"names":["isObservable","isPromise","from","of","BehaviorSubject","map","switchMap","combineLatest","take","startWith","scan","filter","Component","EmptyOutletComponent","noMatch","Observable","NgModuleRef","catchError","concatMap","last","first","EmptyError","mergeMap","tap","applyRedirects","applyRedirectsFn","concat","defer","NoMatch","recognize","recognizeFn","takeLast","EMPTY","InjectionToken","InjectFlags","ConnectableObservable","Subject","refCount","NgModuleFactory","Console","NgZone","finalize","Injectable","Type","Location","Injector","NgModuleFactoryLoader","Compiler","Directive","Attribute","Renderer2","ElementRef","Input","HostListener","LocationStrategy","HostBinding","mergeAll","ChangeDetectorRef","Optional","ContentChildren","EventEmitter","ViewContainerRef","ComponentFactoryResolver","Output","ViewportScroller","SystemJsNgModuleLoader","NgProbeToken","SkipSelf","PlatformLocation","Inject","APP_BASE_HREF","NgModule","HashLocationStrategy","PathLocationStrategy","ANALYZE_FOR_ENTRY_COMPONENTS","LOCATION_INITIALIZED","ApplicationRef","APP_INITIALIZER","APP_BOOTSTRAP_LISTENER","Version"],"mappings":";;;;;;;;;;;;IAAA;;;;;;;;;;;;;;IAcA;IAEA,IAAI,aAAa,GAAG,UAAS,CAAC,EAAE,CAAC;QAC7B,aAAa,GAAG,MAAM,CAAC,cAAc;aAChC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;YAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;gBAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;oBAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACtG,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC;aAEc,SAA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AA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
+{"version":3,"file":"router.umd.js","sources":["../../../../../external/npm/node_modules/tslib/tslib.es6.js","../../../../../packages/router/src/events.ts","../../../../../packages/router/src/shared.ts","../../../../../packages/router/src/utils/collection.ts","../../../../../packages/router/src/url_tree.ts","../../../../../packages/router/src/utils/tree.ts","../../../../../packages/router/src/router_state.ts","../../../../../packages/router/src/create_router_state.ts","../../../../../packages/router/src/create_url_tree.ts","../../../../../packages/router/src/operators/activate_routes.ts","../../../../../packages/router/src/config.ts","../../../../../packages/router/src/utils/type_guards.ts","../../../../../packages/router/src/operators/prioritized_guard_value.ts","../../../../../packages/router/src/components/empty_outlet.ts","../../../../../packages/router/src/utils/config.ts","../../../../../packages/router/src/utils/config_matching.ts","../../../../../packages/router/src/apply_redirects.ts","../../../../../packages/router/src/operators/apply_redirects.ts","../../../../../packages/router/src/utils/preactivation.ts","../../../../../packages/router/src/operators/check_guards.ts","../../../../../packages/router/src/recognize.ts","../../../../../packages/router/src/operators/recognize.ts","../../../../../packages/router/src/operators/resolve_data.ts","../../../../../packages/router/src/operators/switch_tap.ts","../../../../../packages/router/src/route_reuse_strategy.ts","../../../../../packages/router/src/router_config_loader.ts","../../../../../packages/router/src/router_outlet_context.ts","../../../../../packages/router/src/url_handling_strategy.ts","../../../../../packages/router/src/router.ts","../../../../../packages/router/src/directives/router_link.ts","../../../../../packages/router/src/directives/router_link_active.ts","../../../../../packages/router/src/directives/router_outlet.ts","../../../../../packages/router/src/router_preloader.ts","../../../../../packages/router/src/router_scroller.ts","../../../../../packages/router/src/router_module.ts","../../../../../packages/router/src/version.ts","../../../../../packages/router/src/private_export.ts","../../../../../packages/router/src/index.ts","../../../../../packages/router/public_api.ts","../../../../../packages/router/index.ts","../../../../../packages/router/router.ts"],"sourcesContent":["/*! *****************************************************************************\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    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\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","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from './config';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\n\n/**\n * Identifies the call or event that triggered a navigation.\n *\n * * 'imperative': Triggered by `router.navigateByUrl()` or `router.navigate()`.\n * * 'popstate' : Triggered by a `popstate` event.\n * * 'hashchange'-: Triggered by a `hashchange` event.\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative'|'popstate'|'hashchange';\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 */\nexport class RouterEvent {\n  constructor(\n      /** A unique ID that the router assigns to every router navigation. */\n      public id: number,\n      /** The URL that is the destination for this navigation. */\n      public url: string) {}\n}\n\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n  /**\n   * Identifies the call or event that triggered the navigation.\n   * An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.\n   *\n   * @see `NavigationEnd`\n   * @see `NavigationCancel`\n   * @see `NavigationError`\n   */\n  navigationTrigger?: 'imperative'|'popstate'|'hashchange';\n\n  /**\n   * The navigation state that was previously supplied to the `pushState` call,\n   * when the navigation is triggered by a `popstate` event. Otherwise null.\n   *\n   * The state object is defined by `NavigationExtras`, and contains any\n   * developer-defined state value, as well as a unique ID that\n   * the router assigns to every router transition/navigation.\n   *\n   * From the perspective of the router, the router never \"goes back\".\n   * When the user clicks on the back button in the browser,\n   * a new navigation ID is created.\n   *\n   * Use the ID in this previous-state object to differentiate between a newly created\n   * state and one returned to by a `popstate` event, so that you can restore some\n   * remembered state, such as scroll position.\n   *\n   */\n  restoredState?: {[k: string]: any, navigationId: number}|null;\n\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      navigationTrigger: 'imperative'|'popstate'|'hashchange' = 'imperative',\n      /** @docsNotRequired */\n      restoredState: {[k: string]: any, navigationId: number}|null = null) {\n    super(id, url);\n    this.navigationTrigger = navigationTrigger;\n    this.restoredState = restoredState;\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n  }\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 */\nexport class NavigationEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}')`;\n  }\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 */\nexport class NavigationCancel extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public reason: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n  }\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 */\nexport class NavigationError extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public error: any) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n  }\n}\n\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  override toString(): string {\n    return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see `GuardsCheckEnd`\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see `GuardsCheckStart`\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot,\n      /** @docsNotRequired */\n      public shouldActivate: boolean) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n  }\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 */\nexport class ResolveStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see `ResolveStart`.\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  override toString(): string {\n    return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see `RouteConfigLoadEnd`\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadStart(path: ${this.route.path})`;\n  }\n}\n\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see `RouteConfigLoadStart`\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadEnd(path: ${this.route.path})`;\n  }\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 */\nexport class ChildActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationStart(path: '${path}')`;\n  }\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 */\nexport class ChildActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationEnd(path: '${path}')`;\n  }\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 */\nexport class ActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationStart(path: '${path}')`;\n  }\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 */\nexport class ActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nexport class Scroll {\n  constructor(\n      /** @docsNotRequired */\n      readonly routerEvent: NavigationEnd,\n\n      /** @docsNotRequired */\n      readonly position: [number, number]|null,\n\n      /** @docsNotRequired */\n      readonly anchor: string|null) {}\n\n  toString(): string {\n    const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n    return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n  }\n}\n\n/**\n * Router events that allow you to track the lifecycle of the router.\n *\n * The events occur in the following sequence:\n *\n * * [NavigationStart](api/router/NavigationStart): Navigation starts.\n * * [RouteConfigLoadStart](api/router/RouteConfigLoadStart): Before\n * the router [lazy loads](/guide/router#lazy-loading) a route configuration.\n * * [RouteConfigLoadEnd](api/router/RouteConfigLoadEnd): After a route has been lazy loaded.\n * * [RoutesRecognized](api/router/RoutesRecognized): When the router parses the URL\n * and the routes are recognized.\n * * [GuardsCheckStart](api/router/GuardsCheckStart): When the router begins the *guards*\n * phase of routing.\n * * [ChildActivationStart](api/router/ChildActivationStart): When the router\n * begins activating a route's children.\n * * [ActivationStart](api/router/ActivationStart): When the router begins activating a route.\n * * [GuardsCheckEnd](api/router/GuardsCheckEnd): When the router finishes the *guards*\n * phase of routing successfully.\n * * [ResolveStart](api/router/ResolveStart): When the router begins the *resolve*\n * phase of routing.\n * * [ResolveEnd](api/router/ResolveEnd): When the router finishes the *resolve*\n * phase of routing successfully.\n * * [ChildActivationEnd](api/router/ChildActivationEnd): When the router finishes\n * activating a route's children.\n * * [ActivationEnd](api/router/ActivationEnd): When the router finishes activating a route.\n * * [NavigationEnd](api/router/NavigationEnd): When navigation ends successfully.\n * * [NavigationCancel](api/router/NavigationCancel): When navigation is canceled.\n * * [NavigationError](api/router/NavigationError): When navigation fails\n * due to an unexpected error.\n * * [Scroll](api/router/Scroll): When the user scrolls.\n *\n * @publicApi\n */\nexport type Event = RouterEvent|RouteConfigLoadStart|RouteConfigLoadEnd|ChildActivationStart|\n    ChildActivationEnd|ActivationStart|ActivationEnd|Scroll;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route, UrlMatchResult} from './config';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A collection of matrix and query URL parameters.\n * @see `convertToParamMap()`\n * @see `ParamMap`\n *\n * @publicApi\n */\nexport type Params = {\n  [key: string]: any;\n};\n\n/**\n * A map that provides access to the required and optional parameters\n * specific to a route.\n * The map supports retrieving a single value with `get()`\n * or multiple values with `getAll()`.\n *\n * @see [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\n *\n * @publicApi\n */\nexport interface ParamMap {\n  /**\n   * Reports whether the map contains a given parameter.\n   * @param name The parameter name.\n   * @returns True if the map contains the given parameter, false otherwise.\n   */\n  has(name: string): boolean;\n  /**\n   * Retrieves a single value for a parameter.\n   * @param name The parameter name.\n   * @return The parameter's single value,\n   * or the first value if the parameter has multiple values,\n   * or `null` when there is no such parameter.\n   */\n  get(name: string): string|null;\n  /**\n   * Retrieves multiple values for a parameter.\n   * @param name The parameter name.\n   * @return An array containing one or more values,\n   * or an empty array if there is no such parameter.\n   *\n   */\n  getAll(name: string): string[];\n\n  /** Names of the parameters in the map. */\n  readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n  private params: Params;\n\n  constructor(params: Params) {\n    this.params = params || {};\n  }\n\n  has(name: string): boolean {\n    return Object.prototype.hasOwnProperty.call(this.params, name);\n  }\n\n  get(name: string): string|null {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v[0] : v;\n    }\n\n    return null;\n  }\n\n  getAll(name: string): string[] {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v : [v];\n    }\n\n    return [];\n  }\n\n  get keys(): string[] {\n    return Object.keys(this.params);\n  }\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 */\nexport function convertToParamMap(params: Params): ParamMap {\n  return new ParamsAsMap(params);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport function navigationCancelingError(message: string) {\n  const error = Error('NavigationCancelingError: ' + message);\n  (error as any)[NAVIGATION_CANCELING_ERROR] = true;\n  return error;\n}\n\nexport function isNavigationCancelingError(error: Error) {\n  return error && (error as any)[NAVIGATION_CANCELING_ERROR];\n}\n\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nexport function defaultUrlMatcher(\n    segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult|null {\n  const parts = route.path!.split('/');\n\n  if (parts.length > segments.length) {\n    // The actual URL is shorter than the config, no match\n    return null;\n  }\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\n  const posParams: {[key: string]: UrlSegment} = {};\n\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    } else if (part !== segment.path) {\n      // The actual URL part does not match the config, no match\n      return null;\n    }\n  }\n\n  return {consumed: segments.slice(0, parts.length), posParams};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {from, Observable, of} from 'rxjs';\n\nimport {Params} from '../shared';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n  if (a.length !== b.length) return false;\n  for (let i = 0; i < a.length; ++i) {\n    if (!shallowEqual(a[i], b[i])) return false;\n  }\n  return true;\n}\n\nexport function shallowEqual(a: Params, b: Params): boolean {\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: string;\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/**\n * Test equality for arrays of strings or a string.\n */\nexport function equalArraysOrString(a: string|string[], b: string|string[]) {\n  if (Array.isArray(a) && Array.isArray(b)) {\n    if (a.length !== b.length) return false;\n    const aSorted = [...a].sort();\n    const bSorted = [...b].sort();\n    return aSorted.every((val, index) => bSorted[index] === val);\n  } else {\n    return a === b;\n  }\n}\n\n/**\n * Flattens single-level nested arrays.\n */\nexport function flatten<T>(arr: T[][]): T[] {\n  return Array.prototype.concat.apply([], arr);\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T|null {\n  return a.length > 0 ? a[a.length - 1] : null;\n}\n\n/**\n * Verifys all booleans in an array are `true`.\n */\nexport function and(bools: boolean[]): boolean {\n  return !bools.some(v => !v);\n}\n\nexport function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {\n  for (const prop in map) {\n    if (map.hasOwnProperty(prop)) {\n      callback(map[prop], prop);\n    }\n  }\n}\n\nexport function wrapIntoObservable<T>(value: T|Promise<T>|Observable<T>): Observable<T> {\n  if (isObservable(value)) {\n    return value;\n  }\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\n  return of(value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalArraysOrString, forEach, shallowEqual} from './utils/collection';\n\nexport function createEmptyUrlTree() {\n  return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\n\n/**\n * A set of options which specify how to determine if a `UrlTree` is active, given the `UrlTree`\n * for the current router state.\n *\n * @publicApi\n * @see Router.isActive\n */\nexport interface IsActiveMatchOptions {\n  /**\n   * Defines the strategy for comparing the matrix parameters of two `UrlTree`s.\n   *\n   * The matrix parameter matching is dependent on the strategy for matching the\n   * segments. That is, if the `paths` option is set to `'subset'`, only\n   * the matrix parameters of the matching segments will be compared.\n   *\n   * - `'exact'`: Requires that matching segments also have exact matrix parameter\n   * matches.\n   * - `'subset'`: The matching segments in the router's active `UrlTree` may contain\n   * extra matrix parameters, but those that exist in the `UrlTree` in question must match.\n   * - `'ignored'`: When comparing `UrlTree`s, matrix params will be ignored.\n   */\n  matrixParams: 'exact'|'subset'|'ignored';\n  /**\n   * Defines the strategy for comparing the query parameters of two `UrlTree`s.\n   *\n   * - `'exact'`: the query parameters must match exactly.\n   * - `'subset'`: the active `UrlTree` may contain extra parameters,\n   * but must match the key and value of any that exist in the `UrlTree` in question.\n   * - `'ignored'`: When comparing `UrlTree`s, query params will be ignored.\n   */\n  queryParams: 'exact'|'subset'|'ignored';\n  /**\n   * Defines the strategy for comparing the `UrlSegment`s of the `UrlTree`s.\n   *\n   * - `'exact'`: all segments in each `UrlTree` must match.\n   * - `'subset'`: a `UrlTree` will be determined to be active if it\n   * is a subtree of the active route. That is, the active route may contain extra\n   * segments, but must at least have all the segements of the `UrlTree` in question.\n   */\n  paths: 'exact'|'subset';\n  /**\n   * - 'exact'`: indicates that the `UrlTree` fragments must be equal.\n   * - `'ignored'`: the fragments will not be compared when determining if a\n   * `UrlTree` is active.\n   */\n  fragment: 'exact'|'ignored';\n}\n\ntype ParamMatchOptions = 'exact'|'subset'|'ignored';\n\ntype PathCompareFn =\n    (container: UrlSegmentGroup, containee: UrlSegmentGroup, matrixParams: ParamMatchOptions) =>\n        boolean;\ntype ParamCompareFn = (container: Params, containee: Params) => boolean;\n\nconst pathCompareMap: Record<IsActiveMatchOptions['paths'], PathCompareFn> = {\n  'exact': equalSegmentGroups,\n  'subset': containsSegmentGroup,\n};\nconst paramCompareMap: Record<ParamMatchOptions, ParamCompareFn> = {\n  'exact': equalParams,\n  'subset': containsParams,\n  'ignored': () => true,\n};\n\nexport function containsTree(\n    container: UrlTree, containee: UrlTree, options: IsActiveMatchOptions): boolean {\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}\n\nfunction equalParams(container: Params, containee: Params): boolean {\n  // TODO: This does not handle array params correctly.\n  return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup,\n    matrixParams: ParamMatchOptions): boolean {\n  if (!equalPath(container.segments, containee.segments)) return false;\n  if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {\n    return false;\n  }\n  if (container.numberOfChildren !== containee.numberOfChildren) return false;\n  for (const c in containee.children) {\n    if (!container.children[c]) return false;\n    if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams))\n      return false;\n  }\n  return true;\n}\n\nfunction containsParams(container: Params, containee: Params): boolean {\n  return Object.keys(containee).length <= Object.keys(container).length &&\n      Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key]));\n}\n\nfunction containsSegmentGroup(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup,\n    matrixParams: ParamMatchOptions): boolean {\n  return containsSegmentGroupHelper(container, containee, containee.segments, matrixParams);\n}\n\nfunction containsSegmentGroupHelper(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[],\n    matrixParams: ParamMatchOptions): boolean {\n  if (container.segments.length > containeePaths.length) {\n    const current = container.segments.slice(0, containeePaths.length);\n    if (!equalPath(current, containeePaths)) return false;\n    if (containee.hasChildren()) return false;\n    if (!matrixParamsMatch(current, containeePaths, matrixParams)) return false;\n    return true;\n\n  } else if (container.segments.length === containeePaths.length) {\n    if (!equalPath(container.segments, containeePaths)) return false;\n    if (!matrixParamsMatch(container.segments, containeePaths, matrixParams)) return false;\n    for (const c in containee.children) {\n      if (!container.children[c]) 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)) return false;\n    if (!matrixParamsMatch(container.segments, current, matrixParams)) return false;\n    if (!container.children[PRIMARY_OUTLET]) return false;\n    return containsSegmentGroupHelper(\n        container.children[PRIMARY_OUTLET], containee, next, matrixParams);\n  }\n}\n\nfunction matrixParamsMatch(\n    containerPaths: UrlSegment[], containeePaths: UrlSegment[], options: ParamMatchOptions) {\n  return containeePaths.every((containeeSegment, i) => {\n    return paramCompareMap[options](containerPaths[i].parameters, containeeSegment.parameters);\n  });\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 */\nexport class UrlTree {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The root segment group of the URL tree */\n      public root: UrlSegmentGroup,\n      /** The query params of the URL */\n      public queryParams: Params,\n      /** The fragment of the URL */\n      public fragment: string|null) {}\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return DEFAULT_SERIALIZER.serialize(this);\n  }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n  /** @internal */\n  _sourceSegment?: UrlSegmentGroup;\n  /** @internal */\n  _segmentIndexShift?: number;\n  /** The parent node in the url tree */\n  parent: UrlSegmentGroup|null = null;\n\n  constructor(\n      /** The URL segments of this group. See `UrlSegment` for more information */\n      public segments: UrlSegment[],\n      /** The list of children of this group */\n      public children: {[key: string]: UrlSegmentGroup}) {\n    forEach(children, (v: any, k: any) => v.parent = this);\n  }\n\n  /** Whether the segment has child segments */\n  hasChildren(): boolean {\n    return this.numberOfChildren > 0;\n  }\n\n  /** Number of child segments */\n  get numberOfChildren(): number {\n    return Object.keys(this.children).length;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePaths(this);\n  }\n}\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 */\nexport class UrlSegment {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _parameterMap!: ParamMap;\n\n  constructor(\n      /** The path part of a URL segment */\n      public path: string,\n\n      /** The matrix parameters associated with a segment */\n      public parameters: {[name: string]: string}) {}\n\n  get parameterMap() {\n    if (!this._parameterMap) {\n      this._parameterMap = convertToParamMap(this.parameters);\n    }\n    return this._parameterMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePath(this);\n  }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  if (as.length !== bs.length) return false;\n  return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n    segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[] {\n  let res: T[] = [];\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet === PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet !== PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  return res;\n}\n\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 */\nexport abstract class UrlSerializer {\n  /** Parse a url into a `UrlTree` */\n  abstract parse(url: string): UrlTree;\n\n  /** Converts a `UrlTree` into a url */\n  abstract serialize(tree: UrlTree): string;\n}\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 */\nexport class DefaultUrlSerializer implements UrlSerializer {\n  /** Parses a url into a `UrlTree` */\n  parse(url: string): UrlTree {\n    const p = new UrlParser(url);\n    return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n  }\n\n  /** Converts a `UrlTree` into a url */\n  serialize(tree: UrlTree): string {\n    const segment = `/${serializeSegment(tree.root, true)}`;\n    const query = serializeQueryParams(tree.queryParams);\n    const fragment =\n        typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : '';\n\n    return `${segment}${query}${fragment}`;\n  }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n  return segment.segments.map(p => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n  if (!segment.hasChildren()) {\n    return serializePaths(segment);\n  }\n\n  if (root) {\n    const primary = segment.children[PRIMARY_OUTLET] ?\n        serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n        '';\n    const children: string[] = [];\n\n    forEach(segment.children, (v: UrlSegmentGroup, k: string) => {\n      if (k !== PRIMARY_OUTLET) {\n        children.push(`${k}:${serializeSegment(v, false)}`);\n      }\n    });\n\n    return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n\n  } else {\n    const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n      if (k === PRIMARY_OUTLET) {\n        return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n      }\n\n      return [`${k}:${serializeSegment(v, false)}`];\n    });\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\n    return `${serializePaths(segment)}/(${children.join('//')})`;\n  }\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: string): string {\n  return encodeURIComponent(s)\n      .replace(/%40/g, '@')\n      .replace(/%3A/gi, ':')\n      .replace(/%24/g, '$')\n      .replace(/%2C/gi, ',');\n}\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 */\nexport function encodeUriQuery(s: string): string {\n  return encodeUriString(s).replace(/%3B/gi, ';');\n}\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 */\nexport function encodeUriFragment(s: string): string {\n  return encodeURI(s);\n}\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 */\nexport function encodeUriSegment(s: string): string {\n  return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n  return decodeURIComponent(s);\n}\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.\nexport function decodeQuery(s: string): string {\n  return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n  return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n  return Object.keys(params)\n      .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n      .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n  const strParams: string[] =\n      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\n  return strParams.length ? `?${strParams.join('&')}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str: string): string {\n  const match = str.match(SEGMENT_RE);\n  return match ? match[0] : '';\n}\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: string): string {\n  const match = str.match(QUERY_PARAM_RE);\n  return match ? match[0] : '';\n}\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: string): string {\n  const match = str.match(QUERY_PARAM_VALUE_RE);\n  return match ? match[0] : '';\n}\n\nclass UrlParser {\n  private remaining: string;\n\n  constructor(private url: string) {\n    this.remaining = url;\n  }\n\n  parseRootSegment(): UrlSegmentGroup {\n    this.consumeOptional('/');\n\n    if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n      return new UrlSegmentGroup([], {});\n    }\n\n    // The root segment group never has segments\n    return new UrlSegmentGroup([], this.parseChildren());\n  }\n\n  parseQueryParams(): Params {\n    const params: Params = {};\n    if (this.consumeOptional('?')) {\n      do {\n        this.parseQueryParam(params);\n      } while (this.consumeOptional('&'));\n    }\n    return params;\n  }\n\n  parseFragment(): string|null {\n    return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n  }\n\n  private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n    if (this.remaining === '') {\n      return {};\n    }\n\n    this.consumeOptional('/');\n\n    const segments: UrlSegment[] = [];\n    if (!this.peekStartsWith('(')) {\n      segments.push(this.parseSegment());\n    }\n\n    while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n      this.capture('/');\n      segments.push(this.parseSegment());\n    }\n\n    let children: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('/(')) {\n      this.capture('/');\n      children = this.parseParens(true);\n    }\n\n    let res: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('(')) {\n      res = this.parseParens(false);\n    }\n\n    if (segments.length > 0 || Object.keys(children).length > 0) {\n      res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n    }\n\n    return res;\n  }\n\n  // parse a segment with its matrix parameters\n  // ie `name;k1=v1;k2`\n  private parseSegment(): UrlSegment {\n    const path = matchSegments(this.remaining);\n    if (path === '' && this.peekStartsWith(';')) {\n      throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n    }\n\n    this.capture(path);\n    return new UrlSegment(decode(path), this.parseMatrixParams());\n  }\n\n  private parseMatrixParams(): {[key: string]: string} {\n    const params: {[key: string]: string} = {};\n    while (this.consumeOptional(';')) {\n      this.parseParam(params);\n    }\n    return params;\n  }\n\n  private parseParam(params: {[key: string]: string}): void {\n    const key = matchSegments(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchSegments(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    params[decode(key)] = decode(value);\n  }\n\n  // Parse a single query parameter `name[=value]`\n  private parseQueryParam(params: Params): void {\n    const key = matchQueryParams(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchUrlQueryParamValue(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    const decodedKey = decodeQuery(key);\n    const decodedVal = decodeQuery(value);\n\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    } else {\n      // Create a new value\n      params[decodedKey] = decodedVal;\n    }\n  }\n\n  // parse `(a/b//outlet_name:c/d)`\n  private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n    const segments: {[key: string]: UrlSegmentGroup} = {};\n    this.capture('(');\n\n    while (!this.consumeOptional(')') && this.remaining.length > 0) {\n      const path = matchSegments(this.remaining);\n\n      const next = this.remaining[path.length];\n\n      // if is is not one of these characters, then the segment was unescaped\n      // or the group was not closed\n      if (next !== '/' && next !== ')' && next !== ';') {\n        throw new Error(`Cannot parse url '${this.url}'`);\n      }\n\n      let outletName: string = undefined!;\n      if (path.indexOf(':') > -1) {\n        outletName = path.substr(0, path.indexOf(':'));\n        this.capture(outletName);\n        this.capture(':');\n      } else if (allowPrimary) {\n        outletName = PRIMARY_OUTLET;\n      }\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\n    return segments;\n  }\n\n  private peekStartsWith(str: string): boolean {\n    return this.remaining.startsWith(str);\n  }\n\n  // Consumes the prefix when it is present and returns whether it has been consumed\n  private consumeOptional(str: string): boolean {\n    if (this.peekStartsWith(str)) {\n      this.remaining = this.remaining.substring(str.length);\n      return true;\n    }\n    return false;\n  }\n\n  private capture(str: string): void {\n    if (!this.consumeOptional(str)) {\n      throw new Error(`Expected \"${str}\".`);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source 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 class Tree<T> {\n  /** @internal */\n  _root: TreeNode<T>;\n\n  constructor(root: TreeNode<T>) {\n    this._root = root;\n  }\n\n  get root(): T {\n    return this._root.value;\n  }\n\n  /**\n   * @internal\n   */\n  parent(t: T): T|null {\n    const p = this.pathFromRoot(t);\n    return p.length > 1 ? p[p.length - 2] : null;\n  }\n\n  /**\n   * @internal\n   */\n  children(t: T): T[] {\n    const n = findNode(t, this._root);\n    return n ? n.children.map(t => t.value) : [];\n  }\n\n  /**\n   * @internal\n   */\n  firstChild(t: T): T|null {\n    const n = findNode(t, this._root);\n    return n && n.children.length > 0 ? n.children[0].value : null;\n  }\n\n  /**\n   * @internal\n   */\n  siblings(t: T): T[] {\n    const p = findPath(t, this._root);\n    if (p.length < 2) return [];\n\n    const c = p[p.length - 2].children.map(c => c.value);\n    return c.filter(cc => cc !== t);\n  }\n\n  /**\n   * @internal\n   */\n  pathFromRoot(t: T): T[] {\n    return findPath(t, this._root).map(s => s.value);\n  }\n}\n\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T>|null {\n  if (value === node.value) return node;\n\n  for (const child of node.children) {\n    const node = findNode(value, child);\n    if (node) return node;\n  }\n\n  return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n  if (value === node.value) return [node];\n\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\n  return [];\n}\n\nexport class TreeNode<T> {\n  constructor(public value: T, public children: TreeNode<T>[]) {}\n\n  toString(): string {\n    return `TreeNode(${this.value})`;\n  }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends {outlet: string}>(node: TreeNode<T>|null) {\n  const map: {[outlet: string]: TreeNode<T>} = {};\n\n  if (node) {\n    node.children.forEach(child => map[child.value.outlet] = child);\n  }\n\n  return map;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './config';\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalSegments, UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n\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 */\nexport class RouterState extends Tree<ActivatedRoute> {\n  /** @internal */\n  constructor(\n      root: TreeNode<ActivatedRoute>,\n      /** The current snapshot of the router state */\n      public snapshot: RouterStateSnapshot) {\n    super(root);\n    setRouterState(<RouterState>this, root);\n  }\n\n  override toString(): string {\n    return this.snapshot.toString();\n  }\n}\n\nexport function createEmptyState(urlTree: UrlTree, rootComponent: Type<any>|null): RouterState {\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(\n      emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent,\n      snapshot.root);\n  activated.snapshot = snapshot.root;\n  return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(\n    urlTree: UrlTree, rootComponent: Type<any>|null): RouterStateSnapshot {\n  const emptyParams = {};\n  const emptyData = {};\n  const emptyQueryParams = {};\n  const fragment = '';\n  const activated = new ActivatedRouteSnapshot(\n      [], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null,\n      urlTree.root, -1, {});\n  return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\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 */\nexport class ActivatedRoute {\n  /** The current snapshot of this route */\n  snapshot!: ActivatedRouteSnapshot;\n  /** @internal */\n  _futureSnapshot: ActivatedRouteSnapshot;\n  /** @internal */\n  _routerState!: RouterState;\n  /** @internal */\n  _paramMap!: Observable<ParamMap>;\n  /** @internal */\n  _queryParamMap!: Observable<ParamMap>;\n\n  /** @internal */\n  constructor(\n      /** An observable of the URL segments matched by this route. */\n      public url: Observable<UrlSegment[]>,\n      /** An observable of the matrix parameters scoped to this route. */\n      public params: Observable<Params>,\n      /** An observable of the query parameters shared by all the routes. */\n      public queryParams: Observable<Params>,\n      /** An observable of the URL fragment shared by all the routes. */\n      public fragment: Observable<string|null>,\n      /** An observable of the static and resolved data of this route. */\n      public data: Observable<Data>,\n      /** The outlet name of the route, a constant. */\n      public outlet: string,\n      /** The component of the route, a constant. */\n      // TODO(vsavkin): remove |string\n      public component: Type<any>|string|null, futureSnapshot: ActivatedRouteSnapshot) {\n    this._futureSnapshot = futureSnapshot;\n  }\n\n  /** The configuration used to match this route. */\n  get routeConfig(): Route|null {\n    return this._futureSnapshot.routeConfig;\n  }\n\n  /** The root of the router state. */\n  get root(): ActivatedRoute {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree. */\n  get parent(): ActivatedRoute|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree. */\n  get firstChild(): ActivatedRoute|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree. */\n  get children(): ActivatedRoute[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route. */\n  get pathFromRoot(): ActivatedRoute[] {\n    return this._routerState.pathFromRoot(this);\n  }\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(): Observable<ParamMap> {\n    if (!this._paramMap) {\n      this._paramMap = this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._paramMap;\n  }\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(): Observable<ParamMap> {\n    if (!this._queryParamMap) {\n      this._queryParamMap =\n          this.queryParams.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n  }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly'|'always';\n\n/** @internal */\nexport type Inherited = {\n  params: Params,\n  data: Data,\n  resolve: Data,\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 */\nexport function inheritedParamsDataResolve(\n    route: ActivatedRouteSnapshot,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly'): Inherited {\n  const pathFromRoot = route.pathFromRoot;\n\n  let inheritingStartingFrom = 0;\n  if (paramsInheritanceStrategy !== 'always') {\n    inheritingStartingFrom = pathFromRoot.length - 1;\n\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\n        // parent is componentless => current route should inherit its params and data\n      } else if (!parent.component) {\n        inheritingStartingFrom--;\n\n      } else {\n        break;\n      }\n    }\n  }\n\n  return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n\n/** @internal */\nfunction flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {\n  return pathFromRoot.reduce((res, curr) => {\n    const params = {...res.params, ...curr.params};\n    const data = {...res.data, ...curr.data};\n    const resolve = {...res.resolve, ...curr._resolvedData};\n    return {params, data, resolve};\n  }, <any>{params: {}, data: {}, resolve: {}});\n}\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 */\nexport class ActivatedRouteSnapshot {\n  /** The configuration used to match this route **/\n  public readonly routeConfig: Route|null;\n  /** @internal **/\n  _urlSegment: UrlSegmentGroup;\n  /** @internal */\n  _lastPathIndex: number;\n  /** @internal */\n  _resolve: ResolveData;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _resolvedData!: Data;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _routerState!: RouterStateSnapshot;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _paramMap!: ParamMap;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The URL segments matched by this route */\n      public url: UrlSegment[],\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      public params: Params,\n      /** The query parameters shared by all the routes */\n      public queryParams: Params,\n      /** The URL fragment shared by all the routes */\n      public fragment: string|null,\n      /** The static and resolved data of this route */\n      public data: Data,\n      /** The outlet name of the route */\n      public outlet: string,\n      /** The component of the route */\n      public component: Type<any>|string|null, routeConfig: Route|null, urlSegment: UrlSegmentGroup,\n      lastPathIndex: number, resolve: ResolveData) {\n    this.routeConfig = routeConfig;\n    this._urlSegment = urlSegment;\n    this._lastPathIndex = lastPathIndex;\n    this._resolve = resolve;\n  }\n\n  /** The root of the router state */\n  get root(): ActivatedRouteSnapshot {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree */\n  get parent(): ActivatedRouteSnapshot|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree */\n  get firstChild(): ActivatedRouteSnapshot|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree */\n  get children(): ActivatedRouteSnapshot[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route */\n  get pathFromRoot(): ActivatedRouteSnapshot[] {\n    return this._routerState.pathFromRoot(this);\n  }\n\n  get paramMap(): ParamMap {\n    if (!this._paramMap) {\n      this._paramMap = convertToParamMap(this.params);\n    }\n    return this._paramMap;\n  }\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\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/**\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 */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n  /** @internal */\n  constructor(\n      /** The url from which this snapshot was created */\n      public url: string, root: TreeNode<ActivatedRouteSnapshot>) {\n    super(root);\n    setRouterState(<RouterStateSnapshot>this, root);\n  }\n\n  override toString(): string {\n    return serializeNode(this._root);\n  }\n}\n\nfunction setRouterState<U, T extends {_routerState: U}>(state: U, node: TreeNode<T>): void {\n  node.value._routerState = state;\n  node.children.forEach(c => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n  const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n  return `${node.value}${c}`;\n}\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 */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\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      (<any>route.queryParams).next(nextSnapshot.queryParams);\n    }\n    if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n      (<any>route.fragment).next(nextSnapshot.fragment);\n    }\n    if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n      (<any>route.params).next(nextSnapshot.params);\n    }\n    if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n      (<any>route.url).next(nextSnapshot.url);\n    }\n    if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n      (<any>route.data).next(nextSnapshot.data);\n    }\n  } else {\n    route.snapshot = route._futureSnapshot;\n\n    // this is for resolved data\n    (<any>route.data).next(route._futureSnapshot.data);\n  }\n}\n\n\nexport function equalParamsAndUrlSegments(\n    a: ActivatedRouteSnapshot, b: ActivatedRouteSnapshot): boolean {\n  const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n  const parentsMismatch = !a.parent !== !b.parent;\n\n  return equalUrlParams && !parentsMismatch &&\n      (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent!));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n    routeReuseStrategy: RouteReuseStrategy, curr: RouterStateSnapshot,\n    prevState: RouterState): RouterState {\n  const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n  return new RouterState(root, curr);\n}\n\nfunction createNode(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState?: TreeNode<ActivatedRoute>): TreeNode<ActivatedRoute> {\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<ActivatedRoute>(value, children);\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 as DetachedRouteHandleInternal).route;\n        setFutureSnapshotsOfActivatedRoutes(curr, tree);\n        return tree;\n      }\n    }\n\n    const value = createActivatedRoute(curr.value);\n    const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n    return new TreeNode<ActivatedRoute>(value, children);\n  }\n}\n\nfunction setFutureSnapshotsOfActivatedRoutes(\n    curr: TreeNode<ActivatedRouteSnapshot>, result: TreeNode<ActivatedRoute>): void {\n  if (curr.value.routeConfig !== result.value.routeConfig) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n  }\n  if (curr.children.length !== result.children.length) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n  }\n  result.value._futureSnapshot = curr.value;\n  for (let i = 0; i < curr.children.length; ++i) {\n    setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n  }\n}\n\nfunction createOrReuseChildren(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState: TreeNode<ActivatedRoute>) {\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}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n  return new ActivatedRoute(\n      new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams),\n      new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ActivatedRoute} from './router_state';\nimport {Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last, shallowEqual} from './utils/collection';\n\nexport function createUrlTree(\n    route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params|null,\n    fragment: string|null): UrlTree {\n  if (commands.length === 0) {\n    return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n  }\n\n  const nav = computeNavigation(commands);\n\n  if (nav.toRoot()) {\n    return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n  }\n\n  const startingPosition = findStartingPosition(nav, urlTree, route);\n\n  const segmentGroup = startingPosition.processChildren ?\n      updateSegmentGroupChildren(\n          startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n      updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n  return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n  return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\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: any): command is {outlets: {[key: string]: any}} {\n  return typeof command === 'object' && command != null && command.outlets;\n}\n\nfunction tree(\n    oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup, urlTree: UrlTree,\n    queryParams: Params|null, fragment: string|null): UrlTree {\n  let qp: any = {};\n  if (queryParams) {\n    forEach(queryParams, (value: any, name: any) => {\n      qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n    });\n  }\n\n  if (urlTree.root === oldSegmentGroup) {\n    return new UrlTree(newSegmentGroup, qp, fragment);\n  }\n\n  return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\n\nfunction replaceSegment(\n    current: UrlSegmentGroup, oldSegment: UrlSegmentGroup,\n    newSegment: UrlSegmentGroup): UrlSegmentGroup {\n  const children: {[key: string]: UrlSegmentGroup} = {};\n  forEach(current.children, (c: UrlSegmentGroup, outletName: string) => {\n    if (c === oldSegment) {\n      children[outletName] = newSegment;\n    } else {\n      children[outletName] = replaceSegment(c, oldSegment, newSegment);\n    }\n  });\n  return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n  constructor(\n      public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {\n    if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n      throw new Error('Root segment cannot have matrix parameters');\n    }\n\n    const cmdWithOutlet = commands.find(isCommandWithOutlets);\n    if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n      throw new Error('{outlets:{}} has to be the last command');\n    }\n  }\n\n  public toRoot(): boolean {\n    return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n  }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n  if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n    return new Navigation(true, 0, commands);\n  }\n\n  let numberOfDoubleDots = 0;\n  let isAbsolute = false;\n\n  const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n    if (typeof cmd === 'object' && cmd != null) {\n      if (cmd.outlets) {\n        const outlets: {[k: string]: any} = {};\n        forEach(cmd.outlets, (commands: any, name: string) => {\n          outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n        });\n        return [...res, {outlets}];\n      }\n\n      if (cmd.segmentPath) {\n        return [...res, cmd.segmentPath];\n      }\n    }\n\n    if (!(typeof cmd === 'string')) {\n      return [...res, cmd];\n    }\n\n    if (cmdIdx === 0) {\n      cmd.split('/').forEach((urlPart, partIndex) => {\n        if (partIndex == 0 && urlPart === '.') {\n          // skip './a'\n        } else if (partIndex == 0 && urlPart === '') {  //  '/a'\n          isAbsolute = true;\n        } else if (urlPart === '..') {  //  '../a'\n          numberOfDoubleDots++;\n        } else if (urlPart != '') {\n          res.push(urlPart);\n        }\n      });\n\n      return res;\n    }\n\n    return [...res, cmd];\n  }, []);\n\n  return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n  constructor(\n      public segmentGroup: UrlSegmentGroup, public processChildren: boolean, public index: number) {\n  }\n}\n\nfunction findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRoute): Position {\n  if (nav.isAbsolute) {\n    return new Position(tree.root, true, 0);\n  }\n\n  if (route.snapshot._lastPathIndex === -1) {\n    const segmentGroup = route.snapshot._urlSegment;\n    // Pathless ActivatedRoute has _lastPathIndex === -1 but should not process children\n    // see issue #26224, #13011, #35687\n    // However, if the ActivatedRoute is the root we should process children like above.\n    const processChildren = segmentGroup === tree.root;\n    return new Position(segmentGroup, processChildren, 0);\n  }\n\n  const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n  const index = route.snapshot._lastPathIndex + modifier;\n  return createPositionApplyingDoubleDots(\n      route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n    group: UrlSegmentGroup, index: number, numberOfDoubleDots: number): Position {\n  let g = group;\n  let ci = index;\n  let dd = numberOfDoubleDots;\n  while (dd > ci) {\n    dd -= ci;\n    g = g.parent!;\n    if (!g) {\n      throw new Error('Invalid number of \\'../\\'');\n    }\n    ci = g.segments.length;\n  }\n  return new Position(g, false, ci - dd);\n}\n\nfunction getOutlets(commands: unknown[]): {[k: string]: unknown[]|string} {\n  if (isCommandWithOutlets(commands[0])) {\n    return commands[0].outlets;\n  }\n\n  return {[PRIMARY_OUTLET]: commands};\n}\n\nfunction updateSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (!segmentGroup) {\n    segmentGroup = new UrlSegmentGroup([], {});\n  }\n  if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n    return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n  }\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  } else if (m.match && slicedCommands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else if (m.match && !segmentGroup.hasChildren()) {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  } else if (m.match) {\n    return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n  } else {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  }\n}\n\nfunction updateSegmentGroupChildren(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (commands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else {\n    const outlets = getOutlets(commands);\n    const children: {[key: string]: UrlSegmentGroup} = {};\n\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\n    forEach(segmentGroup.children, (child: UrlSegmentGroup, childOutlet: string) => {\n      if (outlets[childOutlet] === undefined) {\n        children[childOutlet] = child;\n      }\n    });\n    return new UrlSegmentGroup(segmentGroup.segments, children);\n  }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n  let currentCommandIndex = 0;\n  let currentPathIndex = startIndex;\n\n  const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n  while (currentPathIndex < segmentGroup.segments.length) {\n    if (currentCommandIndex >= commands.length) 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 =\n        currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n    if (currentPathIndex > 0 && curr === undefined) break;\n\n    if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n      if (!compare(curr, next, path)) return noMatch;\n      currentCommandIndex += 2;\n    } else {\n      if (!compare(curr, {}, path)) return noMatch;\n      currentCommandIndex++;\n    }\n    currentPathIndex++;\n  }\n\n  return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  const paths = segmentGroup.segments.slice(0, startIndex);\n\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\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\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    } else {\n      paths.push(new UrlSegment(curr, {}));\n      i++;\n    }\n  }\n  return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: unknown[]|string}):\n    {[outlet: string]: UrlSegmentGroup} {\n  const children: {[outlet: string]: UrlSegmentGroup} = {};\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}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n  const res: {[key: string]: string} = {};\n  forEach(params, (v: any, k: string) => res[k] = `${v}`);\n  return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n  return path == segment.path && shallowEqual(params, segment.parameters);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {LoadedRouterConfig} from '../config';\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {NavigationTransition} from '../router';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot, advanceActivatedRoute, RouterState} from '../router_state';\nimport {forEach} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport const activateRoutes =\n    (rootContexts: ChildrenOutletContexts, routeReuseStrategy: RouteReuseStrategy,\n     forwardEvent: (evt: Event) => void): MonoTypeOperatorFunction<NavigationTransition> =>\n        map(t => {\n          new ActivateRoutes(\n              routeReuseStrategy, t.targetRouterState!, t.currentRouterState, forwardEvent)\n              .activate(rootContexts);\n          return t;\n        });\n\nexport class ActivateRoutes {\n  constructor(\n      private routeReuseStrategy: RouteReuseStrategy, private futureState: RouterState,\n      private currState: RouterState, private forwardEvent: (evt: Event) => void) {}\n\n  activate(parentContexts: ChildrenOutletContexts): void {\n    const futureRoot = this.futureState._root;\n    const currRoot = this.currState ? this.currState._root : null;\n\n    this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n    advanceActivatedRoute(this.futureState.root);\n    this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n  }\n\n  // De-activate the child route that are not re-used for the future state\n  private deactivateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\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\n    // De-activate the routes that will not be re-used\n    forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {\n      this.deactivateRouteAndItsChildren(v, contexts);\n    });\n  }\n\n  private deactivateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContext: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\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      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.deactivateChildRoutes(futureNode, currNode, parentContext);\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\n  private deactivateRouteAndItsChildren(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n      this.detachAndStoreRouteSubtree(route, parentContexts);\n    } else {\n      this.deactivateRouteAndOutlet(route, parentContexts);\n    }\n  }\n\n  private detachAndStoreRouteSubtree(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n    if (context && context.outlet) {\n      const componentRef = context.outlet.detach();\n      const contexts = context.children.onOutletDeactivated();\n      this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n    }\n  }\n\n  private deactivateRouteAndOutlet(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\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: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(route);\n\n    for (const childOutlet of Object.keys(children)) {\n      this.deactivateRouteAndItsChildren(children[childOutlet], contexts);\n    }\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\n  private activateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outlet: string]: TreeNode<ActivatedRoute>} = 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\n  private activateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContexts: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    advanceActivatedRoute(future);\n\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      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, currNode, parentContexts);\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\n        if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n          const stored =\n              (<DetachedRouteHandleInternal>this.routeReuseStrategy.retrieve(future.snapshot));\n          this.routeReuseStrategy.store(future.snapshot, null);\n          context.children.onOutletReAttached(stored.contexts);\n          context.attachRef = stored.componentRef;\n          context.route = stored.route.value;\n          if (context.outlet) {\n            // Attach right away when the outlet has already been instantiated\n            // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n            context.outlet.attach(stored.componentRef, stored.route.value);\n          }\n          advanceActivatedRouteNodeAndItsChildren(stored.route);\n        } else {\n          const config = parentLoadedConfig(future.snapshot);\n          const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n\n          context.attachRef = null;\n          context.route = future;\n          context.resolver = cmpFactoryResolver;\n          if (context.outlet) {\n            // Activate the outlet when it has already been instantiated\n            // Otherwise it will get activated from its `ngOnInit` when instantiated\n            context.outlet.activateWith(future, cmpFactoryResolver);\n          }\n\n          this.activateChildRoutes(futureNode, null, context.children);\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\nfunction advanceActivatedRouteNodeAndItsChildren(node: TreeNode<ActivatedRoute>): void {\n  advanceActivatedRoute(node.value);\n  node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\n\nfunction parentLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n    if (route && route.component) return null;\n  }\n\n  return 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\nimport {NgModuleFactory, NgModuleRef, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * Represents a route configuration for the Router service.\n * An array of `Route` objects, used in `Router.config` and for nested route configurations\n * in `Route.children`.\n *\n * @see `Route`\n * @see `Router`\n * @see [Router configuration guide](guide/router-reference#configuration)\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * Represents the result of matching URLs with a custom matching function.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @see `UrlMatcher()`\n * @publicApi\n */\nexport type UrlMatchResult = {\n  consumed: UrlSegment[];\n  posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * A function for matching a route against URLs. Implement a custom URL matcher\n * for `Route.matcher` when a combination of `path` and `pathMatch`\n * is not expressive enough. Cannot be used together with `path` and `pathMatch`.\n *\n * The function takes the following arguments and returns a `UrlMatchResult` object.\n * * *segments* : An array of URL segments.\n * * *group* : A segment group.\n * * *route* : The route to match against.\n *\n * The following example implementation matches HTML files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n *   return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) =>\n    UrlMatchResult|null;\n\n/**\n *\n * Represents static data associated with a particular route.\n *\n * @see `Route#data`\n *\n * @publicApi\n */\nexport type Data = {\n  [name: string]: any\n};\n\n/**\n *\n * Represents the resolved data associated with a particular route.\n *\n * @see `Route#resolve`.\n *\n * @publicApi\n */\nexport type ResolveData = {\n  [name: string]: any\n};\n\n/**\n *\n * A function that is called to resolve a collection of lazy-loaded routes.\n * Must be an arrow function of the following form:\n * `() => import('...').then(mod => mod.MODULE)`\n *\n * For example:\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @see [Route.loadChildren](api/router/Route#loadChildren)\n * @publicApi\n */\nexport type LoadChildrenCallback = () => Type<any>|NgModuleFactory<any>|Observable<Type<any>>|\n    Promise<NgModuleFactory<any>|Type<any>|any>;\n\n/**\n *\n * A function that returns a set of routes to load.\n *\n * The string form of `LoadChildren` is deprecated (see `DeprecatedLoadChildren`). The function\n * form (`LoadChildrenCallback`) should be used instead.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n */\nexport type LoadChildren = LoadChildrenCallback|DeprecatedLoadChildren;\n\n/**\n * A string of the form `path/to/file#exportName` that acts as a URL for a set of routes to load.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n * @deprecated The `string` form of `loadChildren` is deprecated in favor of the\n * `LoadChildrenCallback` function which uses the ES dynamic `import()` expression.\n * This offers a more natural and standards-based mechanism to dynamically\n * load an ES module at runtime.\n */\nexport type DeprecatedLoadChildren = string;\n\n/**\n *\n * How to handle query parameters in a router link.\n * One of:\n * - `merge` : Merge new with current parameters.\n * - `preserve` : Preserve current parameters.\n *\n * @see `UrlCreationOptions#queryParamsHandling`\n * @see `RouterLink`\n * @publicApi\n */\nexport type QueryParamsHandling = 'merge'|'preserve'|'';\n\n/**\n *\n * A policy for when to run guards and resolvers on a route.\n *\n * @see [Route.runGuardsAndResolvers](api/router/Route#runGuardsAndResolvers)\n * @publicApi\n */\nexport type RunGuardsAndResolvers =\n    'pathParamsChange'|'pathParamsOrQueryParamsChange'|'paramsChange'|'paramsOrQueryParamsChange'|\n    'always'|((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * A configuration object that defines a single route.\n * A set of routes are collected in a `Routes` array to define a `Router` configuration.\n * The router attempts to match segments of a given URL against each route,\n * using the configuration options defined in this object.\n *\n * Supports static, parameterized, redirect, and wildcard routes, as well as\n * custom route data and resolve methods.\n *\n * For detailed usage information, see the [Routing Guide](guide/router).\n *\n * @usageNotes\n *\n * ### Simple Configuration\n *\n * The following route specifies that when navigating to, for example,\n * `/team/11/user/bob`, the router creates the 'Team' component\n * with the 'User' child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n  *  component: Team,\n *   children: [{\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * ### Multiple Outlets\n *\n * The following route creates sibling components with multiple outlets.\n * When navigating to `/team/11(aux:chat/jim)`, the router creates the 'Team' component next to\n * the 'Chat' component. The 'Chat' component is placed into the 'aux' outlet.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team\n * }, {\n *   path: 'chat/:user',\n *   component: Chat\n *   outlet: 'aux'\n * }]\n * ```\n *\n * ### Wild Cards\n *\n * The following route uses wild-card notation to specify a component\n * that is always instantiated regardless of where you navigate to.\n *\n * ```\n * [{\n *   path: '**',\n *   component: WildcardComponent\n * }]\n * ```\n *\n * ### Redirects\n *\n * The following route uses the `redirectTo` property to ignore a segment of\n * a given URL when looking for a child path.\n *\n * When navigating to '/team/11/legacy/user/jim', the router changes the URL segment\n * '/team/11/legacy/user/jim' to '/team/11/user/jim', and then instantiates\n * the Team component with the User child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: 'legacy/user/:name',\n *     redirectTo: 'user/:name'\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * The redirect path can be relative, as shown in this example, or absolute.\n * If we change the `redirectTo` value in the example to the absolute URL segment '/user/:name',\n * the result URL is also absolute, '/user/jim'.\n\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any URL segments.\n *\n * In the following configuration, when navigating to\n * `/team/11`, the router instantiates the 'AllUsers' component.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: AllUsers\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * Empty-path routes can have children. In the following example, when navigating\n * to `/team/11/user/jim`, the router instantiates the wrapper component with\n * the user component in it.\n *\n * Note that an empty path route inherits its parent's parameters and data.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: WrapperCmp,\n *     children: [{\n *       path: 'user/:name',\n *       component: User\n *     }]\n *   }]\n * }]\n * ```\n *\n * ### Matching Strategy\n *\n * The default path-match strategy is 'prefix', which means that the router\n * checks URL elements from the left to see if the URL matches a specified path.\n * For example, '/team/11/user' matches 'team/:id'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'prefix', //default\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * You can specify the path-match strategy 'full' to make sure that the path\n * covers the whole unconsumed URL. It is important to do this when redirecting\n * empty-path routes. Otherwise, because an empty path is a prefix of any URL,\n * the router would apply the redirect even when navigating to the redirect destination,\n * creating an endless loop.\n *\n * In the following example, supplying the 'full' `pathMatch` strategy ensures\n * that the router applies the redirect if and only if navigating to '/'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'full',\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * You can share parameters between sibling components.\n * For example, suppose that two sibling components should go next to each other,\n * and both of them require an ID parameter. You can accomplish this using a route\n * that does not specify a component at the top level.\n *\n * In the following example, 'MainChild' and 'AuxChild' are siblings.\n * When navigating to 'parent/10/(a//aux:b)', the route instantiates\n * the main child and aux child components next to each other.\n * For this to work, the application component must have the primary and aux outlets defined.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: 'a', component: MainChild },\n *      { path: 'b', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * The router merges the parameters, data, and resolve of the componentless\n * parent into the parameters, data, and resolve of the children.\n *\n * This is especially useful when child components are defined\n * with an empty path string, as in the following example.\n * With this configuration, navigating to '/parent/10' creates\n * the main child and aux components.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: '', component: MainChild },\n *      { path: '', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up application load time by splitting the application\n * into multiple bundles and loading them on demand.\n * To use lazy loading, provide the `loadChildren` property in the `Route` object,\n * instead of the `children` property.\n *\n * Given the following example route, the router will lazy load\n * the associated module on demand using the browser native import system.\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @publicApi\n */\nexport interface Route {\n  /**\n   * The path to match against. Cannot be used together with a custom `matcher` function.\n   * A URL string that uses router matching notation.\n   * Can be a wild card (`**`) that matches any URL (see Usage Notes below).\n   * Default is \"/\" (the root path).\n   *\n   */\n  path?: string;\n  /**\n   * The path-matching strategy, one of 'prefix' or 'full'.\n   * Default is 'prefix'.\n   *\n   * By default, the router checks URL elements from the left to see if the URL\n   * matches a given path and stops when there is a config match. Importantly there must still be a\n   * config match for each segment of the URL. For example, '/team/11/user' matches the prefix\n   * 'team/:id' if one of the route's children matches the segment 'user'. That is, the URL\n   * '/team/11/user` matches the config\n   * `{path: 'team/:id', children: [{path: ':user', component: User}]}`\n   * but does not match when there are no children as in `{path: 'team/:id', component: Team}`.\n   *\n   * The path-match strategy 'full' matches against the entire URL.\n   * It is important to do this when redirecting empty-path routes.\n   * Otherwise, because an empty path is a prefix of any URL,\n   * the router would apply the redirect even when navigating\n   * to the redirect destination, creating an endless loop.\n   *\n   */\n  pathMatch?: string;\n  /**\n   * A custom URL-matching function. Cannot be used together with `path`.\n   */\n  matcher?: UrlMatcher;\n  /**\n   * The component to instantiate when the path matches.\n   * Can be empty if child routes specify components.\n   */\n  component?: Type<any>;\n  /**\n   * A URL to redirect to when the path matches.\n   *\n   * Absolute if the URL begins with a slash (/), otherwise relative to the path URL.\n   * Note that no further redirects are evaluated after an absolute redirect.\n   *\n   * When not present, router does not redirect.\n   */\n  redirectTo?: string;\n  /**\n   * Name of a `RouterOutlet` object where the component can be placed\n   * when the path matches.\n   */\n  outlet?: string;\n  /**\n   * An array of dependency-injection tokens used to look up `CanActivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * activate the component. By default, any user can activate.\n   */\n  canActivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanActivateChild()` handlers,\n   * in order to determine if the current user is allowed to activate\n   * a child of the component. By default, any user can activate a child.\n   */\n  canActivateChild?: any[];\n  /**\n   * An array of DI tokens used to look up `CanDeactivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * deactivate the component. By default, any user can deactivate.\n   *\n   */\n  canDeactivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanLoad()`\n   * handlers, in order to determine if the current user is allowed to\n   * load the component. By default, any user can load.\n   */\n  canLoad?: any[];\n  /**\n   * Additional developer-defined data provided to the component via\n   * `ActivatedRoute`. By default, no additional data is passed.\n   */\n  data?: Data;\n  /**\n   * A map of DI tokens used to look up data resolvers. See `Resolve`.\n   */\n  resolve?: ResolveData;\n  /**\n   * An array of child `Route` objects that specifies a nested route\n   * configuration.\n   */\n  children?: Routes;\n  /**\n   * An object specifying lazy-loaded child routes.\n   */\n  loadChildren?: LoadChildren;\n  /**\n   * Defines when guards and resolvers will be run. One of\n   * - `paramsOrQueryParamsChange` : Run when query parameters change.\n   * - `always` : Run on every execution.\n   * By default, guards and resolvers run only when the matrix\n   * parameters of the route change.\n   */\n  runGuardsAndResolvers?: RunGuardsAndResolvers;\n  /**\n   * Filled for routes with `loadChildren` once the module has been loaded\n   * @internal\n   */\n  _loadedConfig?: LoadedRouterConfig;\n  /**\n   * Filled for routes with `loadChildren` during load\n   * @internal\n   */\n  _loader$?: Observable<LoadedRouterConfig>;\n}\n\nexport class LoadedRouterConfig {\n  constructor(public routes: Route[], public module: NgModuleRef<any>) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CanActivate, CanActivateChild, CanDeactivate, CanLoad} from '../interfaces';\nimport {UrlTree} from '../url_tree';\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 */\nexport function isFunction<T>(v: any): v is T {\n  return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n  return typeof v === 'boolean';\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n  return v instanceof UrlTree;\n}\n\nexport function isCanLoad(guard: any): guard is CanLoad {\n  return guard && isFunction<CanLoad>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is CanActivate {\n  return guard && isFunction<CanActivate>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is CanActivateChild {\n  return guard && isFunction<CanActivateChild>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is CanDeactivate<T> {\n  return guard && isFunction<CanDeactivate<T>>(guard.canDeactivate);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {combineLatest, Observable, OperatorFunction} from 'rxjs';\nimport {filter, map, scan, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {UrlTree} from '../url_tree';\nimport {isUrlTree} from '../utils/type_guards';\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | boolean | UrlTree;\n\nexport function prioritizedGuardValue():\n    OperatorFunction<Observable<boolean|UrlTree>[], boolean|UrlTree> {\n  return switchMap(obs => {\n    return combineLatest(obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))))\n               .pipe(\n                   scan(\n                       (acc: INTERIM_VALUES, list: INTERIM_VALUES[]) => {\n                         let isPending = false;\n                         return list.reduce((innerAcc, val, i: number) => {\n                           if (innerAcc !== INITIAL_VALUE) return innerAcc;\n\n                           // Toggle pending flag if any values haven't been set yet\n                           if (val === INITIAL_VALUE) isPending = true;\n\n                           // Any other return values are only valid if we haven't yet hit a pending\n                           // call. This guarantees that in the case of a guard at the bottom of the\n                           // tree that returns a redirect, we will wait for the higher priority\n                           // guard at the top to finish before performing the redirect.\n                           if (!isPending) {\n                             // Early return when we hit a `false` value as that should always\n                             // cancel navigation\n                             if (val === false) return val;\n\n                             if (i === list.length - 1 || isUrlTree(val)) {\n                               return val;\n                             }\n                           }\n\n                           return innerAcc;\n                         }, acc);\n                       },\n                       INITIAL_VALUE),\n                   filter(item => item !== INITIAL_VALUE),\n                   map(item => isUrlTree(item) ? item : item === true),  //\n                   take(1)) as Observable<boolean|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 */\n\nimport {Component} from '@angular/core';\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 */\n@Component({template: `<router-outlet></router-outlet>`})\nexport class ɵEmptyOutletComponent {\n}\n\nexport {ɵEmptyOutletComponent as EmptyOutletComponent};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EmptyOutletComponent} from '../components/empty_outlet';\nimport {Route, Routes} from '../config';\nimport {PRIMARY_OUTLET} from '../shared';\n\nexport function validateConfig(config: Routes, parentPath: string = ''): void {\n  // forEach doesn't iterate undefined values\n  for (let i = 0; i < config.length; i++) {\n    const route: Route = config[i];\n    const fullPath: string = getFullPath(parentPath, route);\n    validateNode(route, fullPath);\n  }\n}\n\nfunction validateNode(route: Route, fullPath: string): void {\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    if (!route) {\n      throw new Error(`\n      Invalid configuration of route '${fullPath}': Encountered undefined route.\n      The reason might be an extra comma.\n\n      Example:\n      const routes: Routes = [\n        { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n        { path: 'dashboard',  component: DashboardComponent },, << two commas\n        { path: 'detail/:id', component: HeroDetailComponent }\n      ];\n    `);\n    }\n    if (Array.isArray(route)) {\n      throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n    }\n    if (!route.component && !route.children && !route.loadChildren &&\n        (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n    }\n    if (route.redirectTo && route.children) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and children cannot be used together`);\n    }\n    if (route.redirectTo && route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and loadChildren cannot be used together`);\n    }\n    if (route.children && route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': children and loadChildren cannot be used together`);\n    }\n    if (route.redirectTo && route.component) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': redirectTo and component cannot be used together`);\n    }\n    if (route.redirectTo && route.canActivate) {\n      throw new Error(\n          `Invalid configuration of route '${\n              fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +\n          `so canActivate will never be executed.`);\n    }\n    if (route.path && route.matcher) {\n      throw new Error(\n          `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n    }\n    if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n    }\n    if (route.path === void 0 && route.matcher === void 0) {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': routes must have either a path or a matcher specified`);\n    }\n    if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n      throw new Error(\n          `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 =\n          `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n      throw new Error(`Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${\n          route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n    }\n    if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n      throw new Error(`Invalid configuration of route '${\n          fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n    }\n  }\n  if (route.children) {\n    validateConfig(route.children, fullPath);\n  }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n  if (!currentRoute) {\n    return parentPath;\n  }\n  if (!parentPath && !currentRoute.path) {\n    return '';\n  } else if (parentPath && !currentRoute.path) {\n    return `${parentPath}/`;\n  } else if (!parentPath && currentRoute.path) {\n    return currentRoute.path;\n  } else {\n    return `${parentPath}/${currentRoute.path}`;\n  }\n}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n  const children = r.children && r.children.map(standardizeConfig);\n  const c = children ? {...r, children} : {...r};\n  if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n    c.component = EmptyOutletComponent;\n  }\n  return c;\n}\n\n/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */\nexport function getOutlet(route: Route): string {\n  return route.outlet || PRIMARY_OUTLET;\n}\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 */\nexport function sortByMatchingOutlets(routes: Routes, outletName: string): Routes {\n  const sortedConfig = routes.filter(r => getOutlet(r) === outletName);\n  sortedConfig.push(...routes.filter(r => getOutlet(r) !== outletName));\n  return sortedConfig;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from '../config';\nimport {defaultUrlMatcher, PRIMARY_OUTLET} from '../shared';\nimport {UrlSegment, UrlSegmentGroup} from '../url_tree';\n\nimport {forEach} from './collection';\nimport {getOutlet} from './config';\n\nexport interface MatchResult {\n  matched: boolean;\n  consumedSegments: UrlSegment[];\n  lastChild: number;\n  parameters: {[k: string]: string};\n  positionalParamSegments: {[k: string]: UrlSegment};\n}\n\nconst noMatch: MatchResult = {\n  matched: false,\n  consumedSegments: [],\n  lastChild: 0,\n  parameters: {},\n  positionalParamSegments: {}\n};\n\nexport function match(\n    segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): MatchResult {\n  if (route.path === '') {\n    if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n      return {...noMatch};\n    }\n\n    return {\n      matched: true,\n      consumedSegments: [],\n      lastChild: 0,\n      parameters: {},\n      positionalParamSegments: {}\n    };\n  }\n\n  const matcher = route.matcher || defaultUrlMatcher;\n  const res = matcher(segments, segmentGroup, route);\n  if (!res) return {...noMatch};\n\n  const posParams: {[n: string]: string} = {};\n  forEach(res.posParams!, (v: UrlSegment, k: string) => {\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\n  return {\n    matched: true,\n    consumedSegments: res.consumed,\n    lastChild: res.consumed.length,\n    // TODO(atscott): investigate combining parameters and positionalParamSegments\n    parameters,\n    positionalParamSegments: res.posParams ?? {}\n  };\n}\n\nexport function split(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    config: Route[], relativeLinkResolution: 'legacy'|'corrected' = 'corrected') {\n  if (slicedSegments.length > 0 &&\n      containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        consumedSegments,\n        createChildrenForEmptyPaths(\n            segmentGroup, consumedSegments, config,\n            new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments: []};\n  }\n\n  if (slicedSegments.length === 0 &&\n      containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        segmentGroup.segments,\n        addEmptyPathsToChildrenIfNeeded(\n            segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children,\n            relativeLinkResolution));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments};\n  }\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}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    routes: Route[], children: {[name: string]: UrlSegmentGroup},\n    relativeLinkResolution: 'legacy'|'corrected'): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\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      } else {\n        s._segmentIndexShift = consumedSegments.length;\n      }\n      res[getOutlet(r)] = s;\n    }\n  }\n  return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], routes: Route[],\n    primarySegment: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  res[PRIMARY_OUTLET] = primarySegment;\n  primarySegment._sourceSegment = segmentGroup;\n  primarySegment._segmentIndexShift = consumedSegments.length;\n\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}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(\n      r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathMatches(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nfunction emptyPathMatch(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], r: Route): boolean {\n  if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n    return false;\n  }\n\n  return r.path === '';\n}\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 */\nexport function isImmediateMatch(\n    route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[], outlet: string): boolean {\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}\n\nexport function noLeftoversInUrl(\n    segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string): boolean {\n  return segments.length === 0 && !segmentGroup.children[outlet];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModuleRef} from '@angular/core';\nimport {EmptyError, from, Observable, Observer, of} from 'rxjs';\nimport {catchError, concatMap, first, last, map, mergeMap, scan, tap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {CanLoadFn} from './interfaces';\nimport {prioritizedGuardValue} from './operators/prioritized_guard_value';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {navigationCancelingError, Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {forEach, wrapIntoObservable} from './utils/collection';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {isImmediateMatch, match, noLeftoversInUrl, split} from './utils/config_matching';\nimport {isCanLoad, isFunction, isUrlTree} from './utils/type_guards';\n\nclass NoMatch {\n  public segmentGroup: UrlSegmentGroup|null;\n\n  constructor(segmentGroup?: UrlSegmentGroup) {\n    this.segmentGroup = segmentGroup || null;\n  }\n}\n\nclass AbsoluteRedirect {\n  constructor(public urlTree: UrlTree) {}\n}\n\nfunction noMatch(segmentGroup: UrlSegmentGroup): Observable<UrlSegmentGroup> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new NoMatch(segmentGroup)));\n}\n\nfunction absoluteRedirect(newTree: UrlTree): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new AbsoluteRedirect(newTree)));\n}\n\nfunction namedOutletsRedirect(redirectTo: string): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new Error(\n          `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\n\nfunction canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n  return new Observable<LoadedRouterConfig>(\n      (obs: Observer<LoadedRouterConfig>) => obs.error(\n          navigationCancelingError(`Cannot load children because the guard of the route \"path: '${\n              route.path}'\" returned false`)));\n}\n\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    urlTree: UrlTree, config: Routes): Observable<UrlTree> {\n  return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\n\nclass ApplyRedirects {\n  private allowRedirects: boolean = true;\n  private ngModule: NgModuleRef<any>;\n\n  constructor(\n      moduleInjector: Injector, private configLoader: RouterConfigLoader,\n      private urlSerializer: UrlSerializer, private urlTree: UrlTree, private config: Routes) {\n    this.ngModule = moduleInjector.get(NgModuleRef);\n  }\n\n  apply(): Observable<UrlTree> {\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\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    const urlTrees$ = expanded$.pipe(map((rootSegmentGroup: UrlSegmentGroup) => {\n      return this.createUrlTree(\n          squashSegmentGroup(rootSegmentGroup), this.urlTree.queryParams, this.urlTree.fragment);\n    }));\n    return urlTrees$.pipe(catchError((e: any) => {\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\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private match(tree: UrlTree): Observable<UrlTree> {\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n    const mapped$ = expanded$.pipe(map((rootSegmentGroup: UrlSegmentGroup) => {\n      return this.createUrlTree(\n          squashSegmentGroup(rootSegmentGroup), tree.queryParams, tree.fragment);\n    }));\n    return mapped$.pipe(catchError((e: any): Observable<UrlTree> => {\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private noMatchError(e: NoMatch): any {\n    return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n  }\n\n  private createUrlTree(rootCandidate: UrlSegmentGroup, queryParams: Params, fragment: string|null):\n      UrlTree {\n    const root = rootCandidate.segments.length > 0 ?\n        new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate}) :\n        rootCandidate;\n    return new UrlTree(root, queryParams, fragment);\n  }\n\n  private expandSegmentGroup(\n      ngModule: NgModuleRef<any>, routes: Route[], segmentGroup: UrlSegmentGroup,\n      outlet: string): Observable<UrlSegmentGroup> {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.expandChildren(ngModule, routes, segmentGroup)\n          .pipe(map((children: any) => new UrlSegmentGroup([], children)));\n    }\n\n    return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n  }\n\n  // Recursively expand segment groups for all the child outlets\n  private expandChildren(\n      ngModule: NgModuleRef<any>, routes: Route[],\n      segmentGroup: UrlSegmentGroup): Observable<{[name: string]: UrlSegmentGroup}> {\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: string[] = [];\n    for (const child of Object.keys(segmentGroup.children)) {\n      if (child === 'primary') {\n        childOutlets.unshift(child);\n      } else {\n        childOutlets.push(child);\n      }\n    }\n\n    return from(childOutlets)\n        .pipe(\n            concatMap(childOutlet => {\n              const child = segmentGroup.children[childOutlet];\n              // Sort the routes so routes with outlets that match the segment appear\n              // first, followed by routes for other outlets, which might match if they have an\n              // empty path.\n              const sortedRoutes = sortByMatchingOutlets(routes, childOutlet);\n              return this.expandSegmentGroup(ngModule, sortedRoutes, child, childOutlet)\n                  .pipe(map(s => ({segment: s, outlet: childOutlet})));\n            }),\n            scan(\n                (children, expandedChild) => {\n                  children[expandedChild.outlet] = expandedChild.segment;\n                  return children;\n                },\n                {} as {[outlet: string]: UrlSegmentGroup}),\n            last(),\n        );\n  }\n\n  private expandSegment(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[],\n      segments: UrlSegment[], outlet: string,\n      allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    return from(routes).pipe(\n        concatMap((r: any) => {\n          const expanded$ = this.expandSegmentAgainstRoute(\n              ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n          return expanded$.pipe(catchError((e: any) => {\n            if (e instanceof NoMatch) {\n              return of(null);\n            }\n            throw e;\n          }));\n        }),\n        first((s): s is UrlSegmentGroup => !!s), catchError((e: any, _: any) => {\n          if (e instanceof EmptyError || e.name === 'EmptyError') {\n            if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n              return of(new UrlSegmentGroup([], {}));\n            }\n            throw new NoMatch(segmentGroup);\n          }\n          throw e;\n        }));\n  }\n\n  private expandSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      paths: UrlSegment[], outlet: string, allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    if (!isImmediateMatch(route, segmentGroup, paths, outlet)) {\n      return noMatch(segmentGroup);\n    }\n\n    if (route.redirectTo === undefined) {\n      return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths, outlet);\n    }\n\n    if (allowRedirects && this.allowRedirects) {\n      return this.expandSegmentAgainstRouteUsingRedirect(\n          ngModule, segmentGroup, routes, route, paths, outlet);\n    }\n\n    return noMatch(segmentGroup);\n  }\n\n  private expandSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      return this.expandWildCardWithParamsAgainstRouteUsingRedirect(\n          ngModule, routes, route, outlet);\n    }\n\n    return this.expandRegularSegmentAgainstRouteUsingRedirect(\n        ngModule, segmentGroup, routes, route, segments, outlet);\n  }\n\n  private expandWildCardWithParamsAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, routes: Route[], route: Route,\n      outlet: string): Observable<UrlSegmentGroup> {\n    const newTree = this.applyRedirectCommands([], route.redirectTo!, {});\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      const group = new UrlSegmentGroup(newSegments, {});\n      return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n    }));\n  }\n\n  private expandRegularSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    const {matched, consumedSegments, lastChild, positionalParamSegments} =\n        match(segmentGroup, route, segments);\n    if (!matched) return noMatch(segmentGroup);\n\n    const newTree =\n        this.applyRedirectCommands(consumedSegments, route.redirectTo!, positionalParamSegments);\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      return this.expandSegment(\n          ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet,\n          false);\n    }));\n  }\n\n  private matchSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, rawSegmentGroup: UrlSegmentGroup, route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      if (route.loadChildren) {\n        const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                                              this.configLoader.load(ngModule.injector, route);\n        return loaded$.pipe(map((cfg: LoadedRouterConfig) => {\n          route._loadedConfig = cfg;\n          return new UrlSegmentGroup(segments, {});\n        }));\n      }\n\n      return of(new UrlSegmentGroup(segments, {}));\n    }\n\n    const {matched, consumedSegments, lastChild} = match(rawSegmentGroup, route, segments);\n    if (!matched) return noMatch(rawSegmentGroup);\n\n    const rawSlicedSegments = segments.slice(lastChild);\n    const childConfig$ = this.getChildConfig(ngModule, route, segments);\n\n    return childConfig$.pipe(mergeMap((routerConfig: LoadedRouterConfig) => {\n      const childModule = routerConfig.module;\n      const childConfig = routerConfig.routes;\n\n      const {segmentGroup: splitSegmentGroup, slicedSegments} =\n          split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n      // See comment on the other call to `split` about why this is necessary.\n      const segmentGroup =\n          new UrlSegmentGroup(splitSegmentGroup.segments, splitSegmentGroup.children);\n\n      if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n        const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n        return expanded$.pipe(\n            map((children: any) => new UrlSegmentGroup(consumedSegments, children)));\n      }\n\n      if (childConfig.length === 0 && slicedSegments.length === 0) {\n        return of(new UrlSegmentGroup(consumedSegments, {}));\n      }\n\n      const matchedOnOutlet = getOutlet(route) === outlet;\n      const expanded$ = this.expandSegment(\n          childModule, segmentGroup, childConfig, slicedSegments,\n          matchedOnOutlet ? PRIMARY_OUTLET : outlet, true);\n      return expanded$.pipe(\n          map((cs: UrlSegmentGroup) =>\n                  new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n    }));\n  }\n\n  private getChildConfig(ngModule: NgModuleRef<any>, route: Route, segments: UrlSegment[]):\n      Observable<LoadedRouterConfig> {\n    if (route.children) {\n      // The children belong to the same module\n      return of(new LoadedRouterConfig(route.children, ngModule));\n    }\n\n    if (route.loadChildren) {\n      // lazy children belong to the loaded module\n      if (route._loadedConfig !== undefined) {\n        return of(route._loadedConfig);\n      }\n\n      return this.runCanLoadGuards(ngModule.injector, route, segments)\n          .pipe(mergeMap((shouldLoadResult: boolean) => {\n            if (shouldLoadResult) {\n              return this.configLoader.load(ngModule.injector, route)\n                  .pipe(map((cfg: LoadedRouterConfig) => {\n                    route._loadedConfig = cfg;\n                    return cfg;\n                  }));\n            }\n            return canLoadFails(route);\n          }));\n    }\n\n    return of(new LoadedRouterConfig([], ngModule));\n  }\n\n  private runCanLoadGuards(moduleInjector: Injector, route: Route, segments: UrlSegment[]):\n      Observable<boolean> {\n    const canLoad = route.canLoad;\n    if (!canLoad || canLoad.length === 0) return of(true);\n\n    const canLoadObservables = canLoad.map((injectionToken: any) => {\n      const guard = moduleInjector.get(injectionToken);\n      let guardVal;\n      if (isCanLoad(guard)) {\n        guardVal = guard.canLoad(route, segments);\n      } else if (isFunction<CanLoadFn>(guard)) {\n        guardVal = guard(route, segments);\n      } else {\n        throw new Error('Invalid CanLoad guard');\n      }\n      return wrapIntoObservable(guardVal);\n    });\n\n    return of(canLoadObservables)\n        .pipe(\n            prioritizedGuardValue(),\n            tap((result: UrlTree|boolean) => {\n              if (!isUrlTree(result)) return;\n\n              const error: Error&{url?: UrlTree} = navigationCancelingError(\n                  `Redirecting to \"${this.urlSerializer.serialize(result)}\"`);\n              error.url = result;\n              throw error;\n            }),\n            map(result => result === true),\n        );\n  }\n\n  private lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n    let res: UrlSegment[] = [];\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\n      if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n        return namedOutletsRedirect(route.redirectTo!);\n      }\n\n      c = c.children[PRIMARY_OUTLET];\n    }\n  }\n\n  private applyRedirectCommands(\n      segments: UrlSegment[], redirectTo: string, posParams: {[k: string]: UrlSegment}): UrlTree {\n    return this.applyRedirectCreatreUrlTree(\n        redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n  }\n\n  private applyRedirectCreatreUrlTree(\n      redirectTo: string, urlTree: UrlTree, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlTree {\n    const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n    return new UrlTree(\n        newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n        urlTree.fragment);\n  }\n\n  private createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n    const res: Params = {};\n    forEach(redirectToParams, (v: any, k: string) => {\n      const copySourceValue = typeof v === 'string' && v.startsWith(':');\n      if (copySourceValue) {\n        const sourceName = v.substring(1);\n        res[k] = actualParams[sourceName];\n      } else {\n        res[k] = v;\n      }\n    });\n    return res;\n  }\n\n  private createSegmentGroup(\n      redirectTo: string, group: UrlSegmentGroup, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegmentGroup {\n    const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n    let children: {[n: string]: UrlSegmentGroup} = {};\n    forEach(group.children, (child: UrlSegmentGroup, name: string) => {\n      children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n    });\n\n    return new UrlSegmentGroup(updatedSegments, children);\n  }\n\n  private createSegments(\n      redirectTo: string, redirectToSegments: UrlSegment[], actualSegments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegment[] {\n    return redirectToSegments.map(\n        s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n                                      this.findOrReturn(s, actualSegments));\n  }\n\n  private findPosParam(\n      redirectTo: string, redirectToUrlSegment: UrlSegment,\n      posParams: {[k: string]: UrlSegment}): UrlSegment {\n    const pos = posParams[redirectToUrlSegment.path.substring(1)];\n    if (!pos)\n      throw new Error(\n          `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n    return pos;\n  }\n\n  private findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\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 * 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: UrlSegmentGroup): UrlSegmentGroup {\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\n  return s;\n}\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: UrlSegmentGroup): UrlSegmentGroup {\n  const newChildren = {} as any;\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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {applyRedirects as applyRedirectsFn} from '../apply_redirects';\nimport {Routes} from '../config';\nimport {NavigationTransition} from '../router';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    config: Routes): MonoTypeOperatorFunction<NavigationTransition> {\n  return switchMap(\n      t => applyRedirectsFn(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n               .pipe(map(urlAfterRedirects => ({...t, urlAfterRedirects}))));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\nimport {LoadedRouterConfig, RunGuardsAndResolvers} from '../config';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {ActivatedRouteSnapshot, equalParamsAndUrlSegments, RouterStateSnapshot} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {forEach, shallowEqual} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport class CanActivate {\n  readonly route: ActivatedRouteSnapshot;\n  constructor(public path: ActivatedRouteSnapshot[]) {\n    this.route = this.path[this.path.length - 1];\n  }\n}\n\nexport class CanDeactivate {\n  constructor(public component: Object|null, public route: ActivatedRouteSnapshot) {}\n}\n\nexport declare type Checks = {\n  canDeactivateChecks: CanDeactivate[],\n  canActivateChecks: CanActivate[],\n};\n\nexport function getAllRouteGuards(\n    future: RouterStateSnapshot, curr: RouterStateSnapshot,\n    parentContexts: ChildrenOutletContexts) {\n  const futureRoot = future._root;\n  const currRoot = curr ? curr._root : null;\n\n  return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(p: ActivatedRouteSnapshot):\n    {node: ActivatedRouteSnapshot, guards: any[]}|null {\n  const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n  if (!canActivateChild || canActivateChild.length === 0) return null;\n  return {node: p, guards: canActivateChild};\n}\n\nexport function getToken(\n    token: any, snapshot: ActivatedRouteSnapshot, moduleInjector: Injector): any {\n  const config = getClosestLoadedConfig(snapshot);\n  const injector = config ? config.module.injector : moduleInjector;\n  return injector.get(token);\n}\n\nfunction getClosestLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  if (!snapshot) return null;\n\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n  }\n\n  return null;\n}\n\nfunction getChildRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>|null,\n    contexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[], checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const prevChildren = nodeChildrenAsMap(currNode);\n\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\n  // Process any children left from the current route (not active for the future route)\n  forEach(\n      prevChildren,\n      (v: TreeNode<ActivatedRouteSnapshot>, k: string) =>\n          deactivateRouteAndItsChildren(v, contexts!.getContext(k), checks));\n\n  return checks;\n}\n\nfunction getRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>,\n    parentContexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[],\n    checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const future = futureNode.value;\n  const curr = currNode ? currNode.value : null;\n  const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n  // reusing the node\n  if (curr && future.routeConfig === curr.routeConfig) {\n    const shouldRun =\n        shouldRunGuardsAndResolvers(curr, future, future.routeConfig!.runGuardsAndResolvers);\n    if (shouldRun) {\n      checks.canActivateChecks.push(new CanActivate(futurePath));\n    } else {\n      // we need to set the data\n      future.data = curr.data;\n      future._resolvedData = curr._resolvedData;\n    }\n\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(\n          futureNode, currNode, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n    }\n\n    if (shouldRun && context && context.outlet && context.outlet.isActivated) {\n      checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));\n    }\n  } else {\n    if (curr) {\n      deactivateRouteAndItsChildren(currNode, context, checks);\n    }\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\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n    }\n  }\n\n  return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n    curr: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,\n    mode: RunGuardsAndResolvers|undefined): boolean {\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\n    case 'pathParamsOrQueryParamsChange':\n      return !equalPath(curr.url, future.url) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'always':\n      return true;\n\n    case 'paramsOrQueryParamsChange':\n      return !equalParamsAndUrlSegments(curr, future) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'paramsChange':\n    default:\n      return !equalParamsAndUrlSegments(curr, future);\n  }\n}\n\nfunction deactivateRouteAndItsChildren(\n    route: TreeNode<ActivatedRouteSnapshot>, context: OutletContext|null, checks: Checks): void {\n  const children = nodeChildrenAsMap(route);\n  const r = route.value;\n\n  forEach(children, (node: TreeNode<ActivatedRouteSnapshot>, childName: string) => {\n    if (!r.component) {\n      deactivateRouteAndItsChildren(node, context, checks);\n    } else if (context) {\n      deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n    } else {\n      deactivateRouteAndItsChildren(node, null, checks);\n    }\n  });\n\n  if (!r.component) {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  } else if (context && context.outlet && context.outlet.isActivated) {\n    checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n  } else {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {concat, defer, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, first, map, mergeMap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn} from '../interfaces';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {CanActivate, CanDeactivate, getCanActivateChild, getToken} from '../utils/preactivation';\nimport {isBoolean, isCanActivate, isCanActivateChild, isCanDeactivate, isFunction} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(moduleInjector: Injector, forwardEvent?: (evt: Event) => void):\n    MonoTypeOperatorFunction<NavigationTransition> {\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\n    return runCanDeactivateChecks(\n               canDeactivateChecks, targetSnapshot!, currentSnapshot, moduleInjector)\n        .pipe(\n            mergeMap(canDeactivate => {\n              return canDeactivate && isBoolean(canDeactivate) ?\n                  runCanActivateChecks(\n                      targetSnapshot!, canActivateChecks, moduleInjector, forwardEvent) :\n                  of(canDeactivate);\n            }),\n            map(guardsResult => ({...t, guardsResult})));\n  });\n}\n\nfunction runCanDeactivateChecks(\n    checks: CanDeactivate[], futureRSS: RouterStateSnapshot, currRSS: RouterStateSnapshot,\n    moduleInjector: Injector) {\n  return from(checks).pipe(\n      mergeMap(\n          check =>\n              runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\n\nfunction runCanActivateChecks(\n    futureSnapshot: RouterStateSnapshot, checks: CanActivate[], moduleInjector: Injector,\n    forwardEvent?: (evt: Event) => void) {\n  return from(checks).pipe(\n      concatMap((check: CanActivate) => {\n        return concat(\n            fireChildActivationStart(check.route.parent, forwardEvent),\n            fireActivationStart(check.route, forwardEvent),\n            runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n            runCanActivate(futureSnapshot, check.route, moduleInjector));\n      }),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\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(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ActivationStart(snapshot));\n  }\n  return of(true);\n}\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(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ChildActivationStart(snapshot));\n  }\n  return of(true);\n}\n\nfunction runCanActivate(\n    futureRSS: RouterStateSnapshot, futureARS: ActivatedRouteSnapshot,\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n  if (!canActivate || canActivate.length === 0) return of(true);\n\n  const canActivateObservables = canActivate.map((c: any) => {\n    return defer(() => {\n      const guard = getToken(c, futureARS, moduleInjector);\n      let observable;\n      if (isCanActivate(guard)) {\n        observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n      } else if (isFunction<CanActivateFn>(guard)) {\n        observable = wrapIntoObservable(guard(futureARS, futureRSS));\n      } else {\n        throw new Error('Invalid CanActivate guard');\n      }\n      return observable.pipe(first());\n    });\n  });\n  return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n    futureRSS: RouterStateSnapshot, path: ActivatedRouteSnapshot[],\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const futureARS = path[path.length - 1];\n\n  const canActivateChildGuards = path.slice(0, path.length - 1)\n                                     .reverse()\n                                     .map(p => getCanActivateChild(p))\n                                     .filter(_ => _ !== null);\n\n  const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n    return defer(() => {\n      const guardsMapped = d.guards.map((c: any) => {\n        const guard = getToken(c, d.node, moduleInjector);\n        let observable;\n        if (isCanActivateChild(guard)) {\n          observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n        } else if (isFunction<CanActivateChildFn>(guard)) {\n          observable = wrapIntoObservable(guard(futureARS, futureRSS));\n        } else {\n          throw new Error('Invalid CanActivateChild guard');\n        }\n        return observable.pipe(first());\n      });\n      return of(guardsMapped).pipe(prioritizedGuardValue());\n    });\n  });\n  return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n    component: Object|null, currARS: ActivatedRouteSnapshot, currRSS: RouterStateSnapshot,\n    futureRSS: RouterStateSnapshot, moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n  if (!canDeactivate || canDeactivate.length === 0) return of(true);\n  const canDeactivateObservables = canDeactivate.map((c: any) => {\n    const guard = getToken(c, currARS, moduleInjector);\n    let observable;\n    if (isCanDeactivate(guard)) {\n      observable = wrapIntoObservable(guard.canDeactivate(component!, currARS, currRSS, futureRSS));\n    } else if (isFunction<CanDeactivateFn<any>>(guard)) {\n      observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n    } else {\n      throw new Error('Invalid CanDeactivate guard');\n    }\n    return observable.pipe(first());\n  });\n  return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {Observable, Observer, of} from 'rxjs';\n\nimport {Data, ResolveData, Route, Routes} from './config';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, ParamsInheritanceStrategy, RouterStateSnapshot} from './router_state';\nimport {PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {last} from './utils/collection';\nimport {getOutlet, sortByMatchingOutlets} from './utils/config';\nimport {isImmediateMatch, match, noLeftoversInUrl, split} from './utils/config_matching';\nimport {TreeNode} from './utils/tree';\n\nclass NoMatch {}\n\nfunction newObservableError(e: unknown): Observable<RouterStateSnapshot> {\n  // TODO(atscott): This pattern is used throughout the router code and can be `throwError` instead.\n  return new Observable<RouterStateSnapshot>((obs: Observer<RouterStateSnapshot>) => obs.error(e));\n}\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Routes, urlTree: UrlTree, url: string,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n    relativeLinkResolution: 'legacy'|'corrected' = 'legacy'): Observable<RouterStateSnapshot> {\n  try {\n    const result = new Recognizer(\n                       rootComponentType, config, urlTree, url, paramsInheritanceStrategy,\n                       relativeLinkResolution)\n                       .recognize();\n    if (result === null) {\n      return newObservableError(new NoMatch());\n    } else {\n      return of(result);\n    }\n  } catch (e) {\n    // Catch the potential error from recognize due to duplicate outlet matches and return as an\n    // `Observable` error instead.\n    return newObservableError(e);\n  }\n}\n\nexport class Recognizer {\n  constructor(\n      private rootComponentType: Type<any>|null, private config: Routes, private urlTree: UrlTree,\n      private url: string, private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n      private relativeLinkResolution: 'legacy'|'corrected') {}\n\n  recognize(): RouterStateSnapshot|null {\n    const rootSegmentGroup =\n        split(\n            this.urlTree.root, [], [], this.config.filter(c => c.redirectTo === undefined),\n            this.relativeLinkResolution)\n            .segmentGroup;\n\n    const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n    if (children === null) {\n      return null;\n    }\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(\n        [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment,\n        {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});\n\n    const rootNode = new TreeNode<ActivatedRouteSnapshot>(root, children);\n    const routeState = new RouterStateSnapshot(this.url, rootNode);\n    this.inheritParamsAndData(routeState._root);\n    return routeState;\n  }\n\n  inheritParamsAndData(routeNode: TreeNode<ActivatedRouteSnapshot>): void {\n    const route = routeNode.value;\n\n    const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n    route.params = Object.freeze(i.params);\n    route.data = Object.freeze(i.data);\n\n    routeNode.children.forEach(n => this.inheritParamsAndData(n));\n  }\n\n  processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):\n      TreeNode<ActivatedRouteSnapshot>[]|null {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.processChildren(config, segmentGroup);\n    }\n\n    return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n  }\n\n  /**\n   * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if\n   * we cannot find a match for _any_ of the children.\n   *\n   * @param config - The `Routes` to match against\n   * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the\n   *     config.\n   */\n  processChildren(config: Route[], segmentGroup: UrlSegmentGroup):\n      TreeNode<ActivatedRouteSnapshot>[]|null {\n    const children: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n    for (const childOutlet of Object.keys(segmentGroup.children)) {\n      const child = segmentGroup.children[childOutlet];\n      // Sort the config so that routes with outlets that match the one being activated appear\n      // first, followed by routes for other outlets, which might match if they have an empty path.\n      const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n      const outletChildren = this.processSegmentGroup(sortedConfig, child, childOutlet);\n      if (outletChildren === null) {\n        // Configs must match all segment children so because we did not find a match for this\n        // outlet, return `null`.\n        return null;\n      }\n      children.push(...outletChildren);\n    }\n    // Because we may have matched two outlets to the same empty path segment, we can have multiple\n    // activated results for the same outlet. We should merge the children of these results so the\n    // final return value is only one `TreeNode` per outlet.\n    const mergedChildren = mergeEmptyPathMatches(children);\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      // This should really never happen - we are only taking the first match for each outlet and\n      // merge the empty path matches.\n      checkOutletNameUniqueness(mergedChildren);\n    }\n    sortActivatedRouteSnapshots(mergedChildren);\n    return mergedChildren;\n  }\n\n  processSegment(\n      config: Route[], segmentGroup: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[]|null {\n    for (const r of config) {\n      const children = this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n      if (children !== null) {\n        return children;\n      }\n    }\n    if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n      return [];\n    }\n\n    return null;\n  }\n\n  processSegmentAgainstRoute(\n      route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[]|null {\n    if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet)) return null;\n\n    let snapshot: ActivatedRouteSnapshot;\n    let consumedSegments: UrlSegment[] = [];\n    let rawSlicedSegments: UrlSegment[] = [];\n\n    if (route.path === '**') {\n      const params = segments.length > 0 ? last(segments)!.parameters : {};\n      snapshot = new ActivatedRouteSnapshot(\n          segments, params, Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment,\n          getData(route), getOutlet(route), route.component!, route,\n          getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length,\n          getResolve(route));\n    } else {\n      const result = match(rawSegment, route, segments);\n      if (!result.matched) {\n        return null;\n      }\n      consumedSegments = result.consumedSegments;\n      rawSlicedSegments = segments.slice(result.lastChild);\n\n      snapshot = new ActivatedRouteSnapshot(\n          consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),\n          this.urlTree.fragment, getData(route), getOutlet(route), route.component!, route,\n          getSourceSegmentGroup(rawSegment),\n          getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n    }\n\n    const childConfig: Route[] = getChildConfig(route);\n\n    const {segmentGroup, slicedSegments} = split(\n        rawSegment, consumedSegments, rawSlicedSegments,\n        // Filter out routes with redirectTo because we are trying to create activated route\n        // snapshots and don't handle redirects here. That should have been done in\n        // `applyRedirects`.\n        childConfig.filter(c => c.redirectTo === undefined), this.relativeLinkResolution);\n\n    if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n      const children = this.processChildren(childConfig, segmentGroup);\n      if (children === null) {\n        return null;\n      }\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n    }\n\n    if (childConfig.length === 0 && slicedSegments.length === 0) {\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, [])];\n    }\n\n    const matchedOnOutlet = getOutlet(route) === outlet;\n    // If we matched a config due to empty path match on a different outlet, we need to continue\n    // passing the current outlet for the segment rather than switch to PRIMARY.\n    // Note that we switch to primary when we have a match because outlet configs look like this:\n    // {path: 'a', outlet: 'a', children: [\n    //  {path: 'b', component: B},\n    //  {path: 'c', component: C},\n    // ]}\n    // Notice that the children of the named outlet are configured with the primary outlet\n    const children = this.processSegment(\n        childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet);\n    if (children === null) {\n      return null;\n    }\n    return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n  }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  nodes.sort((a, b) => {\n    if (a.value.outlet === PRIMARY_OUTLET) return -1;\n    if (b.value.outlet === PRIMARY_OUTLET) return 1;\n    return a.value.outlet.localeCompare(b.value.outlet);\n  });\n}\n\nfunction getChildConfig(route: Route): Route[] {\n  if (route.children) {\n    return route.children;\n  }\n\n  if (route.loadChildren) {\n    return route._loadedConfig!.routes;\n  }\n\n  return [];\n}\n\nfunction hasEmptyPathConfig(node: TreeNode<ActivatedRouteSnapshot>) {\n  const config = node.value.routeConfig;\n  return config && config.path === '' && config.redirectTo === undefined;\n}\n\n/**\n * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with the\n * children from each duplicate. This is necessary because different outlets can match a single\n * empty path route config and the results need to then be merged.\n */\nfunction mergeEmptyPathMatches(nodes: Array<TreeNode<ActivatedRouteSnapshot>>):\n    Array<TreeNode<ActivatedRouteSnapshot>> {\n  const result: Array<TreeNode<ActivatedRouteSnapshot>> = [];\n  // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n  const mergedNodes: Set<TreeNode<ActivatedRouteSnapshot>> = new Set();\n\n  for (const node of nodes) {\n    if (!hasEmptyPathConfig(node)) {\n      result.push(node);\n      continue;\n    }\n\n    const duplicateEmptyPathNode =\n        result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n    if (duplicateEmptyPathNode !== undefined) {\n      duplicateEmptyPathNode.children.push(...node.children);\n      mergedNodes.add(duplicateEmptyPathNode);\n    } else {\n      result.push(node);\n    }\n  }\n  // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n  // by also merging those children. This is necessary when there are multiple empty path configs in\n  // a row. Put another way: whenever we combine children of two nodes, we need to also check if any\n  // of those children can be combined into a single node as well.\n  for (const mergedNode of mergedNodes) {\n    const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n    result.push(new TreeNode(mergedNode.value, mergedChildren));\n  }\n  return result.filter(n => !mergedNodes.has(n));\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  const names: {[k: string]: ActivatedRouteSnapshot} = {};\n  nodes.forEach(n => {\n    const routeWithSameOutletName = names[n.value.outlet];\n    if (routeWithSameOutletName) {\n      const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n      const c = n.value.url.map(s => s.toString()).join('/');\n      throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n    }\n    names[n.value.outlet] = n.value;\n  });\n}\n\nfunction getSourceSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n  let s = segmentGroup;\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n  }\n  return s;\n}\n\nfunction getPathIndexShift(segmentGroup: UrlSegmentGroup): number {\n  let s = segmentGroup;\n  let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n    res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  }\n  return res - 1;\n}\n\nfunction getData(route: Route): Data {\n  return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n  return route.resolve || {};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../config';\nimport {recognize as recognizeFn} from '../recognize';\nimport {NavigationTransition} from '../router';\nimport {UrlTree} from '../url_tree';\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Route[], serializer: (url: UrlTree) => string,\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    relativeLinkResolution: 'legacy'|'corrected'): MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(\n      t => recognizeFn(\n               rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects),\n               paramsInheritanceStrategy, relativeLinkResolution)\n               .pipe(map(targetSnapshot => ({...t, targetSnapshot}))));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {EMPTY, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, map, mergeMap, takeLast, tap} from 'rxjs/operators';\n\nimport {ResolveData} from '../config';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, RouterStateSnapshot} from '../router_state';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {getToken} from '../utils/preactivation';\n\nexport function resolveData(\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    moduleInjector: Injector): MonoTypeOperatorFunction<NavigationTransition> {\n  return mergeMap(t => {\n    const {targetSnapshot, guards: {canActivateChecks}} = t;\n\n    if (!canActivateChecks.length) {\n      return of(t);\n    }\n    let canActivateChecksResolved = 0;\n    return from(canActivateChecks)\n        .pipe(\n            concatMap(\n                check => runResolve(\n                    check.route, targetSnapshot!, paramsInheritanceStrategy, moduleInjector)),\n            tap(() => canActivateChecksResolved++),\n            takeLast(1),\n            mergeMap(_ => canActivateChecksResolved === canActivateChecks.length ? of(t) : EMPTY),\n        );\n  });\n}\n\nfunction runResolve(\n    futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    paramsInheritanceStrategy: 'emptyOnly'|'always', moduleInjector: Injector) {\n  const resolve = futureARS._resolve;\n  return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n      .pipe(map((resolvedData: any) => {\n        futureARS._resolvedData = resolvedData;\n        futureARS.data = {\n          ...futureARS.data,\n          ...inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve\n        };\n        return null;\n      }));\n}\n\nfunction resolveNode(\n    resolve: ResolveData, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const keys = Object.keys(resolve);\n  if (keys.length === 0) {\n    return of({});\n  }\n  const data: {[k: string]: any} = {};\n  return from(keys).pipe(\n      mergeMap(\n          (key: string) => getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n                               .pipe(tap((value: any) => {\n                                 data[key] = value;\n                               }))),\n      takeLast(1),\n      mergeMap(() => {\n        // Ensure all resolvers returned values, otherwise don't emit any \"next\" and just complete\n        // the chain which will cancel navigation\n        if (Object.keys(data).length === keys.length) {\n          return of(data);\n        }\n        return EMPTY;\n      }),\n  );\n}\n\nfunction getResolver(\n    injectionToken: any, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const resolver = getToken(injectionToken, futureARS, moduleInjector);\n  return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n                            wrapIntoObservable(resolver(futureARS, futureRSS));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {from, MonoTypeOperatorFunction, ObservableInput, of} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\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 */\nexport function switchTap<T>(next: (x: T) => void|ObservableInput<any>):\n    MonoTypeOperatorFunction<T> {\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 * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n  contexts: Map<string, OutletContext>,\n  componentRef: ComponentRef<any>,\n  route: TreeNode<ActivatedRoute>,\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nexport abstract class RouteReuseStrategy {\n  /** Determines if this route (and its subtree) should be detached to be reused later */\n  abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n  /**\n   * Stores the detached route.\n   *\n   * Storing a `null` value should erase the previously stored value.\n   */\n  abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;\n\n  /** Determines if this route (and its subtree) should be reattached */\n  abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n  /** Retrieves the previously stored route */\n  abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null;\n\n  /** Determines if a route should be reused */\n  abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\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 */\nexport abstract class BaseRouteReuseStrategy implements RouteReuseStrategy {\n  /**\n   * Whether the given route should detach for later reuse.\n   * Always returns false for `BaseRouteReuseStrategy`.\n   * */\n  shouldDetach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\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: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n\n  /** Returns `false`, meaning the route (and its subtree) is never reattached */\n  shouldAttach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /** Returns `null` because this strategy does not store routes for later re-use. */\n  retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null {\n    return null;\n  }\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: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n    return future.routeConfig === curr.routeConfig;\n  }\n}\n\nexport class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, InjectFlags, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';\nimport {ConnectableObservable, from, Observable, of, Subject} from 'rxjs';\nimport {catchError, map, mergeMap, refCount, tap} from 'rxjs/operators';\n\nimport {LoadChildren, LoadedRouterConfig, Route} from './config';\nimport {flatten, wrapIntoObservable} from './utils/collection';\nimport {standardizeConfig} from './utils/config';\n\n/**\n * The [DI token](guide/glossary/#di-token) for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `RouterModule.forChild()`, `provideRoutes`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>('ROUTES');\n\nexport class RouterConfigLoader {\n  constructor(\n      private loader: NgModuleFactoryLoader, private compiler: Compiler,\n      private onLoadStartListener?: (r: Route) => void,\n      private onLoadEndListener?: (r: Route) => void) {}\n\n  load(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n    if (route._loader$) {\n      return route._loader$;\n    }\n\n    if (this.onLoadStartListener) {\n      this.onLoadStartListener(route);\n    }\n    const moduleFactory$ = this.loadModuleFactory(route.loadChildren!);\n    const loadRunner = moduleFactory$.pipe(\n        map((factory: NgModuleFactory<any>) => {\n          if (this.onLoadEndListener) {\n            this.onLoadEndListener(route);\n          }\n          const module = factory.create(parentInjector);\n          // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n          // will get stuck in an infinite loop. The child module's Injector will look to\n          // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n          // for it's parent module instead.\n          return new LoadedRouterConfig(\n              flatten(\n                  module.injector.get(ROUTES, undefined, InjectFlags.Self | InjectFlags.Optional))\n                  .map(standardizeConfig),\n              module);\n        }),\n        catchError((err) => {\n          route._loader$ = undefined;\n          throw err;\n        }),\n    );\n    // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n    route._loader$ = new ConnectableObservable(loadRunner, () => new Subject<LoadedRouterConfig>())\n                         .pipe(refCount());\n    return route._loader$;\n  }\n\n  private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {\n    if (typeof loadChildren === 'string') {\n      return from(this.loader.load(loadChildren));\n    } else {\n      return wrapIntoObservable(loadChildren()).pipe(mergeMap((t: any) => {\n        if (t instanceof NgModuleFactory) {\n          return of(t);\n        } else {\n          return from(this.compiler.compileModuleAsync(t));\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\nimport {ComponentFactoryResolver, ComponentRef} from '@angular/core';\n\nimport {RouterOutletContract} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\n\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n  outlet: RouterOutletContract|null = null;\n  route: ActivatedRoute|null = null;\n  resolver: ComponentFactoryResolver|null = null;\n  children = new ChildrenOutletContexts();\n  attachRef: ComponentRef<any>|null = null;\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nexport class ChildrenOutletContexts {\n  // contexts for child outlets, by name.\n  private contexts = new Map<string, OutletContext>();\n\n  /** Called when a `RouterOutlet` directive is instantiated */\n  onChildOutletCreated(childName: string, outlet: RouterOutletContract): void {\n    const context = this.getOrCreateContext(childName);\n    context.outlet = outlet;\n    this.contexts.set(childName, context);\n  }\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: string): void {\n    const context = this.getContext(childName);\n    if (context) {\n      context.outlet = null;\n      context.attachRef = null;\n    }\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(): Map<string, OutletContext> {\n    const contexts = this.contexts;\n    this.contexts = new Map();\n    return contexts;\n  }\n\n  onOutletReAttached(contexts: Map<string, OutletContext>) {\n    this.contexts = contexts;\n  }\n\n  getOrCreateContext(childName: string): OutletContext {\n    let context = this.getContext(childName);\n\n    if (!context) {\n      context = new OutletContext();\n      this.contexts.set(childName, context);\n    }\n\n    return context;\n  }\n\n  getContext(childName: string): OutletContext|null {\n    return this.contexts.get(childName) || 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\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nexport abstract class UrlHandlingStrategy {\n  /**\n   * Tells the router if this URL should be processed.\n   *\n   * When it returns true, the router will execute the regular navigation.\n   * When it returns false, the router will set the router state to an empty state.\n   * As a result, all the active components will be destroyed.\n   *\n   */\n  abstract shouldProcessUrl(url: UrlTree): boolean;\n\n  /**\n   * Extracts the part of the URL that should be handled by the router.\n   * The rest of the URL will remain untouched.\n   */\n  abstract extract(url: UrlTree): UrlTree;\n\n  /**\n   * Merges the URL fragment with the rest of the URL.\n   */\n  abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n  shouldProcessUrl(url: UrlTree): boolean {\n    return true;\n  }\n  extract(url: UrlTree): UrlTree {\n    return url;\n  }\n  merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree {\n    return newUrlPart;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, PopStateEvent} from '@angular/common';\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, NgZone, Type, ɵConsole as Console} from '@angular/core';\nimport {BehaviorSubject, EMPTY, Observable, of, Subject, SubscriptionLike} from 'rxjs';\nimport {catchError, filter, finalize, map, switchMap, tap} from 'rxjs/operators';\n\nimport {QueryParamsHandling, Route, Routes} from './config';\nimport {createRouterState} from './create_router_state';\nimport {createUrlTree} from './create_url_tree';\nimport {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events';\nimport {activateRoutes} from './operators/activate_routes';\nimport {applyRedirects} from './operators/apply_redirects';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ActivatedRoute, createEmptyState, RouterState, RouterStateSnapshot} from './router_state';\nimport {isNavigationCancelingError, navigationCancelingError, Params} from './shared';\nimport {DefaultUrlHandlingStrategy, UrlHandlingStrategy} from './url_handling_strategy';\nimport {containsTree, createEmptyUrlTree, IsActiveMatchOptions, UrlSerializer, UrlTree} from './url_tree';\nimport {standardizeConfig, validateConfig} from './utils/config';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {isUrlTree} from './utils/type_guards';\n\n\n/**\n * @description\n *\n * Options that modify the `Router` URL.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface UrlCreationOptions {\n  /**\n   * Specifies a root URI to use for relative navigation.\n   *\n   * For example, consider the following route configuration where the parent route\n   * has two children.\n   *\n   * ```\n   * [{\n   *   path: 'parent',\n   *   component: ParentComponent,\n   *   children: [{\n   *     path: 'list',\n   *     component: ListComponent\n   *   },{\n   *     path: 'child',\n   *     component: ChildComponent\n   *   }]\n   * }]\n   * ```\n   *\n   * The following `go()` function navigates to the `list` route by\n   * interpreting the destination URI as relative to the activated `child`  route\n   *\n   * ```\n   *  @Component({...})\n   *  class ChildComponent {\n   *    constructor(private router: Router, private route: ActivatedRoute) {}\n   *\n   *    go() {\n   *      this.router.navigate(['../list'], { relativeTo: this.route });\n   *    }\n   *  }\n   * ```\n   *\n   * A value of `null` or `undefined` indicates that the navigation commands should be applied\n   * relative to the root.\n   */\n  relativeTo?: ActivatedRoute|null;\n\n  /**\n   * Sets query parameters to the URL.\n   *\n   * ```\n   * // Navigate to /results?page=1\n   * this.router.navigate(['/results'], { queryParams: { page: 1 } });\n   * ```\n   */\n  queryParams?: Params|null;\n\n  /**\n   * Sets the hash fragment for the URL.\n   *\n   * ```\n   * // Navigate to /results#top\n   * this.router.navigate(['/results'], { fragment: 'top' });\n   * ```\n   */\n  fragment?: string;\n\n  /**\n   * How to handle query parameters in the router link for the next navigation.\n   * One of:\n   * * `preserve` : Preserve current parameters.\n   * * `merge` : Merge new with current parameters.\n   *\n   * The \"preserve\" option discards any new query params:\n   * ```\n   * // from /view1?page=1 to/view2?page=1\n   * this.router.navigate(['/view2'], { queryParams: { page: 2 },  queryParamsHandling: \"preserve\"\n   * });\n   * ```\n   * The \"merge\" option appends new query params to the params from the current URL:\n   * ```\n   * // from /view1?page=1 to/view2?page=1&otherKey=2\n   * this.router.navigate(['/view2'], { queryParams: { otherKey: 2 },  queryParamsHandling: \"merge\"\n   * });\n   * ```\n   * In case of a key collision between current parameters and those in the `queryParams` object,\n   * the new value is used.\n   *\n   */\n  queryParamsHandling?: QueryParamsHandling|null;\n\n  /**\n   * When true, preserves the URL fragment for the next navigation\n   *\n   * ```\n   * // Preserve fragment from /results#top to /view#top\n   * this.router.navigate(['/view'], { preserveFragment: true });\n   * ```\n   */\n  preserveFragment?: boolean;\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the navigation should be handled.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface NavigationBehaviorOptions {\n  /**\n   * When true, navigates without pushing a new state into history.\n   *\n   * ```\n   * // Navigate silently to /view\n   * this.router.navigate(['/view'], { skipLocationChange: true });\n   * ```\n   */\n  skipLocationChange?: boolean;\n\n  /**\n   * When true, navigates while replacing the current state in history.\n   *\n   * ```\n   * // Navigate to /view\n   * this.router.navigate(['/view'], { replaceUrl: true });\n   * ```\n   */\n  replaceUrl?: boolean;\n\n  /**\n   * Developer-defined state that can be passed to any navigation.\n   * Access this value through the `Navigation.extras` object\n   * returned from the [Router.getCurrentNavigation()\n   * method](api/router/Router#getcurrentnavigation) while a navigation is executing.\n   *\n   * After a navigation completes, the router writes an object containing this\n   * value together with a `navigationId` to `history.state`.\n   * The value is written when `location.go()` or `location.replaceState()`\n   * is called before activating this route.\n   *\n   * Note that `history.state` does not pass an object equality test because\n   * the router adds the `navigationId` on each navigation.\n   *\n   */\n  state?: {[k: string]: any};\n}\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed or interpreted.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n * @see UrlCreationOptions\n * @see NavigationBehaviorOptions\n *\n * @publicApi\n */\nexport interface NavigationExtras extends UrlCreationOptions, NavigationBehaviorOptions {}\n\n/**\n * Error handler that is invoked when a navigation error occurs.\n *\n * If the handler returns a value, the navigation Promise is resolved with this value.\n * If the handler throws an exception, the navigation Promise is rejected with\n * the exception.\n *\n * @publicApi\n */\nexport type ErrorHandler = (error: any) => any;\n\nfunction defaultErrorHandler(error: any): any {\n  throw error;\n}\n\nfunction defaultMalformedUriErrorHandler(\n    error: URIError, urlSerializer: UrlSerializer, url: string): UrlTree {\n  return urlSerializer.parse('/');\n}\n\nexport type RestoredState = {\n  [k: string]: any,\n  // TODO(#27607): Remove `navigationId` and `ɵrouterPageId` and move to `ng` or `ɵ` namespace.\n  navigationId: number,\n  // The `ɵ` prefix is there to reduce the chance of colliding with any existing user properties on\n  // the history state.\n  ɵrouterPageId?: number,\n};\n\n/**\n * Information about a navigation operation.\n * Retrieve the most recent navigation object with the\n * [Router.getCurrentNavigation() method](api/router/Router#getcurrentnavigation) .\n *\n * * *id* : The unique identifier of the current navigation.\n * * *initialUrl* : The target URL passed into the `Router#navigateByUrl()` call before navigation.\n * This is the value before the router has parsed or applied redirects to it.\n * * *extractedUrl* : The initial target URL after being parsed with `UrlSerializer.extract()`.\n * * *finalUrl* : The extracted URL after redirects have been applied.\n * This URL may not be available immediately, therefore this property can be `undefined`.\n * It is guaranteed to be set after the `RoutesRecognized` event fires.\n * * *trigger* : Identifies how this navigation was triggered.\n * -- 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n * -- 'popstate'--Triggered by a popstate event.\n * -- 'hashchange'--Triggered by a hashchange event.\n * * *extras* : A `NavigationExtras` options object that controlled the strategy used for this\n * navigation.\n * * *previousNavigation* : The previously successful `Navigation` object. Only one previous\n * navigation is available, therefore this previous `Navigation` object has a `null` value for its\n * own `previousNavigation`.\n *\n * @publicApi\n */\nexport interface Navigation {\n  /**\n   * The unique identifier of the current navigation.\n   */\n  id: number;\n  /**\n   * The target URL passed into the `Router#navigateByUrl()` call before navigation. This is\n   * the value before the router has parsed or applied redirects to it.\n   */\n  initialUrl: string|UrlTree;\n  /**\n   * The initial target URL after being parsed with `UrlSerializer.extract()`.\n   */\n  extractedUrl: UrlTree;\n  /**\n   * The extracted URL after redirects have been applied.\n   * This URL may not be available immediately, therefore this property can be `undefined`.\n   * It is guaranteed to be set after the `RoutesRecognized` event fires.\n   */\n  finalUrl?: UrlTree;\n  /**\n   * Identifies how this navigation was triggered.\n   *\n   * * 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n   * * 'popstate'--Triggered by a popstate event.\n   * * 'hashchange'--Triggered by a hashchange event.\n   */\n  trigger: 'imperative'|'popstate'|'hashchange';\n  /**\n   * Options that controlled the strategy used for this navigation.\n   * See `NavigationExtras`.\n   */\n  extras: NavigationExtras;\n  /**\n   * The previously successful `Navigation` object. Only one previous navigation\n   * is available, therefore this previous `Navigation` object has a `null` value\n   * for its own `previousNavigation`.\n   */\n  previousNavigation: Navigation|null;\n}\n\nexport type NavigationTransition = {\n  id: number,\n  targetPageId: number,\n  currentUrlTree: UrlTree,\n  currentRawUrl: UrlTree,\n  extractedUrl: UrlTree,\n  urlAfterRedirects: UrlTree,\n  rawUrl: UrlTree,\n  extras: NavigationExtras,\n  resolve: any,\n  reject: any,\n  promise: Promise<boolean>,\n  source: NavigationTrigger,\n  restoredState: RestoredState|null,\n  currentSnapshot: RouterStateSnapshot,\n  targetSnapshot: RouterStateSnapshot|null,\n  currentRouterState: RouterState,\n  targetRouterState: RouterState|null,\n  guards: Checks,\n  guardsResult: boolean|UrlTree|null,\n};\n\n/**\n * @internal\n */\nexport type RouterHook = (snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}) => Observable<void>;\n\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}): Observable<void> {\n  return of(null) as any;\n}\n\n/**\n * Information related to a location change, necessary for scheduling follow-up Router navigations.\n */\ntype LocationChangeInfo = {\n  source: 'popstate'|'hashchange',\n  urlTree: UrlTree,\n  state: RestoredState|null,\n  transitionId: number\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `true`\n * (exact = true).\n */\nexport const exactMatchOptions: IsActiveMatchOptions = {\n  paths: 'exact',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'exact'\n};\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `false`\n * (exact = false).\n */\nexport const subsetMatchOptions: IsActiveMatchOptions = {\n  paths: 'subset',\n  fragment: 'ignored',\n  matrixParams: 'ignored',\n  queryParams: 'subset'\n};\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 */\n@Injectable()\nexport class Router {\n  /**\n   * Represents the activated `UrlTree` that the `Router` is configured to handle (through\n   * `UrlHandlingStrategy`). That is, after we find the route config tree that we're going to\n   * activate, run guards, and are just about to activate the route, we set the currentUrlTree.\n   *\n   * This should match the `browserUrlTree` when a navigation succeeds. If the\n   * `UrlHandlingStrategy.shouldProcessUrl` is `false`, only the `browserUrlTree` is updated.\n   */\n  private currentUrlTree: UrlTree;\n  /**\n   * Meant to represent the entire browser url after a successful navigation. In the life of a\n   * navigation transition:\n   * 1. The rawUrl represents the full URL that's being navigated to\n   * 2. We apply redirects, which might only apply to _part_ of the URL (due to\n   * `UrlHandlingStrategy`).\n   * 3. Right before activation (because we assume activation will succeed), we update the\n   * rawUrlTree to be a combination of the urlAfterRedirects (again, this might only apply to part\n   * of the initial url) and the rawUrl of the transition (which was the original navigation url in\n   * its full form).\n   */\n  private rawUrlTree: UrlTree;\n  /**\n   * Meant to represent the part of the browser url that the `Router` is set up to handle (via the\n   * `UrlHandlingStrategy`). This value is updated immediately after the browser url is updated (or\n   * the browser url update is skipped via `skipLocationChange`). With that, note that\n   * `browserUrlTree` _may not_ reflect the actual browser URL for two reasons:\n   *\n   * 1. `UrlHandlingStrategy` only handles part of the URL\n   * 2. `skipLocationChange` does not update the browser url.\n   *\n   * So to reiterate, `browserUrlTree` only represents the Router's internal understanding of the\n   * current route, either before guards with `urlUpdateStrategy === 'eager'` or right before\n   * activation with `'deferred'`.\n   *\n   * This should match the `currentUrlTree` when the navigation succeeds.\n   */\n  private browserUrlTree: UrlTree;\n  private readonly transitions: BehaviorSubject<NavigationTransition>;\n  private navigations: Observable<NavigationTransition>;\n  private lastSuccessfulNavigation: Navigation|null = null;\n  private currentNavigation: Navigation|null = null;\n  private disposed = false;\n\n  private locationSubscription?: SubscriptionLike;\n  /**\n   * Tracks the previously seen location change from the location subscription so we can compare\n   * the two latest to see if they are duplicates. See setUpLocationChangeListener.\n   */\n  private lastLocationChangeInfo: LocationChangeInfo|null = null;\n  private navigationId: number = 0;\n\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  private currentPageId: number = 0;\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  private get browserPageId(): number|undefined {\n    return (this.location.getState() as RestoredState | null)?.ɵrouterPageId;\n  }\n  private configLoader: RouterConfigLoader;\n  private ngModule: NgModuleRef<any>;\n  private console: Console;\n  private isNgZoneEnabled: boolean = false;\n\n  /**\n   * An event stream for routing events in this NgModule.\n   */\n  public readonly events: Observable<Event> = new Subject<Event>();\n  /**\n   * The current state of routing in this NgModule.\n   */\n  public readonly routerState: RouterState;\n\n  /**\n   * A handler for navigation errors in this NgModule.\n   */\n  errorHandler: ErrorHandler = defaultErrorHandler;\n\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  malformedUriErrorHandler:\n      (error: URIError, urlSerializer: UrlSerializer,\n       url: string) => UrlTree = defaultMalformedUriErrorHandler;\n\n  /**\n   * True if at least one navigation event has occurred,\n   * false otherwise.\n   */\n  navigated: boolean = false;\n  private lastSuccessfulId: number = -1;\n\n  /**\n   * Hooks that enable you to pause navigation,\n   * either before or after the preactivation phase.\n   * Used by `RouterModule`.\n   *\n   * @internal\n   */\n  hooks: {\n    beforePreactivation: RouterHook,\n    afterPreactivation: RouterHook\n  } = {beforePreactivation: defaultRouterHook, afterPreactivation: defaultRouterHook};\n\n  /**\n   * A strategy for extracting and merging URLs.\n   * Used for AngularJS to Angular migrations.\n   */\n  urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();\n\n  /**\n   * A strategy for re-using routes.\n   */\n  routeReuseStrategy: RouteReuseStrategy = new DefaultRouteReuseStrategy();\n\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  onSameUrlNavigation: 'reload'|'ignore' = 'ignore';\n\n  /**\n   * How to merge parameters, data, and resolved data from parent to child\n   * routes. One of:\n   *\n   * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\n   * for path-less or component-less routes.\n   * - `'always'` : Inherit parent parameters, data, and resolved data\n   * for all child routes.\n   */\n  paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly';\n\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  urlUpdateStrategy: 'deferred'|'eager' = 'deferred';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * @see `RouterModule`\n   */\n  relativeLinkResolution: 'legacy'|'corrected' = 'corrected';\n\n  /**\n   * Configures how the Router attempts to restore state when a navigation is cancelled.\n   *\n   * 'replace' - Always uses `location.replaceState` to set the browser state to the state of the\n   * router before the navigation started.\n   *\n   * 'computed' - Will always return to the same state that corresponds to the actual Angular route\n   * when the navigation gets cancelled right after triggering a `popstate` event.\n   *\n   * The default value is `replace`\n   *\n   * @internal\n   */\n  // TODO(atscott): Determine how/when/if to make this public API\n  // This shouldn’t be an option at all but may need to be in order to allow migration without a\n  // breaking change. We need to determine if it should be made into public api (or if we forgo\n  // the option and release as a breaking change bug fix in a major version).\n  canceledNavigationResolution: 'replace'|'computed' = 'replace';\n\n  /**\n   * Creates the router service.\n   */\n  // TODO: vsavkin make internal after the final is out.\n  constructor(\n      private rootComponentType: Type<any>|null, private urlSerializer: UrlSerializer,\n      private rootContexts: ChildrenOutletContexts, private location: Location, injector: Injector,\n      loader: NgModuleFactoryLoader, compiler: Compiler, public config: Routes) {\n    const onLoadStart = (r: Route) => this.triggerEvent(new RouteConfigLoadStart(r));\n    const onLoadEnd = (r: Route) => this.triggerEvent(new RouteConfigLoadEnd(r));\n\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\n    this.resetConfig(config);\n    this.currentUrlTree = createEmptyUrlTree();\n    this.rawUrlTree = this.currentUrlTree;\n    this.browserUrlTree = this.currentUrlTree;\n\n    this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n    this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n\n    this.transitions = new BehaviorSubject<NavigationTransition>({\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\n    this.processNavigations();\n  }\n\n  private setupNavigations(transitions: Observable<NavigationTransition>):\n      Observable<NavigationTransition> {\n    const eventsSubject = (this.events as Subject<Event>);\n    return transitions.pipe(\n               filter(t => t.id !== 0),\n\n               // Extract URL\n               map(t =>\n                       ({...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)} as\n                        NavigationTransition)),\n\n               // Using switchMap so we cancel executing navigations when a new one comes in\n               switchMap(t => {\n                 let completed = false;\n                 let errored = false;\n                 return of(t).pipe(\n                     // Store the Navigation object\n                     tap(t => {\n                       this.currentNavigation = {\n                         id: t.id,\n                         initialUrl: t.currentRawUrl,\n                         extractedUrl: t.extractedUrl,\n                         trigger: t.source,\n                         extras: t.extras,\n                         previousNavigation: this.lastSuccessfulNavigation ?\n                             {...this.lastSuccessfulNavigation, previousNavigation: null} :\n                             null\n                       };\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 try\n                           // processing the URL again.\n                           browserUrlTree !== this.currentUrlTree.toString();\n                       const processCurrentUrl =\n                           (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n                           this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n\n\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(\n                                   t.id, this.serializeUrl(t.extractedUrl), t.source,\n                                   t.restoredState));\n                               if (transition !== this.transitions.getValue()) {\n                                 return EMPTY;\n                               }\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\n                             // ApplyRedirects\n                             applyRedirects(\n                                 this.ngModule.injector, this.configLoader, this.urlSerializer,\n                                 this.config),\n\n                             // Update the currentNavigation\n                             tap(t => {\n                               this.currentNavigation = {\n                                 ...this.currentNavigation!,\n                                 finalUrl: t.urlAfterRedirects\n                               };\n                             }),\n\n                             // Recognize\n                             recognize(\n                                 this.rootComponentType, this.config,\n                                 (url) => this.serializeUrl(url), this.paramsInheritanceStrategy,\n                                 this.relativeLinkResolution),\n\n                             // Update URL if in `eager` update mode\n                             tap(t => {\n                               if (this.urlUpdateStrategy === 'eager') {\n                                 if (!t.extras.skipLocationChange) {\n                                   this.setBrowserUrl(t.urlAfterRedirects, t);\n                                   // TODO(atscott): The above line is incorrect. It sets the url to\n                                   // only the part that is handled by the router. It should merge\n                                   // that with the rawUrl so the url includes segments not handled\n                                   // by the router:\n                                   //  const rawUrl = this.urlHandlingStrategy.merge(\n                                   //      t.urlAfterRedirects, t.rawUrl);\n                                   //  this.setBrowserUrl(rawUrl, t);\n                                 }\n                                 this.browserUrlTree = t.urlAfterRedirects;\n                               }\n\n                               // Fire RoutesRecognized\n                               const routesRecognized = new RoutesRecognized(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               eventsSubject.next(routesRecognized);\n                             }));\n                       } else {\n                         const processPreviousUrl = urlTransition && this.rawUrlTree &&\n                             this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n                         /* When the current URL shouldn't be processed, but the previous one was,\n                          * we handle this \"error condition\" by navigating to the previously\n                          * successful URL, but leaving the URL intact.*/\n                         if (processPreviousUrl) {\n                           const {id, extractedUrl, source, restoredState, extras} = t;\n                           const navStart = new NavigationStart(\n                               id, this.serializeUrl(extractedUrl), source, restoredState);\n                           eventsSubject.next(navStart);\n                           const targetSnapshot =\n                               createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n\n                           return of({\n                             ...t,\n                             targetSnapshot,\n                             urlAfterRedirects: extractedUrl,\n                             extras: {...extras, skipLocationChange: false, replaceUrl: false},\n                           });\n                         } else {\n                           /* When neither the current or previous URL can be processed, do nothing\n                            * other than update router's internal reference to the current \"settled\"\n                            * URL. This way the next navigation will be coming from the current URL\n                            * in the browser.\n                            */\n                           this.rawUrlTree = t.rawUrl;\n                           this.browserUrlTree = t.urlAfterRedirects;\n                           t.resolve(null);\n                           return EMPTY;\n                         }\n                       }\n                     }),\n\n                     // Before Preactivation\n                     switchTap(t => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.beforePreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     // --- GUARDS ---\n                     tap(t => {\n                       const guardsStart = new GuardsCheckStart(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                       this.triggerEvent(guardsStart);\n                     }),\n\n                     map(t => ({\n                           ...t,\n                           guards: getAllRouteGuards(\n                               t.targetSnapshot!, t.currentSnapshot, this.rootContexts)\n                         })),\n\n                     checkGuards(this.ngModule.injector, (evt: Event) => this.triggerEvent(evt)),\n                     tap(t => {\n                       if (isUrlTree(t.guardsResult)) {\n                         const error: Error&{url?: UrlTree} = navigationCancelingError(\n                             `Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n                         error.url = t.guardsResult;\n                         throw error;\n                       }\n\n                       const guardsEnd = new GuardsCheckEnd(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!,\n                           !!t.guardsResult);\n                       this.triggerEvent(guardsEnd);\n                     }),\n\n                     filter(t => {\n                       if (!t.guardsResult) {\n                         this.restoreHistory(t);\n                         this.cancelNavigationTransition(t, '');\n                         return false;\n                       }\n                       return true;\n                     }),\n\n                     // --- RESOLVE ---\n                     switchTap(t => {\n                       if (t.guards.canActivateChecks.length) {\n                         return of(t).pipe(\n                             tap(t => {\n                               const resolveStart = new ResolveStart(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveStart);\n                             }),\n                             switchMap(t => {\n                               let dataResolved = false;\n                               return of(t).pipe(\n                                   resolveData(\n                                       this.paramsInheritanceStrategy, this.ngModule.injector),\n                                   tap({\n                                     next: () => dataResolved = true,\n                                     complete: () => {\n                                       if (!dataResolved) {\n                                         this.restoreHistory(t);\n                                         this.cancelNavigationTransition(\n                                             t,\n                                             `At least one route resolver didn't emit any value.`);\n                                       }\n                                     }\n                                   }),\n                               );\n                             }),\n                             tap(t => {\n                               const resolveEnd = new ResolveEnd(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveEnd);\n                             }));\n                       }\n                       return undefined;\n                     }),\n\n                     // --- AFTER PREACTIVATION ---\n                     switchTap((t: NavigationTransition) => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.afterPreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     map((t: NavigationTransition) => {\n                       const targetRouterState = createRouterState(\n                           this.routeReuseStrategy, t.targetSnapshot!, t.currentRouterState);\n                       return ({...t, targetRouterState});\n                     }),\n\n                     /* Once here, we are about to activate syncronously. The assumption is this\n                        will succeed, and user code may read from the Router service. Therefore\n                        before activation, we need to update router properties storing the current\n                        URL and the RouterState, as well as updated the browser URL. All this should\n                        happen *before* activating. */\n                     tap((t: NavigationTransition) => {\n                       this.currentUrlTree = t.urlAfterRedirects;\n                       this.rawUrlTree =\n                           this.urlHandlingStrategy.merge(t.urlAfterRedirects, t.rawUrl);\n\n                       (this as {routerState: RouterState}).routerState = t.targetRouterState!;\n\n                       if (this.urlUpdateStrategy === 'deferred') {\n                         if (!t.extras.skipLocationChange) {\n                           this.setBrowserUrl(this.rawUrlTree, t);\n                         }\n                         this.browserUrlTree = t.urlAfterRedirects;\n                       }\n                     }),\n\n                     activateRoutes(\n                         this.rootContexts, this.routeReuseStrategy,\n                         (evt: Event) => this.triggerEvent(evt)),\n\n                     tap({\n                       next() {\n                         completed = true;\n                       },\n                       complete() {\n                         completed = true;\n                       }\n                     }),\n                     finalize(() => {\n                       /* When the navigation stream finishes either through error or success, we\n                        * set the `completed` or `errored` flag. However, there are some situations\n                        * where we could get here without either of those being set. For instance, a\n                        * redirect during NavigationStart. Therefore, this is a catch-all to make\n                        * sure the NavigationCancel\n                        * event is fired when a navigation gets cancelled but not caught by other\n                        * means. */\n                       if (!completed && !errored) {\n                         const cancelationReason = `Navigation ID ${\n                             t.id} is not equal to the current navigation id ${this.navigationId}`;\n                         if (this.canceledNavigationResolution === 'replace') {\n                           // Must reset to current URL tree here to ensure history.state is set. On\n                           // a fresh page load, if a new navigation comes in before a successful\n                           // navigation completes, there will be nothing in\n                           // history.state.navigationId. This can cause sync problems with\n                           // AngularJS sync code which looks for a value here in order to determine\n                           // whether or not to handle a given popstate event or to leave it to the\n                           // Angular router.\n                           this.restoreHistory(t);\n                           this.cancelNavigationTransition(t, cancelationReason);\n                         } else {\n                           // We cannot trigger a `location.historyGo` if the\n                           // cancellation was due to a new navigation before the previous could\n                           // complete. This is because `location.historyGo` triggers a `popstate`\n                           // which would also trigger another navigation. Instead, treat this as a\n                           // redirect and do not reset the state.\n                           this.cancelNavigationTransition(t, cancelationReason);\n                           // TODO(atscott): The same problem happens here with a fresh page load\n                           // and a new navigation before that completes where we won't set a page\n                           // id.\n                         }\n                       }\n                       // Only clear current navigation if it is still set to the one that\n                       // finalized.\n                       if (this.currentNavigation?.id === t.id) {\n                         this.currentNavigation = null;\n                       }\n                     }),\n                     catchError((e) => {\n                       // TODO(atscott): The NavigationTransition `t` used here does not accurately\n                       // reflect the current state of the whole transition because some operations\n                       // return a new object rather than modifying the one in the outermost\n                       // `switchMap`.\n                       //  The fix can likely be to:\n                       //  1. Rename the outer `t` variable so it's not shadowed all the time and\n                       //  confusing\n                       //  2. Keep reassigning to the outer variable after each stage to ensure it\n                       //  gets updated. Or change the implementations to not return a copy.\n                       // Not changed yet because it affects existing code and would need to be\n                       // tested more thoroughly.\n                       errored = true;\n                       /* This error type is issued during Redirect, and is handled as a\n                        * cancellation rather than an error. */\n                       if (isNavigationCancelingError(e)) {\n                         const redirecting = isUrlTree(e.url);\n                         if (!redirecting) {\n                           // Set property only if we're not redirecting. If we landed on a page and\n                           // redirect to `/` route, the new navigation is going to see the `/`\n                           // isn't a change from the default currentUrlTree and won't navigate.\n                           // This is only applicable with initial navigation, so setting\n                           // `navigated` only when not redirecting resolves this scenario.\n                           this.navigated = true;\n                           this.restoreHistory(t, true);\n                         }\n                         const navCancel = new NavigationCancel(\n                             t.id, this.serializeUrl(t.extractedUrl), e.message);\n                         eventsSubject.next(navCancel);\n\n                         // When redirecting, we need to delay resolving the navigation\n                         // promise and push it to the redirect navigation\n                         if (!redirecting) {\n                           t.resolve(false);\n                         } else {\n                           // setTimeout is required so this navigation finishes with\n                           // the return EMPTY below. If it isn't allowed to finish\n                           // processing, there can be multiple navigations to the same\n                           // URL.\n                           setTimeout(() => {\n                             const mergedTree =\n                                 this.urlHandlingStrategy.merge(e.url, this.rawUrlTree);\n                             const extras = {\n                               skipLocationChange: t.extras.skipLocationChange,\n                               // The URL is already updated at this point if we have 'eager' URL\n                               // updates or if the navigation was triggered by the browser (back\n                               // button, URL bar, etc). We want to replace that item in history if\n                               // the navigation is rejected.\n                               replaceUrl: this.urlUpdateStrategy === 'eager' ||\n                                   isBrowserTriggeredNavigation(t.source)\n                             };\n\n                             this.scheduleNavigation(\n                                 mergedTree, 'imperative', null, extras,\n                                 {resolve: t.resolve, reject: t.reject, promise: t.promise});\n                           }, 0);\n                         }\n\n                         /* All other errors should reset to the router's internal URL reference to\n                          * the pre-error state. */\n                       } else {\n                         this.restoreHistory(t, true);\n                         const navError =\n                             new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n                         eventsSubject.next(navError);\n                         try {\n                           t.resolve(this.errorHandler(e));\n                         } catch (ee) {\n                           t.reject(ee);\n                         }\n                       }\n                       return EMPTY;\n                     }));\n                 // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n               })) as any as Observable<NavigationTransition>;\n  }\n\n  /**\n   * @internal\n   * TODO: this should be removed once the constructor of the router made internal\n   */\n  resetRootComponentType(rootComponentType: Type<any>): void {\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\n  private getTransition(): NavigationTransition {\n    const transition = this.transitions.value;\n    // TODO(atscott): This comment doesn't make it clear why this value needs to be set. In the case\n    // described below (where we don't handle previous or current url), the `browserUrlTree` is set\n    // to the `urlAfterRedirects` value. However, these values *are already the same* because of the\n    // line below. So it seems that we should be able to remove the line below and the line where\n    // `browserUrlTree` is updated when we aren't handling any part of the navigation url.\n    // Run TGP to confirm that this can be done.\n\n    // This value needs to be set. Other values such as extractedUrl are set on initial navigation\n    // but the urlAfterRedirects may not get set if we aren't processing the new URL *and* not\n    // processing the previous URL.\n    transition.urlAfterRedirects = this.browserUrlTree;\n    return transition;\n  }\n\n  private setTransition(t: Partial<NavigationTransition>): void {\n    this.transitions.next({...this.getTransition(), ...t});\n  }\n\n  /**\n   * Sets up the location change listener and performs the initial navigation.\n   */\n  initialNavigation(): void {\n    this.setUpLocationChangeListener();\n    if (this.navigationId === 0) {\n      this.navigateByUrl(this.location.path(true), {replaceUrl: true});\n    }\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(): void {\n    // Don't need to use Zone.wrap any more, because zone.js\n    // already patch onPopState, so location change callback will\n    // run into ngZone\n    if (!this.locationSubscription) {\n      this.locationSubscription = this.location.subscribe(event => {\n        const currentChange = this.extractLocationChangeInfoFromEvent(event);\n        // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n        // hybrid apps.\n        if (this.shouldScheduleNavigation(this.lastLocationChangeInfo, currentChange)) {\n          setTimeout(() => {\n            const {source, state, urlTree} = currentChange;\n            const extras: NavigationExtras = {replaceUrl: true};\n            if (state) {\n              const stateCopy = {...state} as Partial<RestoredState>;\n              delete stateCopy.navigationId;\n              delete stateCopy.ɵrouterPageId;\n              if (Object.keys(stateCopy).length !== 0) {\n                extras.state = stateCopy;\n              }\n            }\n            this.scheduleNavigation(urlTree, source, state, extras);\n          }, 0);\n        }\n        this.lastLocationChangeInfo = currentChange;\n      });\n    }\n  }\n\n  /** Extracts router-related information from a `PopStateEvent`. */\n  private extractLocationChangeInfoFromEvent(change: PopStateEvent): LocationChangeInfo {\n    return {\n      source: change['type'] === 'popstate' ? 'popstate' : 'hashchange',\n      urlTree: this.parseUrl(change['url']!),\n      // Navigations coming from Angular router have a navigationId state\n      // property. When this exists, restore the state.\n      state: change.state?.navigationId ? change.state : null,\n      transitionId: this.getTransition().id\n    } as const;\n  }\n\n  /**\n   * Determines whether two events triggered by the Location subscription are due to the same\n   * navigation. The location subscription can fire two events (popstate and hashchange) for a\n   * single navigation. The second one should be ignored, that is, we should not schedule another\n   * navigation in the Router.\n   */\n  private shouldScheduleNavigation(previous: LocationChangeInfo|null, current: LocationChangeInfo):\n      boolean {\n    if (!previous) return true;\n\n    const sameDestination = current.urlTree.toString() === previous.urlTree.toString();\n    const eventsOccurredAtSameTime = current.transitionId === previous.transitionId;\n    if (!eventsOccurredAtSameTime || !sameDestination) {\n      return true;\n    }\n\n    if ((current.source === 'hashchange' && previous.source === 'popstate') ||\n        (current.source === 'popstate' && previous.source === 'hashchange')) {\n      return false;\n    }\n\n    return true;\n  }\n\n  /** The current URL. */\n  get url(): string {\n    return this.serializeUrl(this.currentUrlTree);\n  }\n\n  /**\n   * Returns the current `Navigation` object when the router is navigating,\n   * and `null` when idle.\n   */\n  getCurrentNavigation(): Navigation|null {\n    return this.currentNavigation;\n  }\n\n  /** @internal */\n  triggerEvent(event: Event): void {\n    (this.events as Subject<Event>).next(event);\n  }\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: Routes): void {\n    validateConfig(config);\n    this.config = config.map(standardizeConfig);\n    this.navigated = false;\n    this.lastSuccessfulId = -1;\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.dispose();\n  }\n\n  /** Disposes of the router. */\n  dispose(): void {\n    this.transitions.complete();\n    if (this.locationSubscription) {\n      this.locationSubscription.unsubscribe();\n      this.locationSubscription = undefined;\n    }\n    this.disposed = true;\n  }\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: any[], navigationExtras: UrlCreationOptions = {}): UrlTree {\n    const {relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment} =\n        navigationExtras;\n    const a = relativeTo || this.routerState.root;\n    const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n    let q: Params|null = 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  /**\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: string|UrlTree, extras: NavigationBehaviorOptions = {\n    skipLocationChange: false\n  }): Promise<boolean> {\n    if (typeof ngDevMode === 'undefined' ||\n        ngDevMode && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n      this.console.warn(\n          `Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n    }\n\n    const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n    const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n    return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n  }\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: any[], extras: NavigationExtras = {skipLocationChange: false}):\n      Promise<boolean> {\n    validateCommands(commands);\n    return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n  }\n\n  /** Serializes a `UrlTree` into a string */\n  serializeUrl(url: UrlTree): string {\n    return this.urlSerializer.serialize(url);\n  }\n\n  /** Parses a string into a `UrlTree` */\n  parseUrl(url: string): UrlTree {\n    let urlTree: UrlTree;\n    try {\n      urlTree = this.urlSerializer.parse(url);\n    } catch (e) {\n      urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n    }\n    return urlTree;\n  }\n\n  /**\n   * Returns whether the url is activated.\n   *\n   * @deprecated\n   * Use `IsActiveMatchOptions` instead.\n   *\n   * - The equivalent `IsActiveMatchOptions` for `true` is\n   * `{paths: 'exact', queryParams: 'exact', fragment: 'ignored', matrixParams: 'ignored'}`.\n   * - The equivalent for `false` is\n   * `{paths: 'subset', queryParams: 'subset', fragment: 'ignored', matrixParams: 'ignored'}`.\n   */\n  isActive(url: string|UrlTree, exact: boolean): boolean;\n  /**\n   * Returns whether the url is activated.\n   */\n  isActive(url: string|UrlTree, matchOptions: IsActiveMatchOptions): boolean;\n  /** @internal */\n  isActive(url: string|UrlTree, matchOptions: boolean|IsActiveMatchOptions): boolean;\n  isActive(url: string|UrlTree, matchOptions: boolean|IsActiveMatchOptions): boolean {\n    let options: IsActiveMatchOptions;\n    if (matchOptions === true) {\n      options = {...exactMatchOptions};\n    } else if (matchOptions === false) {\n      options = {...subsetMatchOptions};\n    } else {\n      options = matchOptions;\n    }\n    if (isUrlTree(url)) {\n      return containsTree(this.currentUrlTree, url, options);\n    }\n\n    const urlTree = this.parseUrl(url);\n    return containsTree(this.currentUrlTree, urlTree, options);\n  }\n\n  private removeEmptyProps(params: Params): Params {\n    return Object.keys(params).reduce((result: Params, key: string) => {\n      const value: any = params[key];\n      if (value !== null && value !== undefined) {\n        result[key] = value;\n      }\n      return result;\n    }, {});\n  }\n\n  private processNavigations(): void {\n    this.navigations.subscribe(\n        t => {\n          this.navigated = true;\n          this.lastSuccessfulId = t.id;\n          this.currentPageId = t.targetPageId;\n          (this.events as Subject<Event>)\n              .next(new NavigationEnd(\n                  t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n          this.lastSuccessfulNavigation = this.currentNavigation;\n          t.resolve(true);\n        },\n        e => {\n          this.console.warn(`Unhandled Navigation Error: ${e}`);\n        });\n  }\n\n  private scheduleNavigation(\n      rawUrl: UrlTree, source: NavigationTrigger, restoredState: RestoredState|null,\n      extras: NavigationExtras,\n      priorPromise?: {resolve: any, reject: any, promise: Promise<boolean>}): Promise<boolean> {\n    if (this.disposed) {\n      return Promise.resolve(false);\n    }\n\n    // * Imperative navigations (router.navigate) might trigger additional navigations to the same\n    //   URL via a popstate event and the locationChangeListener. We should skip these duplicate\n    //   navs. Duplicates may also be triggered by attempts to sync AngularJS and Angular router\n    //   states.\n    // * Imperative navigations can be cancelled by router guards, meaning the URL won't change. If\n    //   the user follows that with a navigation using the back/forward button or manual URL change,\n    //   the destination may be the same as the previous imperative attempt. We should not skip\n    //   these navigations because it's a separate case from the one above -- it's not a duplicate\n    //   navigation.\n    const lastNavigation = this.getTransition();\n    // We don't want to skip duplicate successful navs if they're imperative because\n    // onSameUrlNavigation could be 'reload' (so the duplicate is intended).\n    const browserNavPrecededByRouterNav = isBrowserTriggeredNavigation(source) && lastNavigation &&\n        !isBrowserTriggeredNavigation(lastNavigation.source);\n    const lastNavigationSucceeded = this.lastSuccessfulId === lastNavigation.id;\n    // If the last navigation succeeded or is in flight, we can use the rawUrl as the comparison.\n    // However, if it failed, we should compare to the final result (urlAfterRedirects).\n    const lastNavigationUrl = (lastNavigationSucceeded || this.currentNavigation) ?\n        lastNavigation.rawUrl :\n        lastNavigation.urlAfterRedirects;\n    const duplicateNav = lastNavigationUrl.toString() === rawUrl.toString();\n    if (browserNavPrecededByRouterNav && duplicateNav) {\n      return Promise.resolve(true);  // return value is not used\n    }\n\n    let resolve: any;\n    let reject: any;\n    let promise: Promise<boolean>;\n    if (priorPromise) {\n      resolve = priorPromise.resolve;\n      reject = priorPromise.reject;\n      promise = priorPromise.promise;\n\n    } else {\n      promise = new Promise<boolean>((res, rej) => {\n        resolve = res;\n        reject = rej;\n      });\n    }\n\n    const id = ++this.navigationId;\n    let targetPageId: number;\n    if (this.canceledNavigationResolution === 'computed') {\n      const isInitialPage = this.currentPageId === 0;\n      if (isInitialPage) {\n        restoredState = this.location.getState() as RestoredState | null;\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      } 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        } else {\n          targetPageId = (this.browserPageId ?? 0) + 1;\n        }\n      }\n    } else {\n      // This is unused when `canceledNavigationResolution` is not computed.\n      targetPageId = 0;\n    }\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\n    // Make sure that the error is propagated even though `processNavigations` catch\n    // handler does not rethrow\n    return promise.catch((e: any) => {\n      return Promise.reject(e);\n    });\n  }\n\n  private setBrowserUrl(url: UrlTree, t: NavigationTransition) {\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    } else {\n      this.location.go(path, '', state);\n    }\n  }\n\n  /**\n   * Performs the necessary rollback action to restore the browser URL to the\n   * state before the transition.\n   */\n  private restoreHistory(t: NavigationTransition, 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 `urlUpdateSrategy` is `eager`; `setBrowserUrl` method is called\n      // before any verification.\n      const browserUrlUpdateOccurred =\n          (t.source === 'popstate' || this.urlUpdateStrategy === 'eager' ||\n           this.currentUrlTree === this.currentNavigation?.finalUrl);\n      if (browserUrlUpdateOccurred && targetPagePosition !== 0) {\n        this.location.historyGo(targetPagePosition);\n      } else if (\n          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      } else {\n        // The browser URL and router state was not updated before the navigation cancelled so\n        // there's no restoration needed.\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\n  private resetState(t: NavigationTransition): void {\n    (this as {routerState: RouterState}).routerState = t.currentRouterState;\n    this.currentUrlTree = t.currentUrlTree;\n    this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n  }\n\n  private resetUrlToCurrentUrlTree(): void {\n    this.location.replaceState(\n        this.urlSerializer.serialize(this.rawUrlTree), '',\n        this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));\n  }\n\n  private cancelNavigationTransition(t: NavigationTransition, reason: string) {\n    const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), reason);\n    this.triggerEvent(navCancel);\n    t.resolve(false);\n  }\n\n  private generateNgRouterState(navigationId: number, routerPageId?: number) {\n    if (this.canceledNavigationResolution === 'computed') {\n      return {navigationId, ɵrouterPageId: routerPageId};\n    }\n    return {navigationId};\n  }\n}\n\nfunction validateCommands(commands: string[]): void {\n  for (let i = 0; i < commands.length; i++) {\n    const cmd = commands[i];\n    if (cmd == null) {\n      throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n    }\n  }\n}\n\nfunction isBrowserTriggeredNavigation(source: 'imperative'|'popstate'|'hashchange') {\n  return source !== 'imperative';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, OnChanges, OnDestroy, Renderer2, SimpleChanges} from '@angular/core';\nimport {Subject, Subscription} from 'rxjs';\n\nimport {QueryParamsHandling} from '../config';\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {Params} from '../shared';\nimport {UrlTree} from '../url_tree';\n\n\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `<router-outlet>` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segements.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from the root of the\n *   app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\n *   looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n *   link to user component\n * </a>\n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n *  - `'merge'`: Merge the given `queryParams` into the current query params.\n *  - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n *   link to user component\n * </a>\n * ```\n *\n * See {@link UrlCreationOptions.queryParamsHandling UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n *   link to user component\n * </a>\n * ```\n *\n * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n *   const navigation = router.getCurrentNavigation();\n *   tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: ':not(a):not(area)[routerLink]'})\nexport class RouterLink implements OnChanges {\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParams?: Params|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() fragment?: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  @Input() state?: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() relativeTo?: ActivatedRoute|null;\n\n  private commands: any[] = [];\n  private preserve!: boolean;\n\n  /** @internal */\n  onChanges = new Subject<RouterLink>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n    if (tabIndex == null) {\n      renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges) {\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  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /** @nodoc */\n  @HostListener('click')\n  onClick(): boolean {\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state,\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return true;\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n      // Otherwise, we should use the value provided by the user in the input.\n      relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\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 */\n@Directive({selector: 'a[routerLink],area[routerLink]'})\nexport class RouterLinkWithHref implements OnChanges, OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  @HostBinding('attr.target') @Input() target!: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParams UrlCreationOptions#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParams?: Params|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#fragment UrlCreationOptions#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() fragment?: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#queryParamsHandling UrlCreationOptions#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * @see {@link UrlCreationOptions#preserveFragment UrlCreationOptions#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#skipLocationChange NavigationBehaviorOptions#skipLocationChange}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#replaceUrl NavigationBehaviorOptions#replaceUrl}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#navigateByUrl Router#navigateByUrl} as part of the\n   * `NavigationBehaviorOptions`.\n   * @see {@link NavigationBehaviorOptions#state NavigationBehaviorOptions#state}\n   * @see {@link Router#navigateByUrl Router#navigateByUrl}\n   */\n  @Input() state?: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the\n   * `UrlCreationOptions`.\n   * Specify a value here when you do not want to use the default value\n   * for `routerLink`, which is the current activated route.\n   * Note that a value of `undefined` here will use the `routerLink` default.\n   * @see {@link UrlCreationOptions#relativeTo UrlCreationOptions#relativeTo}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() relativeTo?: ActivatedRoute|null;\n\n  private commands: any[] = [];\n  private subscription: Subscription;\n  // TODO(issue/24571): remove '!'.\n  private preserve!: boolean;\n\n  // the url displayed on the anchor element.\n  // TODO(issue/24571): remove '!'.\n  @HostBinding() href!: string;\n\n  /** @internal */\n  onChanges = new Subject<RouterLinkWithHref>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      private locationStrategy: LocationStrategy) {\n    this.subscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.updateTargetUrlAndHref();\n      }\n    });\n  }\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): any {\n    this.updateTargetUrlAndHref();\n    this.onChanges.next(this);\n  }\n  /** @nodoc */\n  ngOnDestroy(): any {\n    this.subscription.unsubscribe();\n  }\n\n  /** @nodoc */\n  @HostListener(\n      'click',\n      ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey'])\n  onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean):\n      boolean {\n    if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n      return true;\n    }\n\n    if (typeof this.target === 'string' && this.target != '_self') {\n      return true;\n    }\n\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return false;\n  }\n\n  private updateTargetUrlAndHref(): void {\n    this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n      // Otherwise, we should use the value provided by the user in the input.\n      relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\nfunction attrBoolValue(s: any): boolean {\n  return s === '' || !!s;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentInit, ChangeDetectorRef, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, Optional, QueryList, Renderer2, SimpleChanges} from '@angular/core';\nimport {from, of, Subscription} from 'rxjs';\nimport {mergeAll} from 'rxjs/operators';\n\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {IsActiveMatchOptions} from '../url_tree';\n\nimport {RouterLink, RouterLinkWithHref} from './router_link';\n\n\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n *   Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `<div>`  parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n *   <a routerLink=\"/user/jim\">Jim</a>\n *   <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n  selector: '[routerLinkActive]',\n  exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {\n  @ContentChildren(RouterLink, {descendants: true}) links!: QueryList<RouterLink>;\n  @ContentChildren(RouterLinkWithHref, {descendants: true})\n  linksWithHrefs!: QueryList<RouterLinkWithHref>;\n\n  private classes: string[] = [];\n  private routerEventsSubscription: Subscription;\n  private linkInputChangesSubscription?: Subscription;\n  public readonly isActive: boolean = false;\n\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  @Input() routerLinkActiveOptions: {exact: boolean}|IsActiveMatchOptions = {exact: false};\n\n\n  constructor(\n      private router: Router, private element: ElementRef, private renderer: Renderer2,\n      private readonly cdr: ChangeDetectorRef, @Optional() private link?: RouterLink,\n      @Optional() private linkWithHref?: RouterLinkWithHref) {\n    this.routerEventsSubscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.update();\n      }\n    });\n  }\n\n  /** @nodoc */\n  ngAfterContentInit(): void {\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\n  private subscribeToEachLinkOnChanges() {\n    this.linkInputChangesSubscription?.unsubscribe();\n    const allLinkChanges =\n        [...this.links.toArray(), ...this.linksWithHrefs.toArray(), this.link, this.linkWithHref]\n            .filter((link): link is RouterLink|RouterLinkWithHref => !!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\n  @Input()\n  set routerLinkActive(data: string[]|string) {\n    const classes = Array.isArray(data) ? data : data.split(' ');\n    this.classes = classes.filter(c => !!c);\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): void {\n    this.update();\n  }\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.routerEventsSubscription.unsubscribe();\n    this.linkInputChangesSubscription?.unsubscribe();\n  }\n\n  private update(): void {\n    if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;\n    Promise.resolve().then(() => {\n      const hasActiveLinks = this.hasActiveLinks();\n      if (this.isActive !== hasActiveLinks) {\n        (this as any).isActive = hasActiveLinks;\n        this.cdr.markForCheck();\n        this.classes.forEach((c) => {\n          if (hasActiveLinks) {\n            this.renderer.addClass(this.element.nativeElement, c);\n          } else {\n            this.renderer.removeClass(this.element.nativeElement, c);\n          }\n        });\n      }\n    });\n  }\n\n  private isLinkActive(router: Router): (link: (RouterLink|RouterLinkWithHref)) => boolean {\n    const options: boolean|IsActiveMatchOptions =\n        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: RouterLink|RouterLinkWithHref) => router.isActive(link.urlTree, options);\n  }\n\n  private hasActiveLinks(): boolean {\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}\n\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(options: {exact: boolean}|\n                              IsActiveMatchOptions): options is IsActiveMatchOptions {\n  return !!(options as IsActiveMatchOptions).paths;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef,} from '@angular/core';\nimport {Data} from '../config';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * An interface that defines the contract for developing a component outlet for the `Router`.\n *\n * An outlet acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * A router outlet should register itself with the `Router` via\n * `ChildrenOutletContexts#onChildOutletCreated` and unregister with\n * `ChildrenOutletContexts#onChildOutletDestroyed`. When the `Router` identifies a matched `Route`,\n * it looks for a registered outlet in the `ChildrenOutletContexts` and activates it.\n *\n * @see `ChildrenOutletContexts`\n * @publicApi\n */\nexport interface RouterOutletContract {\n  /**\n   * Whether the given outlet is activated.\n   *\n   * An outlet is considered \"activated\" if it has an active component.\n   */\n  isActivated: boolean;\n\n  /** The instance of the activated component or `null` if the outlet is not activated. */\n  component: Object|null;\n\n  /**\n   * The `Data` of the `ActivatedRoute` snapshot.\n   */\n  activatedRouteData: Data;\n\n  /**\n   * The `ActivatedRoute` for the outlet or `null` if the outlet is not activated.\n   */\n  activatedRoute: ActivatedRoute|null;\n\n  /**\n   * Called by the `Router` when the outlet should activate (create a component).\n   */\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null): void;\n\n  /**\n   * A request to destroy the currently activated component.\n   *\n   * When a `RouteReuseStrategy` indicates that an `ActivatedRoute` should be removed but stored for\n   * later re-use rather than destroyed, the `Router` will call `detach` instead.\n   */\n  deactivate(): void;\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree.\n   *\n   * This is similar to `deactivate`, but the activated component should _not_ be destroyed.\n   * Instead, it is returned so that it can be reattached later via the `attach` method.\n   */\n  detach(): ComponentRef<unknown>;\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree.\n   */\n  attach(ref: ComponentRef<unknown>, activatedRoute: ActivatedRoute): void;\n\n  /**\n   * Emits an activate event when a new component is instantiated\n   **/\n  activateEvents?: EventEmitter<unknown>;\n\n  /**\n   * Emits a deactivate event when a component is destroyed.\n   */\n  deactivateEvents?: EventEmitter<unknown>;\n}\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * and a deactivate event when a component is destroyed.\n *\n * ```\n * <router-outlet\n *   (activate)='onActivate($event)'\n *   (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n *\n * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets \"Example of a named\n * outlet and secondary route configuration\").\n * @see `RouterLink`\n * @see `Route`\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'router-outlet', exportAs: 'outlet'})\nexport class RouterOutlet implements OnDestroy, OnInit, RouterOutletContract {\n  private activated: ComponentRef<any>|null = null;\n  private _activatedRoute: ActivatedRoute|null = null;\n  private name: string;\n\n  @Output('activate') activateEvents = new EventEmitter<any>();\n  @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n  constructor(\n      private parentContexts: ChildrenOutletContexts, private location: ViewContainerRef,\n      private resolver: ComponentFactoryResolver, @Attribute('name') name: string,\n      private changeDetector: ChangeDetectorRef) {\n    this.name = name || PRIMARY_OUTLET;\n    parentContexts.onChildOutletCreated(this.name, this);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.parentContexts.onChildOutletDestroyed(this.name);\n  }\n\n  /** @nodoc */\n  ngOnInit(): void {\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        } else {\n          // otherwise the component defined in the configuration is created\n          this.activateWith(context.route, context.resolver || null);\n        }\n      }\n    }\n  }\n\n  get isActivated(): boolean {\n    return !!this.activated;\n  }\n\n  /**\n   * @returns The currently activated component instance.\n   * @throws An error if the outlet is not activated.\n   */\n  get component(): Object {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this.activated.instance;\n  }\n\n  get activatedRoute(): ActivatedRoute {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this._activatedRoute as ActivatedRoute;\n  }\n\n  get activatedRouteData(): Data {\n    if (this._activatedRoute) {\n      return this._activatedRoute.snapshot.data;\n    }\n    return {};\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree\n   */\n  detach(): ComponentRef<any> {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    this.location.detach();\n    const cmp = this.activated;\n    this.activated = null;\n    this._activatedRoute = null;\n    return cmp;\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n   */\n  attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n    this.activated = ref;\n    this._activatedRoute = activatedRoute;\n    this.location.insert(ref.hostView);\n  }\n\n  deactivate(): void {\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\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {\n    if (this.isActivated) {\n      throw new Error('Cannot activate an already activated outlet');\n    }\n    this._activatedRoute = activatedRoute;\n    const snapshot = activatedRoute._futureSnapshot;\n    const component = <any>snapshot.routeConfig!.component;\n    resolver = resolver || this.resolver;\n    const factory = resolver.resolveComponentFactory(component);\n    const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n    const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n    this.activated = this.location.createComponent(factory, this.location.length, injector);\n    // Calling `markForCheck` to make sure we will run the change detection when the\n    // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n    this.changeDetector.markForCheck();\n    this.activateEvents.emit(this.activated.instance);\n  }\n}\n\nclass OutletInjector implements Injector {\n  constructor(\n      private route: ActivatedRoute, private childContexts: ChildrenOutletContexts,\n      private parent: Injector) {}\n\n  get(token: any, notFoundValue?: any): any {\n    if (token === ActivatedRoute) {\n      return this.route;\n    }\n\n    if (token === ChildrenOutletContexts) {\n      return this.childContexts;\n    }\n\n    return this.parent.get(token, notFoundValue);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, OnDestroy} from '@angular/core';\nimport {from, Observable, of, Subscription} from 'rxjs';\nimport {catchError, concatMap, filter, map, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {Event, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart} from './events';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n  abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\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 */\nexport class PreloadAllModules implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return fn().pipe(catchError(() => of(null)));\n  }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nexport class NoPreloading implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return of(null);\n  }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable()\nexport class RouterPreloader implements OnDestroy {\n  private loader: RouterConfigLoader;\n  private subscription?: Subscription;\n\n  constructor(\n      private router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\n      private injector: Injector, private preloadingStrategy: PreloadingStrategy) {\n    const onStartLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadStart(r));\n    const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n  }\n\n  setUpPreloading(): void {\n    this.subscription =\n        this.router.events\n            .pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n            .subscribe(() => {});\n  }\n\n  preload(): Observable<any> {\n    const ngModule = this.injector.get(NgModuleRef);\n    return this.processRoutes(ngModule, this.router.config);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    if (this.subscription) {\n      this.subscription.unsubscribe();\n    }\n  }\n\n  private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {\n    const res: Observable<any>[] = [];\n    for (const route of routes) {\n      // we already have the config loaded, just recurse\n      if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n        const childConfig = route._loadedConfig;\n        res.push(this.processRoutes(childConfig.module, childConfig.routes));\n\n        // no config loaded, fetch the config\n      } else if (route.loadChildren && !route.canLoad) {\n        res.push(this.preloadConfig(ngModule, route));\n\n        // recurse into children\n      } else if (route.children) {\n        res.push(this.processRoutes(ngModule, route.children));\n      }\n    }\n    return from(res).pipe(mergeAll(), map((_) => void 0));\n  }\n\n  private preloadConfig(ngModule: NgModuleRef<any>, route: Route): Observable<void> {\n    return this.preloadingStrategy.preload(route, () => {\n      const loaded$ = route._loadedConfig ? of(route._loadedConfig) :\n                                            this.loader.load(ngModule.injector, route);\n      return loaded$.pipe(mergeMap((config: LoadedRouterConfig) => {\n        route._loadedConfig = config;\n        return this.processRoutes(config.module, config.routes);\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\nimport {ViewportScroller} from '@angular/common';\nimport {Injectable, OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {NavigationEnd, NavigationStart, Scroll} from './events';\nimport {Router} from './router';\n\n@Injectable()\nexport class RouterScroller implements OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  private routerEventsSubscription!: Unsubscribable;\n  // TODO(issue/24571): remove '!'.\n  private scrollEventsSubscription!: Unsubscribable;\n\n  private lastId = 0;\n  private lastSource: 'imperative'|'popstate'|'hashchange'|undefined = 'imperative';\n  private restoredId = 0;\n  private store: {[key: string]: [number, number]} = {};\n\n  constructor(\n      private router: Router,\n      /** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {\n        scrollPositionRestoration?: 'disabled'|'enabled'|'top',\n        anchorScrolling?: 'disabled'|'enabled'\n      } = {}) {\n    // Default both options to 'disabled'\n    options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n    options.anchorScrolling = options.anchorScrolling || 'disabled';\n  }\n\n  init(): void {\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\n  private 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      } else if (e instanceof NavigationEnd) {\n        this.lastId = e.id;\n        this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n      }\n    });\n  }\n\n  private consumeScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (!(e instanceof Scroll)) 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        } else if (this.options.scrollPositionRestoration === 'enabled') {\n          this.viewportScroller.scrollToPosition(e.position);\n        }\n        // imperative navigation \"forward\"\n      } else {\n        if (e.anchor && this.options.anchorScrolling === 'enabled') {\n          this.viewportScroller.scrollToAnchor(e.anchor);\n        } else if (this.options.scrollPositionRestoration !== 'disabled') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        }\n      }\n    });\n  }\n\n  private scheduleScrollEvent(routerEvent: NavigationEnd, anchor: string|null): void {\n    this.router.triggerEvent(new Scroll(\n        routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n  }\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}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, Location, LOCATION_INITIALIZED, LocationStrategy, PathLocationStrategy, PlatformLocation, ViewportScroller} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, OnDestroy, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {of, Subject} from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {Event} from './events';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer, UrlTree} from './url_tree';\nimport {flatten} from './utils/collection';\n\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES =\n    [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router service.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>('ROUTER_FORROOT_GUARD');\n\nexport const ROUTER_PROVIDERS: Provider[] = [\n  Location,\n  {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n  {\n    provide: Router,\n    useFactory: setupRouter,\n    deps: [\n      UrlSerializer, ChildrenOutletContexts, Location, Injector, NgModuleFactoryLoader, Compiler,\n      ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],\n      [RouteReuseStrategy, new Optional()]\n    ]\n  },\n  ChildrenOutletContexts,\n  {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n  {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n  RouterPreloader,\n  NoPreloading,\n  PreloadAllModules,\n  {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n\nexport function routerNgProbeToken() {\n  return new NgProbeToken('Router', Router);\n}\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 */\n@NgModule({\n  declarations: ROUTER_DIRECTIVES,\n  exports: ROUTER_DIRECTIVES,\n  entryComponents: [EmptyOutletComponent]\n})\nexport class RouterModule {\n  // Note: We are injecting the Router so it gets created eagerly...\n  constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any, @Optional() router: Router) {}\n\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: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n    return {\n      ngModule: RouterModule,\n      providers: [\n        ROUTER_PROVIDERS,\n        provideRoutes(routes),\n        {\n          provide: ROUTER_FORROOT_GUARD,\n          useFactory: provideForRootGuard,\n          deps: [[Router, new Optional(), new SkipSelf()]]\n        },\n        {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n        {\n          provide: LocationStrategy,\n          useFactory: provideLocationStrategy,\n          deps:\n              [PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION]\n        },\n        {\n          provide: RouterScroller,\n          useFactory: createRouterScroller,\n          deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n        },\n        {\n          provide: PreloadingStrategy,\n          useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n                                                             NoPreloading\n        },\n        {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n        provideRouterInitializer(),\n      ],\n    };\n  }\n\n  /**\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: Routes): ModuleWithProviders<RouterModule> {\n    return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n  }\n}\n\nexport function createRouterScroller(\n    router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): RouterScroller {\n  if (config.scrollOffset) {\n    viewportScroller.setOffset(config.scrollOffset);\n  }\n  return new RouterScroller(router, viewportScroller, config);\n}\n\nexport function provideLocationStrategy(\n    platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n  return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n                           new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n\nexport function provideForRootGuard(router: Router): any {\n  if ((typeof ngDevMode === 'undefined' || ngDevMode) && router) {\n    throw new Error(\n        `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n  }\n  return 'guarded';\n}\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 */\nexport function provideRoutes(routes: Routes): any {\n  return [\n    {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n    {provide: ROUTES, multi: true, useValue: routes},\n  ];\n}\n\n/**\n * Allowed values in an `ExtraOptions` object that configure\n * when the router performs the initial navigation operation.\n *\n * * 'enabledNonBlocking' - (default) The initial navigation starts after the\n * root component has been created. The bootstrap is not blocked on the completion of the initial\n * navigation.\n * * 'enabledBlocking' - The initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete. This value is required\n * for [server-side rendering](guide/universal) to work.\n * * 'disabled' - The initial navigation is not performed. The location listener is set up before\n * the root component gets created. Use if there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic.\n *\n * The following values have been [deprecated](guide/releases#deprecation-practices) since v11,\n * and should not be used for new applications.\n *\n * * 'enabled' - This option is 1:1 replaceable with `enabledBlocking`.\n *\n * @see `forRoot()`\n *\n * @publicApi\n */\nexport type InitialNavigation = 'disabled'|'enabled'|'enabledBlocking'|'enabledNonBlocking';\n\n/**\n * A set of configuration options for a router module, provided in the\n * `forRoot()` method.\n *\n * @see `forRoot()`\n *\n *\n * @publicApi\n */\nexport interface ExtraOptions {\n  /**\n   * When true, log all internal navigation events to the console.\n   * Use for debugging.\n   */\n  enableTracing?: boolean;\n\n  /**\n   * When true, enable the location strategy that uses the URL fragment\n   * instead of the history API.\n   */\n  useHash?: boolean;\n\n  /**\n   * One of `enabled`, `enabledBlocking`, `enabledNonBlocking` or `disabled`.\n   * When set to `enabled` or `enabledBlocking`, the initial navigation starts before the root\n   * component is created. The bootstrap is blocked until the initial navigation is complete. This\n   * value is required for [server-side rendering](guide/universal) to work. When set to\n   * `enabledNonBlocking`, the initial navigation starts after the root component has been created.\n   * The bootstrap is not blocked on the completion of the initial navigation. When set to\n   * `disabled`, the initial navigation is not performed. The location listener is set up before the\n   * root component gets created. Use if there is a reason to have more control over when the router\n   * starts its initial navigation due to some complex initialization logic.\n   */\n  initialNavigation?: InitialNavigation;\n\n  /**\n   * A custom error handler for failed navigations.\n   * If the handler returns a value, the navigation Promise is resolved with this value.\n   * If the handler throws an exception, the navigation Promise is rejected with the exception.\n   *\n   */\n  errorHandler?: ErrorHandler;\n\n  /**\n   * Configures a preloading strategy.\n   * One of `PreloadAllModules` or `NoPreloading` (the default).\n   */\n  preloadingStrategy?: any;\n\n  /**\n   * Define what the router should do if it receives a navigation request to the current URL.\n   * Default is `ignore`, which causes the router ignores the navigation.\n   * This can disable features such as a \"refresh\" button.\n   * Use this option to configure the behavior when navigating to the\n   * current URL. Default is 'ignore'.\n   */\n  onSameUrlNavigation?: 'reload'|'ignore';\n\n  /**\n   * Configures if the scroll position needs to be restored when navigating back.\n   *\n   * * 'disabled'- (Default) Does nothing. Scroll position is maintained on navigation.\n   * * 'top'- Sets the scroll position to x = 0, y = 0 on all navigation.\n   * * 'enabled'- Restores the previous scroll position on backward navigation, else sets the\n   * position to the anchor if one is provided, or sets the scroll position to [0, 0] (forward\n   * navigation). This option will be the default in the future.\n   *\n   * You can implement custom scroll restoration behavior by adapting the enabled behavior as\n   * in the following example.\n   *\n   * ```typescript\n   * class AppModule {\n   *   constructor(router: Router, viewportScroller: ViewportScroller) {\n   *     router.events.pipe(\n   *       filter((e: Event): e is Scroll => e instanceof Scroll)\n   *     ).subscribe(e => {\n   *       if (e.position) {\n   *         // backward navigation\n   *         viewportScroller.scrollToPosition(e.position);\n   *       } else if (e.anchor) {\n   *         // anchor navigation\n   *         viewportScroller.scrollToAnchor(e.anchor);\n   *       } else {\n   *         // forward navigation\n   *         viewportScroller.scrollToPosition([0, 0]);\n   *       }\n   *     });\n   *   }\n   * }\n   * ```\n   */\n  scrollPositionRestoration?: 'disabled'|'enabled'|'top';\n\n  /**\n   * When set to 'enabled', scrolls to the anchor element when the URL has a fragment.\n   * Anchor scrolling is disabled by default.\n   *\n   * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n   * that we stored or scroll to the top.\n   */\n  anchorScrolling?: 'disabled'|'enabled';\n\n  /**\n   * Configures the scroll offset the router will use when scrolling to an element.\n   *\n   * When given a tuple with x and y position value,\n   * the router uses that offset each time it scrolls.\n   * When given a function, the router invokes the function every time\n   * it restores scroll position.\n   */\n  scrollOffset?: [number, number]|(() => [number, number]);\n\n  /**\n   * Defines how the router merges parameters, data, and resolved data from parent to child\n   * routes. By default ('emptyOnly'), inherits parent parameters only for\n   * path-less or component-less routes.\n   *\n   * Set to 'always' to enable unconditional inheritance of parent parameters.\n   *\n   * Note that when dealing with matrix parameters, \"parent\" refers to the parent `Route`\n   * config which does not necessarily mean the \"URL segment to the left\". When the `Route` `path`\n   * contains multiple segments, the matrix parameters must appear on the last segment. For example,\n   * matrix parameters for `{path: 'a/b', component: MyComp}` should appear as `a/b;foo=bar` and not\n   * `a;foo=bar/b`.\n   *\n   */\n  paramsInheritanceStrategy?: 'emptyOnly'|'always';\n\n  /**\n   * A custom handler for malformed URI errors. The handler is invoked when `encodedURI` contains\n   * invalid character sequences.\n   * The default implementation is to redirect to the root URL, dropping\n   * any path or parameter information. The function takes three parameters:\n   *\n   * - `'URIError'` - Error thrown when parsing a bad URL.\n   * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\n   * - `'url'` -  The malformed URL that caused the URIError\n   * */\n  malformedUriErrorHandler?:\n      (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\n\n  /**\n   * Defines when the router updates the browser URL. By default ('deferred'),\n   * update after successful navigation.\n   * Set to 'eager' if prefer to update the URL at the beginning of navigation.\n   * Updating the URL early allows you to handle a failure of navigation by\n   * showing an error message with the URL that failed.\n   */\n  urlUpdateStrategy?: 'deferred'|'eager';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * Example:\n   *\n   * ```\n   * const routes = [\n   *   {\n   *     path: '',\n   *     component: ContainerComponent,\n   *     children: [\n   *       { path: 'a', component: AComponent },\n   *       { path: 'b', component: BComponent },\n   *     ]\n   *   }\n   * ];\n   * ```\n   *\n   * From the `ContainerComponent`, you should be able to navigate to `AComponent` using\n   * the following `routerLink`, but it will not work if `relativeLinkResolution` is set\n   * to `'legacy'`:\n   *\n   * `<a [routerLink]=\"['./a']\">Link to A</a>`\n   *\n   * However, this will work:\n   *\n   * `<a [routerLink]=\"['../a']\">Link to A</a>`\n   *\n   * In other words, you're required to use `../` rather than `./` when the relative link\n   * resolution is set to `'legacy'`.\n   *\n   * The default in v11 is `corrected`.\n   */\n  relativeLinkResolution?: 'legacy'|'corrected';\n}\n\nexport function setupRouter(\n    urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n    injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Route[][],\n    opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n    routeReuseStrategy?: RouteReuseStrategy) {\n  const router = new Router(\n      null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n\n  if (urlHandlingStrategy) {\n    router.urlHandlingStrategy = urlHandlingStrategy;\n  }\n\n  if (routeReuseStrategy) {\n    router.routeReuseStrategy = routeReuseStrategy;\n  }\n\n  assignExtraOptionsToRouter(opts, router);\n\n  if (opts.enableTracing) {\n    router.events.subscribe((e: Event) => {\n      // tslint:disable:no-console\n      console.group?.(`Router Event: ${(<any>e.constructor).name}`);\n      console.log(e.toString());\n      console.log(e);\n      console.groupEnd?.();\n      // tslint:enable:no-console\n    });\n  }\n\n  return router;\n}\n\nexport function assignExtraOptionsToRouter(opts: ExtraOptions, router: Router): void {\n  if (opts.errorHandler) {\n    router.errorHandler = opts.errorHandler;\n  }\n\n  if (opts.malformedUriErrorHandler) {\n    router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n  }\n\n  if (opts.onSameUrlNavigation) {\n    router.onSameUrlNavigation = opts.onSameUrlNavigation;\n  }\n\n  if (opts.paramsInheritanceStrategy) {\n    router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n  }\n\n  if (opts.relativeLinkResolution) {\n    router.relativeLinkResolution = opts.relativeLinkResolution;\n  }\n\n  if (opts.urlUpdateStrategy) {\n    router.urlUpdateStrategy = opts.urlUpdateStrategy;\n  }\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n  return router.routerState.root;\n}\n\n/**\n * Router initialization requires two steps:\n *\n * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if\n * a resolver or a guard executes asynchronously.\n *\n * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the\n * `afterPreactivation` hook provided by the router.\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n@Injectable()\nexport class RouterInitializer implements OnDestroy {\n  private initNavigation = false;\n  private destroyed = false;\n  private resultOfPreactivationDone = new Subject<void>();\n\n  constructor(private injector: Injector) {}\n\n  appInitializer(): Promise<any> {\n    const p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n    return p.then(() => {\n      // If the injector was destroyed, the DI lookups below will fail.\n      if (this.destroyed) {\n        return Promise.resolve(true);\n      }\n\n      let resolve: Function = null!;\n      const res = new Promise(r => resolve = r);\n      const router = this.injector.get(Router);\n      const opts = this.injector.get(ROUTER_CONFIGURATION);\n\n      if (opts.initialNavigation === 'disabled') {\n        router.setUpLocationChangeListener();\n        resolve(true);\n      } else if (\n          // TODO: enabled is deprecated as of v11, can be removed in v13\n          opts.initialNavigation === 'enabled' || opts.initialNavigation === 'enabledBlocking') {\n        router.hooks.afterPreactivation = () => {\n          // only the initial navigation should be delayed\n          if (!this.initNavigation) {\n            this.initNavigation = true;\n            resolve(true);\n            return this.resultOfPreactivationDone;\n\n            // subsequent navigations should not be delayed\n          } else {\n            return of(null) as any;\n          }\n        };\n        router.initialNavigation();\n      } else {\n        resolve(true);\n      }\n\n      return res;\n    });\n  }\n\n  bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n    const opts = this.injector.get(ROUTER_CONFIGURATION);\n    const preloader = this.injector.get(RouterPreloader);\n    const routerScroller = this.injector.get(RouterScroller);\n    const router = this.injector.get(Router);\n    const ref = this.injector.get<ApplicationRef>(ApplicationRef);\n\n    if (bootstrappedComponentRef !== ref.components[0]) {\n      return;\n    }\n\n    // Default case\n    if (opts.initialNavigation === 'enabledNonBlocking' || opts.initialNavigation === undefined) {\n      router.initialNavigation();\n    }\n\n    preloader.setUpPreloading();\n    routerScroller.init();\n    router.resetRootComponentType(ref.componentTypes[0]);\n    this.resultOfPreactivationDone.next(null!);\n    this.resultOfPreactivationDone.complete();\n  }\n\n  ngOnDestroy() {\n    this.destroyed = true;\n  }\n}\n\nexport function getAppInitializer(r: RouterInitializer) {\n  return r.appInitializer.bind(r);\n}\n\nexport function getBootstrapListener(r: RouterInitializer) {\n  return r.bootstrapListener.bind(r);\n}\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER =\n    new InjectionToken<(compRef: ComponentRef<any>) => void>('Router Initializer');\n\nexport function provideRouterInitializer(): ReadonlyArray<Provider> {\n  return [\n    RouterInitializer,\n    {\n      provide: APP_INITIALIZER,\n      multi: true,\n      useFactory: getAppInitializer,\n      deps: [RouterInitializer]\n    },\n    {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n    {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n  ];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code 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 * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('12.2.13');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {ɵEmptyOutletComponent} from './components/empty_outlet';\nexport {assignExtraOptionsToRouter as ɵassignExtraOptionsToRouter, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module';\nexport {flatten as ɵflatten} from './utils/collection';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {Data, DeprecatedLoadChildren, LoadChildren, LoadChildrenCallback, QueryParamsHandling, ResolveData, Route, Routes, RunGuardsAndResolvers, UrlMatcher, UrlMatchResult} from './config';\nexport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nexport {RouterLinkActive} from './directives/router_link_active';\nexport {RouterOutlet, RouterOutletContract} from './directives/router_outlet';\nexport {ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, Scroll} from './events';\nexport {CanActivate, CanActivateChild, CanDeactivate, CanLoad, Resolve} from './interfaces';\nexport {BaseRouteReuseStrategy, DetachedRouteHandle, RouteReuseStrategy} from './route_reuse_strategy';\nexport {Navigation, NavigationBehaviorOptions, NavigationExtras, Router, UrlCreationOptions} from './router';\nexport {ROUTES} from './router_config_loader';\nexport {ExtraOptions, InitialNavigation, provideRoutes, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, RouterModule} from './router_module';\nexport {ChildrenOutletContexts, OutletContext} from './router_outlet_context';\nexport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nexport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nexport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nexport {UrlHandlingStrategy} from './url_handling_strategy';\nexport {DefaultUrlSerializer, IsActiveMatchOptions, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nexport {VERSION} from './version';\n\nexport * from './private_export';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code 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 * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/index';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code 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 not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {EmptyOutletComponent as ɵangular_packages_router_router_l} from './src/components/empty_outlet';\nexport {ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a,RouterInitializer as ɵangular_packages_router_router_h,createRouterScroller as ɵangular_packages_router_router_c,getAppInitializer as ɵangular_packages_router_router_i,getBootstrapListener as ɵangular_packages_router_router_j,provideForRootGuard as ɵangular_packages_router_router_e,provideLocationStrategy as ɵangular_packages_router_router_d,provideRouterInitializer as ɵangular_packages_router_router_k,rootRoute as ɵangular_packages_router_router_g,routerNgProbeToken as ɵangular_packages_router_router_b,setupRouter as ɵangular_packages_router_router_f} from './src/router_module';\nexport {RouterScroller as ɵangular_packages_router_router_o} from './src/router_scroller';\nexport {Tree as ɵangular_packages_router_router_m,TreeNode as ɵangular_packages_router_router_n} from './src/utils/tree';"],"names":["isObservable","isPromise","from","of","BehaviorSubject","map","switchMap","combineLatest","take","startWith","scan","filter","Component","EmptyOutletComponent","noMatch","Observable","NgModuleRef","catchError","concatMap","last","first","EmptyError","mergeMap","tap","applyRedirects","applyRedirectsFn","concat","defer","NoMatch","recognize","recognizeFn","takeLast","EMPTY","InjectionToken","InjectFlags","ConnectableObservable","Subject","refCount","NgModuleFactory","Console","NgZone","finalize","Injectable","Type","Location","Injector","NgModuleFactoryLoader","Compiler","Directive","Attribute","Renderer2","ElementRef","Input","HostListener","LocationStrategy","HostBinding","mergeAll","ChangeDetectorRef","Optional","ContentChildren","EventEmitter","ViewContainerRef","ComponentFactoryResolver","Output","ViewportScroller","SystemJsNgModuleLoader","NgProbeToken","SkipSelf","PlatformLocation","Inject","APP_BASE_HREF","NgModule","HashLocationStrategy","PathLocationStrategy","ANALYZE_FOR_ENTRY_COMPONENTS","LOCATION_INITIALIZED","ApplicationRef","APP_INITIALIZER","APP_BOOTSTRAP_LISTENER","Version"],"mappings":";;;;;;;;;;;;IAAA;;;;;;;;;;;;;;IAcA;IAEA,IAAI,aAAa,GAAG,UAAS,CAAC,EAAE,CAAC;QAC7B,aAAa,GAAG,MAAM,CAAC,cAAc;aAChC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;YAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;gBAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;oBAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACtG,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC;aAEc,SAAS,CAAC,CAAC,EAAE,CAAC;QAC1B,IAAI,OAAO,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,IAAI;YACrC,MAAM,IAAI,SAAS,CAAC,sBAAsB,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,+BAA+B,CAAC,CAAC;QAC9F,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACpB,SAAS,EAAE,KAAK,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE;QACvC,CAAC,CAAC,SAAS,GAAG,CAAC,KAAK,IAAI,GAAG,MAAM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