@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
  */
@@ -133,28 +133,28 @@ var se=function Qt(){},ce=function(){function t(t,e,r,n,o,i){this.rootComponentT
133
133
  * Use of this source code is governed by an MIT-style license that can be
134
134
  * found in the LICENSE file at https://angular.io/license
135
135
  */
136
- function Pe(t){throw t}function Oe(t,e,r){return e.parse("/")}function _e(t,e){return r.of(null)}var xe=function(){function t(t,n,o,i,a,u,s,c){var l=this;this.rootComponentType=t,this.urlSerializer=n,this.rootContexts=o,this.location=i,this.config=c,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new r.Subject,this.errorHandler=Pe,this.malformedUriErrorHandler=Oe,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:_e,afterPreactivation:_e},this.urlHandlingStrategy=new Ue,this.routeReuseStrategy=new we,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=a.get(e.NgModuleRef),this.console=a.get(e.ɵConsole);var p=a.get(e.NgZone);this.isNgZoneEnabled=p instanceof e.NgZone,this.resetConfig(c),this.currentUrlTree=function h(){return new $(new K([],{}),{},null)}(),this.rawUrlTree=this.currentUrlTree,this.configLoader=new Ce(u,s,function(t){return l.triggerEvent(new P(t))},function(t){return l.triggerEvent(new O(t))}),this.routerState=Ct(this.currentUrlTree,this.rootComponentType),this.transitions=new r.BehaviorSubject({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",state:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}return t.prototype.setupNavigations=function(t){var e=this,o=this.events;return t.pipe(n.filter(function(t){return 0!==t.id}),n.map(function(t){return s({},t,{extractedUrl:e.urlHandlingStrategy.extract(t.rawUrl)})}),n.switchMap(function(t){var i,a,u,c=!1,l=!1;return r.of(t).pipe(n.switchMap(function(t){var i=!e.navigated||t.extractedUrl.toString()!==e.currentUrlTree.toString();if(("reload"===e.onSameUrlNavigation||i)&&e.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return r.of(t).pipe(n.tap(function(t){return"eager"===e.urlUpdateStrategy&&!t.extras.skipLocationChange&&e.setBrowserUrl(t.rawUrl,!!t.extras.replaceUrl,t.id)}),n.switchMap(function(t){var n=e.transitions.getValue();return o.next(new v(t.id,e.serializeUrl(t.extractedUrl),t.source,t.state)),n!==e.transitions.getValue()?r.EMPTY:[t]}),n.switchMap(function(t){return Promise.resolve(t)}),function a(t,e,r,o){return function(i){return i.pipe(n.switchMap(function(i){return function a(t,e,r,n,o){return new Kt(t,e,r,n,o).apply()}(t,e,r,i.extractedUrl,o).pipe(n.map(function(t){return s({},i,{urlAfterRedirects:t})}))}))}}(e.ngModule.injector,e.configLoader,e.urlSerializer,e.config),function u(t,e,r,o,i){return function(a){return a.pipe(n.mergeMap(function(a){return function u(t,e,r,n,o,i){return void 0===o&&(o="emptyOnly"),void 0===i&&(i="legacy"),new ce(t,e,r,n,o,i).recognize()}(t,e,a.urlAfterRedirects,r(a.urlAfterRedirects),o,i).pipe(n.map(function(t){return s({},a,{targetSnapshot:t})}))}))}}
136
+ function Pe(t){throw t}function Oe(t,e,r){return e.parse("/")}function _e(t,e){return r.of(null)}var xe=function(){function t(t,n,o,i,a,u,s,c){var l=this;this.rootComponentType=t,this.urlSerializer=n,this.rootContexts=o,this.location=i,this.config=c,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new r.Subject,this.errorHandler=Pe,this.malformedUriErrorHandler=Oe,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:_e,afterPreactivation:_e},this.urlHandlingStrategy=new Ue,this.routeReuseStrategy=new we,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=a.get(e.NgModuleRef),this.console=a.get(e.ɵConsole);var p=a.get(e.NgZone);this.isNgZoneEnabled=p instanceof e.NgZone,this.resetConfig(c),this.currentUrlTree=function h(){return new $(new K([],{}),{},null)}(),this.rawUrlTree=this.currentUrlTree,this.configLoader=new Ce(u,s,function(t){return l.triggerEvent(new P(t))},function(t){return l.triggerEvent(new O(t))}),this.routerState=Ct(this.currentUrlTree,this.rootComponentType),this.transitions=new r.BehaviorSubject({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}return t.prototype.setupNavigations=function(t){var e=this,o=this.events;return t.pipe(n.filter(function(t){return 0!==t.id}),n.map(function(t){return s({},t,{extractedUrl:e.urlHandlingStrategy.extract(t.rawUrl)})}),n.tap(function(t){e.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:e.lastSuccessfulNavigation?s({},e.lastSuccessfulNavigation,{previousNavigation:null}):null}}),n.switchMap(function(t){var i,a,u,c=!1,l=!1;return r.of(t).pipe(n.switchMap(function(t){var i=!e.navigated||t.extractedUrl.toString()!==e.currentUrlTree.toString();if(("reload"===e.onSameUrlNavigation||i)&&e.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return r.of(t).pipe(n.switchMap(function(t){var n=e.transitions.getValue();return o.next(new v(t.id,e.serializeUrl(t.extractedUrl),t.source,t.restoredState)),n!==e.transitions.getValue()?r.EMPTY:[t]}),n.switchMap(function(t){return Promise.resolve(t)}),function a(t,e,r,o){return function(i){return i.pipe(n.switchMap(function(i){return function a(t,e,r,n,o){return new Kt(t,e,r,n,o).apply()}(t,e,r,i.extractedUrl,o).pipe(n.map(function(t){return s({},i,{urlAfterRedirects:t})}))}))}}(e.ngModule.injector,e.configLoader,e.urlSerializer,e.config),n.tap(function(t){e.currentNavigation=s({},e.currentNavigation,{finalUrl:t.urlAfterRedirects})}),function u(t,e,r,o,i){return function(a){return a.pipe(n.mergeMap(function(a){return function u(t,e,r,n,o,i){return void 0===o&&(o="emptyOnly"),void 0===i&&(i="legacy"),new ce(t,e,r,n,o,i).recognize()}(t,e,a.urlAfterRedirects,r(a.urlAfterRedirects),o,i).pipe(n.map(function(t){return s({},a,{targetSnapshot:t})}))}))}}
137
137
  /**
138
138
  * @license
139
139
  * Copyright Google Inc. All Rights Reserved.
140
140
  *
141
141
  * Use of this source code is governed by an MIT-style license that can be
142
142
  * found in the LICENSE file at https://angular.io/license
143
- */(e.rootComponentType,e.config,function(t){return e.serializeUrl(t)},e.paramsInheritanceStrategy,e.relativeLinkResolution),n.tap(function(t){var r=new w(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);o.next(r)}));if(i&&e.rawUrlTree&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){var c=t.extractedUrl,l=t.source,p=t.state,h=t.extras,f=new v(t.id,e.serializeUrl(c),l,p);o.next(f);var d=Ct(c,e.rootComponentType).snapshot;return r.of(s({},t,{targetSnapshot:d,urlAfterRedirects:c,extras:s({},h,{skipLocationChange:!1,replaceUrl:!1})}))}return e.rawUrlTree=t.rawUrl,t.resolve(null),r.EMPTY}),ye(function(t){var r=t.extras;return e.hooks.beforePreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!r.skipLocationChange,replaceUrl:!!r.replaceUrl})}),n.tap(function(t){var r=new b(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)}),n.map(function(t){return s({},t,{guards:function r(t,e,n){var o=t._root;return function t(e,r,n,o,i){void 0===i&&(i={canDeactivateChecks:[],canActivateChecks:[]});var a=wt(r);return e.children.forEach(function(e){!function r(e,n,o,i,a){void 0===a&&(a={canDeactivateChecks:[],canActivateChecks:[]});var u=e.value,s=n?n.value:null,c=o?o.getContext(e.value.outlet):null;if(s&&u.routeConfig===s.routeConfig){var l=function p(t,e,r){switch(r){case"pathParamsChange":return!X(t.url,e.url);case"always":return!0;case"paramsOrQueryParamsChange":return!Et(t,e)||!G(t.queryParams,e.queryParams);case"paramsChange":default:return!Et(t,e)}}(s,u,u.routeConfig.runGuardsAndResolvers);l?a.canActivateChecks.push(new re(i)):(u.data=s.data,u._resolvedData=s._resolvedData),t(e,n,u.component?c?c.children:null:o,i,a),l&&a.canDeactivateChecks.push(new ne(c&&c.outlet&&c.outlet.component||null,s))}else s&&ie(n,c,a),a.canActivateChecks.push(new re(i)),t(e,null,u.component?c?c.children:null:o,i,a)}(e,a[e.value.outlet],n,o.concat([e.value]),i),delete a[e.value.outlet]}),V(a,function(t,e){return ie(t,n.getContext(e),i)}),i}(o,e?e._root:null,n,[o.value])}(t.targetSnapshot,t.currentSnapshot,e.rootContexts)})}),function p(t,e){return function(o){return o.pipe(n.mergeMap(function(o){var i=o.targetSnapshot,a=o.currentSnapshot,u=o.guards,c=u.canActivateChecks,l=u.canDeactivateChecks;return 0===l.length&&0===c.length?r.of(s({},o,{guardsResult:!0})):function p(t,e,o,i){return r.from(t).pipe(n.mergeMap(function(t){return function a(t,e,o,i,u){var s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!s||0===s.length)return r.of(!0);var c=s.map(function(r){var a,s=oe(r,e,u);if(function c(t){return t&&Gt(t.canDeactivate)}(s))a=Z(s.canDeactivate(t,e,o,i));else{if(!Gt(s))throw new Error("Invalid CanDeactivate guard");a=Z(s(t,e,o,i))}return a.pipe(n.first())});return r.of(c).pipe(ue())}(t.component,t.route,o,e,i)}),n.first(function(t){return!0!==t},!0))}(l,i,a,t).pipe(n.mergeMap(function(o){return o&&function a(t){return"boolean"==typeof t}(o)?function u(t,e,o,i){return r.from(e).pipe(n.concatMap(function(e){return r.from([function a(t,e){return null!==t&&e&&e(new _(t)),r.of(!0)}(e.route.parent,i),function u(t,e){return null!==t&&e&&e(new A(t)),r.of(!0)}(e.route,i),function s(t,e,o){var i=e[e.length-1],a=e.slice(0,e.length-1).reverse().map(function(t){return function e(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)}).filter(function(t){return null!==t}).map(function(e){return r.defer(function(){var a=e.guards.map(function(r){var a,u=oe(r,e.node,o);if(function s(t){return t&&Gt(t.canActivateChild)}(u))a=Z(u.canActivateChild(i,t));else{if(!Gt(u))throw new Error("Invalid CanActivateChild guard");a=Z(u(i,t))}return a.pipe(n.first())});return r.of(a).pipe(ue())})});return r.of(a).pipe(ue())}(t,e.path,o),function c(t,e,o){var i=e.routeConfig?e.routeConfig.canActivate:null;if(!i||0===i.length)return r.of(!0);var a=i.map(function(i){return r.defer(function(){var r,a=oe(i,e,o);if(function u(t){return t&&Gt(t.canActivate)}(a))r=Z(a.canActivate(e,t));else{if(!Gt(a))throw new Error("Invalid CanActivate guard");r=Z(a(e,t))}return r.pipe(n.first())})});return r.of(a).pipe(ue())}(t,e.route,o)]).pipe(n.concatAll(),n.first(function(t){return!0!==t},!0))}),n.first(function(t){return!0!==t},!0))}(i,c,t,e):r.of(o)}),n.map(function(t){return s({},o,{guardsResult:t})}))}))}}(e.ngModule.injector,function(t){return e.triggerEvent(t)}),n.tap(function(t){if(Wt(t.guardsResult)){var r=N('Redirecting to "'+e.serializeUrl(t.guardsResult)+'"');throw r.url=t.guardsResult,r}}),n.tap(function(t){var r=new C(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);e.triggerEvent(r)}),n.filter(function(t){if(!t.guardsResult){e.resetUrlToCurrentUrlTree();var r=new y(t.id,e.serializeUrl(t.extractedUrl),"");return o.next(r),t.resolve(!1),!1}return!0}),ye(function(t){if(t.guards.canActivateChecks.length)return r.of(t).pipe(n.tap(function(t){var r=new R(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)}),function o(t,e){return function(o){return o.pipe(n.mergeMap(function(o){var i=o.targetSnapshot,a=o.guards.canActivateChecks;return a.length?r.from(a).pipe(n.concatMap(function(o){return function a(t,e,o,i){return function a(t,e,o,i){var a=Object.keys(t);if(0===a.length)return r.of({});if(1===a.length){var u=a[0];return me(t[u],e,o,i).pipe(n.map(function(t){var e;return(e={})[u]=t,e}))}var s={};return r.from(a).pipe(n.mergeMap(function(r){return me(t[r],e,o,i).pipe(n.map(function(t){return s[r]=t,t}))})).pipe(n.last(),n.map(function(){return s}))}(t._resolve,t,e,i).pipe(n.map(function(e){return t._resolvedData=e,t.data=s({},t.data,Ut(t,o).resolve),null}))}(o.route,i,t,e)}),n.reduce(function(t,e){return t}),n.map(function(t){return o})):r.of(o)}))}}(e.paramsInheritanceStrategy,e.ngModule.injector),n.tap(function(t){var r=new U(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)}))}),ye(function(t){var r=t.extras;return e.hooks.afterPreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!r.skipLocationChange,replaceUrl:!!r.replaceUrl})}),n.map(function(t){var n=function o(t,e,n){var o=function t(e,n,o){if(o&&e.shouldReuseRoute(n.value,o.value.snapshot)){(c=o.value)._futureSnapshot=n.value;var i=function a(e,r,n){return r.children.map(function(r){var o,i;try{for(var a=h(n.children),u=a.next();!u.done;u=a.next()){var s=u.value;if(e.shouldReuseRoute(s.value.snapshot,r.value))return t(e,r,s)}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return t(e,r)})}(e,n,o);return new St(c,i)}var u=e.retrieve(n.value);if(u){var s=u.route;return function t(e,r){if(e.value.routeConfig!==r.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==r.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");r.value._futureSnapshot=e.value;for(var n=0;n<e.children.length;++n)t(e.children[n],r.children[n])}(n,s),s}var c=function l(t){return new Rt(new r.BehaviorSubject(t.url),new r.BehaviorSubject(t.params),new r.BehaviorSubject(t.queryParams),new r.BehaviorSubject(t.fragment),new r.BehaviorSubject(t.data),t.outlet,t.component,t)}
143
+ */(e.rootComponentType,e.config,function(t){return e.serializeUrl(t)},e.paramsInheritanceStrategy,e.relativeLinkResolution),n.tap(function(t){return"eager"===e.urlUpdateStrategy&&!t.extras.skipLocationChange&&e.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id)}),n.tap(function(t){var r=new w(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);o.next(r)}));if(i&&e.rawUrlTree&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){var c=t.extractedUrl,l=t.source,p=t.restoredState,h=t.extras,f=new v(t.id,e.serializeUrl(c),l,p);o.next(f);var d=Ct(c,e.rootComponentType).snapshot;return r.of(s({},t,{targetSnapshot:d,urlAfterRedirects:c,extras:s({},h,{skipLocationChange:!1,replaceUrl:!1})}))}return e.rawUrlTree=t.rawUrl,t.resolve(null),r.EMPTY}),ye(function(t){var r=t.extras;return e.hooks.beforePreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!r.skipLocationChange,replaceUrl:!!r.replaceUrl})}),n.tap(function(t){var r=new b(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)}),n.map(function(t){return s({},t,{guards:function r(t,e,n){var o=t._root;return function t(e,r,n,o,i){void 0===i&&(i={canDeactivateChecks:[],canActivateChecks:[]});var a=wt(r);return e.children.forEach(function(e){!function r(e,n,o,i,a){void 0===a&&(a={canDeactivateChecks:[],canActivateChecks:[]});var u=e.value,s=n?n.value:null,c=o?o.getContext(e.value.outlet):null;if(s&&u.routeConfig===s.routeConfig){var l=function p(t,e,r){if("function"==typeof r)return r(t,e);switch(r){case"pathParamsChange":return!X(t.url,e.url);case"pathParamsOrQueryParamsChange":return!X(t.url,e.url)||!G(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Et(t,e)||!G(t.queryParams,e.queryParams);case"paramsChange":default:return!Et(t,e)}}(s,u,u.routeConfig.runGuardsAndResolvers);l?a.canActivateChecks.push(new re(i)):(u.data=s.data,u._resolvedData=s._resolvedData),t(e,n,u.component?c?c.children:null:o,i,a),l&&a.canDeactivateChecks.push(new ne(c&&c.outlet&&c.outlet.component||null,s))}else s&&ie(n,c,a),a.canActivateChecks.push(new re(i)),t(e,null,u.component?c?c.children:null:o,i,a)}(e,a[e.value.outlet],n,o.concat([e.value]),i),delete a[e.value.outlet]}),V(a,function(t,e){return ie(t,n.getContext(e),i)}),i}(o,e?e._root:null,n,[o.value])}(t.targetSnapshot,t.currentSnapshot,e.rootContexts)})}),function p(t,e){return function(o){return o.pipe(n.mergeMap(function(o){var i=o.targetSnapshot,a=o.currentSnapshot,u=o.guards,c=u.canActivateChecks,l=u.canDeactivateChecks;return 0===l.length&&0===c.length?r.of(s({},o,{guardsResult:!0})):function p(t,e,o,i){return r.from(t).pipe(n.mergeMap(function(t){return function a(t,e,o,i,u){var s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!s||0===s.length)return r.of(!0);var c=s.map(function(r){var a,s=oe(r,e,u);if(function c(t){return t&&Gt(t.canDeactivate)}(s))a=Z(s.canDeactivate(t,e,o,i));else{if(!Gt(s))throw new Error("Invalid CanDeactivate guard");a=Z(s(t,e,o,i))}return a.pipe(n.first())});return r.of(c).pipe(ue())}(t.component,t.route,o,e,i)}),n.first(function(t){return!0!==t},!0))}(l,i,a,t).pipe(n.mergeMap(function(o){return o&&function a(t){return"boolean"==typeof t}(o)?function u(t,e,o,i){return r.from(e).pipe(n.concatMap(function(e){return r.from([function a(t,e){return null!==t&&e&&e(new _(t)),r.of(!0)}(e.route.parent,i),function u(t,e){return null!==t&&e&&e(new A(t)),r.of(!0)}(e.route,i),function s(t,e,o){var i=e[e.length-1],a=e.slice(0,e.length-1).reverse().map(function(t){return function e(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)}).filter(function(t){return null!==t}).map(function(e){return r.defer(function(){var a=e.guards.map(function(r){var a,u=oe(r,e.node,o);if(function s(t){return t&&Gt(t.canActivateChild)}(u))a=Z(u.canActivateChild(i,t));else{if(!Gt(u))throw new Error("Invalid CanActivateChild guard");a=Z(u(i,t))}return a.pipe(n.first())});return r.of(a).pipe(ue())})});return r.of(a).pipe(ue())}(t,e.path,o),function c(t,e,o){var i=e.routeConfig?e.routeConfig.canActivate:null;if(!i||0===i.length)return r.of(!0);var a=i.map(function(i){return r.defer(function(){var r,a=oe(i,e,o);if(function u(t){return t&&Gt(t.canActivate)}(a))r=Z(a.canActivate(e,t));else{if(!Gt(a))throw new Error("Invalid CanActivate guard");r=Z(a(e,t))}return r.pipe(n.first())})});return r.of(a).pipe(ue())}(t,e.route,o)]).pipe(n.concatAll(),n.first(function(t){return!0!==t},!0))}),n.first(function(t){return!0!==t},!0))}(i,c,t,e):r.of(o)}),n.map(function(t){return s({},o,{guardsResult:t})}))}))}}(e.ngModule.injector,function(t){return e.triggerEvent(t)}),n.tap(function(t){if(Wt(t.guardsResult)){var r=N('Redirecting to "'+e.serializeUrl(t.guardsResult)+'"');throw r.url=t.guardsResult,r}}),n.tap(function(t){var r=new C(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);e.triggerEvent(r)}),n.filter(function(t){if(!t.guardsResult){e.resetUrlToCurrentUrlTree();var r=new y(t.id,e.serializeUrl(t.extractedUrl),"");return o.next(r),t.resolve(!1),!1}return!0}),ye(function(t){if(t.guards.canActivateChecks.length)return r.of(t).pipe(n.tap(function(t){var r=new R(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)}),function o(t,e){return function(o){return o.pipe(n.mergeMap(function(o){var i=o.targetSnapshot,a=o.guards.canActivateChecks;return a.length?r.from(a).pipe(n.concatMap(function(o){return function a(t,e,o,i){return function a(t,e,o,i){var a=Object.keys(t);if(0===a.length)return r.of({});if(1===a.length){var u=a[0];return me(t[u],e,o,i).pipe(n.map(function(t){var e;return(e={})[u]=t,e}))}var s={};return r.from(a).pipe(n.mergeMap(function(r){return me(t[r],e,o,i).pipe(n.map(function(t){return s[r]=t,t}))})).pipe(n.last(),n.map(function(){return s}))}(t._resolve,t,e,i).pipe(n.map(function(e){return t._resolvedData=e,t.data=s({},t.data,Ut(t,o).resolve),null}))}(o.route,i,t,e)}),n.reduce(function(t,e){return t}),n.map(function(t){return o})):r.of(o)}))}}(e.paramsInheritanceStrategy,e.ngModule.injector),n.tap(function(t){var r=new U(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)}))}),ye(function(t){var r=t.extras;return e.hooks.afterPreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!r.skipLocationChange,replaceUrl:!!r.replaceUrl})}),n.map(function(t){var n=function o(t,e,n){var o=function t(e,n,o){if(o&&e.shouldReuseRoute(n.value,o.value.snapshot)){(c=o.value)._futureSnapshot=n.value;var i=function a(e,r,n){return r.children.map(function(r){var o,i;try{for(var a=h(n.children),u=a.next();!u.done;u=a.next()){var s=u.value;if(e.shouldReuseRoute(s.value.snapshot,r.value))return t(e,r,s)}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return t(e,r)})}(e,n,o);return new St(c,i)}var u=e.retrieve(n.value);if(u){var s=u.route;return function t(e,r){if(e.value.routeConfig!==r.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==r.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");r.value._futureSnapshot=e.value;for(var n=0;n<e.children.length;++n)t(e.children[n],r.children[n])}(n,s),s}var c=function l(t){return new Rt(new r.BehaviorSubject(t.url),new r.BehaviorSubject(t.params),new r.BehaviorSubject(t.queryParams),new r.BehaviorSubject(t.fragment),new r.BehaviorSubject(t.data),t.outlet,t.component,t)}
144
144
  /**
145
145
  * @license
146
146
  * Copyright Google Inc. All Rights Reserved.
147
147
  *
148
148
  * Use of this source code is governed by an MIT-style license that can be
149
149
  * found in the LICENSE file at https://angular.io/license
150
- */(n.value);return i=n.children.map(function(r){return t(e,r)}),new St(c,i)}(t,e._root,n?n._root:void 0);return new bt(o,e)}(e.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return s({},t,{targetRouterState:n})}),n.tap(function(t){e.currentUrlTree=t.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(e.currentUrlTree,t.rawUrl),e.routerState=t.targetRouterState,"deferred"!==e.urlUpdateStrategy||t.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,!!t.extras.replaceUrl,t.id)}),(i=e.rootContexts,a=e.routeReuseStrategy,u=function(t){return e.triggerEvent(t)},n.map(function(t){return new Ft(a,t.targetRouterState,t.currentRouterState,u).activate(i),t})),n.tap({next:function(){c=!0},complete:function(){c=!0}}),n.finalize(function(){if(!c&&!l){e.resetUrlToCurrentUrlTree();var r=new y(t.id,e.serializeUrl(t.extractedUrl),"Navigation ID "+t.id+" is not equal to the current navigation id "+e.navigationId);o.next(r),t.resolve(!1)}}),n.catchError(function(n){if(l=!0,function i(t){return t&&t[M]}(n)){e.navigated=!0;var a=Wt(n.url);a||e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var u=new y(t.id,e.serializeUrl(t.extractedUrl),n.message);o.next(u),t.resolve(!1),a&&e.navigateByUrl(n.url)}else{e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var s=new S(t.id,e.serializeUrl(t.extractedUrl),n);o.next(s);try{t.resolve(e.errorHandler(n))}catch(e){t.reject(e)}}return r.EMPTY}))}))},t.prototype.resetRootComponentType=function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType},t.prototype.getTransition=function(){return this.transitions.value},t.prototype.setTransition=function(t){this.transitions.next(s({},this.getTransition(),t))},t.prototype.initialNavigation=function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})},t.prototype.setUpLocationChangeListener=function(){var t=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(function(e){var r=t.parseUrl(e.url),n="popstate"===e.type?"popstate":"hashchange",o=e.state&&e.state.navigationId?{navigationId:e.state.navigationId}:null;setTimeout(function(){t.scheduleNavigation(r,n,o,{replaceUrl:!0})},0)}))},Object.defineProperty(t.prototype,"url",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!0,configurable:!0}),t.prototype.triggerEvent=function(t){this.events.next(t)},t.prototype.resetConfig=function(t){z(t),this.config=t.map(B),this.navigated=!1,this.lastSuccessfulId=-1},t.prototype.ngOnDestroy=function(){this.dispose()},t.prototype.dispose=function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)},t.prototype.createUrlTree=function(t,r){void 0===r&&(r={});var n=r.relativeTo,o=r.queryParams,i=r.fragment,a=r.preserveQueryParams,u=r.queryParamsHandling,c=r.preserveFragment;e.isDevMode()&&a&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");var l=n||this.routerState.root,p=c?this.currentUrlTree.fragment:i,h=null;if(u)switch(u){case"merge":h=s({},this.currentUrlTree.queryParams,o);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=o||null}else h=a?this.currentUrlTree.queryParams:o||null;return null!==h&&(h=this.removeEmptyProps(h)),function f(t,e,r,n,o){if(0===r.length)return jt(e.root,e.root,e,n,o);var i=function a(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new It(!0,0,t);var e=0,r=!1,n=t.reduce(function(t,n,o){if("object"==typeof n&&null!=n){if(n.outlets){var i={};return V(n.outlets,function(t,e){i[e]="string"==typeof t?t.split("/"):t}),d(t,[{outlets:i}])}if(n.segmentPath)return d(t,[n.segmentPath])}return"string"!=typeof n?d(t,[n]):0===o?(n.split("/").forEach(function(n,o){0==o&&"."===n||(0==o&&""===n?r=!0:".."===n?e++:""!=n&&t.push(n))}),t):d(t,[n])},[]);return new It(r,e,n)}(r);if(i.toRoot())return jt(e.root,new K([],{}),e,n,o);var u=function s(t,e,r){if(t.isAbsolute)return new kt(e.root,!0,0);if(-1===r.snapshot._lastPathIndex)return new kt(r.snapshot._urlSegment,!0,0);var n=Tt(t.commands[0])?0:1;return function o(t,e,r){for(var n=t,o=e,i=r;i>o;){if(i-=o,!(n=n.parent))throw new Error("Invalid number of '../'");o=n.segments.length}return new kt(n,!1,o-i)}(r.snapshot._urlSegment,r.snapshot._lastPathIndex+n,t.numberOfDoubleDots)}(i,e,t),c=u.processChildren?Nt(u.segmentGroup,u.index,i.commands):Mt(u.segmentGroup,u.index,i.commands);return jt(u.segmentGroup,c,e,n,o)}(l,this.currentUrlTree,t,h,p)},t.prototype.navigateByUrl=function(t,r){void 0===r&&(r={skipLocationChange:!1}),e.isDevMode()&&this.isNgZoneEnabled&&!e.NgZone.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");var n=Wt(t)?t:this.parseUrl(t),o=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(o,"imperative",null,r)},t.prototype.navigate=function(t,e){return void 0===e&&(e={skipLocationChange:!1}),function r(t){for(var e=0;e<t.length;e++){var r=t[e];if(null==r)throw new Error("The requested path contains "+r+" segment at index "+e)}}
150
+ */(n.value);return i=n.children.map(function(r){return t(e,r)}),new St(c,i)}(t,e._root,n?n._root:void 0);return new bt(o,e)}(e.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return s({},t,{targetRouterState:n})}),n.tap(function(t){e.currentUrlTree=t.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(e.currentUrlTree,t.rawUrl),e.routerState=t.targetRouterState,"deferred"!==e.urlUpdateStrategy||t.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state)}),(i=e.rootContexts,a=e.routeReuseStrategy,u=function(t){return e.triggerEvent(t)},n.map(function(t){return new Ft(a,t.targetRouterState,t.currentRouterState,u).activate(i),t})),n.tap({next:function(){c=!0},complete:function(){c=!0}}),n.finalize(function(){if(!c&&!l){e.resetUrlToCurrentUrlTree();var r=new y(t.id,e.serializeUrl(t.extractedUrl),"Navigation ID "+t.id+" is not equal to the current navigation id "+e.navigationId);o.next(r),t.resolve(!1)}e.currentNavigation=null}),n.catchError(function(n){if(l=!0,function i(t){return t&&t[M]}(n)){e.navigated=!0;var a=Wt(n.url);a||e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var u=new y(t.id,e.serializeUrl(t.extractedUrl),n.message);o.next(u),t.resolve(!1),a&&e.navigateByUrl(n.url)}else{e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var s=new S(t.id,e.serializeUrl(t.extractedUrl),n);o.next(s);try{t.resolve(e.errorHandler(n))}catch(e){t.reject(e)}}return r.EMPTY}))}))},t.prototype.resetRootComponentType=function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType},t.prototype.getTransition=function(){return this.transitions.value},t.prototype.setTransition=function(t){this.transitions.next(s({},this.getTransition(),t))},t.prototype.initialNavigation=function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})},t.prototype.setUpLocationChangeListener=function(){var t=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(function(e){var r=t.parseUrl(e.url),n="popstate"===e.type?"popstate":"hashchange",o=e.state&&e.state.navigationId?e.state:null;setTimeout(function(){t.scheduleNavigation(r,n,o,{replaceUrl:!0})},0)}))},Object.defineProperty(t.prototype,"url",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!0,configurable:!0}),t.prototype.getCurrentNavigation=function(){return this.currentNavigation},t.prototype.triggerEvent=function(t){this.events.next(t)},t.prototype.resetConfig=function(t){z(t),this.config=t.map(B),this.navigated=!1,this.lastSuccessfulId=-1},t.prototype.ngOnDestroy=function(){this.dispose()},t.prototype.dispose=function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)},t.prototype.createUrlTree=function(t,r){void 0===r&&(r={});var n=r.relativeTo,o=r.queryParams,i=r.fragment,a=r.preserveQueryParams,u=r.queryParamsHandling,c=r.preserveFragment;e.isDevMode()&&a&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");var l=n||this.routerState.root,p=c?this.currentUrlTree.fragment:i,h=null;if(u)switch(u){case"merge":h=s({},this.currentUrlTree.queryParams,o);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=o||null}else h=a?this.currentUrlTree.queryParams:o||null;return null!==h&&(h=this.removeEmptyProps(h)),function f(t,e,r,n,o){if(0===r.length)return jt(e.root,e.root,e,n,o);var i=function a(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new It(!0,0,t);var e=0,r=!1,n=t.reduce(function(t,n,o){if("object"==typeof n&&null!=n){if(n.outlets){var i={};return V(n.outlets,function(t,e){i[e]="string"==typeof t?t.split("/"):t}),d(t,[{outlets:i}])}if(n.segmentPath)return d(t,[n.segmentPath])}return"string"!=typeof n?d(t,[n]):0===o?(n.split("/").forEach(function(n,o){0==o&&"."===n||(0==o&&""===n?r=!0:".."===n?e++:""!=n&&t.push(n))}),t):d(t,[n])},[]);return new It(r,e,n)}(r);if(i.toRoot())return jt(e.root,new K([],{}),e,n,o);var u=function s(t,e,r){if(t.isAbsolute)return new kt(e.root,!0,0);if(-1===r.snapshot._lastPathIndex)return new kt(r.snapshot._urlSegment,!0,0);var n=Tt(t.commands[0])?0:1;return function o(t,e,r){for(var n=t,o=e,i=r;i>o;){if(i-=o,!(n=n.parent))throw new Error("Invalid number of '../'");o=n.segments.length}return new kt(n,!1,o-i)}(r.snapshot._urlSegment,r.snapshot._lastPathIndex+n,t.numberOfDoubleDots)}(i,e,t),c=u.processChildren?Nt(u.segmentGroup,u.index,i.commands):Mt(u.segmentGroup,u.index,i.commands);return jt(u.segmentGroup,c,e,n,o)}(l,this.currentUrlTree,t,h,p)},t.prototype.navigateByUrl=function(t,r){void 0===r&&(r={skipLocationChange:!1}),e.isDevMode()&&this.isNgZoneEnabled&&!e.NgZone.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");var n=Wt(t)?t:this.parseUrl(t),o=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(o,"imperative",null,r)},t.prototype.navigate=function(t,e){return void 0===e&&(e={skipLocationChange:!1}),function r(t){for(var e=0;e<t.length;e++){var r=t[e];if(null==r)throw new Error("The requested path contains "+r+" segment at index "+e)}}
151
151
  /**
152
152
  * @license
153
153
  * Copyright Google Inc. All Rights Reserved.
154
154
  *
155
155
  * Use of this source code is governed by an MIT-style license that can be
156
156
  * found in the LICENSE file at https://angular.io/license
157
- */(t),this.navigateByUrl(this.createUrlTree(t,e),e)},t.prototype.serializeUrl=function(t){return this.urlSerializer.serialize(t)},t.prototype.parseUrl=function(t){var e;try{e=this.urlSerializer.parse(t)}catch(r){e=this.malformedUriErrorHandler(r,this.urlSerializer,t)}return e},t.prototype.isActive=function(t,e){if(Wt(t))return Y(this.currentUrlTree,t,e);var r=this.parseUrl(t);return Y(this.currentUrlTree,r,e)},t.prototype.removeEmptyProps=function(t){return Object.keys(t).reduce(function(e,r){var n=t[r];return null!==n&&void 0!==n&&(e[r]=n),e},{})},t.prototype.processNavigations=function(){var t=this;this.navigations.subscribe(function(e){t.navigated=!0,t.lastSuccessfulId=e.id,t.events.next(new m(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(t.currentUrlTree))),e.resolve(!0)},function(e){t.console.warn("Unhandled Navigation Error: ")})},t.prototype.scheduleNavigation=function(t,e,r,n){var o=this.getTransition();if(o&&"imperative"!==e&&"imperative"===o.source&&o.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(o&&"hashchange"==e&&"popstate"===o.source&&o.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(o&&"popstate"==e&&"hashchange"===o.source&&o.rawUrl.toString()===t.toString())return Promise.resolve(!0);var i=null,a=null,u=new Promise(function(t,e){i=t,a=e}),s=++this.navigationId;return this.setTransition({id:s,source:e,state:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:n,resolve:i,reject:a,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(function(t){return Promise.reject(t)})},t.prototype.setBrowserUrl=function(t,e,r){var n=this.urlSerializer.serialize(t);this.location.isCurrentPathEqualTo(n)||e?this.location.replaceState(n,"",{navigationId:r}):this.location.go(n,"",{navigationId:r})},t.prototype.resetStateAndUrl=function(t,e,r){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,r),this.resetUrlToCurrentUrlTree()},t.prototype.resetUrlToCurrentUrlTree=function(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})},t}(),Ae=function(){function t(t,e,r,n,o){this.router=t,this.route=e,this.commands=[],null==r&&n.setAttribute(o.nativeElement,"tabindex","0")}return Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preserveQueryParams",{set:function(t){e.isDevMode()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated!, use queryParamsHandling instead."),this.preserve=t},enumerable:!0,configurable:!0}),t.prototype.onClick=function(){var t={skipLocationChange:Te(this.skipLocationChange),replaceUrl:Te(this.replaceUrl)};return this.router.navigateByUrl(this.urlTree,t),!0},Object.defineProperty(t.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:Te(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:Te(this.preserveFragment)})},enumerable:!0,configurable:!0}),c([e.Input(),p("design:type",Object)],t.prototype,"queryParams",void 0),c([e.Input(),p("design:type",String)],t.prototype,"fragment",void 0),c([e.Input(),p("design:type",String)],t.prototype,"queryParamsHandling",void 0),c([e.Input(),p("design:type",Boolean)],t.prototype,"preserveFragment",void 0),c([e.Input(),p("design:type",Boolean)],t.prototype,"skipLocationChange",void 0),c([e.Input(),p("design:type",Boolean)],t.prototype,"replaceUrl",void 0),c([e.Input(),p("design:type",Object),p("design:paramtypes",[Object])],t.prototype,"routerLink",null),c([e.Input(),p("design:type",Boolean),p("design:paramtypes",[Boolean])],t.prototype,"preserveQueryParams",null),c([e.HostListener("click"),p("design:type",Function),p("design:paramtypes",[]),p("design:returntype",Boolean)],t.prototype,"onClick",null),c([e.Directive({selector:":not(a)[routerLink]"}),l(2,e.Attribute("tabindex")),p("design:paramtypes",[xe,Rt,String,e.Renderer2,e.ElementRef])],t)}(),Ee=function(){function t(t,e,r){var n=this;this.router=t,this.route=e,this.locationStrategy=r,this.commands=[],this.subscription=t.events.subscribe(function(t){t instanceof m&&n.updateTargetUrlAndHref()})}return Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preserveQueryParams",{set:function(t){e.isDevMode()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead."),this.preserve=t},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){this.updateTargetUrlAndHref()},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.onClick=function(t,e,r,n){if(0!==t||e||r||n)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;var o={skipLocationChange:Te(this.skipLocationChange),replaceUrl:Te(this.replaceUrl)};return this.router.navigateByUrl(this.urlTree,o),!1},t.prototype.updateTargetUrlAndHref=function(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))},Object.defineProperty(t.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:Te(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:Te(this.preserveFragment)})},enumerable:!0,configurable:!0}),c([e.HostBinding("attr.target"),e.Input(),p("design:type",String)],t.prototype,"target",void 0),c([e.Input(),p("design:type",Object)],t.prototype,"queryParams",void 0),c([e.Input(),p("design:type",String)],t.prototype,"fragment",void 0),c([e.Input(),p("design:type",String)],t.prototype,"queryParamsHandling",void 0),c([e.Input(),p("design:type",Boolean)],t.prototype,"preserveFragment",void 0),c([e.Input(),p("design:type",Boolean)],t.prototype,"skipLocationChange",void 0),c([e.Input(),p("design:type",Boolean)],t.prototype,"replaceUrl",void 0),c([e.HostBinding(),p("design:type",String)],t.prototype,"href",void 0),c([e.Input(),p("design:type",Object),p("design:paramtypes",[Object])],t.prototype,"routerLink",null),c([e.Input(),p("design:type",Boolean),p("design:paramtypes",[Boolean])],t.prototype,"preserveQueryParams",null),c([e.HostListener("click",["$event.button","$event.ctrlKey","$event.metaKey","$event.shiftKey"]),p("design:type",Function),p("design:paramtypes",[Number,Boolean,Boolean,Boolean]),p("design:returntype",Boolean)],t.prototype,"onClick",null),c([e.Directive({selector:"a[routerLink]"}),p("design:paramtypes",[xe,Rt,o.LocationStrategy])],t)}();function Te(t){return""===t||!!t}
157
+ */(t),this.navigateByUrl(this.createUrlTree(t,e),e)},t.prototype.serializeUrl=function(t){return this.urlSerializer.serialize(t)},t.prototype.parseUrl=function(t){var e;try{e=this.urlSerializer.parse(t)}catch(r){e=this.malformedUriErrorHandler(r,this.urlSerializer,t)}return e},t.prototype.isActive=function(t,e){if(Wt(t))return Y(this.currentUrlTree,t,e);var r=this.parseUrl(t);return Y(this.currentUrlTree,r,e)},t.prototype.removeEmptyProps=function(t){return Object.keys(t).reduce(function(e,r){var n=t[r];return null!==n&&void 0!==n&&(e[r]=n),e},{})},t.prototype.processNavigations=function(){var t=this;this.navigations.subscribe(function(e){t.navigated=!0,t.lastSuccessfulId=e.id,t.events.next(new m(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(t.currentUrlTree))),t.lastSuccessfulNavigation=t.currentNavigation,t.currentNavigation=null,e.resolve(!0)},function(e){t.console.warn("Unhandled Navigation Error: ")})},t.prototype.scheduleNavigation=function(t,e,r,n){var o=this.getTransition();if(o&&"imperative"!==e&&"imperative"===o.source&&o.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(o&&"hashchange"==e&&"popstate"===o.source&&o.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(o&&"popstate"==e&&"hashchange"===o.source&&o.rawUrl.toString()===t.toString())return Promise.resolve(!0);var i=null,a=null,u=new Promise(function(t,e){i=t,a=e}),s=++this.navigationId;return this.setTransition({id:s,source:e,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:n,resolve:i,reject:a,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(function(t){return Promise.reject(t)})},t.prototype.setBrowserUrl=function(t,e,r,n){var o=this.urlSerializer.serialize(t);n=n||{},this.location.isCurrentPathEqualTo(o)||e?this.location.replaceState(o,"",s({},n,{navigationId:r})):this.location.go(o,"",s({},n,{navigationId:r}))},t.prototype.resetStateAndUrl=function(t,e,r){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,r),this.resetUrlToCurrentUrlTree()},t.prototype.resetUrlToCurrentUrlTree=function(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})},t}(),Ae=function(){function t(t,e,r,n,o){this.router=t,this.route=e,this.commands=[],null==r&&n.setAttribute(o.nativeElement,"tabindex","0")}return Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preserveQueryParams",{set:function(t){e.isDevMode()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated!, use queryParamsHandling instead."),this.preserve=t},enumerable:!0,configurable:!0}),t.prototype.onClick=function(){var t={skipLocationChange:Te(this.skipLocationChange),replaceUrl:Te(this.replaceUrl)};return this.router.navigateByUrl(this.urlTree,t),!0},Object.defineProperty(t.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:Te(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:Te(this.preserveFragment)})},enumerable:!0,configurable:!0}),c([e.Input(),p("design:type",Object)],t.prototype,"queryParams",void 0),c([e.Input(),p("design:type",String)],t.prototype,"fragment",void 0),c([e.Input(),p("design:type",String)],t.prototype,"queryParamsHandling",void 0),c([e.Input(),p("design:type",Boolean)],t.prototype,"preserveFragment",void 0),c([e.Input(),p("design:type",Boolean)],t.prototype,"skipLocationChange",void 0),c([e.Input(),p("design:type",Boolean)],t.prototype,"replaceUrl",void 0),c([e.Input(),p("design:type",Object)],t.prototype,"state",void 0),c([e.Input(),p("design:type",Object),p("design:paramtypes",[Object])],t.prototype,"routerLink",null),c([e.Input(),p("design:type",Boolean),p("design:paramtypes",[Boolean])],t.prototype,"preserveQueryParams",null),c([e.HostListener("click"),p("design:type",Function),p("design:paramtypes",[]),p("design:returntype",Boolean)],t.prototype,"onClick",null),c([e.Directive({selector:":not(a)[routerLink]"}),l(2,e.Attribute("tabindex")),p("design:paramtypes",[xe,Rt,String,e.Renderer2,e.ElementRef])],t)}(),Ee=function(){function t(t,e,r){var n=this;this.router=t,this.route=e,this.locationStrategy=r,this.commands=[],this.subscription=t.events.subscribe(function(t){t instanceof m&&n.updateTargetUrlAndHref()})}return Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preserveQueryParams",{set:function(t){e.isDevMode()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead."),this.preserve=t},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){this.updateTargetUrlAndHref()},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.onClick=function(t,e,r,n){if(0!==t||e||r||n)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;var o={skipLocationChange:Te(this.skipLocationChange),replaceUrl:Te(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,o),!1},t.prototype.updateTargetUrlAndHref=function(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))},Object.defineProperty(t.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:Te(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:Te(this.preserveFragment)})},enumerable:!0,configurable:!0}),c([e.HostBinding("attr.target"),e.Input(),p("design:type",String)],t.prototype,"target",void 0),c([e.Input(),p("design:type",Object)],t.prototype,"queryParams",void 0),c([e.Input(),p("design:type",String)],t.prototype,"fragment",void 0),c([e.Input(),p("design:type",String)],t.prototype,"queryParamsHandling",void 0),c([e.Input(),p("design:type",Boolean)],t.prototype,"preserveFragment",void 0),c([e.Input(),p("design:type",Boolean)],t.prototype,"skipLocationChange",void 0),c([e.Input(),p("design:type",Boolean)],t.prototype,"replaceUrl",void 0),c([e.Input(),p("design:type",Object)],t.prototype,"state",void 0),c([e.HostBinding(),p("design:type",String)],t.prototype,"href",void 0),c([e.Input(),p("design:type",Object),p("design:paramtypes",[Object])],t.prototype,"routerLink",null),c([e.Input(),p("design:type",Boolean),p("design:paramtypes",[Boolean])],t.prototype,"preserveQueryParams",null),c([e.HostListener("click",["$event.button","$event.ctrlKey","$event.metaKey","$event.shiftKey"]),p("design:type",Function),p("design:paramtypes",[Number,Boolean,Boolean,Boolean]),p("design:returntype",Boolean)],t.prototype,"onClick",null),c([e.Directive({selector:"a[routerLink]"}),p("design:paramtypes",[xe,Rt,o.LocationStrategy])],t)}();function Te(t){return""===t||!!t}
158
158
  /**
159
159
  * @license
160
160
  * Copyright Google Inc. All Rights Reserved.
@@ -175,7 +175,7 @@ function Pe(t){throw t}function Oe(t,e,r){return e.parse("/")}function _e(t,e){r
175
175
  *
176
176
  * Use of this source code is governed by an MIT-style license that can be
177
177
  * found in the LICENSE file at https://angular.io/license
178
- */var ir=new e.Version("7.2.0-beta.0");
178
+ */var ir=new e.Version("7.2.0");
179
179
  /**
180
180
  * @license
181
181
  * Copyright Google Inc. All Rights Reserved.