@angular/router 11.2.9 → 11.2.13

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.9
2
+ * @license Angular v11.2.13
3
3
  * (c) 2010-2021 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -32,7 +32,7 @@ var l,p=function(t){function e(e,r,n,i){void 0===n&&(n="imperative"),void 0===i&
32
32
  *
33
33
  * Use of this source code is governed by an MIT-style license that can be
34
34
  * found in the LICENSE file at https://angular.io/license
35
- */function N(t,e,r){return r?function n(t,e){return T(t,e)}(t.queryParams,e.queryParams)&&function t(e,r){if(!H(e.segments,r.segments))return!1;if(e.numberOfChildren!==r.numberOfChildren)return!1;for(var n in r.children){if(!e.children[n])return!1;if(!t(e.children[n],r.children[n]))return!1}return!0}(t.root,e.root):function i(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every((function(r){return k(t[r],e[r])}))}(t.queryParams,e.queryParams)&&function t(e,r){return function e(r,n,i){if(r.segments.length>i.length)return!!H(a=r.segments.slice(0,i.length),i)&&!n.hasChildren();if(r.segments.length===i.length){if(!H(r.segments,i))return!1;for(var o in n.children){if(!r.children[o])return!1;if(!t(r.children[o],n.children[o]))return!1}return!0}var a=i.slice(0,r.segments.length),u=i.slice(r.segments.length);return!!H(r.segments,a)&&!!r.children.primary&&e(r.children.primary,n,u)}(e,r,r.segments)}(t.root,e.root)}var q=function(){function t(t,e,r){this.root=t,this.queryParams=e,this.fragment=r}return Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=x(this.queryParams)),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return W.serialize(this)},t}(),z=function(){function t(t,e){var r=this;this.segments=t,this.children=e,this.parent=null,L(e,(function(t,e){return t.parent=r}))}return t.prototype.hasChildren=function(){return this.numberOfChildren>0},Object.defineProperty(t.prototype,"numberOfChildren",{get:function(){return Object.keys(this.children).length},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return B(this)},t}(),D=function(){function t(t,e){this.path=t,this.parameters=e}return Object.defineProperty(t.prototype,"parameterMap",{get:function(){return this._parameterMap||(this._parameterMap=x(this.parameters)),this._parameterMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return K(this)},t}();function H(t,e){return t.length===e.length&&t.every((function(t,r){return t.path===e[r].path}))}var F=function F(){},G=function(){function t(){}return t.prototype.parse=function(t){var e=new rt(t);return new q(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())},t.prototype.serialize=function(t){return"/"+function t(e,r){if(!e.hasChildren())return B(e);if(r){var n=e.children.primary?t(e.children.primary,!1):"",i=[];return L(e.children,(function(e,r){"primary"!==r&&i.push(r+":"+t(e,!1))})),i.length>0?n+"("+i.join("//")+")":n}var o=function a(t,e){var r=[];return L(t.children,(function(t,n){"primary"===n&&(r=r.concat(e(t,n)))})),L(t.children,(function(t,n){"primary"!==n&&(r=r.concat(e(t,n)))})),r}(e,(function(r,n){return"primary"===n?[t(e.children.primary,!1)]:[n+":"+t(r,!1)]}));return 1===Object.keys(e.children).length&&null!=e.children.primary?B(e)+"/"+o[0]:B(e)+"/("+o.join("//")+")"}(t.root,!0)+function e(t){var e=Object.keys(t).map((function(e){var r=t[e];return Array.isArray(r)?r.map((function(t){return $(e)+"="+$(t)})).join("&"):$(e)+"="+$(r)}));return e.length?"?"+e.join("&"):""}(t.queryParams)+("string"==typeof t.fragment?"#"+function r(t){return encodeURI(t)}(t.fragment):"")},t}(),W=new G;function B(t){return t.segments.map((function(t){return K(t)})).join("/")}function V(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function $(t){return V(t).replace(/%3B/gi,";")}function Z(t){return V(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Q(t){return decodeURIComponent(t)}function Y(t){return Q(t.replace(/\+/g,"%20"))}function K(t){return""+Z(t.path)+function e(t){return Object.keys(t).map((function(e){return";"+Z(e)+"="+Z(t[e])})).join("")}(t.parameters)}var J=/^[^\/()?;=#]+/;function X(t){var e=t.match(J);return e?e[0]:""}var tt=/^[^=?&#]+/,et=/^[^?&#]+/,rt=function(){function t(t){this.url=t,this.remaining=t}return t.prototype.parseRootSegment=function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new z([],{}):new z([],this.parseChildren())},t.prototype.parseQueryParams=function(){var t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t},t.prototype.parseFragment=function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null},t.prototype.parseChildren=function(){if(""===this.remaining)return{};this.consumeOptional("/");var t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());var e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));var r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(r.primary=new z(t,e)),r},t.prototype.parseSegment=function(){var t=X(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '"+this.remaining+"'.");return this.capture(t),new D(Q(t),this.parseMatrixParams())},t.prototype.parseMatrixParams=function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t},t.prototype.parseParam=function(t){var e=X(this.remaining);if(e){this.capture(e);var r="";if(this.consumeOptional("=")){var n=X(this.remaining);n&&this.capture(r=n)}t[Q(e)]=Q(r)}},t.prototype.parseQueryParam=function(t){var e=function r(t){var e=t.match(tt);return e?e[0]:""}(this.remaining);if(e){this.capture(e);var n="";if(this.consumeOptional("=")){var i=function o(t){var e=t.match(et);return e?e[0]:""}(this.remaining);i&&this.capture(n=i)}var a=Y(e),u=Y(n);if(t.hasOwnProperty(a)){var s=t[a];Array.isArray(s)||(t[a]=s=[s]),s.push(u)}else t[a]=u}},t.prototype.parseParens=function(t){var e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var r=X(this.remaining),n=this.remaining[r.length];if("/"!==n&&")"!==n&&";"!==n)throw new Error("Cannot parse url '"+this.url+"'");var i=void 0;r.indexOf(":")>-1?(i=r.substr(0,r.indexOf(":")),this.capture(i),this.capture(":")):t&&(i="primary");var o=this.parseChildren();e[i]=1===Object.keys(o).length?o.primary:new z([],o),this.consumeOptional("//")}return e},t.prototype.peekStartsWith=function(t){return this.remaining.startsWith(t)},t.prototype.consumeOptional=function(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)},t.prototype.capture=function(t){if(!this.consumeOptional(t))throw new Error('Expected "'+t+'".')},t}(),nt=function(){function t(t){this._root=t}return Object.defineProperty(t.prototype,"root",{get:function(){return this._root.value},enumerable:!1,configurable:!0}),t.prototype.parent=function(t){var e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null},t.prototype.children=function(t){var e=it(t,this._root);return e?e.children.map((function(t){return t.value})):[]},t.prototype.firstChild=function(t){var e=it(t,this._root);return e&&e.children.length>0?e.children[0].value:null},t.prototype.siblings=function(t){var e=ot(t,this._root);return e.length<2?[]:e[e.length-2].children.map((function(t){return t.value})).filter((function(e){return e!==t}))},t.prototype.pathFromRoot=function(t){return ot(t,this._root).map((function(t){return t.value}))},t}();function it(t,e){var r,n;if(t===e.value)return e;try{for(var i=u(e.children),o=i.next();!o.done;o=i.next()){var a=it(t,o.value);if(a)return a}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return null}function ot(t,e){var r,n;if(t===e.value)return[e];try{for(var i=u(e.children),o=i.next();!o.done;o=i.next()){var a=ot(t,o.value);if(a.length)return a.unshift(e),a}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return[]}var at=function(){function t(t,e){this.value=t,this.children=e}return t.prototype.toString=function(){return"TreeNode("+this.value+")"},t}();function ut(t){var e={};return t&&t.children.forEach((function(t){return e[t.value.outlet]=t})),e}var st=function(t){function e(e,r){var n=t.call(this,e)||this;return n.snapshot=r,dt(n,e),n}return a(e,t),e.prototype.toString=function(){return this.snapshot.toString()},e}(nt);function ct(t,e){var r=function i(t,e){var r=new ht([],{},{},"",{},"primary",e,null,t.root,-1,{});return new ft("",new at(r,[]))}(t,e),o=new n.BehaviorSubject([new D("",{})]),a=new n.BehaviorSubject({}),u=new n.BehaviorSubject({}),s=new n.BehaviorSubject({}),c=new n.BehaviorSubject(""),l=new lt(o,a,s,c,u,"primary",e,r.root);return l.snapshot=r.root,new st(new at(l,[]),r)}var lt=function(){function t(t,e,r,n,i,o,a,u){this.url=t,this.params=e,this.queryParams=r,this.fragment=n,this.data=i,this.outlet=o,this.component=a,this._futureSnapshot=u}return Object.defineProperty(t.prototype,"routeConfig",{get:function(){return this._futureSnapshot.routeConfig},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=this.params.pipe(i.map((function(t){return x(t)})))),this._paramMap},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(i.map((function(t){return x(t)})))),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return this.snapshot?this.snapshot.toString():"Future("+this._futureSnapshot+")"},t}();function pt(t,e){void 0===e&&(e="emptyOnly");var r=t.pathFromRoot,n=0;if("always"!==e)for(n=r.length-1;n>=1;){var i=r[n],o=r[n-1];if(i.routeConfig&&""===i.routeConfig.path)n--;else{if(o.component)break;n--}}return function a(t){return t.reduce((function(t,e){return{params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}}),{params:{},data:{},resolve:{}})}(r.slice(n))}var ht=function(){function t(t,e,r,n,i,o,a,u,s,c,l){this.url=t,this.params=e,this.queryParams=r,this.fragment=n,this.data=i,this.outlet=o,this.component=a,this.routeConfig=u,this._urlSegment=s,this._lastPathIndex=c,this._resolve=l}return Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=x(this.params)),this._paramMap},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=x(this.queryParams)),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"Route(url:'"+this.url.map((function(t){return t.toString()})).join("/")+"', path:'"+(this.routeConfig?this.routeConfig.path:"")+"')"},t}(),ft=function(t){function e(e,r){var n=t.call(this,r)||this;return n.url=e,dt(n,r),n}return a(e,t),e.prototype.toString=function(){return gt(this._root)},e}(nt);function dt(t,e){e.value._routerState=t,e.children.forEach((function(e){return dt(t,e)}))}function gt(t){var e=t.children.length>0?" { "+t.children.map(gt).join(", ")+" } ":"";return""+t.value+e}function vt(t){if(t.snapshot){var e=t.snapshot,r=t._futureSnapshot;t.snapshot=r,T(e.queryParams,r.queryParams)||t.queryParams.next(r.queryParams),e.fragment!==r.fragment&&t.fragment.next(r.fragment),T(e.params,r.params)||t.params.next(r.params),function n(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!T(t[r],e[r]))return!1;return!0}(e.url,r.url)||t.url.next(r.url),T(e.data,r.data)||t.data.next(r.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function mt(t,e){return T(t.params,e.params)&&function r(t,e){return H(t,e)&&t.every((function(t,r){return T(t.parameters,e[r].parameters)}))}(t.url,e.url)&&!(!t.parent!=!e.parent)&&(!t.parent||mt(t.parent,e.parent))}function yt(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function St(t){return"object"==typeof t&&null!=t&&t.outlets}function bt(t,e,r,n,i){var o={};return n&&L(n,(function(t,e){o[e]=Array.isArray(t)?t.map((function(t){return""+t})):""+t})),new q(r.root===t?e:function t(e,r,n){var i={};return L(e.children,(function(e,o){i[o]=e===r?n:t(e,r,n)})),new z(e.segments,i)}(r.root,t,e),o,i)}var Ct=function(){function t(t,e,r){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=r,t&&r.length>0&&yt(r[0]))throw new Error("Root segment cannot have matrix parameters");var n=r.find(St);if(n&&n!==I(r))throw new Error("{outlets:{}} has to be the last command")}return t.prototype.toRoot=function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]},t}(),wt=function wt(t,e,r){this.segmentGroup=t,this.processChildren=e,this.index=r};function Rt(t,e,r){if(t||(t=new z([],{})),0===t.segments.length&&t.hasChildren())return Ot(t,e,r);var n=function i(t,e,r){for(var n=0,i=e,o={match:!1,pathIndex:0,commandIndex:0};i<t.segments.length;){if(n>=r.length)return o;var a=t.segments[i],u=r[n];if(St(u))break;var s=""+u,c=n<r.length-1?r[n+1]:null;if(i>0&&void 0===s)break;if(s&&c&&"object"==typeof c&&void 0===c.outlets){if(!xt(s,c,a))return o;n+=2}else{if(!xt(s,{},a))return o;n++}i++}return{match:!0,pathIndex:i,commandIndex:n}}(t,e,r),o=r.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){var a=new z(t.segments.slice(0,n.pathIndex),{});return a.children.primary=new z(t.segments.slice(n.pathIndex),t.children),Ot(a,0,o)}return n.match&&0===o.length?new z(t.segments,{}):n.match&&!t.hasChildren()?Ut(t,e,r):n.match?Ot(t,0,o):Ut(t,e,r)}function Ot(t,e,r){if(0===r.length)return new z(t.segments,{});var n=function i(t){var e;return St(t[0])?t[0].outlets:((e={}).primary=t,e)}(r),o={};return L(n,(function(r,n){"string"==typeof r&&(r=[r]),null!==r&&(o[n]=Rt(t.children[n],e,r))})),L(t.children,(function(t,e){void 0===n[e]&&(o[e]=t)})),new z(t.segments,o)}function Ut(t,e,r){for(var n=t.segments.slice(0,e),i=0;i<r.length;){var o=r[i];if(St(o)){var a=Pt(o.outlets);return new z(n,a)}if(0===i&&yt(r[0]))n.push(new D(t.segments[e].path,_t(r[0]))),i++;else{var u=St(o)?o.outlets.primary:""+o,s=i<r.length-1?r[i+1]:null;u&&s&&yt(s)?(n.push(new D(u,_t(s))),i+=2):(n.push(new D(u,{})),i++)}}return new z(n,{})}function Pt(t){var e={};return L(t,(function(t,r){"string"==typeof t&&(t=[t]),null!==t&&(e[r]=Ut(new z([],{}),0,t))})),e}function _t(t){var e={};return L(t,(function(t,r){return e[r]=""+t})),e}function xt(t,e,r){return t==r.path&&T(e,r.parameters)}var jt=function(){function t(t,e,r,n){this.routeReuseStrategy=t,this.futureState=e,this.currState=r,this.forwardEvent=n}return t.prototype.activate=function(t){var e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,t),vt(this.futureState.root),this.activateChildRoutes(e,r,t)},t.prototype.deactivateChildRoutes=function(t,e,r){var n=this,i=ut(e);t.children.forEach((function(t){var e=t.value.outlet;n.deactivateRoutes(t,i[e],r),delete i[e]})),L(i,(function(t,e){n.deactivateRouteAndItsChildren(t,r)}))},t.prototype.deactivateRoutes=function(t,e,r){var n=t.value,i=e?e.value:null;if(n===i)if(n.component){var o=r.getContext(n.outlet);o&&this.deactivateChildRoutes(t,e,o.children)}else this.deactivateChildRoutes(t,e,r);else i&&this.deactivateRouteAndItsChildren(e,r)},t.prototype.deactivateRouteAndItsChildren=function(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)},t.prototype.detachAndStoreRouteSubtree=function(t,e){var r=e.getContext(t.value.outlet);if(r&&r.outlet){var n=r.outlet.detach(),i=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:n,route:t,contexts:i})}},t.prototype.deactivateRouteAndOutlet=function(t,e){var r,n,i=e.getContext(t.value.outlet),o=i&&t.value.component?i.children:e,a=ut(t);try{for(var s=u(Object.keys(a)),c=s.next();!c.done;c=s.next())this.deactivateRouteAndItsChildren(a[c.value],o)}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated())},t.prototype.activateChildRoutes=function(t,e,r){var n=this,i=ut(e);t.children.forEach((function(t){n.activateRoutes(t,i[t.value.outlet],r),n.forwardEvent(new U(t.value.snapshot))})),t.children.length&&this.forwardEvent(new R(t.value.snapshot))},t.prototype.activateRoutes=function(t,e,r){var n=t.value,i=e?e.value:null;if(vt(n),n===i)if(n.component){var o=r.getOrCreateContext(n.outlet);this.activateChildRoutes(t,e,o.children)}else this.activateChildRoutes(t,e,r);else if(n.component)if(o=r.getOrCreateContext(n.outlet),this.routeReuseStrategy.shouldAttach(n.snapshot)){var a=this.routeReuseStrategy.retrieve(n.snapshot);this.routeReuseStrategy.store(n.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),At(a.route)}else{var u=function s(t){for(var e=t.parent;e;e=e.parent){var r=e.routeConfig;if(r&&r._loadedConfig)return r._loadedConfig;if(r&&r.component)return null}return null}
35
+ */function N(t,e,r){return r?function n(t,e){return T(t,e)}(t.queryParams,e.queryParams)&&function t(e,r){if(!H(e.segments,r.segments))return!1;if(e.numberOfChildren!==r.numberOfChildren)return!1;for(var n in r.children){if(!e.children[n])return!1;if(!t(e.children[n],r.children[n]))return!1}return!0}(t.root,e.root):function i(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every((function(r){return k(t[r],e[r])}))}(t.queryParams,e.queryParams)&&function t(e,r){return function e(r,n,i){if(r.segments.length>i.length)return!!H(a=r.segments.slice(0,i.length),i)&&!n.hasChildren();if(r.segments.length===i.length){if(!H(r.segments,i))return!1;for(var o in n.children){if(!r.children[o])return!1;if(!t(r.children[o],n.children[o]))return!1}return!0}var a=i.slice(0,r.segments.length),u=i.slice(r.segments.length);return!!H(r.segments,a)&&!!r.children.primary&&e(r.children.primary,n,u)}(e,r,r.segments)}(t.root,e.root)}var q=function(){function t(t,e,r){this.root=t,this.queryParams=e,this.fragment=r}return Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=x(this.queryParams)),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return W.serialize(this)},t}(),z=function(){function t(t,e){var r=this;this.segments=t,this.children=e,this.parent=null,L(e,(function(t,e){return t.parent=r}))}return t.prototype.hasChildren=function(){return this.numberOfChildren>0},Object.defineProperty(t.prototype,"numberOfChildren",{get:function(){return Object.keys(this.children).length},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return B(this)},t}(),D=function(){function t(t,e){this.path=t,this.parameters=e}return Object.defineProperty(t.prototype,"parameterMap",{get:function(){return this._parameterMap||(this._parameterMap=x(this.parameters)),this._parameterMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return K(this)},t}();function H(t,e){return t.length===e.length&&t.every((function(t,r){return t.path===e[r].path}))}var F=function F(){},G=function(){function t(){}return t.prototype.parse=function(t){var e=new rt(t);return new q(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())},t.prototype.serialize=function(t){return"/"+function t(e,r){if(!e.hasChildren())return B(e);if(r){var n=e.children.primary?t(e.children.primary,!1):"",i=[];return L(e.children,(function(e,r){"primary"!==r&&i.push(r+":"+t(e,!1))})),i.length>0?n+"("+i.join("//")+")":n}var o=function a(t,e){var r=[];return L(t.children,(function(t,n){"primary"===n&&(r=r.concat(e(t,n)))})),L(t.children,(function(t,n){"primary"!==n&&(r=r.concat(e(t,n)))})),r}(e,(function(r,n){return"primary"===n?[t(e.children.primary,!1)]:[n+":"+t(r,!1)]}));return 1===Object.keys(e.children).length&&null!=e.children.primary?B(e)+"/"+o[0]:B(e)+"/("+o.join("//")+")"}(t.root,!0)+function e(t){var e=Object.keys(t).map((function(e){var r=t[e];return Array.isArray(r)?r.map((function(t){return $(e)+"="+$(t)})).join("&"):$(e)+"="+$(r)}));return e.length?"?"+e.join("&"):""}(t.queryParams)+("string"==typeof t.fragment?"#"+function r(t){return encodeURI(t)}(t.fragment):"")},t}(),W=new G;function B(t){return t.segments.map((function(t){return K(t)})).join("/")}function V(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function $(t){return V(t).replace(/%3B/gi,";")}function Z(t){return V(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Q(t){return decodeURIComponent(t)}function Y(t){return Q(t.replace(/\+/g,"%20"))}function K(t){return""+Z(t.path)+function e(t){return Object.keys(t).map((function(e){return";"+Z(e)+"="+Z(t[e])})).join("")}(t.parameters)}var J=/^[^\/()?;=#]+/;function X(t){var e=t.match(J);return e?e[0]:""}var tt=/^[^=?&#]+/,et=/^[^?&#]+/,rt=function(){function t(t){this.url=t,this.remaining=t}return t.prototype.parseRootSegment=function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new z([],{}):new z([],this.parseChildren())},t.prototype.parseQueryParams=function(){var t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t},t.prototype.parseFragment=function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null},t.prototype.parseChildren=function(){if(""===this.remaining)return{};this.consumeOptional("/");var t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());var e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));var r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(r.primary=new z(t,e)),r},t.prototype.parseSegment=function(){var t=X(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '"+this.remaining+"'.");return this.capture(t),new D(Q(t),this.parseMatrixParams())},t.prototype.parseMatrixParams=function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t},t.prototype.parseParam=function(t){var e=X(this.remaining);if(e){this.capture(e);var r="";if(this.consumeOptional("=")){var n=X(this.remaining);n&&this.capture(r=n)}t[Q(e)]=Q(r)}},t.prototype.parseQueryParam=function(t){var e=function r(t){var e=t.match(tt);return e?e[0]:""}(this.remaining);if(e){this.capture(e);var n="";if(this.consumeOptional("=")){var i=function o(t){var e=t.match(et);return e?e[0]:""}(this.remaining);i&&this.capture(n=i)}var a=Y(e),u=Y(n);if(t.hasOwnProperty(a)){var s=t[a];Array.isArray(s)||(t[a]=s=[s]),s.push(u)}else t[a]=u}},t.prototype.parseParens=function(t){var e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var r=X(this.remaining),n=this.remaining[r.length];if("/"!==n&&")"!==n&&";"!==n)throw new Error("Cannot parse url '"+this.url+"'");var i=void 0;r.indexOf(":")>-1?(i=r.substr(0,r.indexOf(":")),this.capture(i),this.capture(":")):t&&(i="primary");var o=this.parseChildren();e[i]=1===Object.keys(o).length?o.primary:new z([],o),this.consumeOptional("//")}return e},t.prototype.peekStartsWith=function(t){return this.remaining.startsWith(t)},t.prototype.consumeOptional=function(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)},t.prototype.capture=function(t){if(!this.consumeOptional(t))throw new Error('Expected "'+t+'".')},t}(),nt=function(){function t(t){this._root=t}return Object.defineProperty(t.prototype,"root",{get:function(){return this._root.value},enumerable:!1,configurable:!0}),t.prototype.parent=function(t){var e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null},t.prototype.children=function(t){var e=it(t,this._root);return e?e.children.map((function(t){return t.value})):[]},t.prototype.firstChild=function(t){var e=it(t,this._root);return e&&e.children.length>0?e.children[0].value:null},t.prototype.siblings=function(t){var e=ot(t,this._root);return e.length<2?[]:e[e.length-2].children.map((function(t){return t.value})).filter((function(e){return e!==t}))},t.prototype.pathFromRoot=function(t){return ot(t,this._root).map((function(t){return t.value}))},t}();function it(t,e){var r,n;if(t===e.value)return e;try{for(var i=u(e.children),o=i.next();!o.done;o=i.next()){var a=it(t,o.value);if(a)return a}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return null}function ot(t,e){var r,n;if(t===e.value)return[e];try{for(var i=u(e.children),o=i.next();!o.done;o=i.next()){var a=ot(t,o.value);if(a.length)return a.unshift(e),a}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return[]}var at=function(){function t(t,e){this.value=t,this.children=e}return t.prototype.toString=function(){return"TreeNode("+this.value+")"},t}();function ut(t){var e={};return t&&t.children.forEach((function(t){return e[t.value.outlet]=t})),e}var st=function(t){function e(e,r){var n=t.call(this,e)||this;return n.snapshot=r,dt(n,e),n}return a(e,t),e.prototype.toString=function(){return this.snapshot.toString()},e}(nt);function ct(t,e){var r=function i(t,e){var r=new ht([],{},{},"",{},"primary",e,null,t.root,-1,{});return new ft("",new at(r,[]))}(t,e),o=new n.BehaviorSubject([new D("",{})]),a=new n.BehaviorSubject({}),u=new n.BehaviorSubject({}),s=new n.BehaviorSubject({}),c=new n.BehaviorSubject(""),l=new lt(o,a,s,c,u,"primary",e,r.root);return l.snapshot=r.root,new st(new at(l,[]),r)}var lt=function(){function t(t,e,r,n,i,o,a,u){this.url=t,this.params=e,this.queryParams=r,this.fragment=n,this.data=i,this.outlet=o,this.component=a,this._futureSnapshot=u}return Object.defineProperty(t.prototype,"routeConfig",{get:function(){return this._futureSnapshot.routeConfig},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=this.params.pipe(i.map((function(t){return x(t)})))),this._paramMap},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(i.map((function(t){return x(t)})))),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return this.snapshot?this.snapshot.toString():"Future("+this._futureSnapshot+")"},t}();function pt(t,e){void 0===e&&(e="emptyOnly");var r=t.pathFromRoot,n=0;if("always"!==e)for(n=r.length-1;n>=1;){var i=r[n],o=r[n-1];if(i.routeConfig&&""===i.routeConfig.path)n--;else{if(o.component)break;n--}}return function a(t){return t.reduce((function(t,e){return{params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}}),{params:{},data:{},resolve:{}})}(r.slice(n))}var ht=function(){function t(t,e,r,n,i,o,a,u,s,c,l){this.url=t,this.params=e,this.queryParams=r,this.fragment=n,this.data=i,this.outlet=o,this.component=a,this.routeConfig=u,this._urlSegment=s,this._lastPathIndex=c,this._resolve=l}return Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=x(this.params)),this._paramMap},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=x(this.queryParams)),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"Route(url:'"+this.url.map((function(t){return t.toString()})).join("/")+"', path:'"+(this.routeConfig?this.routeConfig.path:"")+"')"},t}(),ft=function(t){function e(e,r){var n=t.call(this,r)||this;return n.url=e,dt(n,r),n}return a(e,t),e.prototype.toString=function(){return gt(this._root)},e}(nt);function dt(t,e){e.value._routerState=t,e.children.forEach((function(e){return dt(t,e)}))}function gt(t){var e=t.children.length>0?" { "+t.children.map(gt).join(", ")+" } ":"";return""+t.value+e}function vt(t){if(t.snapshot){var e=t.snapshot,r=t._futureSnapshot;t.snapshot=r,T(e.queryParams,r.queryParams)||t.queryParams.next(r.queryParams),e.fragment!==r.fragment&&t.fragment.next(r.fragment),T(e.params,r.params)||t.params.next(r.params),function n(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!T(t[r],e[r]))return!1;return!0}(e.url,r.url)||t.url.next(r.url),T(e.data,r.data)||t.data.next(r.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function mt(t,e){return T(t.params,e.params)&&function r(t,e){return H(t,e)&&t.every((function(t,r){return T(t.parameters,e[r].parameters)}))}(t.url,e.url)&&!(!t.parent!=!e.parent)&&(!t.parent||mt(t.parent,e.parent))}function yt(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function St(t){return"object"==typeof t&&null!=t&&t.outlets}function bt(t,e,r,n,i){var o={};return n&&L(n,(function(t,e){o[e]=Array.isArray(t)?t.map((function(t){return""+t})):""+t})),new q(r.root===t?e:function t(e,r,n){var i={};return L(e.children,(function(e,o){i[o]=e===r?n:t(e,r,n)})),new z(e.segments,i)}(r.root,t,e),o,i)}var Ct=function(){function t(t,e,r){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=r,t&&r.length>0&&yt(r[0]))throw new Error("Root segment cannot have matrix parameters");var n=r.find(St);if(n&&n!==I(r))throw new Error("{outlets:{}} has to be the last command")}return t.prototype.toRoot=function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]},t}(),wt=function wt(t,e,r){this.segmentGroup=t,this.processChildren=e,this.index=r};function Rt(t,e,r){if(t||(t=new z([],{})),0===t.segments.length&&t.hasChildren())return Ot(t,e,r);var n=function i(t,e,r){for(var n=0,i=e,o={match:!1,pathIndex:0,commandIndex:0};i<t.segments.length;){if(n>=r.length)return o;var a=t.segments[i],u=r[n];if(St(u))break;var s=""+u,c=n<r.length-1?r[n+1]:null;if(i>0&&void 0===s)break;if(s&&c&&"object"==typeof c&&void 0===c.outlets){if(!xt(s,c,a))return o;n+=2}else{if(!xt(s,{},a))return o;n++}i++}return{match:!0,pathIndex:i,commandIndex:n}}(t,e,r),o=r.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){var a=new z(t.segments.slice(0,n.pathIndex),{});return a.children.primary=new z(t.segments.slice(n.pathIndex),t.children),Ot(a,0,o)}return n.match&&0===o.length?new z(t.segments,{}):n.match&&!t.hasChildren()?Ut(t,e,r):n.match?Ot(t,0,o):Ut(t,e,r)}function Ot(t,e,r){if(0===r.length)return new z(t.segments,{});var n=function i(t){var e;return St(t[0])?t[0].outlets:((e={}).primary=t,e)}(r),o={};return L(n,(function(r,n){"string"==typeof r&&(r=[r]),null!==r&&(o[n]=Rt(t.children[n],e,r))})),L(t.children,(function(t,e){void 0===n[e]&&(o[e]=t)})),new z(t.segments,o)}function Ut(t,e,r){for(var n=t.segments.slice(0,e),i=0;i<r.length;){var o=r[i];if(St(o)){var a=Pt(o.outlets);return new z(n,a)}if(0===i&&yt(r[0]))n.push(new D(t.segments[e].path,_t(r[0]))),i++;else{var u=St(o)?o.outlets.primary:""+o,s=i<r.length-1?r[i+1]:null;u&&s&&yt(s)?(n.push(new D(u,_t(s))),i+=2):(n.push(new D(u,{})),i++)}}return new z(n,{})}function Pt(t){var e={};return L(t,(function(t,r){"string"==typeof t&&(t=[t]),null!==t&&(e[r]=Ut(new z([],{}),0,t))})),e}function _t(t){var e={};return L(t,(function(t,r){return e[r]=""+t})),e}function xt(t,e,r){return t==r.path&&T(e,r.parameters)}var jt=function(){function t(t,e,r,n){this.routeReuseStrategy=t,this.futureState=e,this.currState=r,this.forwardEvent=n}return t.prototype.activate=function(t){var e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,t),vt(this.futureState.root),this.activateChildRoutes(e,r,t)},t.prototype.deactivateChildRoutes=function(t,e,r){var n=this,i=ut(e);t.children.forEach((function(t){var e=t.value.outlet;n.deactivateRoutes(t,i[e],r),delete i[e]})),L(i,(function(t,e){n.deactivateRouteAndItsChildren(t,r)}))},t.prototype.deactivateRoutes=function(t,e,r){var n=t.value,i=e?e.value:null;if(n===i)if(n.component){var o=r.getContext(n.outlet);o&&this.deactivateChildRoutes(t,e,o.children)}else this.deactivateChildRoutes(t,e,r);else i&&this.deactivateRouteAndItsChildren(e,r)},t.prototype.deactivateRouteAndItsChildren=function(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)},t.prototype.detachAndStoreRouteSubtree=function(t,e){var r=e.getContext(t.value.outlet);if(r&&r.outlet){var n=r.outlet.detach(),i=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:n,route:t,contexts:i})}},t.prototype.deactivateRouteAndOutlet=function(t,e){var r,n,i=e.getContext(t.value.outlet),o=i&&t.value.component?i.children:e,a=ut(t);try{for(var s=u(Object.keys(a)),c=s.next();!c.done;c=s.next())this.deactivateRouteAndItsChildren(a[c.value],o)}catch(t){r={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}i&&i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated(),i.attachRef=null,i.resolver=null,i.route=null)},t.prototype.activateChildRoutes=function(t,e,r){var n=this,i=ut(e);t.children.forEach((function(t){n.activateRoutes(t,i[t.value.outlet],r),n.forwardEvent(new U(t.value.snapshot))})),t.children.length&&this.forwardEvent(new R(t.value.snapshot))},t.prototype.activateRoutes=function(t,e,r){var n=t.value,i=e?e.value:null;if(vt(n),n===i)if(n.component){var o=r.getOrCreateContext(n.outlet);this.activateChildRoutes(t,e,o.children)}else this.activateChildRoutes(t,e,r);else if(n.component)if(o=r.getOrCreateContext(n.outlet),this.routeReuseStrategy.shouldAttach(n.snapshot)){var a=this.routeReuseStrategy.retrieve(n.snapshot);this.routeReuseStrategy.store(n.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),At(a.route)}else{var u=function s(t){for(var e=t.parent;e;e=e.parent){var r=e.routeConfig;if(r&&r._loadedConfig)return r._loadedConfig;if(r&&r.component)return null}return null}
36
36
  /**
37
37
  * @license
38
38
  * Copyright Google LLC All Rights Reserved.
@@ -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,14 +120,14 @@ 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.
127
127
  *
128
128
  * Use of this source code is governed by an MIT-style license that can be
129
129
  * found in the LICENSE file at https://angular.io/license
130
- */(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(Et(t))return N(this.currentUrlTree,t,e);var r=this.parseUrl(t);return N(this.currentUrlTree,r,e)},t.prototype.removeEmptyProps=function(t){return Object.keys(t).reduce((function(e,r){var n=t[r];return null!=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 h(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,i){if(this.disposed)return Promise.resolve(!1);var o,a,u,s=this.getTransition(),c="imperative"!==e&&"imperative"===(null==s?void 0:s.source),l=(this.lastSuccessfulId===s.id||this.currentNavigation?s.rawUrl:s.urlAfterRedirects).toString()===t.toString();if(c&&l)return Promise.resolve(!0);i?(o=i.resolve,a=i.reject,u=i.promise):u=new Promise((function(t,e){o=t,a=e}));var p=++this.navigationId;return this.setTransition({id:p,source:e,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:n,resolve:o,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 i=this.urlSerializer.serialize(t);n=n||{},this.location.isCurrentPathEqualTo(i)||e?this.location.replaceState(i,"",Object.assign(Object.assign({},n),{navigationId:r})):this.location.go(i,"",Object.assign(Object.assign({},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}();_e.decorators=[{type:r.Injectable}],_e.ctorParameters=function(){return[{type:r.Type},{type:F},{type:Ce},{type:e.Location},{type:r.Injector},{type:r.NgModuleFactoryLoader},{type:r.Compiler},{type:void 0}]};var xe=function(){function t(t,e,r,i,o){this.router=t,this.route=e,this.commands=[],this.onChanges=new n.Subject,null==r&&i.setAttribute(o.nativeElement,"tabindex","0")}return t.prototype.ngOnChanges=function(t){this.onChanges.next(this)},Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!1,configurable:!0}),t.prototype.onClick=function(){var t={skipLocationChange:Ae(this.skipLocationChange),replaceUrl:Ae(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,t),!0},Object.defineProperty(t.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:Ae(this.preserveFragment)})},enumerable:!1,configurable:!0}),t}();xe.decorators=[{type:r.Directive,args:[{selector:":not(a):not(area)[routerLink]"}]}],xe.ctorParameters=function(){return[{type:_e},{type:lt},{type:String,decorators:[{type:r.Attribute,args:["tabindex"]}]},{type:r.Renderer2},{type:r.ElementRef}]},xe.propDecorators={queryParams:[{type:r.Input}],fragment:[{type:r.Input}],queryParamsHandling:[{type:r.Input}],preserveFragment:[{type:r.Input}],skipLocationChange:[{type:r.Input}],replaceUrl:[{type:r.Input}],state:[{type:r.Input}],relativeTo:[{type:r.Input}],routerLink:[{type:r.Input}],onClick:[{type:r.HostListener,args:["click"]}]};var je=function(){function t(t,e,r){var i=this;this.router=t,this.route=e,this.locationStrategy=r,this.commands=[],this.onChanges=new n.Subject,this.subscription=t.events.subscribe((function(t){t instanceof h&&i.updateTargetUrlAndHref()}))}return Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(t){this.updateTargetUrlAndHref(),this.onChanges.next(this)},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.onClick=function(t,e,r,n,i){if(0!==t||e||r||n||i)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;var o={skipLocationChange:Ae(this.skipLocationChange),replaceUrl:Ae(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:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:Ae(this.preserveFragment)})},enumerable:!1,configurable:!0}),t}();function Ae(t){return""===t||!!t}je.decorators=[{type:r.Directive,args:[{selector:"a[routerLink],area[routerLink]"}]}],je.ctorParameters=function(){return[{type:_e},{type:lt},{type:e.LocationStrategy}]},je.propDecorators={target:[{type:r.HostBinding,args:["attr.target"]},{type:r.Input}],queryParams:[{type:r.Input}],fragment:[{type:r.Input}],queryParamsHandling:[{type:r.Input}],preserveFragment:[{type:r.Input}],skipLocationChange:[{type:r.Input}],replaceUrl:[{type:r.Input}],state:[{type:r.Input}],relativeTo:[{type:r.Input}],href:[{type:r.HostBinding}],routerLink:[{type:r.Input}],onClick:[{type:r.HostListener,args:["click",["$event.button","$event.ctrlKey","$event.shiftKey","$event.altKey","$event.metaKey"]]}]};var Te=function(){function t(t,e,r,n,i,o){var a=this;this.router=t,this.element=e,this.renderer=r,this.cdr=n,this.link=i,this.linkWithHref=o,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=t.events.subscribe((function(t){t instanceof h&&a.update()}))}return t.prototype.ngAfterContentInit=function(){var t=this;n.of(this.links.changes,this.linksWithHrefs.changes,n.of(null)).pipe(i.mergeAll()).subscribe((function(e){t.update(),t.subscribeToEachLinkOnChanges()}))},t.prototype.subscribeToEachLinkOnChanges=function(){var t,e=this;null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe();var r=c(this.links.toArray(),this.linksWithHrefs.toArray(),[this.link,this.linkWithHref]).filter((function(t){return!!t})).map((function(t){return t.onChanges}));this.linkInputChangesSubscription=n.from(r).pipe(i.mergeAll()).subscribe((function(t){e.isActive!==e.isLinkActive(e.router)(t)&&e.update()}))},Object.defineProperty(t.prototype,"routerLinkActive",{set:function(t){var e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter((function(t){return!!t}))},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(t){this.update()},t.prototype.ngOnDestroy=function(){var t;this.routerEventsSubscription.unsubscribe(),null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe()},t.prototype.update=function(){var t=this;this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then((function(){var e=t.hasActiveLinks();t.isActive!==e&&(t.isActive=e,t.cdr.markForCheck(),t.classes.forEach((function(r){e?t.renderer.addClass(t.element.nativeElement,r):t.renderer.removeClass(t.element.nativeElement,r)})))}))},t.prototype.isLinkActive=function(t){var e=this;return function(r){return t.isActive(r.urlTree,e.routerLinkActiveOptions.exact)}},t.prototype.hasActiveLinks=function(){var t=this.isLinkActive(this.router);return this.link&&t(this.link)||this.linkWithHref&&t(this.linkWithHref)||this.links.some(t)||this.linksWithHrefs.some(t)},t}();Te.decorators=[{type:r.Directive,args:[{selector:"[routerLinkActive]",exportAs:"routerLinkActive"}]}],Te.ctorParameters=function(){return[{type:_e},{type:r.ElementRef},{type:r.Renderer2},{type:r.ChangeDetectorRef},{type:xe,decorators:[{type:r.Optional}]},{type:je,decorators:[{type:r.Optional}]}]},Te.propDecorators={links:[{type:r.ContentChildren,args:[xe,{descendants:!0}]}],linksWithHrefs:[{type:r.ContentChildren,args:[je,{descendants:!0}]}],routerLinkActiveOptions:[{type:r.Input}],routerLinkActive:[{type:r.Input}]};
130
+ */(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(Et(t))return N(this.currentUrlTree,t,e);var r=this.parseUrl(t);return N(this.currentUrlTree,r,e)},t.prototype.removeEmptyProps=function(t){return Object.keys(t).reduce((function(e,r){var n=t[r];return null!=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 h(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(t.currentUrlTree))),t.lastSuccessfulNavigation=t.currentNavigation,e.resolve(!0)}),(function(e){t.console.warn("Unhandled Navigation Error: ")}))},t.prototype.scheduleNavigation=function(t,e,r,n,i){if(this.disposed)return Promise.resolve(!1);var o,a,u,s=this.getTransition(),c="imperative"!==e&&"imperative"===(null==s?void 0:s.source),l=(this.lastSuccessfulId===s.id||this.currentNavigation?s.rawUrl:s.urlAfterRedirects).toString()===t.toString();if(c&&l)return Promise.resolve(!0);i?(o=i.resolve,a=i.reject,u=i.promise):u=new Promise((function(t,e){o=t,a=e}));var p=++this.navigationId;return this.setTransition({id:p,source:e,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:n,resolve:o,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 i=this.urlSerializer.serialize(t);n=n||{},this.location.isCurrentPathEqualTo(i)||e?this.location.replaceState(i,"",Object.assign(Object.assign({},n),{navigationId:r})):this.location.go(i,"",Object.assign(Object.assign({},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}();_e.decorators=[{type:r.Injectable}],_e.ctorParameters=function(){return[{type:r.Type},{type:F},{type:Ce},{type:e.Location},{type:r.Injector},{type:r.NgModuleFactoryLoader},{type:r.Compiler},{type:void 0}]};var xe=function(){function t(t,e,r,i,o){this.router=t,this.route=e,this.commands=[],this.onChanges=new n.Subject,null==r&&i.setAttribute(o.nativeElement,"tabindex","0")}return t.prototype.ngOnChanges=function(t){this.onChanges.next(this)},Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!1,configurable:!0}),t.prototype.onClick=function(){var t={skipLocationChange:Ae(this.skipLocationChange),replaceUrl:Ae(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,t),!0},Object.defineProperty(t.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:Ae(this.preserveFragment)})},enumerable:!1,configurable:!0}),t}();xe.decorators=[{type:r.Directive,args:[{selector:":not(a):not(area)[routerLink]"}]}],xe.ctorParameters=function(){return[{type:_e},{type:lt},{type:String,decorators:[{type:r.Attribute,args:["tabindex"]}]},{type:r.Renderer2},{type:r.ElementRef}]},xe.propDecorators={queryParams:[{type:r.Input}],fragment:[{type:r.Input}],queryParamsHandling:[{type:r.Input}],preserveFragment:[{type:r.Input}],skipLocationChange:[{type:r.Input}],replaceUrl:[{type:r.Input}],state:[{type:r.Input}],relativeTo:[{type:r.Input}],routerLink:[{type:r.Input}],onClick:[{type:r.HostListener,args:["click"]}]};var je=function(){function t(t,e,r){var i=this;this.router=t,this.route=e,this.locationStrategy=r,this.commands=[],this.onChanges=new n.Subject,this.subscription=t.events.subscribe((function(t){t instanceof h&&i.updateTargetUrlAndHref()}))}return Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(t){this.updateTargetUrlAndHref(),this.onChanges.next(this)},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.onClick=function(t,e,r,n,i){if(0!==t||e||r||n||i)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;var o={skipLocationChange:Ae(this.skipLocationChange),replaceUrl:Ae(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:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:Ae(this.preserveFragment)})},enumerable:!1,configurable:!0}),t}();function Ae(t){return""===t||!!t}je.decorators=[{type:r.Directive,args:[{selector:"a[routerLink],area[routerLink]"}]}],je.ctorParameters=function(){return[{type:_e},{type:lt},{type:e.LocationStrategy}]},je.propDecorators={target:[{type:r.HostBinding,args:["attr.target"]},{type:r.Input}],queryParams:[{type:r.Input}],fragment:[{type:r.Input}],queryParamsHandling:[{type:r.Input}],preserveFragment:[{type:r.Input}],skipLocationChange:[{type:r.Input}],replaceUrl:[{type:r.Input}],state:[{type:r.Input}],relativeTo:[{type:r.Input}],href:[{type:r.HostBinding}],routerLink:[{type:r.Input}],onClick:[{type:r.HostListener,args:["click",["$event.button","$event.ctrlKey","$event.shiftKey","$event.altKey","$event.metaKey"]]}]};var Te=function(){function t(t,e,r,n,i,o){var a=this;this.router=t,this.element=e,this.renderer=r,this.cdr=n,this.link=i,this.linkWithHref=o,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=t.events.subscribe((function(t){t instanceof h&&a.update()}))}return t.prototype.ngAfterContentInit=function(){var t=this;n.of(this.links.changes,this.linksWithHrefs.changes,n.of(null)).pipe(i.mergeAll()).subscribe((function(e){t.update(),t.subscribeToEachLinkOnChanges()}))},t.prototype.subscribeToEachLinkOnChanges=function(){var t,e=this;null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe();var r=c(this.links.toArray(),this.linksWithHrefs.toArray(),[this.link,this.linkWithHref]).filter((function(t){return!!t})).map((function(t){return t.onChanges}));this.linkInputChangesSubscription=n.from(r).pipe(i.mergeAll()).subscribe((function(t){e.isActive!==e.isLinkActive(e.router)(t)&&e.update()}))},Object.defineProperty(t.prototype,"routerLinkActive",{set:function(t){var e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter((function(t){return!!t}))},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(t){this.update()},t.prototype.ngOnDestroy=function(){var t;this.routerEventsSubscription.unsubscribe(),null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe()},t.prototype.update=function(){var t=this;this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then((function(){var e=t.hasActiveLinks();t.isActive!==e&&(t.isActive=e,t.cdr.markForCheck(),t.classes.forEach((function(r){e?t.renderer.addClass(t.element.nativeElement,r):t.renderer.removeClass(t.element.nativeElement,r)})))}))},t.prototype.isLinkActive=function(t){var e=this;return function(r){return t.isActive(r.urlTree,e.routerLinkActiveOptions.exact)}},t.prototype.hasActiveLinks=function(){var t=this.isLinkActive(this.router);return this.link&&t(this.link)||this.linkWithHref&&t(this.linkWithHref)||this.links.some(t)||this.linksWithHrefs.some(t)},t}();Te.decorators=[{type:r.Directive,args:[{selector:"[routerLinkActive]",exportAs:"routerLinkActive"}]}],Te.ctorParameters=function(){return[{type:_e},{type:r.ElementRef},{type:r.Renderer2},{type:r.ChangeDetectorRef},{type:xe,decorators:[{type:r.Optional}]},{type:je,decorators:[{type:r.Optional}]}]},Te.propDecorators={links:[{type:r.ContentChildren,args:[xe,{descendants:!0}]}],linksWithHrefs:[{type:r.ContentChildren,args:[je,{descendants:!0}]}],routerLinkActiveOptions:[{type:r.Input}],routerLinkActive:[{type:r.Input}]};
131
131
  /**
132
132
  * @license
133
133
  * 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.9");
161
+ */var nr=new r.Version("11.2.13");
162
162
  /**
163
163
  * @license
164
164
  * Copyright Google LLC All Rights Reserved.