@angular/router 7.2.0-beta.0 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/bundles/router-testing.umd.js +1 -1
  2. package/bundles/router-testing.umd.js.map +1 -1
  3. package/bundles/router-testing.umd.min.js +1 -1
  4. package/bundles/router-testing.umd.min.js.map +1 -1
  5. package/bundles/router-upgrade.umd.js +1 -1
  6. package/bundles/router-upgrade.umd.js.map +1 -1
  7. package/bundles/router-upgrade.umd.min.js +1 -1
  8. package/bundles/router-upgrade.umd.min.js.map +1 -1
  9. package/bundles/router.umd.js +87 -18
  10. package/bundles/router.umd.js.map +1 -1
  11. package/bundles/router.umd.min.js +6 -6
  12. package/bundles/router.umd.min.js.map +1 -1
  13. package/esm2015/index.js +2 -3
  14. package/esm2015/public_api.js +2 -4
  15. package/esm2015/router.externs.js +7 -3
  16. package/esm2015/router.js +1 -2
  17. package/esm2015/src/apply_redirects.js +60 -21
  18. package/esm2015/src/components/empty_outlet.js +2 -3
  19. package/esm2015/src/config.js +40 -66
  20. package/esm2015/src/create_router_state.js +3 -4
  21. package/esm2015/src/create_url_tree.js +3 -6
  22. package/esm2015/src/directives/router_link.js +71 -13
  23. package/esm2015/src/directives/router_link_active.js +30 -10
  24. package/esm2015/src/directives/router_outlet.js +46 -15
  25. package/esm2015/src/events.js +47 -35
  26. package/esm2015/src/index.js +2 -3
  27. package/esm2015/src/interfaces.js +44 -25
  28. package/esm2015/src/operators/activate_routes.js +31 -9
  29. package/esm2015/src/operators/apply_redirects.js +2 -3
  30. package/esm2015/src/operators/check_guards.js +8 -9
  31. package/esm2015/src/operators/prioritized_guard_value.js +4 -6
  32. package/esm2015/src/operators/recognize.js +2 -3
  33. package/esm2015/src/operators/resolve_data.js +3 -4
  34. package/esm2015/src/operators/switch_tap.js +2 -3
  35. package/esm2015/src/private_export.js +2 -3
  36. package/esm2015/src/recognize.js +41 -21
  37. package/esm2015/src/route_reuse_strategy.js +2 -9
  38. package/esm2015/src/router.js +304 -199
  39. package/esm2015/src/router_config_loader.js +24 -10
  40. package/esm2015/src/router_module.js +202 -188
  41. package/esm2015/src/router_outlet_context.js +7 -4
  42. package/esm2015/src/router_preloader.js +27 -8
  43. package/esm2015/src/router_scroller.js +37 -11
  44. package/esm2015/src/router_state.js +12 -19
  45. package/esm2015/src/shared.js +42 -34
  46. package/esm2015/src/url_handling_strategy.js +2 -3
  47. package/esm2015/src/url_tree.js +31 -7
  48. package/esm2015/src/utils/collection.js +2 -3
  49. package/esm2015/src/utils/preactivation.js +10 -5
  50. package/esm2015/src/utils/tree.js +5 -3
  51. package/esm2015/src/utils/type_guards.js +2 -3
  52. package/esm2015/src/version.js +11 -6
  53. package/esm2015/testing/index.js +2 -3
  54. package/esm2015/testing/public_api.js +2 -4
  55. package/esm2015/testing/src/router_testing_module.js +9 -6
  56. package/esm2015/testing/src/testing.js +2 -3
  57. package/esm2015/testing/testing.js +1 -2
  58. package/esm2015/upgrade/index.js +2 -3
  59. package/esm2015/upgrade/public_api.js +2 -4
  60. package/esm2015/upgrade/src/upgrade.js +9 -8
  61. package/esm2015/upgrade/upgrade.js +1 -2
  62. package/esm5/index.js +1 -2
  63. package/esm5/public_api.js +1 -2
  64. package/esm5/router.js +1 -2
  65. package/esm5/src/apply_redirects.js +1 -2
  66. package/esm5/src/components/empty_outlet.js +1 -2
  67. package/esm5/src/config.js +1 -2
  68. package/esm5/src/create_router_state.js +1 -2
  69. package/esm5/src/create_url_tree.js +1 -2
  70. package/esm5/src/directives/router_link.js +31 -2
  71. package/esm5/src/directives/router_link_active.js +1 -2
  72. package/esm5/src/directives/router_outlet.js +1 -2
  73. package/esm5/src/events.js +1 -2
  74. package/esm5/src/index.js +1 -2
  75. package/esm5/src/interfaces.js +1 -2
  76. package/esm5/src/operators/activate_routes.js +1 -2
  77. package/esm5/src/operators/apply_redirects.js +1 -2
  78. package/esm5/src/operators/check_guards.js +1 -2
  79. package/esm5/src/operators/prioritized_guard_value.js +1 -2
  80. package/esm5/src/operators/recognize.js +1 -2
  81. package/esm5/src/operators/resolve_data.js +1 -2
  82. package/esm5/src/operators/switch_tap.js +1 -2
  83. package/esm5/src/private_export.js +1 -2
  84. package/esm5/src/recognize.js +1 -2
  85. package/esm5/src/route_reuse_strategy.js +1 -2
  86. package/esm5/src/router.js +50 -18
  87. package/esm5/src/router_config_loader.js +1 -2
  88. package/esm5/src/router_module.js +1 -2
  89. package/esm5/src/router_outlet_context.js +1 -2
  90. package/esm5/src/router_preloader.js +1 -2
  91. package/esm5/src/router_scroller.js +1 -2
  92. package/esm5/src/router_state.js +1 -2
  93. package/esm5/src/shared.js +1 -2
  94. package/esm5/src/url_handling_strategy.js +1 -2
  95. package/esm5/src/url_tree.js +1 -2
  96. package/esm5/src/utils/collection.js +1 -2
  97. package/esm5/src/utils/preactivation.js +7 -2
  98. package/esm5/src/utils/tree.js +1 -2
  99. package/esm5/src/utils/type_guards.js +1 -2
  100. package/esm5/src/version.js +2 -3
  101. package/esm5/testing/index.js +1 -2
  102. package/esm5/testing/public_api.js +1 -2
  103. package/esm5/testing/src/router_testing_module.js +1 -2
  104. package/esm5/testing/src/testing.js +1 -2
  105. package/esm5/testing/testing.js +1 -2
  106. package/esm5/upgrade/index.js +1 -2
  107. package/esm5/upgrade/public_api.js +1 -2
  108. package/esm5/upgrade/src/upgrade.js +1 -2
  109. package/esm5/upgrade/upgrade.js +1 -2
  110. package/fesm2015/router.js +387 -202
  111. package/fesm2015/router.js.map +1 -1
  112. package/fesm2015/testing.js +7 -8
  113. package/fesm2015/testing.js.map +1 -1
  114. package/fesm2015/upgrade.js +11 -10
  115. package/fesm2015/upgrade.js.map +1 -1
  116. package/fesm5/router.js +87 -18
  117. package/fesm5/router.js.map +1 -1
  118. package/fesm5/testing.js +1 -1
  119. package/fesm5/testing.js.map +1 -1
  120. package/fesm5/upgrade.js +1 -1
  121. package/fesm5/upgrade.js.map +1 -1
  122. package/package.json +4 -4
  123. package/router.metadata.json +1 -1
  124. package/src/config.d.ts +9 -2
  125. package/src/directives/router_link.d.ts +27 -0
  126. package/src/events.d.ts +6 -2
  127. package/src/index.d.ts +1 -1
  128. package/src/router.d.ts +74 -3
  129. package/testing.d.ts +5 -0
  130. package/upgrade.d.ts +5 -0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v7.2.0-beta.0
