@angular/router 11.2.10 → 11.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v11.2.10
2
+ * @license Angular v11.2.14
3
3
  * (c) 2010-2021 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -83,7 +83,7 @@ var re=function re(t){this.path=t,this.route=this.path[this.path.length-1]},ne=f
83
83
  *
84
84
  * Use of this source code is governed by an MIT-style license that can be
85
85
  * found in the LICENSE file at https://angular.io/license
86
- */var ue=function Qt(){};function se(t){return new n.Observable((function(e){return e.error(t)}))}var ce=function(){function t(t,e,r,n,i,o){this.rootComponentType=t,this.config=e,this.urlTree=r,this.url=n,this.paramsInheritanceStrategy=i,this.relativeLinkResolution=o}return t.prototype.recognize=function(){var t=Bt(this.urlTree.root,[],[],this.config.filter((function(t){return void 0===t.redirectTo})),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,"primary");if(null===e)return null;var r=new ht([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),n=new at(r,e),i=new ft(this.url,n);return this.inheritParamsAndData(i._root),i},t.prototype.inheritParamsAndData=function(t){var e=this,r=t.value,n=pt(r,this.paramsInheritanceStrategy);r.params=Object.freeze(n.params),r.data=Object.freeze(n.data),t.children.forEach((function(t){return e.inheritParamsAndData(t)}))},t.prototype.processSegmentGroup=function(t,e,r){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,r)},t.prototype.processChildren=function(t,e){var r,n,i=[];try{for(var o=u(Object.keys(e.children)),a=o.next();!a.done;a=o.next()){var s=a.value,l=e.children[s],p=Ft(t,s),h=this.processSegmentGroup(p,l,s);if(null===h)return null;i.push.apply(i,c(h))}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}var f=function d(t){var e,r,n=[],i=function(t){var e;if(!function r(t){var e=t.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}(t))return n.push(t),"continue";var i=n.find((function(e){return t.value.routeConfig===e.value.routeConfig}));void 0!==i?(e=i.children).push.apply(e,c(t.children)):n.push(t)};try{for(var o=u(t),a=o.next();!a.done;a=o.next())i(a.value)}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n}(i);return function g(t){t.sort((function(t,e){return"primary"===t.value.outlet?-1:"primary"===e.value.outlet?1:t.value.outlet.localeCompare(e.value.outlet)}))}(f),f},t.prototype.processSegment=function(t,e,r,n){var i,o;try{for(var a=u(t),s=a.next();!s.done;s=a.next()){var c=this.processSegmentAgainstRoute(s.value,e,r,n);if(null!==c)return c}}catch(t){i={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return Zt(e,r,n)?[]:null},t.prototype.processSegmentAgainstRoute=function(t,e,r,n){if(t.redirectTo||!$t(t,e,r,n))return null;var i,o=[],a=[];if("**"===t.path){var u=r.length>0?I(r).parameters:{};i=new ht(r,u,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,he(t),Ht(t),t.component,t,le(e),pe(e)+r.length,fe(t))}else{var s=Wt(e,t,r);if(!s.matched)return null;o=s.consumedSegments,a=r.slice(s.lastChild),i=new ht(o,s.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,he(t),Ht(t),t.component,t,le(e),pe(e)+o.length,fe(t))}var c=function l(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),p=Bt(e,o,a,c.filter((function(t){return void 0===t.redirectTo})),this.relativeLinkResolution),h=p.segmentGroup,f=p.slicedSegments;if(0===f.length&&h.hasChildren()){var d=this.processChildren(c,h);return null===d?null:[new at(i,d)]}if(0===c.length&&0===f.length)return[new at(i,[])];var g=Ht(t)===n,v=this.processSegment(c,h,f,g?"primary":n);return null===v?null:[new at(i,v)]},t}();function le(t){for(var e=t;e._sourceSegment;)e=e._sourceSegment;return e}function pe(t){for(var e=t,r=e._segmentIndexShift?e._segmentIndexShift:0;e._sourceSegment;)r+=(e=e._sourceSegment)._segmentIndexShift?e._segmentIndexShift:0;return r-1}function he(t){return t.data||{}}function fe(t){return t.resolve||{}}
86
+ */var ue=function Qt(){};function se(t){return new n.Observable((function(e){return e.error(t)}))}var ce=function(){function t(t,e,r,n,i,o){this.rootComponentType=t,this.config=e,this.urlTree=r,this.url=n,this.paramsInheritanceStrategy=i,this.relativeLinkResolution=o}return t.prototype.recognize=function(){var t=Bt(this.urlTree.root,[],[],this.config.filter((function(t){return void 0===t.redirectTo})),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,"primary");if(null===e)return null;var r=new ht([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),n=new at(r,e),i=new ft(this.url,n);return this.inheritParamsAndData(i._root),i},t.prototype.inheritParamsAndData=function(t){var e=this,r=t.value,n=pt(r,this.paramsInheritanceStrategy);r.params=Object.freeze(n.params),r.data=Object.freeze(n.data),t.children.forEach((function(t){return e.inheritParamsAndData(t)}))},t.prototype.processSegmentGroup=function(t,e,r){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,r)},t.prototype.processChildren=function(t,e){var r,n,i=[];try{for(var o=u(Object.keys(e.children)),a=o.next();!a.done;a=o.next()){var s=a.value,l=e.children[s],p=Ft(t,s),h=this.processSegmentGroup(p,l,s);if(null===h)return null;i.push.apply(i,c(h))}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}var f=function t(e){var r,n,i,o,a=[],s=new Set,l=function(t){var e;if(!function r(t){var e=t.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}(t))return a.push(t),"continue";var n=a.find((function(e){return t.value.routeConfig===e.value.routeConfig}));void 0!==n?((e=n.children).push.apply(e,c(t.children)),s.add(n)):a.push(t)};try{for(var p=u(e),h=p.next();!h.done;h=p.next())l(h.value)}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}try{for(var f=u(s),d=f.next();!d.done;d=f.next()){var g=d.value,v=t(g.children);a.push(new at(g.value,v))}}catch(t){i={error:t}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}return a.filter((function(t){return!s.has(t)}))}(i);return function d(t){t.sort((function(t,e){return"primary"===t.value.outlet?-1:"primary"===e.value.outlet?1:t.value.outlet.localeCompare(e.value.outlet)}))}(f),f},t.prototype.processSegment=function(t,e,r,n){var i,o;try{for(var a=u(t),s=a.next();!s.done;s=a.next()){var c=this.processSegmentAgainstRoute(s.value,e,r,n);if(null!==c)return c}}catch(t){i={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return Zt(e,r,n)?[]:null},t.prototype.processSegmentAgainstRoute=function(t,e,r,n){if(t.redirectTo||!$t(t,e,r,n))return null;var i,o=[],a=[];if("**"===t.path){var u=r.length>0?I(r).parameters:{};i=new ht(r,u,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,he(t),Ht(t),t.component,t,le(e),pe(e)+r.length,fe(t))}else{var s=Wt(e,t,r);if(!s.matched)return null;o=s.consumedSegments,a=r.slice(s.lastChild),i=new ht(o,s.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,he(t),Ht(t),t.component,t,le(e),pe(e)+o.length,fe(t))}var c=function l(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),p=Bt(e,o,a,c.filter((function(t){return void 0===t.redirectTo})),this.relativeLinkResolution),h=p.segmentGroup,f=p.slicedSegments;if(0===f.length&&h.hasChildren()){var d=this.processChildren(c,h);return null===d?null:[new at(i,d)]}if(0===c.length&&0===f.length)return[new at(i,[])];var g=Ht(t)===n,v=this.processSegment(c,h,f,g?"primary":n);return null===v?null:[new at(i,v)]},t}();function le(t){for(var e=t;e._sourceSegment;)e=e._sourceSegment;return e}function pe(t){for(var e=t,r=e._segmentIndexShift?e._segmentIndexShift:0;e._sourceSegment;)r+=(e=e._sourceSegment)._segmentIndexShift?e._segmentIndexShift:0;return r-1}function he(t){return t.data||{}}function fe(t){return t.resolve||{}}
87
87
  /**
88
88
  * @license
89
89
  * Copyright Google LLC All Rights Reserved.
@@ -120,7 +120,7 @@ function Oe(t){throw t}function Ue(t,e,r){return e.parse("/")}function Pe(t,e){r
120
120
  *
121
121
  * Use of this source code is governed by an MIT-style license that can be
122
122
  * found in the LICENSE file at https://angular.io/license
123
- */(e.rootComponentType,e.config,(function(t){return e.serializeUrl(t)}),e.paramsInheritanceStrategy,e.relativeLinkResolution),i.tap((function(t){"eager"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects);var n=new g(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);r.next(n)})));if(o&&e.rawUrlTree&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){var s=t.extractedUrl,c=t.source,l=t.restoredState,h=t.extras,f=new p(t.id,e.serializeUrl(s),c,l);r.next(f);var d=ct(s,e.rootComponentType).snapshot;return n.of(Object.assign(Object.assign({},t),{targetSnapshot:d,urlAfterRedirects:s,extras:Object.assign(Object.assign({},h),{skipLocationChange:!1,replaceUrl:!1})}))}return e.rawUrlTree=t.rawUrl,e.browserUrlTree=t.urlAfterRedirects,t.resolve(null),n.EMPTY})),de((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})})),i.tap((function(t){var r=new v(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)})),i.map((function(t){return Object.assign(Object.assign({},t),{guards:(r=t.targetSnapshot,n=t.currentSnapshot,i=e.rootContexts,o=r._root,oe(o,n?n._root:null,i,[o.value]))});var r,n,i,o})),function h(t,e){return i.mergeMap((function(r){var o=r.targetSnapshot,a=r.currentSnapshot,u=r.guards,s=u.canActivateChecks,c=u.canDeactivateChecks;return 0===c.length&&0===s.length?n.of(Object.assign(Object.assign({},r),{guardsResult:!0})):function l(t,e,r,o){return n.from(t).pipe(i.mergeMap((function(t){return function a(t,e,r,o,u){var s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!s||0===s.length)return n.of(!0);var c=s.map((function(n){var a,s=ie(n,e,u);if(function c(t){return t&&kt(t.canDeactivate)}(s))a=M(s.canDeactivate(t,e,r,o));else{if(!kt(s))throw new Error("Invalid CanDeactivate guard");a=M(s(t,e,r,o))}return a.pipe(i.first())}));return n.of(c).pipe(Mt())}(t.component,t.route,r,e,o)})),i.first((function(t){return!0!==t}),!0))}(c,o,a,t).pipe(i.mergeMap((function(r){return r&&function a(t){return"boolean"==typeof t}(r)?function u(t,e,r,o){return n.from(e).pipe(i.concatMap((function(e){return n.concat(function a(t,e){return null!==t&&e&&e(new w(t)),n.of(!0)}(e.route.parent,o),function u(t,e){return null!==t&&e&&e(new O(t)),n.of(!0)}(e.route,o),function s(t,e,r){var o=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 n.defer((function(){var a=e.guards.map((function(n){var a,u=ie(n,e.node,r);if(function s(t){return t&&kt(t.canActivateChild)}(u))a=M(u.canActivateChild(o,t));else{if(!kt(u))throw new Error("Invalid CanActivateChild guard");a=M(u(o,t))}return a.pipe(i.first())}));return n.of(a).pipe(Mt())}))}));return n.of(a).pipe(Mt())}(t,e.path,r),function c(t,e,r){var o=e.routeConfig?e.routeConfig.canActivate:null;if(!o||0===o.length)return n.of(!0);var a=o.map((function(o){return n.defer((function(){var n,a=ie(o,e,r);if(function u(t){return t&&kt(t.canActivate)}(a))n=M(a.canActivate(e,t));else{if(!kt(a))throw new Error("Invalid CanActivate guard");n=M(a(e,t))}return n.pipe(i.first())}))}));return n.of(a).pipe(Mt())}(t,e.route,r))})),i.first((function(t){return!0!==t}),!0))}(o,s,t,e):n.of(r)})),i.map((function(t){return Object.assign(Object.assign({},r),{guardsResult:t})})))}))}(e.ngModule.injector,(function(t){return e.triggerEvent(t)})),i.tap((function(t){if(Et(t.guardsResult)){var r=j('Redirecting to "'+e.serializeUrl(t.guardsResult)+'"');throw r.url=t.guardsResult,r}var n=new m(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);e.triggerEvent(n)})),i.filter((function(t){if(!t.guardsResult){e.resetUrlToCurrentUrlTree();var n=new f(t.id,e.serializeUrl(t.extractedUrl),"");return r.next(n),t.resolve(!1),!1}return!0})),de((function(t){if(t.guards.canActivateChecks.length)return n.of(t).pipe(i.tap((function(t){var r=new y(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)})),i.switchMap((function(t){var o=!1;return n.of(t).pipe(function a(t,e){return i.mergeMap((function(r){var o=r.targetSnapshot,a=r.guards.canActivateChecks;if(!a.length)return n.of(r);var u=0;return n.from(a).pipe(i.concatMap((function(r){return function a(t,e,r,o){return function a(t,e,r,o){var a=Object.keys(t);if(0===a.length)return n.of({});var u={};return n.from(a).pipe(i.mergeMap((function(n){return function a(t,e,r,n){var i=ie(t,e,n);return M(i.resolve?i.resolve(e,r):i(e,r))}(t[n],e,r,o).pipe(i.tap((function(t){u[n]=t})))})),i.takeLast(1),i.mergeMap((function(){return Object.keys(u).length===a.length?n.of(u):n.EMPTY})))}(t._resolve,t,e,o).pipe(i.map((function(e){return t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),pt(t,r).resolve),null})))}(r.route,o,t,e)})),i.tap((function(){return u++})),i.takeLast(1),i.mergeMap((function(t){return u===a.length?n.of(r):n.EMPTY})))}))}(e.paramsInheritanceStrategy,e.ngModule.injector),i.tap({next:function(){return o=!0},complete:function(){if(!o){var n=new f(t.id,e.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");r.next(n),t.resolve(!1)}}}))})),i.tap((function(t){var r=new S(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)})))})),de((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})})),i.map((function(t){var r=function i(t,e,r){var i=function t(e,r,i){if(i&&e.shouldReuseRoute(r.value,i.value.snapshot)){(l=i.value)._futureSnapshot=r.value;var o=function a(e,r,n){return r.children.map((function(r){var i,o;try{for(var a=u(n.children),s=a.next();!s.done;s=a.next()){var c=s.value;if(e.shouldReuseRoute(r.value,c.value.snapshot))return t(e,r,c)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return t(e,r)}))}(e,r,i);return new at(l,o)}var s=e.retrieve(r.value);if(s){var c=s.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])}(r,c),c}var l=function p(t){return new lt(new n.BehaviorSubject(t.url),new n.BehaviorSubject(t.params),new n.BehaviorSubject(t.queryParams),new n.BehaviorSubject(t.fragment),new n.BehaviorSubject(t.data),t.outlet,t.component,t)}(r.value);return o=r.children.map((function(r){return t(e,r)})),new at(l,o)}(t,e._root,r?r._root:void 0);return new st(i,e)}(e.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:r})})),i.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),e.browserUrlTree=t.urlAfterRedirects)})),(o=e.rootContexts,a=e.routeReuseStrategy,s=function(t){return e.triggerEvent(t)},i.map((function(t){return new jt(a,t.targetRouterState,t.currentRouterState,s).activate(o),t}))),i.tap({next:function(){c=!0},complete:function(){c=!0}}),i.finalize((function(){if(!c&&!l){e.resetUrlToCurrentUrlTree();var n=new f(t.id,e.serializeUrl(t.extractedUrl),"Navigation ID "+t.id+" is not equal to the current navigation id "+e.navigationId);r.next(n),t.resolve(!1)}e.currentNavigation=null})),i.catchError((function(i){if(l=!0,function o(t){return t&&t.ngNavigationCancelingError}(i)){var a=Et(i.url);a||(e.navigated=!0,e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));var u=new f(t.id,e.serializeUrl(t.extractedUrl),i.message);r.next(u),a?setTimeout((function(){var r=e.urlHandlingStrategy.merge(i.url,e.rawUrlTree);e.scheduleNavigation(r,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})}),0):t.resolve(!1)}else{e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var s=new d(t.id,e.serializeUrl(t.extractedUrl),i);r.next(s);try{t.resolve(e.errorHandler(i))}catch(e){t.reject(e)}}return n.EMPTY})))})))},t.prototype.resetRootComponentType=function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType},t.prototype.getTransition=function(){var t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t},t.prototype.setTransition=function(t){this.transitions.next(Object.assign(Object.assign({},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.extractLocationChangeInfoFromEvent(e);t.shouldScheduleNavigation(t.lastLocationChangeInfo,r)&&setTimeout((function(){var e=r.source,n=r.state,i=r.urlTree,o={replaceUrl:!0};if(n){var a=Object.assign({},n);delete a.navigationId,0!==Object.keys(a).length&&(o.state=a)}t.scheduleNavigation(i,e,n,o)}),0),t.lastLocationChangeInfo=r})))},t.prototype.extractLocationChangeInfoFromEvent=function(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}},t.prototype.shouldScheduleNavigation=function(t,e){if(!t)return!0;var r=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&r&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))},Object.defineProperty(t.prototype,"url",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!1,configurable:!0}),t.prototype.getCurrentNavigation=function(){return this.currentNavigation},t.prototype.triggerEvent=function(t){this.events.next(t)},t.prototype.resetConfig=function(t){Nt(t),this.config=t.map(Dt),this.navigated=!1,this.lastSuccessfulId=-1},t.prototype.ngOnDestroy=function(){this.dispose()},t.prototype.dispose=function(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0},t.prototype.createUrlTree=function(t,e){void 0===e&&(e={});var r=e.queryParams,n=e.relativeTo||this.routerState.root,i=e.preserveFragment?this.currentUrlTree.fragment:e.fragment,o=null;switch(e.queryParamsHandling){case"merge":o=Object.assign(Object.assign({},this.currentUrlTree.queryParams),r);break;case"preserve":o=this.currentUrlTree.queryParams;break;default:o=r||null}return null!==o&&(o=this.removeEmptyProps(o)),function a(t,e,r,n,i){if(0===r.length)return bt(e.root,e.root,e,n,i);var o=function a(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new Ct(!0,0,t);var e=0,r=!1,n=t.reduce((function(t,n,i){if("object"==typeof n&&null!=n){if(n.outlets){var o={};return L(n.outlets,(function(t,e){o[e]="string"==typeof t?t.split("/"):t})),c(t,[{outlets:o}])}if(n.segmentPath)return c(t,[n.segmentPath])}return"string"!=typeof n?c(t,[n]):0===i?(n.split("/").forEach((function(n,i){0==i&&"."===n||(0==i&&""===n?r=!0:".."===n?e++:""!=n&&t.push(n))})),t):c(t,[n])}),[]);return new Ct(r,e,n)}(r);if(o.toRoot())return bt(e.root,new z([],{}),e,n,i);var u=function s(t,e,r){if(t.isAbsolute)return new wt(e.root,!0,0);if(-1===r.snapshot._lastPathIndex){var n=r.snapshot._urlSegment;return new wt(n,n===e.root,0)}var i=yt(t.commands[0])?0:1;return function o(t,e,r){for(var n=t,i=e,o=r;o>i;){if(o-=i,!(n=n.parent))throw new Error("Invalid number of '../'");i=n.segments.length}return new wt(n,!1,i-o)}(r.snapshot._urlSegment,r.snapshot._lastPathIndex+i,t.numberOfDoubleDots)}(o,e,t),l=u.processChildren?Ot(u.segmentGroup,u.index,o.commands):Rt(u.segmentGroup,u.index,o.commands);return bt(u.segmentGroup,l,e,n,i)}(n,this.currentUrlTree,t,o,i)},t.prototype.navigateByUrl=function(t,e){void 0===e&&(e={skipLocationChange:!1});var r=Et(t)?t:this.parseUrl(t),n=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(n,"imperative",null,e)},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)}}
123
+ */(e.rootComponentType,e.config,(function(t){return e.serializeUrl(t)}),e.paramsInheritanceStrategy,e.relativeLinkResolution),i.tap((function(t){"eager"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects);var n=new g(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);r.next(n)})));if(o&&e.rawUrlTree&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){var s=t.extractedUrl,c=t.source,l=t.restoredState,h=t.extras,f=new p(t.id,e.serializeUrl(s),c,l);r.next(f);var d=ct(s,e.rootComponentType).snapshot;return n.of(Object.assign(Object.assign({},t),{targetSnapshot:d,urlAfterRedirects:s,extras:Object.assign(Object.assign({},h),{skipLocationChange:!1,replaceUrl:!1})}))}return e.rawUrlTree=t.rawUrl,e.browserUrlTree=t.urlAfterRedirects,t.resolve(null),n.EMPTY})),de((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})})),i.tap((function(t){var r=new v(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)})),i.map((function(t){return Object.assign(Object.assign({},t),{guards:(r=t.targetSnapshot,n=t.currentSnapshot,i=e.rootContexts,o=r._root,oe(o,n?n._root:null,i,[o.value]))});var r,n,i,o})),function h(t,e){return i.mergeMap((function(r){var o=r.targetSnapshot,a=r.currentSnapshot,u=r.guards,s=u.canActivateChecks,c=u.canDeactivateChecks;return 0===c.length&&0===s.length?n.of(Object.assign(Object.assign({},r),{guardsResult:!0})):function l(t,e,r,o){return n.from(t).pipe(i.mergeMap((function(t){return function a(t,e,r,o,u){var s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!s||0===s.length)return n.of(!0);var c=s.map((function(n){var a,s=ie(n,e,u);if(function c(t){return t&&kt(t.canDeactivate)}(s))a=M(s.canDeactivate(t,e,r,o));else{if(!kt(s))throw new Error("Invalid CanDeactivate guard");a=M(s(t,e,r,o))}return a.pipe(i.first())}));return n.of(c).pipe(Mt())}(t.component,t.route,r,e,o)})),i.first((function(t){return!0!==t}),!0))}(c,o,a,t).pipe(i.mergeMap((function(r){return r&&function a(t){return"boolean"==typeof t}(r)?function u(t,e,r,o){return n.from(e).pipe(i.concatMap((function(e){return n.concat(function a(t,e){return null!==t&&e&&e(new w(t)),n.of(!0)}(e.route.parent,o),function u(t,e){return null!==t&&e&&e(new O(t)),n.of(!0)}(e.route,o),function s(t,e,r){var o=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 n.defer((function(){var a=e.guards.map((function(n){var a,u=ie(n,e.node,r);if(function s(t){return t&&kt(t.canActivateChild)}(u))a=M(u.canActivateChild(o,t));else{if(!kt(u))throw new Error("Invalid CanActivateChild guard");a=M(u(o,t))}return a.pipe(i.first())}));return n.of(a).pipe(Mt())}))}));return n.of(a).pipe(Mt())}(t,e.path,r),function c(t,e,r){var o=e.routeConfig?e.routeConfig.canActivate:null;if(!o||0===o.length)return n.of(!0);var a=o.map((function(o){return n.defer((function(){var n,a=ie(o,e,r);if(function u(t){return t&&kt(t.canActivate)}(a))n=M(a.canActivate(e,t));else{if(!kt(a))throw new Error("Invalid CanActivate guard");n=M(a(e,t))}return n.pipe(i.first())}))}));return n.of(a).pipe(Mt())}(t,e.route,r))})),i.first((function(t){return!0!==t}),!0))}(o,s,t,e):n.of(r)})),i.map((function(t){return Object.assign(Object.assign({},r),{guardsResult:t})})))}))}(e.ngModule.injector,(function(t){return e.triggerEvent(t)})),i.tap((function(t){if(Et(t.guardsResult)){var r=j('Redirecting to "'+e.serializeUrl(t.guardsResult)+'"');throw r.url=t.guardsResult,r}var n=new m(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);e.triggerEvent(n)})),i.filter((function(t){if(!t.guardsResult){e.resetUrlToCurrentUrlTree();var n=new f(t.id,e.serializeUrl(t.extractedUrl),"");return r.next(n),t.resolve(!1),!1}return!0})),de((function(t){if(t.guards.canActivateChecks.length)return n.of(t).pipe(i.tap((function(t){var r=new y(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)})),i.switchMap((function(t){var o=!1;return n.of(t).pipe(function a(t,e){return i.mergeMap((function(r){var o=r.targetSnapshot,a=r.guards.canActivateChecks;if(!a.length)return n.of(r);var u=0;return n.from(a).pipe(i.concatMap((function(r){return function a(t,e,r,o){return function a(t,e,r,o){var a=Object.keys(t);if(0===a.length)return n.of({});var u={};return n.from(a).pipe(i.mergeMap((function(n){return function a(t,e,r,n){var i=ie(t,e,n);return M(i.resolve?i.resolve(e,r):i(e,r))}(t[n],e,r,o).pipe(i.tap((function(t){u[n]=t})))})),i.takeLast(1),i.mergeMap((function(){return Object.keys(u).length===a.length?n.of(u):n.EMPTY})))}(t._resolve,t,e,o).pipe(i.map((function(e){return t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),pt(t,r).resolve),null})))}(r.route,o,t,e)})),i.tap((function(){return u++})),i.takeLast(1),i.mergeMap((function(t){return u===a.length?n.of(r):n.EMPTY})))}))}(e.paramsInheritanceStrategy,e.ngModule.injector),i.tap({next:function(){return o=!0},complete:function(){if(!o){var n=new f(t.id,e.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");r.next(n),t.resolve(!1)}}}))})),i.tap((function(t){var r=new S(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)})))})),de((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})})),i.map((function(t){var r=function i(t,e,r){var i=function t(e,r,i){if(i&&e.shouldReuseRoute(r.value,i.value.snapshot)){(l=i.value)._futureSnapshot=r.value;var o=function a(e,r,n){return r.children.map((function(r){var i,o;try{for(var a=u(n.children),s=a.next();!s.done;s=a.next()){var c=s.value;if(e.shouldReuseRoute(r.value,c.value.snapshot))return t(e,r,c)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return t(e,r)}))}(e,r,i);return new at(l,o)}if(e.shouldAttach(r.value)){var s=e.retrieve(r.value);if(null!==s){var c=s.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])}(r,c),c}}var l=function p(t){return new lt(new n.BehaviorSubject(t.url),new n.BehaviorSubject(t.params),new n.BehaviorSubject(t.queryParams),new n.BehaviorSubject(t.fragment),new n.BehaviorSubject(t.data),t.outlet,t.component,t)}(r.value);return o=r.children.map((function(r){return t(e,r)})),new at(l,o)}(t,e._root,r?r._root:void 0);return new st(i,e)}(e.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:r})})),i.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),e.browserUrlTree=t.urlAfterRedirects)})),(o=e.rootContexts,a=e.routeReuseStrategy,s=function(t){return e.triggerEvent(t)},i.map((function(t){return new jt(a,t.targetRouterState,t.currentRouterState,s).activate(o),t}))),i.tap({next:function(){c=!0},complete:function(){c=!0}}),i.finalize((function(){if(!c&&!l){e.resetUrlToCurrentUrlTree();var n=new f(t.id,e.serializeUrl(t.extractedUrl),"Navigation ID "+t.id+" is not equal to the current navigation id "+e.navigationId);r.next(n),t.resolve(!1)}e.currentNavigation=null})),i.catchError((function(i){if(l=!0,function o(t){return t&&t.ngNavigationCancelingError}(i)){var a=Et(i.url);a||(e.navigated=!0,e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));var u=new f(t.id,e.serializeUrl(t.extractedUrl),i.message);r.next(u),a?setTimeout((function(){var r=e.urlHandlingStrategy.merge(i.url,e.rawUrlTree);e.scheduleNavigation(r,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})}),0):t.resolve(!1)}else{e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var s=new d(t.id,e.serializeUrl(t.extractedUrl),i);r.next(s);try{t.resolve(e.errorHandler(i))}catch(e){t.reject(e)}}return n.EMPTY})))})))},t.prototype.resetRootComponentType=function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType},t.prototype.getTransition=function(){var t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t},t.prototype.setTransition=function(t){this.transitions.next(Object.assign(Object.assign({},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.extractLocationChangeInfoFromEvent(e);t.shouldScheduleNavigation(t.lastLocationChangeInfo,r)&&setTimeout((function(){var e=r.source,n=r.state,i=r.urlTree,o={replaceUrl:!0};if(n){var a=Object.assign({},n);delete a.navigationId,0!==Object.keys(a).length&&(o.state=a)}t.scheduleNavigation(i,e,n,o)}),0),t.lastLocationChangeInfo=r})))},t.prototype.extractLocationChangeInfoFromEvent=function(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}},t.prototype.shouldScheduleNavigation=function(t,e){if(!t)return!0;var r=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&r&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))},Object.defineProperty(t.prototype,"url",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!1,configurable:!0}),t.prototype.getCurrentNavigation=function(){return this.currentNavigation},t.prototype.triggerEvent=function(t){this.events.next(t)},t.prototype.resetConfig=function(t){Nt(t),this.config=t.map(Dt),this.navigated=!1,this.lastSuccessfulId=-1},t.prototype.ngOnDestroy=function(){this.dispose()},t.prototype.dispose=function(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0},t.prototype.createUrlTree=function(t,e){void 0===e&&(e={});var r=e.queryParams,n=e.relativeTo||this.routerState.root,i=e.preserveFragment?this.currentUrlTree.fragment:e.fragment,o=null;switch(e.queryParamsHandling){case"merge":o=Object.assign(Object.assign({},this.currentUrlTree.queryParams),r);break;case"preserve":o=this.currentUrlTree.queryParams;break;default:o=r||null}return null!==o&&(o=this.removeEmptyProps(o)),function a(t,e,r,n,i){if(0===r.length)return bt(e.root,e.root,e,n,i);var o=function a(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new Ct(!0,0,t);var e=0,r=!1,n=t.reduce((function(t,n,i){if("object"==typeof n&&null!=n){if(n.outlets){var o={};return L(n.outlets,(function(t,e){o[e]="string"==typeof t?t.split("/"):t})),c(t,[{outlets:o}])}if(n.segmentPath)return c(t,[n.segmentPath])}return"string"!=typeof n?c(t,[n]):0===i?(n.split("/").forEach((function(n,i){0==i&&"."===n||(0==i&&""===n?r=!0:".."===n?e++:""!=n&&t.push(n))})),t):c(t,[n])}),[]);return new Ct(r,e,n)}(r);if(o.toRoot())return bt(e.root,new z([],{}),e,n,i);var u=function s(t,e,r){if(t.isAbsolute)return new wt(e.root,!0,0);if(-1===r.snapshot._lastPathIndex){var n=r.snapshot._urlSegment;return new wt(n,n===e.root,0)}var i=yt(t.commands[0])?0:1;return function o(t,e,r){for(var n=t,i=e,o=r;o>i;){if(o-=i,!(n=n.parent))throw new Error("Invalid number of '../'");i=n.segments.length}return new wt(n,!1,i-o)}(r.snapshot._urlSegment,r.snapshot._lastPathIndex+i,t.numberOfDoubleDots)}(o,e,t),l=u.processChildren?Ot(u.segmentGroup,u.index,o.commands):Rt(u.segmentGroup,u.index,o.commands);return bt(u.segmentGroup,l,e,n,i)}(n,this.currentUrlTree,t,o,i)},t.prototype.navigateByUrl=function(t,e){void 0===e&&(e={skipLocationChange:!1});var r=Et(t)?t:this.parseUrl(t),n=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(n,"imperative",null,e)},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)}}
124
124
  /**
125
125
  * @license
126
126
  * Copyright Google LLC All Rights Reserved.
@@ -158,7 +158,7 @@ var ze=[ke,xe,je,Te,It],De=new r.InjectionToken("ROUTER_CONFIGURATION"),He=new r
158
158
  *
159
159
  * Use of this source code is governed by an MIT-style license that can be
160
160
  * found in the LICENSE file at https://angular.io/license
161
- */var nr=new r.Version("11.2.10");
161
+ */var nr=new r.Version("11.2.14");
162
162
  /**
163
163
  * @license
164
164
  * Copyright Google LLC All Rights Reserved.