1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@angular/router",["exports","@angular/common","@angular/core","rxjs","rxjs/operators"],e):e(((t=t||self).ng=t.ng||{},t.ng.router={}),t.ng.common,t.ng.core,t.rxjs,t.rxjs.operators)}(this,(function(t,e,r,n,o){"use strict";
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function a(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var u=function(){return(u=Object.assign||function t(e){for(var r,n=1,o=arguments.length;n<o;n++)for(var i in r=arguments[n])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e}).apply(this,arguments)};function s(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function l(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t}
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 | var p,h=function(t){function e(e,r,n,o){void 0===n&&(n="imperative"),void 0===o&&(o=null);var i=t.call(this,e,r)||this;return i.navigationTrigger=n,i.restoredState=o,i}return a(e,t),e.prototype.toString=function(){return"NavigationStart(id: "+this.id+", url: '"+this.url+"')"},e}(p=function p(t,e){this.id=t,this.url=e}),f=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.urlAfterRedirects=n,o}return a(e,t),e.prototype.toString=function(){return"NavigationEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"')"},e}(p),d=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.reason=n,o}return a(e,t),e.prototype.toString=function(){return"NavigationCancel(id: "+this.id+", url: '"+this.url+"')"},e}(p),g=function(t){function e(e,r,n){var o=t.call(this,e,r)||this;return o.error=n,o}return a(e,t),e.prototype.toString=function(){return"NavigationError(id: "+this.id+", url: '"+this.url+"', error: "+this.error+")"},e}(p),v=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.urlAfterRedirects=n,i.state=o,i}return a(e,t),e.prototype.toString=function(){return"RoutesRecognized(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(p),m=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.urlAfterRedirects=n,i.state=o,i}return a(e,t),e.prototype.toString=function(){return"GuardsCheckStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(p),y=function(t){function e(e,r,n,o,i){var a=t.call(this,e,r)||this;return a.urlAfterRedirects=n,a.state=o,a.shouldActivate=i,a}return a(e,t),e.prototype.toString=function(){return"GuardsCheckEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+", shouldActivate: "+this.shouldActivate+")"},e}(p),S=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.urlAfterRedirects=n,i.state=o,i}return a(e,t),e.prototype.toString=function(){return"ResolveStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(p),w=function(t){function e(e,r,n,o){var i=t.call(this,e,r)||this;return i.urlAfterRedirects=n,i.state=o,i}return a(e,t),e.prototype.toString=function(){return"ResolveEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(p),b=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadStart(path: "+this.route.path+")"},t}(),C=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadEnd(path: "+this.route.path+")"},t}(),R=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),U=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),P=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),_=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),x=function(){function t(t,e,r){this.routerEvent=t,this.position=e,this.anchor=r}return t.prototype.toString=function(){return"Scroll(anchor: '"+this.anchor+"', position: '"+(this.position?this.position[0]+", "+this.position[1]:null)+"')"},t}(),A=function(){function t(){}return t.decorators=[{type:r.Component,args:[{template:"<router-outlet></router-outlet>"}]}],t}(),T=function(){function t(t){this.params=t||{}}return t.prototype.has=function(t){return Object.prototype.hasOwnProperty.call(this.params,t)},t.prototype.get=function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e[0]:e}return null},t.prototype.getAll=function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e:[e]}return[]},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!1,configurable:!0}),t}();function O(t){return new T(t)}function E(t){var e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function k(t,e,r){var n=r.path.split("/");if(n.length>t.length)return null;if("full"===r.pathMatch&&(e.hasChildren()||n.length<t.length))return null;for(var o={},i=0;i<n.length;i++){var a=n[i],u=t[i];if(a.startsWith(":"))o[a.substring(1)]=u;else if(a!==u.path)return null}return{consumed:t.slice(0,n.length),posParams:o}}
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | var I=function I(t,e){this.routes=t,this.module=e};function j(t,e){void 0===e&&(e="");for(var r=0;r<t.length;r++){var n=t[r];L(n,M(e,n))}}function L(t,e){if(!t)throw new Error("\n Invalid configuration of route '"+e+"': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n ");if(Array.isArray(t))throw new Error("Invalid configuration of route '"+e+"': Array cannot be specified");if(!t.component&&!t.children&&!t.loadChildren&&t.outlet&&"primary"!==t.outlet)throw new Error("Invalid configuration of route '"+e+"': a componentless route without children or loadChildren cannot have a named outlet set");if(t.redirectTo&&t.children)throw new Error("Invalid configuration of route '"+e+"': redirectTo and children cannot be used together");if(t.redirectTo&&t.loadChildren)throw new Error("Invalid configuration of route '"+e+"': redirectTo and loadChildren cannot be used together");if(t.children&&t.loadChildren)throw new Error("Invalid configuration of route '"+e+"': children and loadChildren cannot be used together");if(t.redirectTo&&t.component)throw new Error("Invalid configuration of route '"+e+"': redirectTo and component cannot be used together");if(t.path&&t.matcher)throw new Error("Invalid configuration of route '"+e+"': path and matcher cannot be used together");if(void 0===t.redirectTo&&!t.component&&!t.children&&!t.loadChildren)throw new Error("Invalid configuration of route '"+e+"'. One of the following must be provided: component, redirectTo, children or loadChildren");if(void 0===t.path&&void 0===t.matcher)throw new Error("Invalid configuration of route '"+e+"': routes must have either a path or a matcher specified");if("string"==typeof t.path&&"/"===t.path.charAt(0))throw new Error("Invalid configuration of route '"+e+"': path cannot start with a slash");if(""===t.path&&void 0!==t.redirectTo&&void 0===t.pathMatch)throw new Error("Invalid configuration of route '{path: \""+e+'", redirectTo: "'+t.redirectTo+"\"}': please provide 'pathMatch'. The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.");if(void 0!==t.pathMatch&&"full"!==t.pathMatch&&"prefix"!==t.pathMatch)throw new Error("Invalid configuration of route '"+e+"': pathMatch can only be set to 'prefix' or 'full'");t.children&&j(t.children,e)}function M(t,e){return e?t||e.path?t&&!e.path?t+"/":!t&&e.path?e.path:t+"/"+e.path:"":t}function N(t){var e=t.children&&t.children.map(N),r=e?u(u({},t),{children:e}):u({},t);return!r.component&&(e||r.loadChildren)&&r.outlet&&"primary"!==r.outlet&&(r.component=A),r}
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 | function D(t,e){var r,n=Object.keys(t),o=Object.keys(e);if(!n||!o||n.length!=o.length)return!1;for(var i=0;i<n.length;i++)if(!q(t[r=n[i]],e[r]))return!1;return!0}function q(t,e){return Array.isArray(t)&&Array.isArray(e)?t.length==e.length&&t.every((function(t){return e.indexOf(t)>-1})):t===e}function z(t){return Array.prototype.concat.apply([],t)}function H(t){return t.length>0?t[t.length-1]:null}function F(t,e){for(var r in t)t.hasOwnProperty(r)&&e(t[r],r)}function G(t){return r.ɵisObservable(t)?t:r.ɵisPromise(t)?n.from(Promise.resolve(t)):n.of(t)}
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | function W(t,e,r){return r?function n(t,e){return D(t,e)}(t.queryParams,e.queryParams)&&function t(e,r){if(!Z(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 o(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every((function(r){return q(t[r],e[r])}))}(t.queryParams,e.queryParams)&&function t(e,r){return function e(r,n,o){if(r.segments.length>o.length)return!!Z(a=r.segments.slice(0,o.length),o)&&!n.hasChildren();if(r.segments.length===o.length){if(!Z(r.segments,o))return!1;for(var i in n.children){if(!r.children[i])return!1;if(!t(r.children[i],n.children[i]))return!1}return!0}var a=o.slice(0,r.segments.length),u=o.slice(r.segments.length);return!!Z(r.segments,a)&&!!r.children.primary&&e(r.children.primary,n,u)}(e,r,r.segments)}(t.root,e.root)}var B=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=O(this.queryParams)),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return J.serialize(this)},t}(),Q=function(){function t(t,e){var r=this;this.segments=t,this.children=e,this.parent=null,F(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 X(this)},t}(),V=function(){function t(t,e){this.path=t,this.parameters=e}return Object.defineProperty(t.prototype,"parameterMap",{get:function(){return this._parameterMap||(this._parameterMap=O(this.parameters)),this._parameterMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return it(this)},t}();function Z(t,e){return t.length===e.length&&t.every((function(t,r){return t.path===e[r].path}))}function Y(t,e){var r=[];return F(t.children,(function(t,n){"primary"===n&&(r=r.concat(e(t,n)))})),F(t.children,(function(t,n){"primary"!==n&&(r=r.concat(e(t,n)))})),r}var $=function $(){},K=function(){function t(){}return t.prototype.parse=function(t){var e=new lt(t);return new B(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())},t.prototype.serialize=function(t){return"/"+function t(e,r){if(!e.hasChildren())return X(e);if(r){var n=e.children.primary?t(e.children.primary,!1):"",o=[];return F(e.children,(function(e,r){"primary"!==r&&o.push(r+":"+t(e,!1))})),o.length>0?n+"("+o.join("//")+")":n}var i=Y(e,(function(r,n){return"primary"===n?[t(e.children.primary,!1)]:[n+":"+t(r,!1)]}));return X(e)+"/("+i.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 et(e)+"="+et(t)})).join("&"):et(e)+"="+et(r)}));return e.length?"?"+e.join("&"):""}(t.queryParams)+("string"==typeof t.fragment?"#"+function r(t){return encodeURI(t)}(t.fragment):"")},t}(),J=new K;function X(t){return t.segments.map((function(t){return it(t)})).join("/")}function tt(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function et(t){return tt(t).replace(/%3B/gi,";")}function rt(t){return tt(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function nt(t){return decodeURIComponent(t)}function ot(t){return nt(t.replace(/\+/g,"%20"))}function it(t){return""+rt(t.path)+function e(t){return Object.keys(t).map((function(e){return";"+rt(e)+"="+rt(t[e])})).join("")}(t.parameters)}var at=/^[^\/()?;=#]+/;function ut(t){var e=t.match(at);return e?e[0]:""}var st=/^[^=?&#]+/,ct=/^[^?&#]+/,lt=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 Q([],{}):new Q([],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 Q(t,e)),r},t.prototype.parseSegment=function(){var t=ut(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '"+this.remaining+"'.");return this.capture(t),new V(nt(t),this.parseMatrixParams())},t.prototype.parseMatrixParams=function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t},t.prototype.parseParam=function(t){var e=ut(this.remaining);if(e){this.capture(e);var r="";if(this.consumeOptional("=")){var n=ut(this.remaining);n&&this.capture(r=n)}t[nt(e)]=nt(r)}},t.prototype.parseQueryParam=function(t){var e=function r(t){var e=t.match(st);return e?e[0]:""}(this.remaining);if(e){this.capture(e);var n="";if(this.consumeOptional("=")){var o=function i(t){var e=t.match(ct);return e?e[0]:""}(this.remaining);o&&this.capture(n=o)}var a=ot(e),u=ot(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=ut(this.remaining),n=this.remaining[r.length];if("/"!==n&&")"!==n&&";"!==n)throw new Error("Cannot parse url '"+this.url+"'");var o=void 0;r.indexOf(":")>-1?(o=r.substr(0,r.indexOf(":")),this.capture(o),this.capture(":")):t&&(o="primary");var i=this.parseChildren();e[o]=1===Object.keys(i).length?i.primary:new Q([],i),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}(),pt=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=ht(t,this._root);return e?e.children.map((function(t){return t.value})):[]},t.prototype.firstChild=function(t){var e=ht(t,this._root);return e&&e.children.length>0?e.children[0].value:null},t.prototype.siblings=function(t){var e=ft(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 ft(t,this._root).map((function(t){return t.value}))},t}();function ht(t,e){var r,n;if(t===e.value)return e;try{for(var o=s(e.children),i=o.next();!i.done;i=o.next()){var a=ht(t,i.value);if(a)return a}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return null}function ft(t,e){var r,n;if(t===e.value)return[e];try{for(var o=s(e.children),i=o.next();!i.done;i=o.next()){var a=ft(t,i.value);if(a.length)return a.unshift(e),a}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return[]}var dt=function(){function t(t,e){this.value=t,this.children=e}return t.prototype.toString=function(){return"TreeNode("+this.value+")"},t}();function gt(t){var e={};return t&&t.children.forEach((function(t){return e[t.value.outlet]=t})),e}
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 | var vt=function(t){function e(e,r){var n=t.call(this,e)||this;return n.snapshot=r,Ct(n,e),n}return a(e,t),e.prototype.toString=function(){return this.snapshot.toString()},e}(pt);function mt(t,e){var r=function o(t,e){var r=new wt([],{},{},"",{},"primary",e,null,t.root,-1,{});return new bt("",new dt(r,[]))}(t,e),i=new n.BehaviorSubject([new V("",{})]),a=new n.BehaviorSubject({}),u=new n.BehaviorSubject({}),s=new n.BehaviorSubject({}),c=new n.BehaviorSubject(""),l=new yt(i,a,s,c,u,"primary",e,r.root);return l.snapshot=r.root,new vt(new dt(l,[]),r)}var yt=function(){function t(t,e,r,n,o,i,a,u){this.url=t,this.params=e,this.queryParams=r,this.fragment=n,this.data=o,this.outlet=i,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(o.map((function(t){return O(t)})))),this._paramMap},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(o.map((function(t){return O(t)})))),this._queryParamMap},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return this.snapshot?this.snapshot.toString():"Future("+this._futureSnapshot+")"},t}();function St(t,e){void 0===e&&(e="emptyOnly");var r=t.pathFromRoot,n=0;if("always"!==e)for(n=r.length-1;n>=1;){var o=r[n],i=r[n-1];if(o.routeConfig&&""===o.routeConfig.path)n--;else{if(i.component)break;n--}}return function a(t){return t.reduce((function(t,e){return{params:u(u({},t.params),e.params),data:u(u({},t.data),e.data),resolve:u(u({},t.resolve),e._resolvedData)}}),{params:{},data:{},resolve:{}})}(r.slice(n))}var wt=function(){function t(t,e,r,n,o,i,a,u,s,c,l){this.url=t,this.params=e,this.queryParams=r,this.fragment=n,this.data=o,this.outlet=i,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=O(this.params)),this._paramMap},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=O(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}(),bt=function(t){function e(e,r){var n=t.call(this,r)||this;return n.url=e,Ct(n,r),n}return a(e,t),e.prototype.toString=function(){return Rt(this._root)},e}(pt);function Ct(t,e){e.value._routerState=t,e.children.forEach((function(e){return Ct(t,e)}))}function Rt(t){var e=t.children.length>0?" { "+t.children.map(Rt).join(", ")+" } ":"";return""+t.value+e}function Ut(t){if(t.snapshot){var e=t.snapshot,r=t._futureSnapshot;t.snapshot=r,D(e.queryParams,r.queryParams)||t.queryParams.next(r.queryParams),e.fragment!==r.fragment&&t.fragment.next(r.fragment),D(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(!D(t[r],e[r]))return!1;return!0}(e.url,r.url)||t.url.next(r.url),D(e.data,r.data)||t.data.next(r.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function Pt(t,e){return D(t.params,e.params)&&function r(t,e){return Z(t,e)&&t.every((function(t,r){return D(t.parameters,e[r].parameters)}))}(t.url,e.url)&&!(!t.parent!=!e.parent)&&(!t.parent||Pt(t.parent,e.parent))}
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 | function _t(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function xt(t,e,r,n,o){var i={};return n&&F(n,(function(t,e){i[e]=Array.isArray(t)?t.map((function(t){return""+t})):""+t})),new B(r.root===t?e:function t(e,r,n){var o={};return F(e.children,(function(e,i){o[i]=e===r?n:t(e,r,n)})),new Q(e.segments,o)}(r.root,t,e),i,o)}var At=function(){function t(t,e,r){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=r,t&&r.length>0&&_t(r[0]))throw new Error("Root segment cannot have matrix parameters");var n=r.find((function(t){return"object"==typeof t&&null!=t&&t.outlets}));if(n&&n!==H(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}(),Tt=function Tt(t,e,r){this.segmentGroup=t,this.processChildren=e,this.index=r};function Ot(t){return"object"==typeof t&&null!=t&&t.outlets?t.outlets.primary:""+t}function Et(t,e,r){if(t||(t=new Q([],{})),0===t.segments.length&&t.hasChildren())return kt(t,e,r);var n=function o(t,e,r){for(var n=0,o=e,i={match:!1,pathIndex:0,commandIndex:0};o<t.segments.length;){if(n>=r.length)return i;var a=t.segments[o],u=Ot(r[n]),s=n<r.length-1?r[n+1]:null;if(o>0&&void 0===u)break;if(u&&s&&"object"==typeof s&&void 0===s.outlets){if(!Mt(u,s,a))return i;n+=2}else{if(!Mt(u,{},a))return i;n++}o++}return{match:!0,pathIndex:o,commandIndex:n}}(t,e,r),i=r.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){var a=new Q(t.segments.slice(0,n.pathIndex),{});return a.children.primary=new Q(t.segments.slice(n.pathIndex),t.children),kt(a,0,i)}return n.match&&0===i.length?new Q(t.segments,{}):n.match&&!t.hasChildren()?It(t,e,r):n.match?kt(t,0,i):It(t,e,r)}function kt(t,e,r){if(0===r.length)return new Q(t.segments,{});var n=function o(t){var e;return"object"==typeof t[0]&&null!==t[0]&&t[0].outlets?t[0].outlets:((e={}).primary=t,e)}(r),i={};return F(n,(function(r,n){null!==r&&(i[n]=Et(t.children[n],e,r))})),F(t.children,(function(t,e){void 0===n[e]&&(i[e]=t)})),new Q(t.segments,i)}function It(t,e,r){for(var n=t.segments.slice(0,e),o=0;o<r.length;){if("object"==typeof r[o]&&null!==r[o]&&void 0!==r[o].outlets){var i=jt(r[o].outlets);return new Q(n,i)}if(0===o&&_t(r[0]))n.push(new V(t.segments[e].path,r[0])),o++;else{var a=Ot(r[o]),u=o<r.length-1?r[o+1]:null;a&&u&&_t(u)?(n.push(new V(a,Lt(u))),o+=2):(n.push(new V(a,{})),o++)}}return new Q(n,{})}function jt(t){var e={};return F(t,(function(t,r){null!==t&&(e[r]=It(new Q([],{}),0,t))})),e}function Lt(t){var e={};return F(t,(function(t,r){return e[r]=""+t})),e}function Mt(t,e,r){return t==r.path&&D(e,r.parameters)}
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 | var Nt=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),Ut(this.futureState.root),this.activateChildRoutes(e,r,t)},t.prototype.deactivateChildRoutes=function(t,e,r){var n=this,o=gt(e);t.children.forEach((function(t){var e=t.value.outlet;n.deactivateRoutes(t,o[e],r),delete o[e]})),F(o,(function(t,e){n.deactivateRouteAndItsChildren(t,r)}))},t.prototype.deactivateRoutes=function(t,e,r){var n=t.value,o=e?e.value:null;if(n===o)if(n.component){var i=r.getContext(n.outlet);i&&this.deactivateChildRoutes(t,e,i.children)}else this.deactivateChildRoutes(t,e,r);else o&&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(),o=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:n,route:t,contexts:o})}},t.prototype.deactivateRouteAndOutlet=function(t,e){var r=this,n=e.getContext(t.value.outlet);if(n){var o=gt(t),i=t.value.component?n.children:e;F(o,(function(t,e){return r.deactivateRouteAndItsChildren(t,i)})),n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated())}},t.prototype.activateChildRoutes=function(t,e,r){var n=this,o=gt(e);t.children.forEach((function(t){n.activateRoutes(t,o[t.value.outlet],r),n.forwardEvent(new _(t.value.snapshot))})),t.children.length&&this.forwardEvent(new U(t.value.snapshot))},t.prototype.activateRoutes=function(t,e,r){var n=t.value,o=e?e.value:null;if(Ut(n),n===o)if(n.component){var i=r.getOrCreateContext(n.outlet);this.activateChildRoutes(t,e,i.children)}else this.activateChildRoutes(t,e,r);else if(n.component)if(i=r.getOrCreateContext(n.outlet),this.routeReuseStrategy.shouldAttach(n.snapshot)){var a=this.routeReuseStrategy.retrieve(n.snapshot);this.routeReuseStrategy.store(n.snapshot,null),i.children.onOutletReAttached(a.contexts),i.attachRef=a.componentRef,i.route=a.route.value,i.outlet&&i.outlet.attach(a.componentRef,a.route.value),Dt(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}
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 | (n.snapshot),c=u?u.module.componentFactoryResolver:null;i.attachRef=null,i.route=n,i.resolver=c,i.outlet&&i.outlet.activateWith(n,c),this.activateChildRoutes(t,null,i.children)}else this.activateChildRoutes(t,null,r)},t}();function Dt(t){Ut(t.value),t.children.forEach(Dt)}function qt(t){return"function"==typeof t}function zt(t){return t instanceof B}
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 | var Ht=function Ht(t){this.segmentGroup=t||null},Ft=function Ft(t){this.urlTree=t};function Gt(t){return new n.Observable((function(e){return e.error(new Ht(t))}))}function Wt(t){return new n.Observable((function(e){return e.error(new Ft(t))}))}function Bt(t){return new n.Observable((function(e){return e.error(new Error("Only absolute redirects can have named outlets. redirectTo: '"+t+"'"))}))}var Qt=function(){function t(t,e,n,o,i){this.configLoader=e,this.urlSerializer=n,this.urlTree=o,this.config=i,this.allowRedirects=!0,this.ngModule=t.get(r.NgModuleRef)}return t.prototype.apply=function(){var t=this;return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,"primary").pipe(o.map((function(e){return t.createUrlTree(e,t.urlTree.queryParams,t.urlTree.fragment)}))).pipe(o.catchError((function(e){if(e instanceof Ft)return t.allowRedirects=!1,t.match(e.urlTree);if(e instanceof Ht)throw t.noMatchError(e);throw e})))},t.prototype.match=function(t){var e=this;return this.expandSegmentGroup(this.ngModule,this.config,t.root,"primary").pipe(o.map((function(r){return e.createUrlTree(r,t.queryParams,t.fragment)}))).pipe(o.catchError((function(t){if(t instanceof Ht)throw e.noMatchError(t);throw t})))},t.prototype.noMatchError=function(t){return new Error("Cannot match any routes. URL Segment: '"+t.segmentGroup+"'")},t.prototype.createUrlTree=function(t,e,r){var n,o=t.segments.length>0?new Q([],((n={}).primary=t,n)):t;return new B(o,e,r)},t.prototype.expandSegmentGroup=function(t,e,r,n){return 0===r.segments.length&&r.hasChildren()?this.expandChildren(t,e,r).pipe(o.map((function(t){return new Q([],t)}))):this.expandSegment(t,r,e,r.segments,n,!0)},t.prototype.expandChildren=function(t,e,r){var i=this;return function a(t,e){if(0===Object.keys(t).length)return n.of({});var r=[],i=[],a={};return F(t,(function(t,n){var u=e(n,t).pipe(o.map((function(t){return a[n]=t})));"primary"===n?r.push(u):i.push(u)})),n.of.apply(null,r.concat(i)).pipe(o.concatAll(),o.last(),o.map((function(){return a})))}(r.children,(function(r,n){return i.expandSegmentGroup(t,e,n,r)}))},t.prototype.expandSegment=function(t,e,r,i,a,u){var s=this;return n.of.apply(void 0,l(r)).pipe(o.map((function(c){return s.expandSegmentAgainstRoute(t,e,r,c,i,a,u).pipe(o.catchError((function(t){if(t instanceof Ht)return n.of(null);throw t})))})),o.concatAll(),o.first((function(t){return!!t})),o.catchError((function(t,r){if(t instanceof n.EmptyError||"EmptyError"===t.name){if(s.noLeftoversInUrl(e,i,a))return n.of(new Q([],{}));throw new Ht(e)}throw t})))},t.prototype.noLeftoversInUrl=function(t,e,r){return 0===e.length&&!t.children[r]},t.prototype.expandSegmentAgainstRoute=function(t,e,r,n,o,i,a){return $t(n)!==i?Gt(e):void 0===n.redirectTo?this.matchSegmentAgainstRoute(t,e,n,o):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,r,n,o,i):Gt(e)},t.prototype.expandSegmentAgainstRouteUsingRedirect=function(t,e,r,n,o,i){return"**"===n.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,r,n,i):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,r,n,o,i)},t.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect=function(t,e,r,n){var i=this,a=this.applyRedirectCommands([],r.redirectTo,{});return r.redirectTo.startsWith("/")?Wt(a):this.lineralizeSegments(r,a).pipe(o.mergeMap((function(r){var o=new Q(r,{});return i.expandSegment(t,o,e,r,n,!1)})))},t.prototype.expandRegularSegmentAgainstRouteUsingRedirect=function(t,e,r,n,i,a){var u=this,s=Vt(e,n,i),c=s.consumedSegments,l=s.lastChild,p=s.positionalParamSegments;if(!s.matched)return Gt(e);var h=this.applyRedirectCommands(c,n.redirectTo,p);return n.redirectTo.startsWith("/")?Wt(h):this.lineralizeSegments(n,h).pipe(o.mergeMap((function(n){return u.expandSegment(t,e,r,n.concat(i.slice(l)),a,!1)})))},t.prototype.matchSegmentAgainstRoute=function(t,e,r,i){var a=this;if("**"===r.path)return r.loadChildren?this.configLoader.load(t.injector,r).pipe(o.map((function(t){return r._loadedConfig=t,new Q(i,{})}))):n.of(new Q(i,{}));var c=Vt(e,r,i),l=c.consumedSegments,p=c.lastChild;if(!c.matched)return Gt(e);var h=i.slice(p);return this.getChildConfig(t,r,i).pipe(o.mergeMap((function(t){var r=t.module,i=t.routes,c=function p(t,e,r,n){return r.length>0&&function o(t,e,r){return r.some((function(r){return Yt(t,e,r)&&"primary"!==$t(r)}))}(t,r,n)?{segmentGroup:Zt(new Q(e,function i(t,e){var r,n,o={};o.primary=e;try{for(var i=s(t),a=i.next();!a.done;a=i.next()){var u=a.value;""===u.path&&"primary"!==$t(u)&&(o[$t(u)]=new Q([],{}))}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o}(n,new Q(r,t.children)))),slicedSegments:[]}:0===r.length&&function a(t,e,r){return r.some((function(r){return Yt(t,e,r)}))}(t,r,n)?{segmentGroup:Zt(new Q(t.segments,function c(t,e,r,n){var o,i,a={};try{for(var c=s(r),l=c.next();!l.done;l=c.next()){var p=l.value;Yt(t,e,p)&&!n[$t(p)]&&(a[$t(p)]=new Q([],{}))}}catch(t){o={error:t}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return u(u({},n),a)}(t,r,n,t.children))),slicedSegments:r}:{segmentGroup:t,slicedSegments:r}}(e,l,h,i),f=c.segmentGroup,d=c.slicedSegments;return 0===d.length&&f.hasChildren()?a.expandChildren(r,i,f).pipe(o.map((function(t){return new Q(l,t)}))):0===i.length&&0===d.length?n.of(new Q(l,{})):a.expandSegment(r,f,i,d,"primary",!0).pipe(o.map((function(t){return new Q(l.concat(t.segments),t.children)})))})))},t.prototype.getChildConfig=function(t,e,r){var i=this;return e.children?n.of(new I(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?n.of(e._loadedConfig):this.runCanLoadGuards(t.injector,e,r).pipe(o.mergeMap((function(r){return r?i.configLoader.load(t.injector,e).pipe(o.map((function(t){return e._loadedConfig=t,t}))):function a(t){return new n.Observable((function(e){return e.error(E("Cannot load children because the guard of the route \"path: '"+t.path+"'\" returned false"))}))}(e)}))):n.of(new I([],t))},t.prototype.runCanLoadGuards=function(t,e,r){var i=this,a=e.canLoad;return a&&0!==a.length?n.from(a).pipe(o.map((function(n){var o,i=t.get(n);if(function a(t){return t&&qt(t.canLoad)}(i))o=i.canLoad(e,r);else{if(!qt(i))throw new Error("Invalid CanLoad guard");o=i(e,r)}return G(o)}))).pipe(o.concatAll(),o.tap((function(t){if(zt(t)){var e=E('Redirecting to "'+i.urlSerializer.serialize(t)+'"');throw e.url=t,e}})),o.every((function(t){return!0===t}))):n.of(!0)},t.prototype.lineralizeSegments=function(t,e){for(var r=[],o=e.root;;){if(r=r.concat(o.segments),0===o.numberOfChildren)return n.of(r);if(o.numberOfChildren>1||!o.children.primary)return Bt(t.redirectTo);o=o.children.primary}},t.prototype.applyRedirectCommands=function(t,e,r){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,r)},t.prototype.applyRedirectCreatreUrlTree=function(t,e,r,n){var o=this.createSegmentGroup(t,e.root,r,n);return new B(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)},t.prototype.createQueryParams=function(t,e){var r={};return F(t,(function(t,n){if("string"==typeof t&&t.startsWith(":")){var o=t.substring(1);r[n]=e[o]}else r[n]=t})),r},t.prototype.createSegmentGroup=function(t,e,r,n){var o=this,i=this.createSegments(t,e.segments,r,n),a={};return F(e.children,(function(e,i){a[i]=o.createSegmentGroup(t,e,r,n)})),new Q(i,a)},t.prototype.createSegments=function(t,e,r,n){var o=this;return e.map((function(e){return e.path.startsWith(":")?o.findPosParam(t,e,n):o.findOrReturn(e,r)}))},t.prototype.findPosParam=function(t,e,r){var n=r[e.path.substring(1)];if(!n)throw new Error("Cannot redirect to '"+t+"'. Cannot find '"+e.path+"'.");return n},t.prototype.findOrReturn=function(t,e){var r,n,o=0;try{for(var i=s(e),a=i.next();!a.done;a=i.next()){var u=a.value;if(u.path===t.path)return e.splice(o),u;o++}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return t},t}();function Vt(t,e,r){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||r.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};var n=(e.matcher||k)(r,t,e);return n?{matched:!0,consumedSegments:n.consumed,lastChild:n.consumed.length,positionalParamSegments:n.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function Zt(t){if(1===t.numberOfChildren&&t.children.primary){var e=t.children.primary;return new Q(t.segments.concat(e.segments),e.children)}return t}function Yt(t,e,r){return(!(t.hasChildren()||e.length>0)||"full"!==r.pathMatch)&&""===r.path&&void 0!==r.redirectTo}function $t(t){return t.outlet||"primary"}
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 | var Kt=function Kt(t){this.path=t,this.route=this.path[this.path.length-1]},Jt=function Jt(t,e){this.component=t,this.route=e};function Xt(t,e,r){var n=function o(t){if(!t)return null;for(var e=t.parent;e;e=e.parent){var r=e.routeConfig;if(r&&r._loadedConfig)return r._loadedConfig}return null}(e);return(n?n.module.injector:r).get(t)}function te(t,e,r,n,o){void 0===o&&(o={canDeactivateChecks:[],canActivateChecks:[]});var i=gt(e);return t.children.forEach((function(t){!function e(t,r,n,o,i){void 0===i&&(i={canDeactivateChecks:[],canActivateChecks:[]});var a=t.value,u=r?r.value:null,s=n?n.getContext(t.value.outlet):null;if(u&&a.routeConfig===u.routeConfig){var c=function l(t,e,r){if("function"==typeof r)return r(t,e);switch(r){case"pathParamsChange":return!Z(t.url,e.url);case"pathParamsOrQueryParamsChange":return!Z(t.url,e.url)||!D(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Pt(t,e)||!D(t.queryParams,e.queryParams);case"paramsChange":default:return!Pt(t,e)}}(u,a,a.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new Kt(o)):(a.data=u.data,a._resolvedData=u._resolvedData),te(t,r,a.component?s?s.children:null:n,o,i),c&&i.canDeactivateChecks.push(new Jt(s&&s.outlet&&s.outlet.component||null,u))}else u&&ee(r,s,i),i.canActivateChecks.push(new Kt(o)),te(t,null,a.component?s?s.children:null:n,o,i)}(t,i[t.value.outlet],r,n.concat([t.value]),o),delete i[t.value.outlet]})),F(i,(function(t,e){return ee(t,r.getContext(e),o)})),o}function ee(t,e,r){var n=gt(t),o=t.value;F(n,(function(t,n){ee(t,o.component?e?e.children.getContext(n):null:e,r)})),r.canDeactivateChecks.push(new Jt(o.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,o))}
|
101 |
|
102 |
|
103 |
|
104 |
|
105 |
|
106 |
|
107 | var re=Symbol("INITIAL_VALUE");function ne(){return o.switchMap((function(t){return n.combineLatest.apply(void 0,l(t.map((function(t){return t.pipe(o.take(1),o.startWith(re))})))).pipe(o.scan((function(t,e){var r=!1;return e.reduce((function(t,n,o){if(t!==re)return t;if(n===re&&(r=!0),!r){if(!1===n)return n;if(o===e.length-1||zt(n))return n}return t}),t)}),re),o.filter((function(t){return t!==re})),o.map((function(t){return zt(t)?t:!0===t})),o.take(1))}))}
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 | function oe(t,e){return null!==t&&e&&e(new P(t)),n.of(!0)}function ie(t,e){return null!==t&&e&&e(new R(t)),n.of(!0)}function ae(t,e,r){var i=e.routeConfig?e.routeConfig.canActivate:null;if(!i||0===i.length)return n.of(!0);var a=i.map((function(i){return n.defer((function(){var n,a=Xt(i,e,r);if(function u(t){return t&&qt(t.canActivate)}(a))n=G(a.canActivate(e,t));else{if(!qt(a))throw new Error("Invalid CanActivate guard");n=G(a(e,t))}return n.pipe(o.first())}))}));return n.of(a).pipe(ne())}function ue(t,e,r){var i=e[e.length-1],a=e.slice(0,e.length-1).reverse().map((function(t){return function e(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)})).filter((function(t){return null!==t})).map((function(e){return n.defer((function(){var a=e.guards.map((function(n){var a,u=Xt(n,e.node,r);if(function s(t){return t&&qt(t.canActivateChild)}(u))a=G(u.canActivateChild(i,t));else{if(!qt(u))throw new Error("Invalid CanActivateChild guard");a=G(u(i,t))}return a.pipe(o.first())}));return n.of(a).pipe(ne())}))}));return n.of(a).pipe(ne())}
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 | var se=function Ht(){},ce=function(){function t(t,e,r,n,o,i){this.rootComponentType=t,this.config=e,this.urlTree=r,this.url=n,this.paramsInheritanceStrategy=o,this.relativeLinkResolution=i}return t.prototype.recognize=function(){try{var t=he(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,"primary"),r=new wt([],Object.freeze({}),Object.freeze(u({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),o=new dt(r,e),i=new bt(this.url,o);return this.inheritParamsAndData(i._root),n.of(i)}catch(t){return new n.Observable((function(e){return e.error(t)}))}},t.prototype.inheritParamsAndData=function(t){var e=this,r=t.value,n=St(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=this,n=Y(e,(function(e,n){return r.processSegmentGroup(t,e,n)}));return function o(t){var e={};t.forEach((function(t){var r=e[t.value.outlet];if(r){var n=r.url.map((function(t){return t.toString()})).join("/"),o=t.value.url.map((function(t){return t.toString()})).join("/");throw new Error("Two segments cannot have the same outlet name: '"+n+"' and '"+o+"'.")}e[t.value.outlet]=t.value}))}(n),function i(t){t.sort((function(t,e){return"primary"===t.value.outlet?-1:"primary"===e.value.outlet?1:t.value.outlet.localeCompare(e.value.outlet)}))}(n),n},t.prototype.processSegment=function(t,e,r,n){var o,i;try{for(var a=s(t),u=a.next();!u.done;u=a.next()){var c=u.value;try{return this.processSegmentAgainstRoute(c,e,r,n)}catch(t){if(!(t instanceof se))throw t}}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}if(this.noLeftoversInUrl(e,r,n))return[];throw new se},t.prototype.noLeftoversInUrl=function(t,e,r){return 0===e.length&&!t.children[r]},t.prototype.processSegmentAgainstRoute=function(t,e,r,n){if(t.redirectTo)throw new se;if((t.outlet||"primary")!==n)throw new se;var o,i=[],a=[];if("**"===t.path){var s=r.length>0?H(r).parameters:{};o=new wt(r,s,Object.freeze(u({},this.urlTree.queryParams)),this.urlTree.fragment,ge(t),n,t.component,t,le(e),pe(e)+r.length,ve(t))}else{var c=function l(t,e,r){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||r.length>0))throw new se;return{consumedSegments:[],lastChild:0,parameters:{}}}var n=(e.matcher||k)(r,t,e);if(!n)throw new se;var o={};F(n.posParams,(function(t,e){o[e]=t.path}));var i=n.consumed.length>0?u(u({},o),n.consumed[n.consumed.length-1].parameters):o;return{consumedSegments:n.consumed,lastChild:n.consumed.length,parameters:i}}(e,t,r);i=c.consumedSegments,a=r.slice(c.lastChild),o=new wt(i,c.parameters,Object.freeze(u({},this.urlTree.queryParams)),this.urlTree.fragment,ge(t),n,t.component,t,le(e),pe(e)+i.length,ve(t))}var p=function h(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),f=he(e,i,a,p,this.relativeLinkResolution),d=f.segmentGroup,g=f.slicedSegments;if(0===g.length&&d.hasChildren()){var v=this.processChildren(p,d);return[new dt(o,v)]}if(0===p.length&&0===g.length)return[new dt(o,[])];var m=this.processSegment(p,d,g,"primary");return[new dt(o,m)]},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,e,r,n,o){if(r.length>0&&function i(t,e,r){return r.some((function(r){return fe(t,e,r)&&"primary"!==de(r)}))}(t,r,n)){var a=new Q(e,function c(t,e,r,n){var o,i,a={};a.primary=n,n._sourceSegment=t,n._segmentIndexShift=e.length;try{for(var u=s(r),c=u.next();!c.done;c=u.next()){var l=c.value;if(""===l.path&&"primary"!==de(l)){var p=new Q([],{});p._sourceSegment=t,p._segmentIndexShift=e.length,a[de(l)]=p}}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return a}(t,e,n,new Q(r,t.children)));return a._sourceSegment=t,a._segmentIndexShift=e.length,{segmentGroup:a,slicedSegments:[]}}if(0===r.length&&function l(t,e,r){return r.some((function(r){return fe(t,e,r)}))}(t,r,n)){var p=new Q(t.segments,function h(t,e,r,n,o,i){var a,c,l={};try{for(var p=s(n),h=p.next();!h.done;h=p.next()){var f=h.value;if(fe(t,r,f)&&!o[de(f)]){var d=new Q([],{});d._sourceSegment=t,d._segmentIndexShift="legacy"===i?t.segments.length:e.length,l[de(f)]=d}}}catch(t){a={error:t}}finally{try{h&&!h.done&&(c=p.return)&&c.call(p)}finally{if(a)throw a.error}}return u(u({},o),l)}(t,e,r,n,t.children,o));return p._sourceSegment=t,p._segmentIndexShift=e.length,{segmentGroup:p,slicedSegments:r}}var f=new Q(t.segments,t.children);return f._sourceSegment=t,f._segmentIndexShift=e.length,{segmentGroup:f,slicedSegments:r}}function fe(t,e,r){return(!(t.hasChildren()||e.length>0)||"full"!==r.pathMatch)&&""===r.path&&void 0===r.redirectTo}function de(t){return t.outlet||"primary"}function ge(t){return t.data||{}}function ve(t){return t.resolve||{}}
|
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 |
|
137 | function me(t){return function(e){return e.pipe(o.switchMap((function(e){var r=t(e);return r?n.from(r).pipe(o.map((function(){return e}))):n.from([e])})))}}
|
138 |
|
139 |
|
140 |
|
141 |
|
142 |
|
143 |
|
144 | var ye=function ye(){},Se=function(){function t(){}return t.prototype.shouldDetach=function(t){return!1},t.prototype.store=function(t,e){},t.prototype.shouldAttach=function(t){return!1},t.prototype.retrieve=function(t){return null},t.prototype.shouldReuseRoute=function(t,e){return t.routeConfig===e.routeConfig},t}(),we=new r.InjectionToken("ROUTES"),be=function(){function t(t,e,r,n){this.loader=t,this.compiler=e,this.onLoadStartListener=r,this.onLoadEndListener=n}return t.prototype.load=function(t,e){var r=this;return this.onLoadStartListener&&this.onLoadStartListener(e),this.loadModuleFactory(e.loadChildren).pipe(o.map((function(n){r.onLoadEndListener&&r.onLoadEndListener(e);var o=n.create(t);return new I(z(o.injector.get(we)).map(N),o)})))},t.prototype.loadModuleFactory=function(t){var e=this;return"string"==typeof t?n.from(this.loader.load(t)):G(t()).pipe(o.mergeMap((function(t){return t instanceof r.NgModuleFactory?n.of(t):n.from(e.compiler.compileModuleAsync(t))})))},t}(),Ce=function Ce(){this.outlet=null,this.route=null,this.resolver=null,this.children=new Re,this.attachRef=null},Re=function(){function t(){this.contexts=new Map}return t.prototype.onChildOutletCreated=function(t,e){var r=this.getOrCreateContext(t);r.outlet=e,this.contexts.set(t,r)},t.prototype.onChildOutletDestroyed=function(t){var e=this.getContext(t);e&&(e.outlet=null)},t.prototype.onOutletDeactivated=function(){var t=this.contexts;return this.contexts=new Map,t},t.prototype.onOutletReAttached=function(t){this.contexts=t},t.prototype.getOrCreateContext=function(t){var e=this.getContext(t);return e||(e=new Ce,this.contexts.set(t,e)),e},t.prototype.getContext=function(t){return this.contexts.get(t)||null},t}(),Ue=function Ue(){},Pe=function(){function t(){}return t.prototype.shouldProcessUrl=function(t){return!0},t.prototype.extract=function(t){return t},t.prototype.merge=function(t,e){return t},t}();
|
145 |
|
146 |
|
147 |
|
148 |
|
149 |
|
150 |
|
151 |
|
152 | function _e(t){throw t}function xe(t,e,r){return e.parse("/")}function Ae(t,e){return n.of(null)}var Te=function(){function t(t,e,o,i,a,u,s,c){var l=this;this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=o,this.location=i,this.config=c,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new n.Subject,this.errorHandler=_e,this.malformedUriErrorHandler=xe,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Ae,afterPreactivation:Ae},this.urlHandlingStrategy=new Pe,this.routeReuseStrategy=new Se,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=a.get(r.NgModuleRef),this.console=a.get(r.ɵConsole);var p=a.get(r.NgZone);this.isNgZoneEnabled=p instanceof r.NgZone,this.resetConfig(c),this.currentUrlTree=function h(){return new B(new Q([],{}),{},null)}(),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new be(u,s,(function(t){return l.triggerEvent(new b(t))}),(function(t){return l.triggerEvent(new C(t))})),this.routerState=mt(this.currentUrlTree,this.rootComponentType),this.transitions=new n.BehaviorSubject({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}return t.prototype.setupNavigations=function(t){var e=this,r=this.events;return t.pipe(o.filter((function(t){return 0!==t.id})),o.map((function(t){return u(u({},t),{extractedUrl:e.urlHandlingStrategy.extract(t.rawUrl)})})),o.switchMap((function(t){var i,a,c,l=!1,p=!1;return n.of(t).pipe(o.tap((function(t){e.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:e.lastSuccessfulNavigation?u(u({},e.lastSuccessfulNavigation),{previousNavigation:null}):null}})),o.switchMap((function(t){var i=!e.navigated||t.extractedUrl.toString()!==e.browserUrlTree.toString();if(("reload"===e.onSameUrlNavigation||i)&&e.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return n.of(t).pipe(o.switchMap((function(t){var o=e.transitions.getValue();return r.next(new h(t.id,e.serializeUrl(t.extractedUrl),t.source,t.restoredState)),o!==e.transitions.getValue()?n.EMPTY:[t]})),o.switchMap((function(t){return Promise.resolve(t)})),function a(t,e,r,n){return function(i){return i.pipe(o.switchMap((function(i){return function a(t,e,r,n,o){return new Qt(t,e,r,n,o).apply()}(t,e,r,i.extractedUrl,n).pipe(o.map((function(t){return u(u({},i),{urlAfterRedirects:t})})))})))}}(e.ngModule.injector,e.configLoader,e.urlSerializer,e.config),o.tap((function(t){e.currentNavigation=u(u({},e.currentNavigation),{finalUrl:t.urlAfterRedirects})})),function s(t,e,r,n,i){return function(a){return a.pipe(o.mergeMap((function(a){return function s(t,e,r,n,o,i){return void 0===o&&(o="emptyOnly"),void 0===i&&(i="legacy"),new ce(t,e,r,n,o,i).recognize()}(t,e,a.urlAfterRedirects,r(a.urlAfterRedirects),n,i).pipe(o.map((function(t){return u(u({},a),{targetSnapshot:t})})))})))}}
|
153 |
|
154 |
|
155 |
|
156 |
|
157 |
|
158 |
|
159 | (e.rootComponentType,e.config,(function(t){return e.serializeUrl(t)}),e.paramsInheritanceStrategy,e.relativeLinkResolution),o.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)})),o.tap((function(t){var n=new v(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);r.next(n)})));if(i&&e.rawUrlTree&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){var c=t.extractedUrl,l=t.source,p=t.restoredState,f=t.extras,d=new h(t.id,e.serializeUrl(c),l,p);r.next(d);var g=mt(c,e.rootComponentType).snapshot;return n.of(u(u({},t),{targetSnapshot:g,urlAfterRedirects:c,extras:u(u({},f),{skipLocationChange:!1,replaceUrl:!1})}))}return e.rawUrlTree=t.rawUrl,e.browserUrlTree=t.urlAfterRedirects,t.resolve(null),n.EMPTY})),me((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})})),o.tap((function(t){var r=new m(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)})),o.map((function(t){return u(u({},t),{guards:(r=t.targetSnapshot,n=t.currentSnapshot,o=e.rootContexts,i=r._root,te(i,n?n._root:null,o,[i.value]))});var r,n,o,i})),function f(t,e){return function(r){return r.pipe(o.mergeMap((function(r){var i=r.targetSnapshot,a=r.currentSnapshot,s=r.guards,c=s.canActivateChecks,l=s.canDeactivateChecks;return 0===l.length&&0===c.length?n.of(u(u({},r),{guardsResult:!0})):function p(t,e,r,i){return n.from(t).pipe(o.mergeMap((function(t){return function a(t,e,r,i,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=Xt(n,e,u);if(function c(t){return t&&qt(t.canDeactivate)}(s))a=G(s.canDeactivate(t,e,r,i));else{if(!qt(s))throw new Error("Invalid CanDeactivate guard");a=G(s(t,e,r,i))}return a.pipe(o.first())}));return n.of(c).pipe(ne())}(t.component,t.route,r,e,i)})),o.first((function(t){return!0!==t}),!0))}(l,i,a,t).pipe(o.mergeMap((function(r){return r&&function a(t){return"boolean"==typeof t}(r)?function u(t,e,r,i){return n.from(e).pipe(o.concatMap((function(e){return n.from([ie(e.route.parent,i),oe(e.route,i),ue(t,e.path,r),ae(t,e.route,r)]).pipe(o.concatAll(),o.first((function(t){return!0!==t}),!0))})),o.first((function(t){return!0!==t}),!0))}(i,c,t,e):n.of(r)})),o.map((function(t){return u(u({},r),{guardsResult:t})})))})))}}(e.ngModule.injector,(function(t){return e.triggerEvent(t)})),o.tap((function(t){if(zt(t.guardsResult)){var r=E('Redirecting to "'+e.serializeUrl(t.guardsResult)+'"');throw r.url=t.guardsResult,r}})),o.tap((function(t){var r=new y(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);e.triggerEvent(r)})),o.filter((function(t){if(!t.guardsResult){e.resetUrlToCurrentUrlTree();var n=new d(t.id,e.serializeUrl(t.extractedUrl),"");return r.next(n),t.resolve(!1),!1}return!0})),me((function(t){if(t.guards.canActivateChecks.length)return n.of(t).pipe(o.tap((function(t){var r=new S(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)})),o.switchMap((function(t){var i=!1;return n.of(t).pipe(function a(t,e){return function(r){return r.pipe(o.mergeMap((function(r){var i=r.targetSnapshot,a=r.guards.canActivateChecks;if(!a.length)return n.of(r);var s=0;return n.from(a).pipe(o.concatMap((function(r){return function a(t,e,r,i){return function a(t,e,r,i){var a=Object.keys(t);if(0===a.length)return n.of({});var u={};return n.from(a).pipe(o.mergeMap((function(n){return function a(t,e,r,n){var o=Xt(t,e,n);return G(o.resolve?o.resolve(e,r):o(e,r))}(t[n],e,r,i).pipe(o.tap((function(t){u[n]=t})))})),o.takeLast(1),o.mergeMap((function(){return Object.keys(u).length===a.length?n.of(u):n.EMPTY})))}(t._resolve,t,e,i).pipe(o.map((function(e){return t._resolvedData=e,t.data=u(u({},t.data),St(t,r).resolve),null})))}(r.route,i,t,e)})),o.tap((function(){return s++})),o.takeLast(1),o.mergeMap((function(t){return s===a.length?n.of(r):n.EMPTY})))})))}}(e.paramsInheritanceStrategy,e.ngModule.injector),o.tap({next:function(){return i=!0},complete:function(){if(!i){var n=new d(t.id,e.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");r.next(n),t.resolve(!1)}}}))})),o.tap((function(t){var r=new w(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(r)})))})),me((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})})),o.map((function(t){var r=function o(t,e,r){var o=function t(e,r,o){if(o&&e.shouldReuseRoute(r.value,o.value.snapshot)){(l=o.value)._futureSnapshot=r.value;var i=function a(e,r,n){return r.children.map((function(r){var o,i;try{for(var a=s(n.children),u=a.next();!u.done;u=a.next()){var c=u.value;if(e.shouldReuseRoute(c.value.snapshot,r.value))return t(e,r,c)}}catch(t){o={error:t}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return t(e,r)}))}(e,r,o);return new dt(l,i)}var u=e.retrieve(r.value);if(u){var c=u.route;return function t(e,r){if(e.value.routeConfig!==r.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==r.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");r.value._futureSnapshot=e.value;for(var n=0;n<e.children.length;++n)t(e.children[n],r.children[n])}(r,c),c}var l=function p(t){return new yt(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)}
|
160 |
|
161 |
|
162 |
|
163 |
|
164 |
|
165 |
|
166 | (r.value);return i=r.children.map((function(r){return t(e,r)})),new dt(l,i)}(t,e._root,r?r._root:void 0);return new vt(o,e)}(e.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return u(u({},t),{targetRouterState:r})})),o.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)})),(i=e.rootContexts,a=e.routeReuseStrategy,c=function(t){return e.triggerEvent(t)},o.map((function(t){return new Nt(a,t.targetRouterState,t.currentRouterState,c).activate(i),t}))),o.tap({next:function(){l=!0},complete:function(){l=!0}}),o.finalize((function(){if(!l&&!p){e.resetUrlToCurrentUrlTree();var n=new d(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})),o.catchError((function(o){if(p=!0,function i(t){return t&&t.ngNavigationCancelingError}(o)){var a=zt(o.url);a||(e.navigated=!0,e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));var u=new d(t.id,e.serializeUrl(t.extractedUrl),o.message);r.next(u),a?setTimeout((function(){var r=e.urlHandlingStrategy.merge(o.url,e.rawUrlTree);return 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 g(t.id,e.serializeUrl(t.extractedUrl),o);r.next(s);try{t.resolve(e.errorHandler(o))}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(u(u({},this.getTransition()),t))},t.prototype.initialNavigation=function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})},t.prototype.setUpLocationChangeListener=function(){var t=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe((function(e){var r=t.parseUrl(e.url),n="popstate"===e.type?"popstate":"hashchange",o=e.state&&e.state.navigationId?e.state:null;setTimeout((function(){t.scheduleNavigation(r,n,o,{replaceUrl:!0})}),0)})))},Object.defineProperty(t.prototype,"url",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!1,configurable:!0}),t.prototype.getCurrentNavigation=function(){return this.currentNavigation},t.prototype.triggerEvent=function(t){this.events.next(t)},t.prototype.resetConfig=function(t){j(t),this.config=t.map(N),this.navigated=!1,this.lastSuccessfulId=-1},t.prototype.ngOnDestroy=function(){this.dispose()},t.prototype.dispose=function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)},t.prototype.createUrlTree=function(t,e){void 0===e&&(e={});var n=e.relativeTo,o=e.queryParams,i=e.fragment,a=e.preserveQueryParams,s=e.queryParamsHandling,c=e.preserveFragment;r.isDevMode()&&a&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");var p=n||this.routerState.root,h=c?this.currentUrlTree.fragment:i,f=null;if(s)switch(s){case"merge":f=u(u({},this.currentUrlTree.queryParams),o);break;case"preserve":f=this.currentUrlTree.queryParams;break;default:f=o||null}else f=a?this.currentUrlTree.queryParams:o||null;return null!==f&&(f=this.removeEmptyProps(f)),function d(t,e,r,n,o){if(0===r.length)return xt(e.root,e.root,e,n,o);var i=function a(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new At(!0,0,t);var e=0,r=!1,n=t.reduce((function(t,n,o){if("object"==typeof n&&null!=n){if(n.outlets){var i={};return F(n.outlets,(function(t,e){i[e]="string"==typeof t?t.split("/"):t})),l(t,[{outlets:i}])}if(n.segmentPath)return l(t,[n.segmentPath])}return"string"!=typeof n?l(t,[n]):0===o?(n.split("/").forEach((function(n,o){0==o&&"."===n||(0==o&&""===n?r=!0:".."===n?e++:""!=n&&t.push(n))})),t):l(t,[n])}),[]);return new At(r,e,n)}(r);if(i.toRoot())return xt(e.root,new Q([],{}),e,n,o);var u=function s(t,e,r){if(t.isAbsolute)return new Tt(e.root,!0,0);if(-1===r.snapshot._lastPathIndex){var n=r.snapshot._urlSegment;return new Tt(n,n===e.root,0)}var o=_t(t.commands[0])?0:1;return function i(t,e,r){for(var n=t,o=e,i=r;i>o;){if(i-=o,!(n=n.parent))throw new Error("Invalid number of '../'");o=n.segments.length}return new Tt(n,!1,o-i)}(r.snapshot._urlSegment,r.snapshot._lastPathIndex+o,t.numberOfDoubleDots)}(i,e,t),c=u.processChildren?kt(u.segmentGroup,u.index,i.commands):Et(u.segmentGroup,u.index,i.commands);return xt(u.segmentGroup,c,e,n,o)}(p,this.currentUrlTree,t,f,h)},t.prototype.navigateByUrl=function(t,e){void 0===e&&(e={skipLocationChange:!1}),r.isDevMode()&&this.isNgZoneEnabled&&!r.NgZone.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");var n=zt(t)?t:this.parseUrl(t),o=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(o,"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)}}
|
167 |
|
168 |
|
169 |
|
170 |
|
171 |
|
172 |
|
173 | (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(zt(t))return W(this.currentUrlTree,t,e);var r=this.parseUrl(t);return W(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 f(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,o){var i,a,u,s=this.getTransition();if(s&&"imperative"!==e&&"imperative"===s.source&&s.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(s&&"hashchange"==e&&"popstate"===s.source&&s.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(s&&"popstate"==e&&"hashchange"===s.source&&s.rawUrl.toString()===t.toString())return Promise.resolve(!0);o?(i=o.resolve,a=o.reject,u=o.promise):u=new Promise((function(t,e){i=t,a=e}));var c=++this.navigationId;return this.setTransition({id:c,source:e,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:n,resolve:i,reject:a,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch((function(t){return Promise.reject(t)}))},t.prototype.setBrowserUrl=function(t,e,r,n){var o=this.urlSerializer.serialize(t);n=n||{},this.location.isCurrentPathEqualTo(o)||e?this.location.replaceState(o,"",u(u({},n),{navigationId:r})):this.location.go(o,"",u(u({},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.decorators=[{type:r.Injectable}],t.ctorParameters=function(){return[{type:r.Type},{type:$},{type:Re},{type:e.Location},{type:r.Injector},{type:r.NgModuleFactoryLoader},{type:r.Compiler},{type:void 0}]},t}(),Oe=function(){function t(t,e,r,n,o){this.router=t,this.route=e,this.commands=[],null==r&&n.setAttribute(o.nativeElement,"tabindex","0")}return Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"preserveQueryParams",{set:function(t){r.isDevMode()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated!, use queryParamsHandling instead."),this.preserve=t},enumerable:!1,configurable:!0}),t.prototype.onClick=function(){var t={skipLocationChange:ke(this.skipLocationChange),replaceUrl:ke(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:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:ke(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:ke(this.preserveFragment)})},enumerable:!1,configurable:!0}),t.decorators=[{type:r.Directive,args:[{selector:":not(a):not(area)[routerLink]"}]}],t.ctorParameters=function(){return[{type:Te},{type:yt},{type:String,decorators:[{type:r.Attribute,args:["tabindex"]}]},{type:r.Renderer2},{type:r.ElementRef}]},t.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}],routerLink:[{type:r.Input}],preserveQueryParams:[{type:r.Input}],onClick:[{type:r.HostListener,args:["click"]}]},t}(),Ee=function(){function t(t,e,r){var n=this;this.router=t,this.route=e,this.locationStrategy=r,this.commands=[],this.subscription=t.events.subscribe((function(t){t instanceof f&&n.updateTargetUrlAndHref()}))}return Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"preserveQueryParams",{set:function(t){r.isDevMode()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead."),this.preserve=t},enumerable:!1,configurable:!0}),t.prototype.ngOnChanges=function(t){this.updateTargetUrlAndHref()},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.onClick=function(t,e,r,n){if(0!==t||e||r||n)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;var o={skipLocationChange:ke(this.skipLocationChange),replaceUrl:ke(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,o),!1},t.prototype.updateTargetUrlAndHref=function(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))},Object.defineProperty(t.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:ke(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:ke(this.preserveFragment)})},enumerable:!1,configurable:!0}),t.decorators=[{type:r.Directive,args:[{selector:"a[routerLink],area[routerLink]"}]}],t.ctorParameters=function(){return[{type:Te},{type:yt},{type:e.LocationStrategy}]},t.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}],href:[{type:r.HostBinding}],routerLink:[{type:r.Input}],preserveQueryParams:[{type:r.Input}],onClick:[{type:r.HostListener,args:["click",["$event.button","$event.ctrlKey","$event.metaKey","$event.shiftKey"]]}]},t}();function ke(t){return""===t||!!t}
|
174 |
|
175 |
|
176 |
|
177 |
|
178 |
|
179 |
|
180 | var Ie=function(){function t(t,e,r,n,o,i){var a=this;this.router=t,this.element=e,this.renderer=r,this.cdr=n,this.link=o,this.linkWithHref=i,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.subscription=t.events.subscribe((function(t){t instanceof f&&a.update()}))}return t.prototype.ngAfterContentInit=function(){var t=this;this.links.changes.subscribe((function(e){return t.update()})),this.linksWithHrefs.changes.subscribe((function(e){return t.update()})),this.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(){this.subscription.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.decorators=[{type:r.Directive,args:[{selector:"[routerLinkActive]",exportAs:"routerLinkActive"}]}],t.ctorParameters=function(){return[{type:Te},{type:r.ElementRef},{type:r.Renderer2},{type:r.ChangeDetectorRef},{type:Oe,decorators:[{type:r.Optional}]},{type:Ee,decorators:[{type:r.Optional}]}]},t.propDecorators={links:[{type:r.ContentChildren,args:[Oe,{descendants:!0}]}],linksWithHrefs:[{type:r.ContentChildren,args:[Ee,{descendants:!0}]}],routerLinkActiveOptions:[{type:r.Input}],routerLinkActive:[{type:r.Input}]},t}(),je=function(){function t(t,e,n,o,i){this.parentContexts=t,this.location=e,this.resolver=n,this.changeDetector=i,this.activated=null,this._activatedRoute=null,this.activateEvents=new r.EventEmitter,this.deactivateEvents=new r.EventEmitter,this.name=o||"primary",t.onChildOutletCreated(this.name,this)}return t.prototype.ngOnDestroy=function(){this.parentContexts.onChildOutletDestroyed(this.name)},t.prototype.ngOnInit=function(){if(!this.activated){var t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}},Object.defineProperty(t.prototype,"isActivated",{get:function(){return!!this.activated},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activatedRoute",{get:function(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activatedRouteData",{get:function(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}},enumerable:!1,configurable:!0}),t.prototype.detach=function(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();var t=this.activated;return this.activated=null,this._activatedRoute=null,t},t.prototype.attach=function(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)},t.prototype.deactivate=function(){if(this.activated){var t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}},t.prototype.activateWith=function(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;var r=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),n=this.parentContexts.getOrCreateContext(this.name).children,o=new Le(t,n,this.location.injector);this.activated=this.location.createComponent(r,this.location.length,o),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)},t.decorators=[{type:r.Directive,args:[{selector:"router-outlet",exportAs:"outlet"}]}],t.ctorParameters=function(){return[{type:Re},{type:r.ViewContainerRef},{type:r.ComponentFactoryResolver},{type:String,decorators:[{type:r.Attribute,args:["name"]}]},{type:r.ChangeDetectorRef}]},t.propDecorators={activateEvents:[{type:r.Output,args:["activate"]}],deactivateEvents:[{type:r.Output,args:["deactivate"]}]},t}(),Le=function(){function t(t,e,r){this.route=t,this.childContexts=e,this.parent=r}return t.prototype.get=function(t,e){return t===yt?this.route:t===Re?this.childContexts:this.parent.get(t,e)},t}(),Me=function Me(){},Ne=function(){function t(){}return t.prototype.preload=function(t,e){return e().pipe(o.catchError((function(){return n.of(null)})))},t}(),De=function(){function t(){}return t.prototype.preload=function(t,e){return n.of(null)},t}(),qe=function(){function t(t,e,r,n,o){this.router=t,this.injector=n,this.preloadingStrategy=o,this.loader=new be(e,r,(function(e){return t.triggerEvent(new b(e))}),(function(e){return t.triggerEvent(new C(e))}))}return t.prototype.setUpPreloading=function(){var t=this;this.subscription=this.router.events.pipe(o.filter((function(t){return t instanceof f})),o.concatMap((function(){return t.preload()}))).subscribe((function(){}))},t.prototype.preload=function(){var t=this.injector.get(r.NgModuleRef);return this.processRoutes(t,this.router.config)},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.processRoutes=function(t,e){var r,i,a=[];try{for(var u=s(e),c=u.next();!c.done;c=u.next()){var l=c.value;if(l.loadChildren&&!l.canLoad&&l._loadedConfig){var p=l._loadedConfig;a.push(this.processRoutes(p.module,p.routes))}else l.loadChildren&&!l.canLoad?a.push(this.preloadConfig(t,l)):l.children&&a.push(this.processRoutes(t,l.children))}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return n.from(a).pipe(o.mergeAll(),o.map((function(t){})))},t.prototype.preloadConfig=function(t,e){var r=this;return this.preloadingStrategy.preload(e,(function(){return r.loader.load(t.injector,e).pipe(o.mergeMap((function(t){return e._loadedConfig=t,r.processRoutes(t.module,t.routes)})))}))},t.decorators=[{type:r.Injectable}],t.ctorParameters=function(){return[{type:Te},{type:r.NgModuleFactoryLoader},{type:r.Compiler},{type:r.Injector},{type:Me}]},t}(),ze=function(){function t(t,e,r){void 0===r&&(r={}),this.router=t,this.viewportScroller=e,this.options=r,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},r.scrollPositionRestoration=r.scrollPositionRestoration||"disabled",r.anchorScrolling=r.anchorScrolling||"disabled"}return t.prototype.init=function(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()},t.prototype.createScrollEvents=function(){var t=this;return this.router.events.subscribe((function(e){e instanceof h?(t.store[t.lastId]=t.viewportScroller.getScrollPosition(),t.lastSource=e.navigationTrigger,t.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof f&&(t.lastId=e.id,t.scheduleScrollEvent(e,t.router.parseUrl(e.urlAfterRedirects).fragment))}))},t.prototype.consumeScrollEvents=function(){var t=this;return this.router.events.subscribe((function(e){e instanceof x&&(e.position?"top"===t.options.scrollPositionRestoration?t.viewportScroller.scrollToPosition([0,0]):"enabled"===t.options.scrollPositionRestoration&&t.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===t.options.anchorScrolling?t.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==t.options.scrollPositionRestoration&&t.viewportScroller.scrollToPosition([0,0]))}))},t.prototype.scheduleScrollEvent=function(t,e){this.router.triggerEvent(new x(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))},t.prototype.ngOnDestroy=function(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()},t.decorators=[{type:r.Injectable}],t.ctorParameters=function(){return[{type:Te},{type:e.ViewportScroller},{type:void 0}]},t}(),He=[je,Oe,Ee,Ie,A],Fe=new r.InjectionToken("ROUTER_CONFIGURATION"),Ge=new r.InjectionToken("ROUTER_FORROOT_GUARD"),We=[e.Location,{provide:$,useClass:K},{provide:Te,useFactory:Ke,deps:[$,Re,e.Location,r.Injector,r.NgModuleFactoryLoader,r.Compiler,we,Fe,[Ue,new r.Optional],[ye,new r.Optional]]},Re,{provide:yt,useFactory:Je,deps:[Te]},{provide:r.NgModuleFactoryLoader,useClass:r.SystemJsNgModuleLoader},qe,De,Ne,{provide:Fe,useValue:{enableTracing:!1}}];
|
181 |
|
182 |
|
183 |
|
184 |
|
185 |
|
186 |
|
187 | function Be(){return new r.NgProbeToken("Router",Te)}var Qe=function(){function t(t,e){}return t.forRoot=function(n,o){return{ngModule:t,providers:[We,$e(n),{provide:Ge,useFactory:Ye,deps:[[Te,new r.Optional,new r.SkipSelf]]},{provide:Fe,useValue:o||{}},{provide:e.LocationStrategy,useFactory:Ze,deps:[e.PlatformLocation,[new r.Inject(e.APP_BASE_HREF),new r.Optional],Fe]},{provide:ze,useFactory:Ve,deps:[Te,e.ViewportScroller,Fe]},{provide:Me,useExisting:o&&o.preloadingStrategy?o.preloadingStrategy:De},{provide:r.NgProbeToken,multi:!0,useFactory:Be},nr()]}},t.forChild=function(e){return{ngModule:t,providers:[$e(e)]}},t.decorators=[{type:r.NgModule,args:[{declarations:He,exports:He,entryComponents:[A]}]}],t.ctorParameters=function(){return[{type:void 0,decorators:[{type:r.Optional},{type:r.Inject,args:[Ge]}]},{type:Te,decorators:[{type:r.Optional}]}]},t}();function Ve(t,e,r){return r.scrollOffset&&e.setOffset(r.scrollOffset),new ze(t,e,r)}function Ze(t,r,n){return void 0===n&&(n={}),n.useHash?new e.HashLocationStrategy(t,r):new e.PathLocationStrategy(t,r)}function Ye(t){if(t)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function $e(t){return[{provide:r.ANALYZE_FOR_ENTRY_COMPONENTS,multi:!0,useValue:t},{provide:we,multi:!0,useValue:t}]}function Ke(t,r,n,o,i,a,u,s,c,l){void 0===s&&(s={});var p=new Te(null,t,r,n,o,i,a,z(u));if(c&&(p.urlHandlingStrategy=c),l&&(p.routeReuseStrategy=l),s.errorHandler&&(p.errorHandler=s.errorHandler),s.malformedUriErrorHandler&&(p.malformedUriErrorHandler=s.malformedUriErrorHandler),s.enableTracing){var h=e.ɵgetDOM();p.events.subscribe((function(t){h.logGroup("Router Event: "+t.constructor.name),h.log(t.toString()),h.log(t),h.logGroupEnd()}))}return s.onSameUrlNavigation&&(p.onSameUrlNavigation=s.onSameUrlNavigation),s.paramsInheritanceStrategy&&(p.paramsInheritanceStrategy=s.paramsInheritanceStrategy),s.urlUpdateStrategy&&(p.urlUpdateStrategy=s.urlUpdateStrategy),s.relativeLinkResolution&&(p.relativeLinkResolution=s.relativeLinkResolution),p}function Je(t){return t.routerState.root}var Xe=function(){function t(t){this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new n.Subject}return t.prototype.appInitializer=function(){var t=this;return this.injector.get(e.LOCATION_INITIALIZED,Promise.resolve(null)).then((function(){var e=null,r=new Promise((function(t){return e=t})),o=t.injector.get(Te),i=t.injector.get(Fe);if(t.isLegacyDisabled(i)||t.isLegacyEnabled(i))e(!0);else if("disabled"===i.initialNavigation)o.setUpLocationChangeListener(),e(!0);else{if("enabled"!==i.initialNavigation)throw new Error("Invalid initialNavigation options: '"+i.initialNavigation+"'");o.hooks.afterPreactivation=function(){return t.initNavigation?n.of(null):(t.initNavigation=!0,e(!0),t.resultOfPreactivationDone)},o.initialNavigation()}return r}))},t.prototype.bootstrapListener=function(t){var e=this.injector.get(Fe),n=this.injector.get(qe),o=this.injector.get(ze),i=this.injector.get(Te),a=this.injector.get(r.ApplicationRef);t===a.components[0]&&(this.isLegacyEnabled(e)?i.initialNavigation():this.isLegacyDisabled(e)&&i.setUpLocationChangeListener(),n.setUpPreloading(),o.init(),i.resetRootComponentType(a.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())},t.prototype.isLegacyEnabled=function(t){return"legacy_enabled"===t.initialNavigation||!0===t.initialNavigation||void 0===t.initialNavigation},t.prototype.isLegacyDisabled=function(t){return"legacy_disabled"===t.initialNavigation||!1===t.initialNavigation},t.decorators=[{type:r.Injectable}],t.ctorParameters=function(){return[{type:r.Injector}]},t}();function tr(t){return t.appInitializer.bind(t)}function er(t){return t.bootstrapListener.bind(t)}var rr=new r.InjectionToken("Router Initializer");function nr(){return[Xe,{provide:r.APP_INITIALIZER,multi:!0,useFactory:tr,deps:[Xe]},{provide:rr,useFactory:er,deps:[Xe]},{provide:r.APP_BOOTSTRAP_LISTENER,multi:!0,useExisting:rr}]}
|
188 |
|
189 |
|
190 |
|
191 |
|
192 |
|
193 |
|
194 | var or=new r.Version("10.0.3");
|
195 |
|
196 |
|
197 |
|
198 |
|
199 |
|
200 |
|
201 |
|
202 |
|
203 |
|
204 |
|
205 |
|
206 |
|
207 |
|
208 |
|
209 |
|
210 |
|
211 |
|
212 |
|
213 |
|
214 |
|
215 |
|
216 |
|
217 |
|
218 |
|
219 |
|
220 |
|
221 |
|
222 | t.ActivatedRoute=yt,t.ActivatedRouteSnapshot=wt,t.ActivationEnd=_,t.ActivationStart=P,t.ChildActivationEnd=U,t.ChildActivationStart=R,t.ChildrenOutletContexts=Re,t.DefaultUrlSerializer=K,t.GuardsCheckEnd=y,t.GuardsCheckStart=m,t.NavigationCancel=d,t.NavigationEnd=f,t.NavigationError=g,t.NavigationStart=h,t.NoPreloading=De,t.OutletContext=Ce,t.PRIMARY_OUTLET="primary",t.PreloadAllModules=Ne,t.PreloadingStrategy=Me,t.ROUTER_CONFIGURATION=Fe,t.ROUTER_INITIALIZER=rr,t.ROUTES=we,t.ResolveEnd=w,t.ResolveStart=S,t.RouteConfigLoadEnd=C,t.RouteConfigLoadStart=b,t.RouteReuseStrategy=ye,t.Router=Te,t.RouterEvent=p,t.RouterLink=Oe,t.RouterLinkActive=Ie,t.RouterLinkWithHref=Ee,t.RouterModule=Qe,t.RouterOutlet=je,t.RouterPreloader=qe,t.RouterState=vt,t.RouterStateSnapshot=bt,t.RoutesRecognized=v,t.Scroll=x,t.UrlHandlingStrategy=Ue,t.UrlSegment=V,t.UrlSegmentGroup=Q,t.UrlSerializer=$,t.UrlTree=B,t.VERSION=or,t.convertToParamMap=O,t.provideRoutes=$e,t.ɵEmptyOutletComponent=A,t.ɵROUTER_PROVIDERS=We,t.ɵangular_packages_router_router_a=Ge,t.ɵangular_packages_router_router_b=Be,t.ɵangular_packages_router_router_c=Ve,t.ɵangular_packages_router_router_d=Ze,t.ɵangular_packages_router_router_e=Ye,t.ɵangular_packages_router_router_f=Ke,t.ɵangular_packages_router_router_g=Je,t.ɵangular_packages_router_router_h=Xe,t.ɵangular_packages_router_router_i=tr,t.ɵangular_packages_router_router_j=er,t.ɵangular_packages_router_router_k=nr,t.ɵangular_packages_router_router_l=A,t.ɵangular_packages_router_router_m=pt,t.ɵangular_packages_router_router_n=dt,t.ɵangular_packages_router_router_o=ze,t.ɵflatten=z,Object.defineProperty(t,"__esModule",{value:!0})})); |
\ | No newline at end of file |