2
+ * @license Angular v7.2.0
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"router-testing.umd.js","sources":["../../../../../../../../../../external/ngdeps/node_modules/tslib/tslib.es6.js","../../../../../../packages/router/testing/src/router_testing_module.ts","../../../../../../packages/router/testing/src/testing.ts","../../../../../../packages/router/testing/public_api.ts","../../../../../../packages/router/testing/index.ts","../../../../../../packages/router/testing/testing.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\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 (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\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++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\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 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) : new P(function (resolve) { resolve(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 function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n 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}\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\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\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\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = 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","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, LocationStrategy} from '@angular/common';\nimport {MockLocationStrategy, SpyLocation} from '@angular/common/testing';\nimport {Compiler, Injectable, Injector, ModuleWithProviders, NgModule, NgModuleFactory, NgModuleFactoryLoader, Optional} from '@angular/core';\nimport {ChildrenOutletContexts, ExtraOptions, NoPreloading, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTES, Route, Router, RouterModule, Routes, UrlHandlingStrategy, UrlSerializer, provideRoutes, ɵROUTER_PROVIDERS as ROUTER_PROVIDERS, ɵflatten as flatten} from '@angular/router';\n\n\n\n/**\n * @description\n *\n * Allows to simulate the loading of ng modules in tests.\n *\n * ```\n * const loader = TestBed.get(NgModuleFactoryLoader);\n *\n * @Component({template: 'lazy-loaded'})\n * class LazyLoadedComponent {}\n * @NgModule({\n * declarations: [LazyLoadedComponent],\n * imports: [RouterModule.forChild([{path: 'loaded', component: LazyLoadedComponent}])]\n * })\n *\n * class LoadedModule {}\n *\n * // sets up stubbedModules\n * loader.stubbedModules = {lazyModule: LoadedModule};\n *\n * router.resetConfig([\n * {path: 'lazy', loadChildren: 'lazyModule'},\n * ]);\n *\n * router.navigateByUrl('/lazy/loaded');\n * ```\n *\n * @publicApi\n */\n@Injectable()\nexport class SpyNgModuleFactoryLoader implements NgModuleFactoryLoader {\n /**\n * @docsNotRequired\n */\n private _stubbedModules: {[path: string]: Promise<NgModuleFactory<any>>} = {};\n\n /**\n * @docsNotRequired\n */\n set stubbedModules(modules: {[path: string]: any}) {\n const res: {[path: string]: any} = {};\n for (const t of Object.keys(modules)) {\n res[t] = this.compiler.compileModuleAsync(modules[t]);\n }\n this._stubbedModules = res;\n }\n\n /**\n * @docsNotRequired\n */\n get stubbedModules(): {[path: string]: any} { return this._stubbedModules; }\n\n constructor(private compiler: Compiler) {}\n\n load(path: string): Promise<NgModuleFactory<any>> {\n if (this._stubbedModules[path]) {\n return this._stubbedModules[path];\n } else {\n return <any>Promise.reject(new Error(`Cannot find module ${path}`));\n }\n }\n}\n\nfunction isUrlHandlingStrategy(opts: ExtraOptions | UrlHandlingStrategy):\n opts is UrlHandlingStrategy {\n // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at\n // runtime.\n return 'shouldProcessUrl' in opts;\n}\n\n/**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][],\n opts?: ExtraOptions, urlHandlingStrategy?: UrlHandlingStrategy): Router;\n\n/**\n * Router setup factory function used for testing.\n *\n * @deprecated As of v5.2. The 2nd-to-last argument should be `ExtraOptions`, not\n * `UrlHandlingStrategy`\n * @publicApi\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][],\n urlHandlingStrategy?: UrlHandlingStrategy): Router;\n\n/**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][],\n opts?: ExtraOptions | UrlHandlingStrategy, urlHandlingStrategy?: UrlHandlingStrategy) {\n const router = new Router(\n null !, urlSerializer, contexts, location, injector, loader, compiler, flatten(routes));\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n router.urlHandlingStrategy = opts;\n } else {\n // Handle ExtraOptions\n\n if (opts.malformedUriErrorHandler) {\n router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n\n if (opts.paramsInheritanceStrategy) {\n router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n }\n }\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n return router;\n}\n\n/**\n * @description\n *\n * Sets up the router to be used for testing.\n *\n * The modules sets up the router to be used for testing.\n * It provides spy implementations of `Location`, `LocationStrategy`, and {@link\n * NgModuleFactoryLoader}.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * beforeEach(() => {\n * TestBed.configureTestModule({\n * imports: [\n * RouterTestingModule.withRoutes(\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\n * )\n * ]\n * });\n * });\n * ```\n *\n * @publicApi\n */\n@NgModule({\n exports: [RouterModule],\n providers: [\n ROUTER_PROVIDERS, {provide: Location, useClass: SpyLocation},\n {provide: LocationStrategy, useClass: MockLocationStrategy},\n {provide: NgModuleFactoryLoader, useClass: SpyNgModuleFactoryLoader}, {\n provide: Router,\n useFactory: setupTestingRouter,\n deps: [\n UrlSerializer, ChildrenOutletContexts, Location, NgModuleFactoryLoader, Compiler, Injector,\n ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()]\n ]\n },\n {provide: PreloadingStrategy, useExisting: NoPreloading}, provideRoutes([])\n ]\n})\nexport class RouterTestingModule {\n static withRoutes(routes: Routes, config?: ExtraOptions):\n ModuleWithProviders<RouterTestingModule> {\n return {\n ngModule: RouterTestingModule,\n providers: [\n provideRoutes(routes),\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n ]\n };\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router/testing package.\n */\nexport * from './router_testing_module';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/testing';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// 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"],"names":["tslib_1.__values","Injectable","Compiler","router","Router","flatten","provideRoutes","ROUTER_CONFIGURATION","NgModule","RouterModule","ROUTER_PROVIDERS","Location","SpyLocation","LocationStrategy","MockLocationStrategy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;ICNH;;;;;;;AAQA,IAOA,0EAA0E;;ICf1E;;;;;;OAMG;;ICNH;;OAEG;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"router-testing.umd.js","sources":["../../../../../../../../../../external/ngdeps/node_modules/tslib/tslib.es6.js","npm_package.esm5/packages/packages/router/testing/src/router_testing_module.ts","npm_package.esm5/packages/packages/router/testing/src/testing.ts","npm_package.esm5/packages/router/testing/public_api.ts","npm_package.esm5/packages/router/testing/index.ts","npm_package.esm5/packages/router/testing/testing.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\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 (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\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++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\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 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) : new P(function (resolve) { resolve(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 function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n 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}\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\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\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\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = 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","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, LocationStrategy} from '@angular/common';\nimport {MockLocationStrategy, SpyLocation} from '@angular/common/testing';\nimport {Compiler, Injectable, Injector, ModuleWithProviders, NgModule, NgModuleFactory, NgModuleFactoryLoader, Optional} from '@angular/core';\nimport {ChildrenOutletContexts, ExtraOptions, NoPreloading, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTES, Route, Router, RouterModule, Routes, UrlHandlingStrategy, UrlSerializer, provideRoutes, ɵROUTER_PROVIDERS as ROUTER_PROVIDERS, ɵflatten as flatten} from '@angular/router';\n\n\n\n/**\n * @description\n *\n * Allows to simulate the loading of ng modules in tests.\n *\n * ```\n * const loader = TestBed.get(NgModuleFactoryLoader);\n *\n * @Component({template: 'lazy-loaded'})\n * class LazyLoadedComponent {}\n * @NgModule({\n * declarations: [LazyLoadedComponent],\n * imports: [RouterModule.forChild([{path: 'loaded', component: LazyLoadedComponent}])]\n * })\n *\n * class LoadedModule {}\n *\n * // sets up stubbedModules\n * loader.stubbedModules = {lazyModule: LoadedModule};\n *\n * router.resetConfig([\n * {path: 'lazy', loadChildren: 'lazyModule'},\n * ]);\n *\n * router.navigateByUrl('/lazy/loaded');\n * ```\n *\n * @publicApi\n */\n@Injectable()\nexport class SpyNgModuleFactoryLoader implements NgModuleFactoryLoader {\n /**\n * @docsNotRequired\n */\n private _stubbedModules: {[path: string]: Promise<NgModuleFactory<any>>} = {};\n\n /**\n * @docsNotRequired\n */\n set stubbedModules(modules: {[path: string]: any}) {\n const res: {[path: string]: any} = {};\n for (const t of Object.keys(modules)) {\n res[t] = this.compiler.compileModuleAsync(modules[t]);\n }\n this._stubbedModules = res;\n }\n\n /**\n * @docsNotRequired\n */\n get stubbedModules(): {[path: string]: any} { return this._stubbedModules; }\n\n constructor(private compiler: Compiler) {}\n\n load(path: string): Promise<NgModuleFactory<any>> {\n if (this._stubbedModules[path]) {\n return this._stubbedModules[path];\n } else {\n return <any>Promise.reject(new Error(`Cannot find module ${path}`));\n }\n }\n}\n\nfunction isUrlHandlingStrategy(opts: ExtraOptions | UrlHandlingStrategy):\n opts is UrlHandlingStrategy {\n // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at\n // runtime.\n return 'shouldProcessUrl' in opts;\n}\n\n/**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][],\n opts?: ExtraOptions, urlHandlingStrategy?: UrlHandlingStrategy): Router;\n\n/**\n * Router setup factory function used for testing.\n *\n * @deprecated As of v5.2. The 2nd-to-last argument should be `ExtraOptions`, not\n * `UrlHandlingStrategy`\n * @publicApi\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][],\n urlHandlingStrategy?: UrlHandlingStrategy): Router;\n\n/**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\nexport function setupTestingRouter(\n urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][],\n opts?: ExtraOptions | UrlHandlingStrategy, urlHandlingStrategy?: UrlHandlingStrategy) {\n const router = new Router(\n null !, urlSerializer, contexts, location, injector, loader, compiler, flatten(routes));\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n router.urlHandlingStrategy = opts;\n } else {\n // Handle ExtraOptions\n\n if (opts.malformedUriErrorHandler) {\n router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n\n if (opts.paramsInheritanceStrategy) {\n router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n }\n }\n\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n return router;\n}\n\n/**\n * @description\n *\n * Sets up the router to be used for testing.\n *\n * The modules sets up the router to be used for testing.\n * It provides spy implementations of `Location`, `LocationStrategy`, and {@link\n * NgModuleFactoryLoader}.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * beforeEach(() => {\n * TestBed.configureTestModule({\n * imports: [\n * RouterTestingModule.withRoutes(\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\n * )\n * ]\n * });\n * });\n * ```\n *\n * @publicApi\n */\n@NgModule({\n exports: [RouterModule],\n providers: [\n ROUTER_PROVIDERS, {provide: Location, useClass: SpyLocation},\n {provide: LocationStrategy, useClass: MockLocationStrategy},\n {provide: NgModuleFactoryLoader, useClass: SpyNgModuleFactoryLoader}, {\n provide: Router,\n useFactory: setupTestingRouter,\n deps: [\n UrlSerializer, ChildrenOutletContexts, Location, NgModuleFactoryLoader, Compiler, Injector,\n ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()]\n ]\n },\n {provide: PreloadingStrategy, useExisting: NoPreloading}, provideRoutes([])\n ]\n})\nexport class RouterTestingModule {\n static withRoutes(routes: Routes, config?: ExtraOptions):\n ModuleWithProviders<RouterTestingModule> {\n return {\n ngModule: RouterTestingModule,\n providers: [\n provideRoutes(routes),\n {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n ]\n };\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router/testing package.\n */\nexport * from './router_testing_module';\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/testing';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// 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"],"names":["tslib_1.__values","Injectable","Compiler","router","Router","flatten","provideRoutes","ROUTER_CONFIGURATION","NgModule","RouterModule","ROUTER_PROVIDERS","Location","SpyLocation","LocationStrategy","MockLocationStrategy","NgModuleFactoryLoader","UrlSerializer","ChildrenOutletContexts","Injector","ROUTES","UrlHandlingStrategy","Optional","PreloadingStrategy","NoPreloading"],"mappings":";;;;;;;;;;;;IAAA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA;IACA;IACA;AACA,AAmCA;AACA,IAAO,SAAS,UAAU,CAAC,U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  */
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/router/router-testing.umd.js"],"names":["global","factory","exports","module","require","define","amd","ng","router","testing","common","core","this","__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","SpyNgModuleFactoryLoader","compiler","_stubbedModules","prototype","get","set","modules","e_1","_a","res","_b","__values","o","m","Symbol","iterator","call","next","value","done","keys","_c","t","compileModuleAsync","e_1_1","error","return","enumerable","configurable","load","path","Promise","reject","Error","Injectable","__metadata","metadataKey","metadataValue","metadata","Compiler","setupTestingRouter","urlSerializer","contexts","location","loader","injector","routes","opts","urlHandlingStrategy","router$$1","Router","ɵflatten","isUrlHandlingStrategy","malformedUriErrorHandler","paramsInheritanceStrategy","RouterTestingModule","RouterTestingModule_1","withRoutes","config","ngModule","providers","provideRoutes","provide","ROUTER_CONFIGURATION","useValue","NgModule","RouterModule","ɵROUTER_PROVIDERS","Location","useClass","SpyLocation","LocationStrategy","MockLocationStrategy","NgModuleFactoryLoader","useFactory","deps","UrlSerializer","ChildrenOutletContexts","Injector","ROUTES","UrlHandlingStrategy","Optional","PreloadingStrategy","useExisting","NoPreloading"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,mBAAoBA,QAAQ,2BAA4BA,QAAQ,iBAAkBA,QAAQ,oBAChK,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,2BAA4B,UAAW,kBAAmB,0BAA2B,gBAAiB,mBAAoBJ,GAC7KA,GAASD,EAAOO,GAAKP,EAAOO,OAAUP,EAAOO,GAAGC,OAASR,EAAOO,GAAGC,WAAcR,EAAOO,GAAGC,OAAOC,YAAcT,EAAOO,GAAGG,OAAOV,EAAOO,GAAGG,OAAOD,QAAQT,EAAOO,GAAGI,KAAKX,EAAOO,GAAGC,QAHxL,CAIEI,KAAM,SAAWV,EAAQQ,EAAOD,EAAQE,EAAKH,GAA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OuF,SAAUC,SAAUzF,EAAQ0F,cACtER,QAASjF,EAAO0F,iBAAkBF,SAAUzF,EAAQ4F,uBACpDV,QAAShF,EAAK2F,sBAAuBJ,SAAUrE,IAC7C8D,QAASnF,EAAOuE,OAChBwB,WAAYlC,EACZmC,MACIhG,EAAOiG,cAAejG,EAAOkG,uBAAwBhG,EAAOuF,SAAUtF,EAAK2F,sBAAuB3F,EAAKyD,SAAUzD,EAAKgG,SACtHnG,EAAOoG,OAAQpG,EAAOoF,sBAAuBpF,EAAOqG,oBAAqB,IAAIlG,EAAKmG,aAGxFnB,QAASnF,EAAOuG,mBAAoBC,YAAaxG,EAAOyG,cAAgBzG,EAAOkF,sBAG1FN,GA/BiC;;;;;;;;;;;;;;;;;;;;;OAgExClF,EAAQ2B,yBAA2BA,EACnC3B,EAAQmE,mBAAqBA,EAC7BnE,EAAQkF,oBAAsBA,EAE9B7D,OAAOK,eAAe1B,EAAS,cAAgB6C,OAAO","sourcesContent":["/**\n * @license Angular v7.2.0-beta.0\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/common/testing'), require('@angular/core'), require('@angular/router')) :\n typeof define === 'function' && define.amd ? define('@angular/router/testing', ['exports', '@angular/common', '@angular/common/testing', '@angular/core', '@angular/router'], factory) :\n (factory((global.ng = global.ng || {}, global.ng.router = global.ng.router || {}, global.ng.router.testing = {}),global.ng.common,global.ng.common.testing,global.ng.core,global.ng.router));\n}(this, (function (exports,common,testing,core,router) { 'use strict';\n\n /*! *****************************************************************************\r\n Copyright (c) Microsoft Corporation. All rights reserved.\r\n Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\n this file except in compliance with the License. You may obtain a copy of the\r\n License at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\n WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\n MERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\n See the Apache Version 2.0 License for specific language governing permissions\r\n and limitations under the License.\r\n ***************************************************************************** */\r\n\r\n 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\n function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n }\r\n\r\n function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n 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 }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Allows to simulate the loading of ng modules in tests.\n *\n * ```\n * const loader = TestBed.get(NgModuleFactoryLoader);\n *\n * @Component({template: 'lazy-loaded'})\n * class LazyLoadedComponent {}\n * @NgModule({\n * declarations: [LazyLoadedComponent],\n * imports: [RouterModule.forChild([{path: 'loaded', component: LazyLoadedComponent}])]\n * })\n *\n * class LoadedModule {}\n *\n * // sets up stubbedModules\n * loader.stubbedModules = {lazyModule: LoadedModule};\n *\n * router.resetConfig([\n * {path: 'lazy', loadChildren: 'lazyModule'},\n * ]);\n *\n * router.navigateByUrl('/lazy/loaded');\n * ```\n *\n * @publicApi\n */\n var SpyNgModuleFactoryLoader = /** @class */ (function () {\n function SpyNgModuleFactoryLoader(compiler) {\n this.compiler = compiler;\n /**\n * @docsNotRequired\n */\n this._stubbedModules = {};\n }\n Object.defineProperty(SpyNgModuleFactoryLoader.prototype, \"stubbedModules\", {\n /**\n * @docsNotRequired\n */\n get: function () { return this._stubbedModules; },\n /**\n * @docsNotRequired\n */\n set: function (modules) {\n var e_1, _a;\n var res = {};\n try {\n for (var _b = __values(Object.keys(modules)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var t = _c.value;\n res[t] = this.compiler.compileModuleAsync(modules[t]);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n this._stubbedModules = res;\n },\n enumerable: true,\n configurable: true\n });\n SpyNgModuleFactoryLoader.prototype.load = function (path) {\n if (this._stubbedModules[path]) {\n return this._stubbedModules[path];\n }\n else {\n return Promise.reject(new Error(\"Cannot find module \" + path));\n }\n };\n SpyNgModuleFactoryLoader = __decorate([\n core.Injectable(),\n __metadata(\"design:paramtypes\", [core.Compiler])\n ], SpyNgModuleFactoryLoader);\n return SpyNgModuleFactoryLoader;\n }());\n function isUrlHandlingStrategy(opts) {\n // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at\n // runtime.\n return 'shouldProcessUrl' in opts;\n }\n /**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\n function setupTestingRouter(urlSerializer, contexts, location, loader, compiler, injector, routes, opts, urlHandlingStrategy) {\n var router$$1 = new router.Router(null, urlSerializer, contexts, location, injector, loader, compiler, router.ɵflatten(routes));\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n router$$1.urlHandlingStrategy = opts;\n }\n else {\n // Handle ExtraOptions\n if (opts.malformedUriErrorHandler) {\n router$$1.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n if (opts.paramsInheritanceStrategy) {\n router$$1.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n }\n }\n if (urlHandlingStrategy) {\n router$$1.urlHandlingStrategy = urlHandlingStrategy;\n }\n return router$$1;\n }\n /**\n * @description\n *\n * Sets up the router to be used for testing.\n *\n * The modules sets up the router to be used for testing.\n * It provides spy implementations of `Location`, `LocationStrategy`, and {@link\n * NgModuleFactoryLoader}.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * beforeEach(() => {\n * TestBed.configureTestModule({\n * imports: [\n * RouterTestingModule.withRoutes(\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\n * )\n * ]\n * });\n * });\n * ```\n *\n * @publicApi\n */\n var RouterTestingModule = /** @class */ (function () {\n function RouterTestingModule() {\n }\n RouterTestingModule_1 = RouterTestingModule;\n RouterTestingModule.withRoutes = function (routes, config) {\n return {\n ngModule: RouterTestingModule_1,\n providers: [\n router.provideRoutes(routes),\n { provide: router.ROUTER_CONFIGURATION, useValue: config ? config : {} },\n ]\n };\n };\n var RouterTestingModule_1;\n RouterTestingModule = RouterTestingModule_1 = __decorate([\n core.NgModule({\n exports: [router.RouterModule],\n providers: [\n router.ɵROUTER_PROVIDERS, { provide: common.Location, useClass: testing.SpyLocation },\n { provide: common.LocationStrategy, useClass: testing.MockLocationStrategy },\n { provide: core.NgModuleFactoryLoader, useClass: SpyNgModuleFactoryLoader }, {\n provide: router.Router,\n useFactory: setupTestingRouter,\n deps: [\n router.UrlSerializer, router.ChildrenOutletContexts, common.Location, core.NgModuleFactoryLoader, core.Compiler, core.Injector,\n router.ROUTES, router.ROUTER_CONFIGURATION, [router.UrlHandlingStrategy, new core.Optional()]\n ]\n },\n { provide: router.PreloadingStrategy, useExisting: router.NoPreloading }, router.provideRoutes([])\n ]\n })\n ], RouterTestingModule);\n return RouterTestingModule;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // This file only reexports content of the `src` folder. Keep it that way.\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.SpyNgModuleFactoryLoader = SpyNgModuleFactoryLoader;\n exports.setupTestingRouter = setupTestingRouter;\n exports.RouterTestingModule = RouterTestingModule;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=router-testing.umd.js.map\n"]}
1
+ {"version":3,"sources":["packages/router/router-testing.umd.js"],"names":["global","factory","exports","module","require","define","amd","ng","router","testing","common","core","this","__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","SpyNgModuleFactoryLoader","compiler","_stubbedModules","prototype","get","set","modules","e_1","_a","res","_b","__values","o","m","Symbol","iterator","call","next","value","done","keys","_c","t","compileModuleAsync","e_1_1","error","return","enumerable","configurable","load","path","Promise","reject","Error","Injectable","__metadata","metadataKey","metadataValue","metadata","Compiler","setupTestingRouter","urlSerializer","contexts","location","loader","injector","routes","opts","urlHandlingStrategy","router$$1","Router","ɵflatten","isUrlHandlingStrategy","malformedUriErrorHandler","paramsInheritanceStrategy","RouterTestingModule","RouterTestingModule_1","withRoutes","config","ngModule","providers","provideRoutes","provide","ROUTER_CONFIGURATION","useValue","NgModule","RouterModule","ɵROUTER_PROVIDERS","Location","useClass","SpyLocation","LocationStrategy","MockLocationStrategy","NgModuleFactoryLoader","useFactory","deps","UrlSerializer","ChildrenOutletContexts","Injector","ROUTES","UrlHandlingStrategy","Optional","PreloadingStrategy","useEx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ASK,EAAsBL,GAG3B,MAAO,qBAAsBA,EAWrBK,CAAsBL,GACtBE,EAAUD,oBAAsBD,GAI5BA,EAAKM,2BACLJ,EAAUI,yBAA2BN,EAAKM,0BAE1CN,EAAKO,4BACLL,EAAUK,0BAA4BP,EAAKO,6BAInDN,IACAC,EAAUD,oBAAsBA,GAE7BC,EA4BX,IAAIM,EAAqC,WACrC,SAASA,KAYT,IAAIC,EAmBJ,OA7BAA,EAAwBD,EACxBA,EAAoBE,WAAa,SAAUX,EAAQY,GAC/C,OACIC,SAAUH,EACVI,WACIjF,EAAOkF,cAAcf,IACnBgB,QAASnF,EAAOoF,qBAAsBC,SAAUN,UAKxCF,EAAwBxE,GAC1CF,EAAKmF,UACD5F,SAAUM,EAAOuF,cACjBN,WACIjF,EAAOwF,mBAAqBL,QAASjF,EAAOuF,SAAUC,SAAUzF,EAAQ0F,cACtER,QAASjF,EAAO0F,iBAAkBF,SAAUzF,EAAQ4F,uBACpDV,QAAShF,EAAK2F,sBAAuBJ,SAAUrE,IAC7C8D,QAASnF,EAAOuE,OAChBwB,WAAYlC,EACZmC,MACIhG,EAAOiG,cAAejG,EAAOkG,uBAAwBhG,EAAOuF,SAAUtF,EAAK2F,sBAAuB3F,EAAKyD,SAAUzD,EAAKgG,SACtHnG,EAAOoG,OAAQpG,EAAOoF,sBAAuBpF,EAAOqG,oBAAqB,IAAIlG,EAAKmG,aAGxFnB,QAASnF,EAAOuG,mBAAoBC,YAAaxG,EAAOyG,cAAgBzG,EAAOkF,sBAG1FN,GA/BiC;;;;;;;;;;;;;;;;;;;;;OAgExClF,EAAQ2B,yBAA2BA,EACnC3B,EAAQmE,mBAAqBA,EAC7BnE,EAAQkF,oBAAsBA,EAE9B7D,OAAOK,eAAe1B,EAAS,cAAgB6C,OAAO","sourcesContent":["/**\n * @license Angular v7.2.0\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/common/testing'), require('@angular/core'), require('@angular/router')) :\n typeof define === 'function' && define.amd ? define('@angular/router/testing', ['exports', '@angular/common', '@angular/common/testing', '@angular/core', '@angular/router'], factory) :\n (factory((global.ng = global.ng || {}, global.ng.router = global.ng.router || {}, global.ng.router.testing = {}),global.ng.common,global.ng.common.testing,global.ng.core,global.ng.router));\n}(this, (function (exports,common,testing,core,router) { 'use strict';\n\n /*! *****************************************************************************\r\n Copyright (c) Microsoft Corporation. All rights reserved.\r\n Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\n this file except in compliance with the License. You may obtain a copy of the\r\n License at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\n WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\n MERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\n See the Apache Version 2.0 License for specific language governing permissions\r\n and limitations under the License.\r\n ***************************************************************************** */\r\n\r\n 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\n function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n }\r\n\r\n function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n 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 }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Allows to simulate the loading of ng modules in tests.\n *\n * ```\n * const loader = TestBed.get(NgModuleFactoryLoader);\n *\n * @Component({template: 'lazy-loaded'})\n * class LazyLoadedComponent {}\n * @NgModule({\n * declarations: [LazyLoadedComponent],\n * imports: [RouterModule.forChild([{path: 'loaded', component: LazyLoadedComponent}])]\n * })\n *\n * class LoadedModule {}\n *\n * // sets up stubbedModules\n * loader.stubbedModules = {lazyModule: LoadedModule};\n *\n * router.resetConfig([\n * {path: 'lazy', loadChildren: 'lazyModule'},\n * ]);\n *\n * router.navigateByUrl('/lazy/loaded');\n * ```\n *\n * @publicApi\n */\n var SpyNgModuleFactoryLoader = /** @class */ (function () {\n function SpyNgModuleFactoryLoader(compiler) {\n this.compiler = compiler;\n /**\n * @docsNotRequired\n */\n this._stubbedModules = {};\n }\n Object.defineProperty(SpyNgModuleFactoryLoader.prototype, \"stubbedModules\", {\n /**\n * @docsNotRequired\n */\n get: function () { return this._stubbedModules; },\n /**\n * @docsNotRequired\n */\n set: function (modules) {\n var e_1, _a;\n var res = {};\n try {\n for (var _b = __values(Object.keys(modules)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var t = _c.value;\n res[t] = this.compiler.compileModuleAsync(modules[t]);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n this._stubbedModules = res;\n },\n enumerable: true,\n configurable: true\n });\n SpyNgModuleFactoryLoader.prototype.load = function (path) {\n if (this._stubbedModules[path]) {\n return this._stubbedModules[path];\n }\n else {\n return Promise.reject(new Error(\"Cannot find module \" + path));\n }\n };\n SpyNgModuleFactoryLoader = __decorate([\n core.Injectable(),\n __metadata(\"design:paramtypes\", [core.Compiler])\n ], SpyNgModuleFactoryLoader);\n return SpyNgModuleFactoryLoader;\n }());\n function isUrlHandlingStrategy(opts) {\n // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at\n // runtime.\n return 'shouldProcessUrl' in opts;\n }\n /**\n * Router setup factory function used for testing.\n *\n * @publicApi\n */\n function setupTestingRouter(urlSerializer, contexts, location, loader, compiler, injector, routes, opts, urlHandlingStrategy) {\n var router$$1 = new router.Router(null, urlSerializer, contexts, location, injector, loader, compiler, router.ɵflatten(routes));\n if (opts) {\n // Handle deprecated argument ordering.\n if (isUrlHandlingStrategy(opts)) {\n router$$1.urlHandlingStrategy = opts;\n }\n else {\n // Handle ExtraOptions\n if (opts.malformedUriErrorHandler) {\n router$$1.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n if (opts.paramsInheritanceStrategy) {\n router$$1.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n }\n }\n if (urlHandlingStrategy) {\n router$$1.urlHandlingStrategy = urlHandlingStrategy;\n }\n return router$$1;\n }\n /**\n * @description\n *\n * Sets up the router to be used for testing.\n *\n * The modules sets up the router to be used for testing.\n * It provides spy implementations of `Location`, `LocationStrategy`, and {@link\n * NgModuleFactoryLoader}.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * beforeEach(() => {\n * TestBed.configureTestModule({\n * imports: [\n * RouterTestingModule.withRoutes(\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\n * )\n * ]\n * });\n * });\n * ```\n *\n * @publicApi\n */\n var RouterTestingModule = /** @class */ (function () {\n function RouterTestingModule() {\n }\n RouterTestingModule_1 = RouterTestingModule;\n RouterTestingModule.withRoutes = function (routes, config) {\n return {\n ngModule: RouterTestingModule_1,\n providers: [\n router.provideRoutes(routes),\n { provide: router.ROUTER_CONFIGURATION, useValue: config ? config : {} },\n ]\n };\n };\n var RouterTestingModule_1;\n RouterTestingModule = RouterTestingModule_1 = __decorate([\n core.NgModule({\n exports: [router.RouterModule],\n providers: [\n router.ɵROUTER_PROVIDERS, { provide: common.Location, useClass: testing.SpyLocation },\n { provide: common.LocationStrategy, useClass: testing.MockLocationStrategy },\n { provide: core.NgModuleFactoryLoader, useClass: SpyNgModuleFactoryLoader }, {\n provide: router.Router,\n useFactory: setupTestingRouter,\n deps: [\n router.UrlSerializer, router.ChildrenOutletContexts, common.Location, core.NgModuleFactoryLoader, core.Compiler, core.Injector,\n router.ROUTES, router.ROUTER_CONFIGURATION, [router.UrlHandlingStrategy, new core.Optional()]\n ]\n },\n { provide: router.PreloadingStrategy, useExisting: router.NoPreloading }, router.provideRoutes([])\n ]\n })\n ], RouterTestingModule);\n return RouterTestingModule;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // This file only reexports content of the `src` folder. Keep it that way.\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.SpyNgModuleFactoryLoader = SpyNgModuleFactoryLoader;\n exports.setupTestingRouter = setupTestingRouter;\n exports.RouterTestingModule = RouterTestingModule;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=router-testing.umd.js.map\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v7.2.0-beta.0
2
+ * @license Angular v7.2.0
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"router-upgrade.umd.js","sources":["../../../../../../packages/router/upgrade/src/upgrade.ts","../../../../../../packages/router/upgrade/public_api.ts","../../../../../../packages/router/upgrade/index.ts","../../../../../../packages/router/upgrade/upgrade.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location} from '@angular/common';\nimport {APP_BOOTSTRAP_LISTENER, ComponentRef, InjectionToken} from '@angular/core';\nimport {Router} from '@angular/router';\nimport {UpgradeModule} from '@angular/upgrade/static';\n\n/**\n * @description\n *\n * Creates an initializer that in addition to setting up the Angular\n * router sets up the ngRoute integration.\n *\n * ```\n * @NgModule({\n * imports: [\n * RouterModule.forRoot(SOME_ROUTES),\n * UpgradeModule\n * ],\n * providers: [\n * RouterUpgradeInitializer\n * ]\n * })\n * export class AppModule {\n * ngDoBootstrap() {}\n * }\n * ```\n *\n * @publicApi\n */\nexport const RouterUpgradeInitializer = {\n provide: APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: locationSyncBootstrapListener as(ngUpgrade: UpgradeModule) => () => void,\n deps: [UpgradeModule]\n};\n\n/**\n * @internal\n */\nexport function locationSyncBootstrapListener(ngUpgrade: UpgradeModule) {\n return () => { setUpLocationSync(ngUpgrade); };\n}\n\n/**\n * @description\n *\n * Sets up a location synchronization.\n *\n * History.pushState does not fire onPopState, so the Angular location\n * doesn't detect it. The workaround is to attach a location change listener\n *\n * @publicApi\n */\nexport function setUpLocationSync(ngUpgrade: UpgradeModule) {\n if (!ngUpgrade.$injector) {\n throw new Error(`\n RouterUpgradeInitializer can be used only after UpgradeModule.bootstrap has been called.\n Remove RouterUpgradeInitializer and call setUpLocationSync after UpgradeModule.bootstrap.\n `);\n }\n\n const router: Router = ngUpgrade.injector.get(Router);\n const location: Location = ngUpgrade.injector.get(Location);\n\n ngUpgrade.$injector.get('$rootScope')\n .$on('$locationChangeStart', (_: any, next: string, __: string) => {\n const url = resolveUrl(next);\n const path = location.normalize(url.pathname);\n router.navigateByUrl(path + url.search + url.hash);\n });\n}\n\n/**\n * Normalize and parse a URL.\n *\n * - Normalizing means that a relative URL will be resolved into an absolute URL in the context of\n * the application document.\n * - Parsing means that the anchor's `protocol`, `hostname`, `port`, `pathname` and related\n * properties are all populated to reflect the normalized URL.\n *\n * While this approach has wide compatibility, it doesn't work as expected on IE. On IE, normalizing\n * happens similar to other browsers, but the parsed components will not be set. (E.g. if you assign\n * `a.href = 'foo'`, then `a.protocol`, `a.host`, etc. will not be correctly updated.)\n * We work around that by performing the parsing in a 2nd step by taking a previously normalized URL\n * and assigning it again. This correctly populates all properties.\n *\n * See\n * https://github.com/angular/angular.js/blob/2c7400e7d07b0f6cec1817dab40b9250ce8ebce6/src/ng/urlUtils.js#L26-L33\n * for more info.\n */\nlet anchor: HTMLAnchorElement|undefined;\nfunction resolveUrl(url: string): {pathname: string, search: string, hash: string} {\n if (!anchor) {\n anchor = document.createElement('a');\n }\n\n anchor.setAttribute('href', url);\n anchor.setAttribute('href', anchor.href);\n\n return {\n // IE does not start `pathname` with `/` like other browsers.\n pathname: `/${anchor.pathname.replace(/^\\//, '')}`,\n search: anchor.search,\n hash: anchor.hash\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/upgrade';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// 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"],"names":["APP_BOOTSTRAP_LISTENER","UpgradeModule","router","Router","Location"],"mapp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AC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACjC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QAEzC,OAAO;;YAEL,QAAQ,EAAE,MAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAG;YAClD,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,IAAI,EAAE,MAAM,CAAC,IAAI;SAClB,CAAC;IACJ,CAAC;;IChHD;;;;;;;AAQA,IAOA,0EAA0E;;ICf1E;;;;;;OAMG;;ICNH;;OAEG;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"router-upgrade.umd.js","sources":["npm_package.esm5/packages/packages/router/upgrade/src/upgrade.ts","npm_package.esm5/packages/router/upgrade/public_api.ts","npm_package.esm5/packages/router/upgrade/index.ts","npm_package.esm5/packages/router/upgrade/upgrade.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location} from '@angular/common';\nimport {APP_BOOTSTRAP_LISTENER, ComponentRef, InjectionToken} from '@angular/core';\nimport {Router} from '@angular/router';\nimport {UpgradeModule} from '@angular/upgrade/static';\n\n/**\n * @description\n *\n * Creates an initializer that in addition to setting up the Angular\n * router sets up the ngRoute integration.\n *\n * ```\n * @NgModule({\n * imports: [\n * RouterModule.forRoot(SOME_ROUTES),\n * UpgradeModule\n * ],\n * providers: [\n * RouterUpgradeInitializer\n * ]\n * })\n * export class AppModule {\n * ngDoBootstrap() {}\n * }\n * ```\n *\n * @publicApi\n */\nexport const RouterUpgradeInitializer = {\n provide: APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: locationSyncBootstrapListener as(ngUpgrade: UpgradeModule) => () => void,\n deps: [UpgradeModule]\n};\n\n/**\n * @internal\n */\nexport function locationSyncBootstrapListener(ngUpgrade: UpgradeModule) {\n return () => { setUpLocationSync(ngUpgrade); };\n}\n\n/**\n * @description\n *\n * Sets up a location synchronization.\n *\n * History.pushState does not fire onPopState, so the Angular location\n * doesn't detect it. The workaround is to attach a location change listener\n *\n * @publicApi\n */\nexport function setUpLocationSync(ngUpgrade: UpgradeModule) {\n if (!ngUpgrade.$injector) {\n throw new Error(`\n RouterUpgradeInitializer can be used only after UpgradeModule.bootstrap has been called.\n Remove RouterUpgradeInitializer and call setUpLocationSync after UpgradeModule.bootstrap.\n `);\n }\n\n const router: Router = ngUpgrade.injector.get(Router);\n const location: Location = ngUpgrade.injector.get(Location);\n\n ngUpgrade.$injector.get('$rootScope')\n .$on('$locationChangeStart', (_: any, next: string, __: string) => {\n const url = resolveUrl(next);\n const path = location.normalize(url.pathname);\n router.navigateByUrl(path + url.search + url.hash);\n });\n}\n\n/**\n * Normalize and parse a URL.\n *\n * - Normalizing means that a relative URL will be resolved into an absolute URL in the context of\n * the application document.\n * - Parsing means that the anchor's `protocol`, `hostname`, `port`, `pathname` and related\n * properties are all populated to reflect the normalized URL.\n *\n * While this approach has wide compatibility, it doesn't work as expected on IE. On IE, normalizing\n * happens similar to other browsers, but the parsed components will not be set. (E.g. if you assign\n * `a.href = 'foo'`, then `a.protocol`, `a.host`, etc. will not be correctly updated.)\n * We work around that by performing the parsing in a 2nd step by taking a previously normalized URL\n * and assigning it again. This correctly populates all properties.\n *\n * See\n * https://github.com/angular/angular.js/blob/2c7400e7d07b0f6cec1817dab40b9250ce8ebce6/src/ng/urlUtils.js#L26-L33\n * for more info.\n */\nlet anchor: HTMLAnchorElement|undefined;\nfunction resolveUrl(url: string): {pathname: string, search: string, hash: string} {\n if (!anchor) {\n anchor = document.createElement('a');\n }\n\n anchor.setAttribute('href', url);\n anchor.setAttribute('href', anchor.href);\n\n return {\n // IE does not start `pathname` with `/` like other browsers.\n pathname: `/${anchor.pathname.replace(/^\\//, '')}`,\n search: anchor.search,\n hash: anchor.hash\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/upgrade';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// 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"],"names":["APP_BOOTSTRAP_LISTENER","UpgradeModule","router","Router","Location"],"mappings":";;;;;;;;;;;;IAAA;;;;;;;AAQA,IAKA;;;;;;;;;;;;;;;;;;;;;;;AAuBA,QAAa,wBAAwB,GAAG;QACtC,OAAO,EAAEA,2BAAsB;QAC/B,KAAK,EAAE,IAAI;QACX,UAAU,EAAE,6BAAwE;QACpF,IAAI,EAAE,CAACC,qBAAa,CAAC;KACtB,CAAC;IAEF;;;AAGA,aAAgB,6BAA6B,CAAC,SAAwB;QACpE,OAAO,cAAQ,iBAAiB,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;IACjD,CAAC;IAED;;;;;;;;;;AAUA,aAAgB,iBAAiB,CAAC,SAAwB;QACxD,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE;YACxB,MAAM,IAAI,KAAK,CAAC,+MAGb,CAAC,CAAC;SACN;QAED,IAAMC,SAAM,GAAW,SAAS,CAAC,QAAQ,CAAC,GAAG,CAACC,aAAM,CAAC,CAAC;QACtD,IAAM,QAAQ,GAAa,SAAS,CAAC,QAAQ,CAAC,GAAG,CAACC,eAAQ,CAAC,CAAC;QAE5D,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC;aAChC,GAAG,CAAC,sBAAsB,EAAE,UAAC,CAAM,EAAE,IAAY,EAAE,EAAU;YAC5D,IAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAM,IAAI,GAAG,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAC9CF,SAAM,CAAC,aAAa,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;SACpD,CAAC,CAAC;IACT,CAAC;IAED;;;;;;;;;;;;;;;;;;IAkBA,IAAI,MAAmC,CAAC;IACxC,SAAS,UAAU,CAAC,GAAW;QAC7B,IAAI,CAAC,MAAM,EAAE;YACX,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;SACtC;QAED,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACjC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QAEzC,OAAO;;YAEL,QAAQ,EAAE,MAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAG;YAClD,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,IAAI,EAAE,MAAM,CAAC,IAAI;SAClB,CAAC;IACJ,CAAC;;IChHD;;;;;;;AAQA,IAOA,0EAA0E;;ICf1E;;;;;;OAMG;;ICNH;;OAEG;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v7.2.0-beta.0
2
+ * @license Angular v7.2.0
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/router/router-upgrade.umd.js"],"names":["global","factory","exports","module","require","define","amd","ng","router","upgrade","common","core","static","this","_static","anchor","locationSyncBootstrapListener","ngUpgrade","setUpLocationSync","$injector","Error","router$$1","injector","get","Router","location","Location","$on","_","next","__","url","resolveUrl","document","createElement","setAttribute","href","pathname","replace","search","hash","path","normalize","navigateByUrl","RouterUpgradeInitializer","provide","APP_BOOTSTRAP_LISTENER","multi","useFactory","deps","UpgradeModule","Object","defineProperty","value"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,mBAAoBA,QAAQ,iBAAkBA,QAAQ,mBAAoBA,QAAQ,4BACxJ,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,2BAA4B,UAAW,kBAAmB,gBAAiB,kBAAmB,2BAA4BJ,GAC7KA,GAASD,EAAOO,GAAKP,EAAOO,OAAUP,EAAOO,GAAGC,OAASR,EAAOO,GAAGC,WAAcR,EAAOO,GAAGC,OAAOC,YAAcT,EAAOO,GAAGG,OAAOV,EAAOO,GAAGI,KAAKX,EAAOO,GAAGC,OAAOR,EAAOO,GAAGE,QAAQG,QAHxL,CAIEC,KAAM,SAAWX,EAAQQ,EAAOC,EAAKH,EAAOM,GAAW;;;;;;;OAgCrD,IAqDIC,EA5CJ,SAASC,EAA8BC,GACnC,OAAO,WAAcC,EAAkBD,IAY3C,SAASC,EAAkBD,GACvB,IAAKA,EAAUE,UACX,MAAM,IAAIC,MAAM,iNAEpB,IAAIC,EAAYJ,EAAUK,SAASC,IAAIf,EAAOgB,QAC1CC,EAAWR,EAAUK,SAASC,IAAIb,EAAOgB,UAC7CT,EAAUE,UAAUI,IAAI,cACnBI,IAAI,uBAAwB,SAAUC,EAAGC,EAAMC,GAChD,IAAIC,EAwBZ,SAASC,EAAWD,GAMhB,OALKhB,IACDA,EAASkB,SAASC,cAAc,MAEpCnB,EAAOoB,aAAa,OAAQJ,GAC5BhB,EAAOoB,aAAa,OAAQpB,EAAOqB,OAG/BC,SAAU,IAAMtB,EAAOsB,SAASC,QAAQ,MAAO,IAC/CC,OAAQxB,EAAOwB,OACfC,KAAMzB,EAAOyB;;;;;;;;;;;;;;OAlCHR,CAAWH,GACjBY,EAAOhB,EAASiB,UAAUX,EAAIM,UAClChB,EAAUsB,cAAcF,EAAOV,EAAIQ,OAASR,EAAIS,QAyDxDtC,EAAQ0C,0BAxFJC,QAASlC,EAAKmC,uBACdC,OAAO,EACPC,WAAYhC,EACZiC,MAAOnC,EAAQoC,gBAsFnBhD,EAAQc,8BAAgCA,EACxCd,EAAQgB,kBAAoBA,EAE5BiC,OAAOC,eAAelD,EAAS,cAAgBmD,OAAO","sourcesContent":["/**\n * @license Angular v7.2.0-beta.0\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/router'), require('@angular/upgrade/static')) :\n typeof define === 'function' && define.amd ? define('@angular/router/upgrade', ['exports', '@angular/common', '@angular/core', '@angular/router', '@angular/upgrade/static'], factory) :\n (factory((global.ng = global.ng || {}, global.ng.router = global.ng.router || {}, global.ng.router.upgrade = {}),global.ng.common,global.ng.core,global.ng.router,global.ng.upgrade.static));\n}(this, (function (exports,common,core,router,_static) { 'use strict';\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Creates an initializer that in addition to setting up the Angular\n * router sets up the ngRoute integration.\n *\n * ```\n * @NgModule({\n * imports: [\n * RouterModule.forRoot(SOME_ROUTES),\n * UpgradeModule\n * ],\n * providers: [\n * RouterUpgradeInitializer\n * ]\n * })\n * export class AppModule {\n * ngDoBootstrap() {}\n * }\n * ```\n *\n * @publicApi\n */\n var RouterUpgradeInitializer = {\n provide: core.APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: locationSyncBootstrapListener,\n deps: [_static.UpgradeModule]\n };\n /**\n * @internal\n */\n function locationSyncBootstrapListener(ngUpgrade) {\n return function () { setUpLocationSync(ngUpgrade); };\n }\n /**\n * @description\n *\n * Sets up a location synchronization.\n *\n * History.pushState does not fire onPopState, so the Angular location\n * doesn't detect it. The workaround is to attach a location change listener\n *\n * @publicApi\n */\n function setUpLocationSync(ngUpgrade) {\n if (!ngUpgrade.$injector) {\n throw new Error(\"\\n RouterUpgradeInitializer can be used only after UpgradeModule.bootstrap has been called.\\n Remove RouterUpgradeInitializer and call setUpLocationSync after UpgradeModule.bootstrap.\\n \");\n }\n var router$$1 = ngUpgrade.injector.get(router.Router);\n var location = ngUpgrade.injector.get(common.Location);\n ngUpgrade.$injector.get('$rootScope')\n .$on('$locationChangeStart', function (_, next, __) {\n var url = resolveUrl(next);\n var path = location.normalize(url.pathname);\n router$$1.navigateByUrl(path + url.search + url.hash);\n });\n }\n /**\n * Normalize and parse a URL.\n *\n * - Normalizing means that a relative URL will be resolved into an absolute URL in the context of\n * the application document.\n * - Parsing means that the anchor's `protocol`, `hostname`, `port`, `pathname` and related\n * properties are all populated to reflect the normalized URL.\n *\n * While this approach has wide compatibility, it doesn't work as expected on IE. On IE, normalizing\n * happens similar to other browsers, but the parsed components will not be set. (E.g. if you assign\n * `a.href = 'foo'`, then `a.protocol`, `a.host`, etc. will not be correctly updated.)\n * We work around that by performing the parsing in a 2nd step by taking a previously normalized URL\n * and assigning it again. This correctly populates all properties.\n *\n * See\n * https://github.com/angular/angular.js/blob/2c7400e7d07b0f6cec1817dab40b9250ce8ebce6/src/ng/urlUtils.js#L26-L33\n * for more info.\n */\n var anchor;\n function resolveUrl(url) {\n if (!anchor) {\n anchor = document.createElement('a');\n }\n anchor.setAttribute('href', url);\n anchor.setAttribute('href', anchor.href);\n return {\n // IE does not start `pathname` with `/` like other browsers.\n pathname: \"/\" + anchor.pathname.replace(/^\\//, ''),\n search: anchor.search,\n hash: anchor.hash\n };\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // This file only reexports content of the `src` folder. Keep it that way.\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.RouterUpgradeInitializer = RouterUpgradeInitializer;\n exports.locationSyncBootstrapListener = locationSyncBootstrapListener;\n exports.setUpLocationSync = setUpLocationSync;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=router-upgrade.umd.js.map\n"]}
1
+ {"version":3,"sources":["packages/router/router-upgrade.umd.js"],"names":["global","factory","exports","module","require","define","amd","ng","router","upgrade","common","core","static","this","_static","anchor","locationSyncBootstrapListener","ngUpgrade","setUpLocationSync","$injector","Error","router$$1","injector","get","Router","location","Location","$on","_","next","__","url","resolveUrl","document","createElement","setAttribute","href","pathname","replace","search","hash","path","normalize","navigateByUrl","RouterUpgradeInitializer","provide","APP_BOOTSTRAP_LISTENER","multi","useFactory","deps","UpgradeModule","Object","defineProperty","value"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,mBAAoBA,QAAQ,iBAAkBA,QAAQ,mBAAoBA,QAAQ,4BACxJ,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,2BAA4B,UAAW,kBAAmB,gBAAiB,kBAAmB,2BAA4BJ,GAC7KA,GAASD,EAAOO,GAAKP,EAAOO,OAAUP,EAAOO,GAAGC,OAASR,EAAOO,GAAGC,WAAcR,EAAOO,GAAGC,OAAOC,YAAcT,EAAOO,GAAGG,OAAOV,EAAOO,GAAGI,KAAKX,EAAOO,GAAGC,OAAOR,EAAOO,GAAGE,QAAQG,QAHxL,CAIEC,KAAM,SAAWX,EAAQQ,EAAOC,EAAKH,EAAOM,GAAW;;;;;;;OAgCrD,IAqDIC,EA5CJ,SAASC,EAA8BC,GACnC,OAAO,WAAcC,EAAkBD,IAY3C,SAASC,EAAkBD,GACvB,IAAKA,EAAUE,UACX,MAAM,IAAIC,MAAM,iNAEpB,IAAIC,EAAYJ,EAAUK,SAASC,IAAIf,EAAOgB,QAC1CC,EAAWR,EAAUK,SAASC,IAAIb,EAAOgB,UAC7CT,EAAUE,UAAUI,IAAI,cACnBI,IAAI,uBAAwB,SAAUC,EAAGC,EAAMC,GAChD,IAAIC,EAwBZ,SAASC,EAAWD,GAMhB,OALKhB,IACDA,EAASkB,SAASC,cAAc,MAEpCnB,EAAOoB,aAAa,OAAQJ,GAC5BhB,EAAOoB,aAAa,OAAQpB,EAAOqB,OAG/BC,SAAU,IAAMtB,EAAOsB,SAASC,QAAQ,MAAO,IAC/CC,OAAQxB,EAAOwB,OACfC,KAAMzB,EAAOyB;;;;;;;;;;;;;;OAlCHR,CAAWH,GACjBY,EAAOhB,EAASiB,UAAUX,EAAIM,UAClChB,EAAUsB,cAAcF,EAAOV,EAAIQ,OAASR,EAAIS,QAyDxDtC,EAAQ0C,0BAxFJC,QAASlC,EAAKmC,uBACdC,OAAO,EACPC,WAAYhC,EACZiC,MAAOnC,EAAQoC,gBAsFnBhD,EAAQc,8BAAgCA,EACxCd,EAAQgB,kBAAoBA,EAE5BiC,OAAOC,eAAelD,EAAS,cAAgBmD,OAAO","sourcesContent":["/**\n * @license Angular v7.2.0\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/router'), require('@angular/upgrade/static')) :\n typeof define === 'function' && define.amd ? define('@angular/router/upgrade', ['exports', '@angular/common', '@angular/core', '@angular/router', '@angular/upgrade/static'], factory) :\n (factory((global.ng = global.ng || {}, global.ng.router = global.ng.router || {}, global.ng.router.upgrade = {}),global.ng.common,global.ng.core,global.ng.router,global.ng.upgrade.static));\n}(this, (function (exports,common,core,router,_static) { 'use strict';\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Creates an initializer that in addition to setting up the Angular\n * router sets up the ngRoute integration.\n *\n * ```\n * @NgModule({\n * imports: [\n * RouterModule.forRoot(SOME_ROUTES),\n * UpgradeModule\n * ],\n * providers: [\n * RouterUpgradeInitializer\n * ]\n * })\n * export class AppModule {\n * ngDoBootstrap() {}\n * }\n * ```\n *\n * @publicApi\n */\n var RouterUpgradeInitializer = {\n provide: core.APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: locationSyncBootstrapListener,\n deps: [_static.UpgradeModule]\n };\n /**\n * @internal\n */\n function locationSyncBootstrapListener(ngUpgrade) {\n return function () { setUpLocationSync(ngUpgrade); };\n }\n /**\n * @description\n *\n * Sets up a location synchronization.\n *\n * History.pushState does not fire onPopState, so the Angular location\n * doesn't detect it. The workaround is to attach a location change listener\n *\n * @publicApi\n */\n function setUpLocationSync(ngUpgrade) {\n if (!ngUpgrade.$injector) {\n throw new Error(\"\\n RouterUpgradeInitializer can be used only after UpgradeModule.bootstrap has been called.\\n Remove RouterUpgradeInitializer and call setUpLocationSync after UpgradeModule.bootstrap.\\n \");\n }\n var router$$1 = ngUpgrade.injector.get(router.Router);\n var location = ngUpgrade.injector.get(common.Location);\n ngUpgrade.$injector.get('$rootScope')\n .$on('$locationChangeStart', function (_, next, __) {\n var url = resolveUrl(next);\n var path = location.normalize(url.pathname);\n router$$1.navigateByUrl(path + url.search + url.hash);\n });\n }\n /**\n * Normalize and parse a URL.\n *\n * - Normalizing means that a relative URL will be resolved into an absolute URL in the context of\n * the application document.\n * - Parsing means that the anchor's `protocol`, `hostname`, `port`, `pathname` and related\n * properties are all populated to reflect the normalized URL.\n *\n * While this approach has wide compatibility, it doesn't work as expected on IE. On IE, normalizing\n * happens similar to other browsers, but the parsed components will not be set. (E.g. if you assign\n * `a.href = 'foo'`, then `a.protocol`, `a.host`, etc. will not be correctly updated.)\n * We work around that by performing the parsing in a 2nd step by taking a previously normalized URL\n * and assigning it again. This correctly populates all properties.\n *\n * See\n * https://github.com/angular/angular.js/blob/2c7400e7d07b0f6cec1817dab40b9250ce8ebce6/src/ng/urlUtils.js#L26-L33\n * for more info.\n */\n var anchor;\n function resolveUrl(url) {\n if (!anchor) {\n anchor = document.createElement('a');\n }\n anchor.setAttribute('href', url);\n anchor.setAttribute('href', anchor.href);\n return {\n // IE does not start `pathname` with `/` like other browsers.\n pathname: \"/\" + anchor.pathname.replace(/^\\//, ''),\n search: anchor.search,\n hash: anchor.hash\n };\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // This file only reexports content of the `src` folder. Keep it that way.\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.RouterUpgradeInitializer = RouterUpgradeInitializer;\n exports.locationSyncBootstrapListener = locationSyncBootstrapListener;\n exports.setUpLocationSync = setUpLocationSync;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=router-upgrade.umd.js.map\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v7.2.0-beta.0
2
+ * @license Angular v7.2.0
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -3028,9 +3028,15 @@
3028
3028
  return checks;
3029
3029
  }
3030
3030
  function shouldRunGuardsAndResolvers(curr, future, mode) {
3031
+ if (typeof mode === 'function') {
3032
+ return mode(curr, future);
3033
+ }
3031
3034
  switch (mode) {
3032
3035
  case 'pathParamsChange':
3033
3036
  return !equalPath(curr.url, future.url);
3037
+ case 'pathParamsOrQueryParamsChange':
3038
+ return !equalPath(curr.url, future.url) ||
3039
+ !shallowEqual(curr.queryParams, future.queryParams);
3034
3040
  case 'always':
3035
3041
  return true;
3036
3042
  case 'paramsOrQueryParamsChange':
@@ -3782,6 +3788,8 @@
3782
3788
  this.rootContexts = rootContexts;
3783
3789
  this.location = location;
3784
3790
  this.config = config;
3791
+ this.lastSuccessfulNavigation = null;
3792
+ this.currentNavigation = null;
3785
3793
  this.navigationId = 0;
3786
3794
  this.isNgZoneEnabled = false;
3787
3795
  this.events = new rxjs.Subject();
@@ -3870,7 +3878,7 @@
3870
3878
  reject: null,
3871
3879
  promise: Promise.resolve(true),
3872
3880
  source: 'imperative',
3873
- state: null,
3881
+ restoredState: null,
3874
3882
  currentSnapshot: this.routerState.snapshot,
3875
3883
  targetSnapshot: null,
3876
3884
  currentRouterState: this.routerState,
@@ -3887,6 +3895,18 @@
3887
3895
  return transitions.pipe(operators.filter(function (t) { return t.id !== 0; }),
3888
3896
  // Extract URL
3889
3897
  operators.map(function (t) { return (__assign({}, t, { extractedUrl: _this.urlHandlingStrategy.extract(t.rawUrl) })); }),
3898
+ // Store the Navigation object
3899
+ operators.tap(function (t) {
3900
+ _this.currentNavigation = {
3901
+ id: t.id,
3902
+ initialUrl: t.currentRawUrl,
3903
+ extractedUrl: t.extractedUrl,
3904
+ trigger: t.source,
3905
+ extras: t.extras,
3906
+ previousNavigation: _this.lastSuccessfulNavigation ? __assign({}, _this.lastSuccessfulNavigation, { previousNavigation: null }) :
3907
+ null
3908
+ };
3909
+ }),
3890
3910
  // Using switchMap so we cancel executing navigations when a new one comes in
3891
3911
  operators.switchMap(function (t) {
3892
3912
  var completed = false;
@@ -3897,13 +3917,10 @@
3897
3917
  _this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);
3898
3918
  if (processCurrentUrl) {
3899
3919
  return rxjs.of(t).pipe(
3900
- // Update URL if in `eager` update mode
3901
- operators.tap(function (t) { return _this.urlUpdateStrategy === 'eager' && !t.extras.skipLocationChange &&
3902
- _this.setBrowserUrl(t.rawUrl, !!t.extras.replaceUrl, t.id); }),
3903
3920
  // Fire NavigationStart event
3904
3921
  operators.switchMap(function (t) {
3905
3922
  var transition = _this.transitions.getValue();
3906
- eventsSubject.next(new NavigationStart(t.id, _this.serializeUrl(t.extractedUrl), t.source, t.state));
3923
+ eventsSubject.next(new NavigationStart(t.id, _this.serializeUrl(t.extractedUrl), t.source, t.restoredState));
3907
3924
  if (transition !== _this.transitions.getValue()) {
3908
3925
  return rxjs.EMPTY;
3909
3926
  }
@@ -3914,8 +3931,15 @@
3914
3931
  operators.switchMap(function (t) { return Promise.resolve(t); }),
3915
3932
  // ApplyRedirects
3916
3933
  applyRedirects$1(_this.ngModule.injector, _this.configLoader, _this.urlSerializer, _this.config),
3934
+ // Update the currentNavigation
3935
+ operators.tap(function (t) {
3936
+ _this.currentNavigation = __assign({}, _this.currentNavigation, { finalUrl: t.urlAfterRedirects });
3937
+ }),
3917
3938
  // Recognize
3918
3939
  recognize$1(_this.rootComponentType, _this.config, function (url) { return _this.serializeUrl(url); }, _this.paramsInheritanceStrategy, _this.relativeLinkResolution),
3940
+ // Update URL if in `eager` update mode
3941
+ operators.tap(function (t) { return _this.urlUpdateStrategy === 'eager' && !t.extras.skipLocationChange &&
3942
+ _this.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id); }),
3919
3943
  // Fire RoutesRecognized
3920
3944
  operators.tap(function (t) {
3921
3945
  var routesRecognized = new RoutesRecognized(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);
@@ -3929,8 +3953,8 @@
3929
3953
  * handle this "error condition" by navigating to the previously successful URL,
3930
3954
  * but leaving the URL intact.*/
3931
3955
  if (processPreviousUrl) {
3932
- var id = t.id, extractedUrl = t.extractedUrl, source = t.source, state = t.state, extras = t.extras;
3933
- var navStart = new NavigationStart(id, _this.serializeUrl(extractedUrl), source, state);
3956
+ var id = t.id, extractedUrl = t.extractedUrl, source = t.source, restoredState = t.restoredState, extras = t.extras;
3957
+ var navStart = new NavigationStart(id, _this.serializeUrl(extractedUrl), source, restoredState);
3934
3958
  eventsSubject.next(navStart);
3935
3959
  var targetSnapshot = createEmptyState(extractedUrl, _this.rootComponentType).snapshot;
3936
3960
  return rxjs.of(__assign({}, t, { targetSnapshot: targetSnapshot, urlAfterRedirects: extractedUrl, extras: __assign({}, extras, { skipLocationChange: false, replaceUrl: false }) }));
@@ -4018,7 +4042,7 @@
4018
4042
  _this.rawUrlTree = _this.urlHandlingStrategy.merge(_this.currentUrlTree, t.rawUrl);
4019
4043
  _this.routerState = t.targetRouterState;
4020
4044
  if (_this.urlUpdateStrategy === 'deferred' && !t.extras.skipLocationChange) {
4021
- _this.setBrowserUrl(_this.rawUrlTree, !!t.extras.replaceUrl, t.id);
4045
+ _this.setBrowserUrl(_this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state);
4022
4046
  }
4023
4047
  }), activateRoutes(_this.rootContexts, _this.routeReuseStrategy, function (evt) { return _this.triggerEvent(evt); }), operators.tap({ next: function () { completed = true; }, complete: function () { completed = true; } }), operators.finalize(function () {
4024
4048
  /* When the navigation stream finishes either through error or success, we set the
@@ -4038,6 +4062,10 @@
4038
4062
  eventsSubject.next(navCancel);
4039
4063
  t.resolve(false);
4040
4064
  }
4065
+ // currentNavigation should always be reset to null here. If navigation was
4066
+ // successful, lastSuccessfulTransition will have already been set. Therefore we
4067
+ // can safely set currentNavigation to null here.
4068
+ _this.currentNavigation = null;
4041
4069
  }), operators.catchError(function (e) {
4042
4070
  errored = true;
4043
4071
  /* This error type is issued during Redirect, and is handled as a cancellation
@@ -4108,9 +4136,9 @@
4108
4136
  this.locationSubscription = this.location.subscribe(function (change) {
4109
4137
  var rawUrlTree = _this.parseUrl(change['url']);
4110
4138
  var source = change['type'] === 'popstate' ? 'popstate' : 'hashchange';
4111
- var state = change.state && change.state.navigationId ?
4112
- { navigationId: change.state.navigationId } :
4113
- null;
4139
+ // Navigations coming from Angular router have a navigationId state property. When this
4140
+ // exists, restore the state.
4141
+ var state = change.state && change.state.navigationId ? change.state : null;
4114
4142
  setTimeout(function () { _this.scheduleNavigation(rawUrlTree, source, state, { replaceUrl: true }); }, 0);
4115
4143
  });
4116
4144
  }
@@ -4121,6 +4149,8 @@
4121
4149
  enumerable: true,
4122
4150
  configurable: true
4123
4151
  });
4152
+ /** The current Navigation object if one exists */
4153
+ Router.prototype.getCurrentNavigation = function () { return this.currentNavigation; };
4124
4154
  /** @internal */
4125
4155
  Router.prototype.triggerEvent = function (event) { this.events.next(event); };
4126
4156
  /**
@@ -4282,6 +4312,11 @@
4282
4312
  * The first parameter of `navigate()` is a delta to be applied to the current URL
4283
4313
  * or the one provided in the `relativeTo` property of the second parameter (the
4284
4314
  * `NavigationExtras`).
4315
+ *
4316
+ * In order to affect this browser's `history.state` entry, the `state`
4317
+ * parameter can be passed. This must be an object because the router
4318
+ * will add the `navigationId` property to this object before creating
4319
+ * the new history item.
4285
4320
  */
4286
4321
  Router.prototype.navigate = function (commands, extras) {
4287
4322
  if (extras === void 0) { extras = { skipLocationChange: false }; }
@@ -4325,10 +4360,12 @@
4325
4360
  _this.lastSuccessfulId = t.id;
4326
4361
  _this.events
4327
4362
  .next(new NavigationEnd(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(_this.currentUrlTree)));
4363
+ _this.lastSuccessfulNavigation = _this.currentNavigation;
4364
+ _this.currentNavigation = null;
4328
4365
  t.resolve(true);
4329
4366
  }, function (e) { _this.console.warn("Unhandled Navigation Error: "); });
4330
4367
  };
4331
- Router.prototype.scheduleNavigation = function (rawUrl, source, state, extras) {
4368
+ Router.prototype.scheduleNavigation = function (rawUrl, source, restoredState, extras) {
4332
4369
  var lastNavigation = this.getTransition();
4333
4370
  // If the user triggers a navigation imperatively (e.g., by using navigateByUrl),
4334
4371
  // and that navigation results in 'replaceState' that leads to the same URL,
@@ -4361,7 +4398,7 @@
4361
4398
  this.setTransition({
4362
4399
  id: id,
4363
4400
  source: source,
4364
- state: state,
4401
+ restoredState: restoredState,
4365
4402
  currentUrlTree: this.currentUrlTree,
4366
4403
  currentRawUrl: this.rawUrlTree, rawUrl: rawUrl, extras: extras, resolve: resolve, reject: reject, promise: promise,
4367
4404
  currentSnapshot: this.routerState.snapshot,
@@ -4371,13 +4408,15 @@
4371
4408
  // handler does not rethrow
4372
4409
  return promise.catch(function (e) { return Promise.reject(e); });
4373
4410
  };
4374
- Router.prototype.setBrowserUrl = function (url, replaceUrl, id) {
4411
+ Router.prototype.setBrowserUrl = function (url, replaceUrl, id, state) {
4375
4412
  var path = this.urlSerializer.serialize(url);
4413
+ state = state || {};
4376
4414
  if (this.location.isCurrentPathEqualTo(path) || replaceUrl) {
4377
- this.location.replaceState(path, '', { navigationId: id });
4415
+ // TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace.
4416
+ this.location.replaceState(path, '', __assign({}, state, { navigationId: id }));
4378
4417
  }
4379
4418
  else {
4380
- this.location.go(path, '', { navigationId: id });
4419
+ this.location.go(path, '', __assign({}, state, { navigationId: id }));
4381
4420
  }
4382
4421
  };
4383
4422
  Router.prototype.resetStateAndUrl = function (storedState, storedUrl, rawUrl) {
@@ -4467,6 +4506,27 @@
4467
4506
  * </a>
4468
4507
  * ```
4469
4508
  *
4509
+ * You can provide a `state` value to be persisted to the browser's History.state
4510
+ * property (See https://developer.mozilla.org/en-US/docs/Web/API/History#Properties). It's
4511
+ * used as follows:
4512
+ *
4513
+ * ```
4514
+ * <a [routerLink]="['/user/bob']" [state]="{tracingId: 123}">
4515
+ * link to user component
4516
+ * </a>
4517
+ * ```
4518
+ *
4519
+ * And later the value can be read from the router through `router.getCurrentNavigation`.
4520
+ * For example, to capture the `tracingId` above during the `NavigationStart` event:
4521
+ *
4522
+ * ```
4523
+ * // Get NavigationStart events
4524
+ * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {
4525
+ * const navigation = router.getCurrentNavigation();
4526
+ * tracingService.trace({id: navigation.extras.state.tracingId});
4527
+ * });
4528
+ * ```
4529
+ *
4470
4530
  * The router link directive always treats the provided input as a delta to the current url.
4471
4531
  *
4472
4532
  * For instance, if the current url is `/user/(box//aux:team)`.
@@ -4560,6 +4620,10 @@
4560
4620
  core.Input(),
4561
4621
  __metadata("design:type", Boolean)
4562
4622
  ], RouterLink.prototype, "replaceUrl", void 0);
4623
+ __decorate([
4624
+ core.Input(),
4625
+ __metadata("design:type", Object)
4626
+ ], RouterLink.prototype, "state", void 0);
4563
4627
  __decorate([
4564
4628
  core.Input(),
4565
4629
  __metadata("design:type", Object),
@@ -4641,6 +4705,7 @@
4641
4705
  var extras = {
4642
4706
  skipLocationChange: attrBoolValue(this.skipLocationChange),
4643
4707
  replaceUrl: attrBoolValue(this.replaceUrl),
4708
+ state: this.state
4644
4709
  };
4645
4710
  this.router.navigateByUrl(this.urlTree, extras);
4646
4711
  return false;
@@ -4690,6 +4755,10 @@
4690
4755
  core.Input(),
4691
4756
  __metadata("design:type", Boolean)
4692
4757
  ], RouterLinkWithHref.prototype, "replaceUrl", void 0);
4758
+ __decorate([
4759
+ core.Input(),
4760
+ __metadata("design:type", Object)
4761
+ ], RouterLinkWithHref.prototype, "state", void 0);
4693
4762
  __decorate([
4694
4763
  core.HostBinding(),
4695
4764
  __metadata("design:type", String)
@@ -5721,7 +5790,7 @@
5721
5790
  /**
5722
5791
  * @publicApi
5723
5792
  */
5724
- var VERSION = new core.Version('7.2.0-beta.0');
5793
+ var VERSION = new core.Version('7.2.0');
5725
5794
 
5726
5795
  /**
5727
5796
  * @license