UNPKG

angular2

Version:

Angular 2 - a web framework for modern web apps

2 lines 69.9 kB
"format register";System.register("angular2/src/router/router_link_transform",["angular2/compiler","angular2/src/core/change_detection/parser/ast","angular2/src/facade/exceptions","angular2/core","angular2/src/core/change_detection/parser/parser"],!0,function(t,e,r){function n(t,e){var r=new y(t,e.trim()).tokenize();return new v(r).generate()}var o=System.global,a=o.define;o.define=void 0;var i=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},s=this&&this.__decorate||function(t,e,r,n){var o,a=arguments.length,i=3>a?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(i=(3>a?o(i):a>3?o(e,r,i):o(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},u=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},c=t("angular2/compiler"),l=t("angular2/src/core/change_detection/parser/ast"),p=t("angular2/src/facade/exceptions"),f=t("angular2/core"),h=t("angular2/src/core/change_detection/parser/parser"),g=function(){function t(t){this.value=t}return t}(),m=function(){function t(){}return t}(),d=function(){function t(){}return t}(),_=function(){function t(t){this.ast=t}return t}(),y=function(){function t(t,e){this.parser=t,this.exp=e,this.index=0}return t.prototype.tokenize=function(){for(var t=[];this.index<this.exp.length;)t.push(this._parseToken());return t},t.prototype._parseToken=function(){var t=this.exp[this.index];return"["==t?(this.index++,new m):"]"==t?(this.index++,new d):"("==t?this._parseParams():"/"==t&&0!==this.index?(this.index++,this._parseFixedPart()):this._parseFixedPart()},t.prototype._parseParams=function(){for(var t=this.index;this.index<this.exp.length;++this.index){var e=this.exp[this.index];if(")"==e){var r=this.exp.substring(t+1,this.index);return this.index++,new _(this.parser.parseBinding("{"+r+"}",null).ast)}}throw new p.BaseException("Cannot find ')'")},t.prototype._parseFixedPart=function(){for(var t=this.index,e=!1;this.index<this.exp.length;++this.index){var r=this.exp[this.index];if("("==r||"["==r||"]"==r||"/"==r&&e)break;"."!=r&&"/"!=r&&(e=!0)}var n=this.exp.substring(t,this.index);if(t===this.index||!e||n.startsWith("//"))throw new p.BaseException("Invalid router link");return new g(n)},t}(),v=function(){function t(t){this.tokens=t,this.index=0}return t.prototype.generate=function(){return this._genAuxiliary()},t.prototype._genAuxiliary=function(){for(var t=[];this.index<this.tokens.length;this.index++){var e=this.tokens[this.index];if(e instanceof g)t.push(new l.LiteralPrimitive(e.value));else if(e instanceof _)t.push(e.ast);else{if(e instanceof d)break;e instanceof m&&(this.index++,t.push(this._genAuxiliary()))}}return new l.LiteralArray(t)},t}(),R=function(t){function e(e){t.call(this),this.parser=e}return i(e,t),e.prototype.visitQuote=function(e){return"route"==e.prefix?n(this.parser,e.uninterpretedExpression):t.prototype.visitQuote.call(this,e)},e}(l.AstTransformer);e.parseRouterLinkExpression=n;var P=function(){function t(t){this.astTransformer=new R(t)}return t.prototype.visitNgContent=function(t,e){return t},t.prototype.visitEmbeddedTemplate=function(t,e){return t},t.prototype.visitElement=function(t,e){var r=this,n=t.children.map(function(t){return t.visit(r,e)}),o=t.inputs.map(function(t){return t.visit(r,e)}),a=t.directives.map(function(t){return t.visit(r,e)});return new c.ElementAst(t.name,t.attrs,o,t.outputs,t.exportAsVars,a,n,t.ngContentIndex,t.sourceSpan)},t.prototype.visitVariable=function(t,e){return t},t.prototype.visitEvent=function(t,e){return t},t.prototype.visitElementProperty=function(t,e){return t},t.prototype.visitAttr=function(t,e){return t},t.prototype.visitBoundText=function(t,e){return t},t.prototype.visitText=function(t,e){return t},t.prototype.visitDirective=function(t,e){var r=this,n=t.inputs.map(function(t){return t.visit(r,e)});return new c.DirectiveAst(t.directive,n,t.hostProperties,t.hostEvents,t.exportAsVars,t.sourceSpan)},t.prototype.visitDirectiveProperty=function(t,e){var r=t.value.visit(this.astTransformer);return new c.BoundDirectivePropertyAst(t.directiveName,t.templateName,r,t.sourceSpan)},t=s([f.Injectable(),u("design:paramtypes",[h.Parser])],t)}();return e.RouterLinkTransform=P,o.define=a,r.exports}),System.register("angular2/router/router_link_dsl",["angular2/compiler","angular2/core","angular2/src/router/router_link_transform","angular2/src/facade/lang","angular2/src/router/router_link_transform"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=t("angular2/compiler"),i=t("angular2/core"),s=t("angular2/src/router/router_link_transform"),u=t("angular2/src/facade/lang"),c=t("angular2/src/router/router_link_transform");return e.RouterLinkTransform=c.RouterLinkTransform,e.ROUTER_LINK_DSL_PROVIDER=u.CONST_EXPR(new i.Provider(a.TEMPLATE_TRANSFORMS,{useClass:s.RouterLinkTransform,multi:!0})),n.define=o,r.exports}),System.register("angular2/src/router/route_config_impl",["angular2/src/facade/lang"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=this&&this.__decorate||function(t,e,r,n){var o,a=arguments.length,i=3>a?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(i=(3>a?o(i):a>3?o(e,r,i):o(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=t("angular2/src/facade/lang"),u=function(){function t(t){this.configs=t}return t=a([s.CONST(),i("design:paramtypes",[Array])],t)}();e.RouteConfig=u;var c=function(){function t(t){var e=t.path,r=t.component,n=t.name,o=t.data,a=t.useAsDefault;this.aux=null,this.loader=null,this.redirectTo=null,this.path=e,this.component=r,this.name=n,this.data=o,this.useAsDefault=a}return t=a([s.CONST(),i("design:paramtypes",[Object])],t)}();e.Route=c;var l=function(){function t(t){var e=t.path,r=t.component,n=t.name;this.data=null,this.aux=null,this.loader=null,this.redirectTo=null,this.useAsDefault=!1,this.path=e,this.component=r,this.name=n}return t=a([s.CONST(),i("design:paramtypes",[Object])],t)}();e.AuxRoute=l;var p=function(){function t(t){var e=t.path,r=t.loader,n=t.name,o=t.data,a=t.useAsDefault;this.aux=null,this.path=e,this.loader=r,this.name=n,this.data=o,this.useAsDefault=a}return t=a([s.CONST(),i("design:paramtypes",[Object])],t)}();e.AsyncRoute=p;var f=function(){function t(t){var e=t.path,r=t.redirectTo;this.name=null,this.loader=null,this.data=null,this.aux=null,this.useAsDefault=!1,this.path=e,this.redirectTo=r}return t=a([s.CONST(),i("design:paramtypes",[Object])],t)}();return e.Redirect=f,n.define=o,r.exports}),System.register("angular2/src/router/instruction",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/facade/async"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("angular2/src/facade/collection"),s=t("angular2/src/facade/lang"),u=t("angular2/src/facade/async"),c=function(){function t(t){this.params=t}return t.prototype.get=function(t){return s.normalizeBlank(i.StringMapWrapper.get(this.params,t))},t}();e.RouteParams=c;var l=function(){function t(t){void 0===t&&(t=s.CONST_EXPR({})),this.data=t}return t.prototype.get=function(t){return s.normalizeBlank(i.StringMapWrapper.get(this.data,t))},t}();e.RouteData=l,e.BLANK_ROUTE_DATA=new l;var p=function(){function t(t,e,r){this.component=t,this.child=e,this.auxInstruction=r}return Object.defineProperty(t.prototype,"urlPath",{get:function(){return s.isPresent(this.component)?this.component.urlPath:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"urlParams",{get:function(){return s.isPresent(this.component)?this.component.urlParams:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"specificity",{get:function(){var t="";return s.isPresent(this.component)&&(t+=this.component.specificity),s.isPresent(this.child)&&(t+=this.child.specificity),t},enumerable:!0,configurable:!0}),t.prototype.toRootUrl=function(){return this.toUrlPath()+this.toUrlQuery()},t.prototype._toNonRootUrl=function(){return this._stringifyPathMatrixAuxPrefixed()+(s.isPresent(this.child)?this.child._toNonRootUrl():"")},t.prototype.toUrlQuery=function(){return this.urlParams.length>0?"?"+this.urlParams.join("&"):""},t.prototype.replaceChild=function(t){return new f(this.component,t,this.auxInstruction)},t.prototype.toUrlPath=function(){return this.urlPath+this._stringifyAux()+(s.isPresent(this.child)?this.child._toNonRootUrl():"")},t.prototype.toLinkUrl=function(){return this.urlPath+this._stringifyAux()+(s.isPresent(this.child)?this.child._toLinkUrl():"")},t.prototype._toLinkUrl=function(){return this._stringifyPathMatrixAuxPrefixed()+(s.isPresent(this.child)?this.child._toLinkUrl():"")},t.prototype._stringifyPathMatrixAuxPrefixed=function(){var t=this._stringifyPathMatrixAux();return t.length>0&&(t="/"+t),t},t.prototype._stringifyMatrixParams=function(){return this.urlParams.length>0?";"+this.urlParams.join(";"):""},t.prototype._stringifyPathMatrixAux=function(){return s.isBlank(this.component)?"":this.urlPath+this._stringifyMatrixParams()+this._stringifyAux()},t.prototype._stringifyAux=function(){var t=[];return i.StringMapWrapper.forEach(this.auxInstruction,function(e,r){t.push(e._stringifyPathMatrixAux())}),t.length>0?"("+t.join("//")+")":""},t}();e.Instruction=p;var f=function(t){function e(e,r,n){t.call(this,e,r,n)}return a(e,t),e.prototype.resolveComponent=function(){return u.PromiseWrapper.resolve(this.component)},e}(p);e.ResolvedInstruction=f;var h=function(t){function e(e,r){t.call(this,e,r,{})}return a(e,t),e.prototype.resolveComponent=function(){return u.PromiseWrapper.resolve(this.component)},e.prototype.toLinkUrl=function(){return""},e.prototype._toLinkUrl=function(){return""},e}(p);e.DefaultInstruction=h;var g=function(t){function e(e,r,n){void 0===r&&(r=""),void 0===n&&(n=s.CONST_EXPR([])),t.call(this,null,null,{}),this._resolver=e,this._urlPath=r,this._urlParams=n}return a(e,t),Object.defineProperty(e.prototype,"urlPath",{get:function(){return s.isPresent(this.component)?this.component.urlPath:s.isPresent(this._urlPath)?this._urlPath:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"urlParams",{get:function(){return s.isPresent(this.component)?this.component.urlParams:s.isPresent(this._urlParams)?this._urlParams:[]},enumerable:!0,configurable:!0}),e.prototype.resolveComponent=function(){var t=this;return s.isPresent(this.component)?u.PromiseWrapper.resolve(this.component):this._resolver().then(function(e){return t.child=e.child,t.component=e.component})},e}(p);e.UnresolvedInstruction=g;var m=function(t){function e(e,r,n,o){t.call(this,e,r,n),this._specificity=o}return a(e,t),Object.defineProperty(e.prototype,"specificity",{get:function(){return this._specificity},enumerable:!0,configurable:!0}),e}(f);e.RedirectInstruction=m;var d=function(){function t(t,r,n,o,a,i,u){void 0===u&&(u=null),this.urlPath=t,this.urlParams=r,this.componentType=o,this.terminal=a,this.specificity=i,this.params=u,this.reuse=!1,this.routeData=s.isPresent(n)?n:e.BLANK_ROUTE_DATA}return t}();return e.ComponentInstruction=d,n.define=o,r.exports}),System.register("angular2/src/router/url_parser",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/facade/exceptions"],!0,function(t,e,r){function n(t){for(var e=new f(t[t.length-1]),r=t.length-2;r>=0;r-=1)e=new f(t[r],e);return e}function o(t){var e=l.RegExpWrapper.firstMatch(g,t);return l.isPresent(e)?e[0]:""}function a(t){var e=[];return l.isPresent(t)&&c.StringMapWrapper.forEach(t,function(t,r){t===!0?e.push(r):e.push(r+"="+t)}),e}var i=System.global,s=i.define;i.define=void 0;var u=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},c=t("angular2/src/facade/collection"),l=t("angular2/src/facade/lang"),p=t("angular2/src/facade/exceptions"),f=function(){function t(t,e,r,n){void 0===e&&(e=null),void 0===r&&(r=l.CONST_EXPR([])),void 0===n&&(n=null),this.path=t,this.child=e,this.auxiliary=r,this.params=n}return t.prototype.toString=function(){return this.path+this._matrixParamsToString()+this._auxToString()+this._childString()},t.prototype.segmentToString=function(){return this.path+this._matrixParamsToString()},t.prototype._auxToString=function(){return this.auxiliary.length>0?"("+this.auxiliary.map(function(t){return t.toString()}).join("//")+")":""},t.prototype._matrixParamsToString=function(){return l.isBlank(this.params)?"":";"+a(this.params).join(";")},t.prototype._childString=function(){return l.isPresent(this.child)?"/"+this.child.toString():""},t}();e.Url=f;var h=function(t){function e(e,r,n,o){void 0===r&&(r=null),void 0===n&&(n=l.CONST_EXPR([])),void 0===o&&(o=null),t.call(this,e,r,n,o)}return u(e,t),e.prototype.toString=function(){return this.path+this._auxToString()+this._childString()+this._queryParamsToString()},e.prototype.segmentToString=function(){return this.path+this._queryParamsToString()},e.prototype._queryParamsToString=function(){return l.isBlank(this.params)?"":"?"+a(this.params).join("&")},e}(f);e.RootUrl=h,e.pathSegmentsToUrl=n;var g=l.RegExpWrapper.create("^[^\\/\\(\\)\\?;=&#]+"),m=function(){function t(){}return t.prototype.peekStartsWith=function(t){return this._remaining.startsWith(t)},t.prototype.capture=function(t){if(!this._remaining.startsWith(t))throw new p.BaseException('Expected "'+t+'".');this._remaining=this._remaining.substring(t.length)},t.prototype.parse=function(t){return this._remaining=t,""==t||"/"==t?new f(""):this.parseRoot()},t.prototype.parseRoot=function(){this.peekStartsWith("/")&&this.capture("/");var t=o(this._remaining);this.capture(t);var e=[];this.peekStartsWith("(")&&(e=this.parseAuxiliaryRoutes()),this.peekStartsWith(";")&&this.parseMatrixParams();var r=null;this.peekStartsWith("/")&&!this.peekStartsWith("//")&&(this.capture("/"),r=this.parseSegment());var n=null;return this.peekStartsWith("?")&&(n=this.parseQueryParams()),new h(t,r,e,n)},t.prototype.parseSegment=function(){if(0==this._remaining.length)return null;this.peekStartsWith("/")&&this.capture("/");var t=o(this._remaining);this.capture(t);var e=null;this.peekStartsWith(";")&&(e=this.parseMatrixParams());var r=[];this.peekStartsWith("(")&&(r=this.parseAuxiliaryRoutes());var n=null;return this.peekStartsWith("/")&&!this.peekStartsWith("//")&&(this.capture("/"),n=this.parseSegment()),new f(t,n,r,e)},t.prototype.parseQueryParams=function(){var t={};for(this.capture("?"),this.parseParam(t);this._remaining.length>0&&this.peekStartsWith("&");)this.capture("&"),this.parseParam(t);return t},t.prototype.parseMatrixParams=function(){for(var t={};this._remaining.length>0&&this.peekStartsWith(";");)this.capture(";"),this.parseParam(t);return t},t.prototype.parseParam=function(t){var e=o(this._remaining);if(!l.isBlank(e)){this.capture(e);var r=!0;if(this.peekStartsWith("=")){this.capture("=");var n=o(this._remaining);l.isPresent(n)&&(r=n,this.capture(r))}t[e]=r}},t.prototype.parseAuxiliaryRoutes=function(){var t=[];for(this.capture("(");!this.peekStartsWith(")")&&this._remaining.length>0;)t.push(this.parseSegment()),this.peekStartsWith("//")&&this.capture("//");return this.capture(")"),t},t}();return e.UrlParser=m,e.parser=new m,e.serializeParams=a,i.define=s,r.exports}),System.register("angular2/src/router/async_route_handler",["angular2/src/facade/lang","angular2/src/router/instruction"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=t("angular2/src/facade/lang"),i=t("angular2/src/router/instruction"),s=function(){function t(t,e){void 0===e&&(e=null),this._loader=t,this._resolvedComponent=null,this.data=a.isPresent(e)?new i.RouteData(e):i.BLANK_ROUTE_DATA}return t.prototype.resolveComponentType=function(){var t=this;return a.isPresent(this._resolvedComponent)?this._resolvedComponent:this._resolvedComponent=this._loader().then(function(e){return t.componentType=e,e})},t}();return e.AsyncRouteHandler=s,n.define=o,r.exports}),System.register("angular2/src/router/sync_route_handler",["angular2/src/facade/async","angular2/src/facade/lang","angular2/src/router/instruction"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=t("angular2/src/facade/async"),i=t("angular2/src/facade/lang"),s=t("angular2/src/router/instruction"),u=function(){function t(t,e){this.componentType=t,this._resolvedComponent=null,this._resolvedComponent=a.PromiseWrapper.resolve(t),this.data=i.isPresent(e)?new s.RouteData(e):s.BLANK_ROUTE_DATA}return t.prototype.resolveComponentType=function(){return this._resolvedComponent},t}();return e.SyncRouteHandler=u,n.define=o,r.exports}),System.register("angular2/src/router/route_config_decorator",["angular2/src/router/route_config_impl","angular2/src/core/util/decorators","angular2/src/router/route_config_impl"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=t("angular2/src/router/route_config_impl"),i=t("angular2/src/core/util/decorators"),s=t("angular2/src/router/route_config_impl");return e.Route=s.Route,e.Redirect=s.Redirect,e.AuxRoute=s.AuxRoute,e.AsyncRoute=s.AsyncRoute,e.RouteConfig=i.makeDecorator(a.RouteConfig),n.define=o,r.exports}),System.register("angular2/src/router/location_strategy",["angular2/src/facade/lang","angular2/core"],!0,function(t,e,r){function n(t){return t.length>0&&"?"!=t.substring(0,1)?"?"+t:t}function o(t,e){if(0==t.length)return e;if(0==e.length)return t;var r=0;return t.endsWith("/")&&r++,e.startsWith("/")&&r++,2==r?t+e.substring(1):1==r?t+e:t+"/"+e}var a=System.global,i=a.define;a.define=void 0;var s=t("angular2/src/facade/lang"),u=t("angular2/core"),c=function(){function t(){}return t}();return e.LocationStrategy=c,e.APP_BASE_HREF=s.CONST_EXPR(new u.OpaqueToken("appBaseHref")),e.normalizeQueryParams=n,e.joinWithSlash=o,a.define=i,r.exports}),System.register("angular2/src/router/lifecycle_annotations_impl",["angular2/src/facade/lang"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=this&&this.__decorate||function(t,e,r,n){var o,a=arguments.length,i=3>a?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(i=(3>a?o(i):a>3?o(e,r,i):o(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=t("angular2/src/facade/lang"),u=function(){function t(t){this.name=t}return t=a([s.CONST(),i("design:paramtypes",[String])],t)}();e.RouteLifecycleHook=u;var c=function(){function t(t){this.fn=t}return t=a([s.CONST(),i("design:paramtypes",[Function])],t)}();return e.CanActivate=c,e.routerCanReuse=s.CONST_EXPR(new u("routerCanReuse")),e.routerCanDeactivate=s.CONST_EXPR(new u("routerCanDeactivate")),e.routerOnActivate=s.CONST_EXPR(new u("routerOnActivate")),e.routerOnReuse=s.CONST_EXPR(new u("routerOnReuse")),e.routerOnDeactivate=s.CONST_EXPR(new u("routerOnDeactivate")),n.define=o,r.exports}),System.register("angular2/src/router/lifecycle_annotations",["angular2/src/core/util/decorators","angular2/src/router/lifecycle_annotations_impl","angular2/src/router/lifecycle_annotations_impl"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=t("angular2/src/core/util/decorators"),i=t("angular2/src/router/lifecycle_annotations_impl"),s=t("angular2/src/router/lifecycle_annotations_impl");return e.routerCanReuse=s.routerCanReuse,e.routerCanDeactivate=s.routerCanDeactivate,e.routerOnActivate=s.routerOnActivate,e.routerOnReuse=s.routerOnReuse,e.routerOnDeactivate=s.routerOnDeactivate,e.CanActivate=a.makeDecorator(i.CanActivate),n.define=o,r.exports}),System.register("angular2/src/router/router_link",["angular2/core","angular2/src/facade/lang","angular2/src/router/router","angular2/src/router/location"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=this&&this.__decorate||function(t,e,r,n){var o,a=arguments.length,i=3>a?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(i=(3>a?o(i):a>3?o(e,r,i):o(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=t("angular2/core"),u=t("angular2/src/facade/lang"),c=t("angular2/src/router/router"),l=t("angular2/src/router/location"),p=function(){function t(t,e){var r=this;this._router=t,this._location=e,this._router.subscribe(function(t){return r._updateLink()})}return t.prototype._updateLink=function(){this._navigationInstruction=this._router.generate(this._routeParams);var t=this._navigationInstruction.toLinkUrl();this.visibleHref=this._location.prepareExternalUrl(t)},Object.defineProperty(t.prototype,"isRouteActive",{get:function(){return this._router.isRouteActive(this._navigationInstruction)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"routeParams",{set:function(t){this._routeParams=t,this._updateLink()},enumerable:!0,configurable:!0}),t.prototype.onClick=function(){return u.isString(this.target)&&"_self"!=this.target?!0:(this._router.navigateByInstruction(this._navigationInstruction),!1)},t=a([s.Directive({selector:"[routerLink]",inputs:["routeParams: routerLink","target: target"],host:{"(click)":"onClick()","[attr.href]":"visibleHref","[class.router-link-active]":"isRouteActive"}}),i("design:paramtypes",[c.Router,l.Location])],t)}();return e.RouterLink=p,n.define=o,r.exports}),System.register("angular2/src/router/platform_location",[],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=function(){function t(){}return t}();return e.PlatformLocation=a,n.define=o,r.exports}),System.register("angular2/src/router/hash_location_strategy",["angular2/core","angular2/src/router/location_strategy","angular2/src/facade/lang","angular2/src/router/platform_location"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=this&&this.__decorate||function(t,e,r,n){var o,a=arguments.length,i=3>a?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(i=(3>a?o(i):a>3?o(e,r,i):o(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},s=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},u=this&&this.__param||function(t,e){return function(r,n){e(r,n,t)}},c=t("angular2/core"),l=t("angular2/src/router/location_strategy"),p=t("angular2/src/facade/lang"),f=t("angular2/src/router/platform_location"),h=function(t){function e(e,r){t.call(this),this._platformLocation=e,this._baseHref="",p.isPresent(r)&&(this._baseHref=r)}return a(e,t),e.prototype.onPopState=function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)},e.prototype.getBaseHref=function(){return this._baseHref},e.prototype.path=function(){var t=this._platformLocation.hash;return p.isPresent(t)||(t="#"),t.length>0?t.substring(1):t},e.prototype.prepareExternalUrl=function(t){var e=l.joinWithSlash(this._baseHref,t);return e.length>0?"#"+e:e},e.prototype.pushState=function(t,e,r,n){var o=this.prepareExternalUrl(r+l.normalizeQueryParams(n));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(t,e,o)},e.prototype.replaceState=function(t,e,r,n){var o=this.prepareExternalUrl(r+l.normalizeQueryParams(n));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,o)},e.prototype.forward=function(){this._platformLocation.forward()},e.prototype.back=function(){this._platformLocation.back()},e=i([c.Injectable(),u(1,c.Optional()),u(1,c.Inject(l.APP_BASE_HREF)),s("design:paramtypes",[f.PlatformLocation,String])],e)}(l.LocationStrategy);return e.HashLocationStrategy=h,n.define=o,r.exports}),System.register("angular2/src/router/path_location_strategy",["angular2/core","angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/router/location_strategy","angular2/src/router/platform_location"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=this&&this.__decorate||function(t,e,r,n){var o,a=arguments.length,i=3>a?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(i=(3>a?o(i):a>3?o(e,r,i):o(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},s=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},u=this&&this.__param||function(t,e){return function(r,n){e(r,n,t)}},c=t("angular2/core"),l=t("angular2/src/facade/lang"),p=t("angular2/src/facade/exceptions"),f=t("angular2/src/router/location_strategy"),h=t("angular2/src/router/platform_location"),g=function(t){function e(e,r){if(t.call(this),this._platformLocation=e,l.isBlank(r)&&(r=this._platformLocation.getBaseHrefFromDOM()),l.isBlank(r))throw new p.BaseException("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=r}return a(e,t),e.prototype.onPopState=function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)},e.prototype.getBaseHref=function(){return this._baseHref},e.prototype.prepareExternalUrl=function(t){return f.joinWithSlash(this._baseHref,t)},e.prototype.path=function(){return this._platformLocation.pathname+f.normalizeQueryParams(this._platformLocation.search)},e.prototype.pushState=function(t,e,r,n){var o=this.prepareExternalUrl(r+f.normalizeQueryParams(n));this._platformLocation.pushState(t,e,o)},e.prototype.replaceState=function(t,e,r,n){var o=this.prepareExternalUrl(r+f.normalizeQueryParams(n));this._platformLocation.replaceState(t,e,o)},e.prototype.forward=function(){this._platformLocation.forward()},e.prototype.back=function(){this._platformLocation.back()},e=i([c.Injectable(),u(1,c.Optional()),u(1,c.Inject(f.APP_BASE_HREF)),s("design:paramtypes",[h.PlatformLocation,String])],e)}(f.LocationStrategy);return e.PathLocationStrategy=g,n.define=o,r.exports}),System.register("angular2/src/router/route_definition",[],!0,function(t,e,r){var n=System.global,o=n.define;return n.define=void 0,n.define=o,r.exports}),System.register("angular2/src/router/router_providers_common",["angular2/src/router/location_strategy","angular2/src/router/path_location_strategy","angular2/src/router/router","angular2/src/router/route_registry","angular2/src/router/location","angular2/src/facade/lang","angular2/core","angular2/src/facade/exceptions"],!0,function(t,e,r){function n(t,e,r,n){var o=new c.RootRouter(t,e,r);return n.registerDisposeListener(function(){return o.dispose()}),o}function o(t){if(0==t.componentTypes.length)throw new g.BaseException("Bootstrap at least one component before injecting Router.");return t.componentTypes[0]}var a=System.global,i=a.define;a.define=void 0;var s=t("angular2/src/router/location_strategy"),u=t("angular2/src/router/path_location_strategy"),c=t("angular2/src/router/router"),l=t("angular2/src/router/route_registry"),p=t("angular2/src/router/location"),f=t("angular2/src/facade/lang"),h=t("angular2/core"),g=t("angular2/src/facade/exceptions");return e.ROUTER_PROVIDERS_COMMON=f.CONST_EXPR([l.RouteRegistry,f.CONST_EXPR(new h.Provider(s.LocationStrategy,{useClass:u.PathLocationStrategy})),p.Location,f.CONST_EXPR(new h.Provider(c.Router,{useFactory:n,deps:f.CONST_EXPR([l.RouteRegistry,p.Location,l.ROUTER_PRIMARY_COMPONENT,h.ApplicationRef])})),f.CONST_EXPR(new h.Provider(l.ROUTER_PRIMARY_COMPONENT,{useFactory:o,deps:f.CONST_EXPR([h.ApplicationRef])}))]),a.define=i,r.exports}),System.register("angular2/src/router/path_recognizer",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/router/url_parser"],!0,function(t,e,r){function n(t){return l.isBlank(t)?null:t.toString()}function o(t){t.startsWith("/")&&(t=t.substring(1));var e=i(t),r=[],n="";0==e.length&&(n+="2");for(var o=e.length-1,a=0;o>=a;a++){var s,u=e[a];if(l.isPresent(s=l.RegExpWrapper.firstMatch(v,u)))r.push(new _(s[1])),n+="1";else if(l.isPresent(s=l.RegExpWrapper.firstMatch(R,u)))r.push(new y(s[1])),n+="0";else if("..."==u){if(o>a)throw new p.BaseException('Unexpected "..." before the end of the path for "'+t+'".');r.push(new m)}else r.push(new d(u)),n+="2"}return{segments:r,specificity:n}}function a(t){return t.map(function(t){return t instanceof y?"*":t instanceof m?"...":t instanceof _?":":t instanceof d?t.path:void 0}).join("/")}function i(t){return t.split("/")}function s(t){if(l.StringWrapper.contains(t,"#"))throw new p.BaseException('Path "'+t+'" should not include "#". Use "HashLocationStrategy" instead.');var e=l.RegExpWrapper.firstMatch(P,t);if(l.isPresent(e))throw new p.BaseException('Path "'+t+'" contains "'+e[0]+'" which is not allowed in a route config.')}var u=System.global,c=u.define;u.define=void 0;var l=t("angular2/src/facade/lang"),p=t("angular2/src/facade/exceptions"),f=t("angular2/src/facade/collection"),h=t("angular2/src/router/url_parser"),g=function(){function t(t){var e=this;this.map={},this.keys={},l.isPresent(t)&&f.StringMapWrapper.forEach(t,function(t,r){e.map[r]=l.isPresent(t)?t.toString():null,e.keys[r]=!0})}return t.prototype.get=function(t){return f.StringMapWrapper["delete"](this.keys,t),this.map[t]},t.prototype.getUnused=function(){var t=this,e={},r=f.StringMapWrapper.keys(this.keys);return r.forEach(function(r){return e[r]=f.StringMapWrapper.get(t.map,r)}),e},t}(),m=function(){function t(){this.name=""}return t.prototype.generate=function(t){return""},t.prototype.match=function(t){return!0},t}(),d=function(){function t(t){this.path=t,this.name=""}return t.prototype.match=function(t){return t==this.path},t.prototype.generate=function(t){return this.path},t}(),_=function(){function t(t){this.name=t}return t.prototype.match=function(t){return t.length>0},t.prototype.generate=function(t){if(!f.StringMapWrapper.contains(t.map,this.name))throw new p.BaseException("Route generator for '"+this.name+"' was not included in parameters passed.");return n(t.get(this.name))},t}(),y=function(){function t(t){this.name=t}return t.prototype.match=function(t){return!0},t.prototype.generate=function(t){return n(t.get(this.name))},t}(),v=/^:([^\/]+)$/g,R=/^\*([^\/]+)$/g,P=l.RegExpWrapper.create("//|\\(|\\)|;|\\?|="),x=function(){function t(t){this.path=t,this.terminal=!0,s(t);var e=o(t);this._segments=e.segments,this.specificity=e.specificity,this.hash=a(this._segments);var r=this._segments[this._segments.length-1];this.terminal=!(r instanceof m)}return t.prototype.recognize=function(t){ for(var e,r=t,n={},o=[],a=0;a<this._segments.length;a+=1){var i=this._segments[a];if(e=r,i instanceof m)break;if(l.isPresent(e)){if(i instanceof y){n[i.name]=e.toString(),o.push(e.toString()),r=null;break}if(o.push(e.path),i instanceof _)n[i.name]=e.path;else if(!i.match(e.path))return null;r=e.child}else if(!i.match(""))return null}if(this.terminal&&l.isPresent(r))return null;var s,u,c,p=o.join("/");if(l.isPresent(e)){var g=t instanceof h.RootUrl?t:e;c=l.isPresent(g.params)?f.StringMapWrapper.merge(g.params,n):n,u=h.serializeParams(g.params),s=e.auxiliary}else c=n,s=[],u=[];return{urlPath:p,urlParams:u,allParams:c,auxiliary:s,nextSegment:r}},t.prototype.generate=function(t){for(var e=new g(t),r=[],n=0;n<this._segments.length;n++){var o=this._segments[n];o instanceof m||r.push(o.generate(e))}var a=r.join("/"),i=e.getUnused(),s=h.serializeParams(i);return{urlPath:a,urlParams:s}},t}();return e.PathRecognizer=x,u.define=c,r.exports}),System.register("angular2/src/router/component_recognizer",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/facade/async","angular2/src/router/route_recognizer","angular2/src/router/route_config_impl","angular2/src/router/async_route_handler","angular2/src/router/sync_route_handler"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=t("angular2/src/facade/lang"),i=t("angular2/src/facade/exceptions"),s=t("angular2/src/facade/collection"),u=t("angular2/src/facade/async"),c=t("angular2/src/router/route_recognizer"),l=t("angular2/src/router/route_config_impl"),p=t("angular2/src/router/async_route_handler"),f=t("angular2/src/router/sync_route_handler"),h=function(){function t(){this.names=new s.Map,this.auxNames=new s.Map,this.auxRoutes=new s.Map,this.matchers=[],this.defaultRoute=null}return t.prototype.config=function(t){var e;if(a.isPresent(t.name)&&t.name[0].toUpperCase()!=t.name[0]){var r=t.name[0].toUpperCase()+t.name.substring(1);throw new i.BaseException('Route "'+t.path+'" with name "'+t.name+'" does not begin with an uppercase letter. Route names should be CamelCase like "'+r+'".')}if(t instanceof l.AuxRoute){e=new f.SyncRouteHandler(t.component,t.data);var n=t.path.startsWith("/")?t.path.substring(1):t.path,o=new c.RouteRecognizer(t.path,e);return this.auxRoutes.set(n,o),a.isPresent(t.name)&&this.auxNames.set(t.name,o),o.terminal}var s=!1;if(t instanceof l.Redirect){var u=new c.RedirectRecognizer(t.path,t.redirectTo);return this._assertNoHashCollision(u.hash,t.path),this.matchers.push(u),!0}t instanceof l.Route?(e=new f.SyncRouteHandler(t.component,t.data),s=a.isPresent(t.useAsDefault)&&t.useAsDefault):t instanceof l.AsyncRoute&&(e=new p.AsyncRouteHandler(t.loader,t.data),s=a.isPresent(t.useAsDefault)&&t.useAsDefault);var o=new c.RouteRecognizer(t.path,e);if(this._assertNoHashCollision(o.hash,t.path),s){if(a.isPresent(this.defaultRoute))throw new i.BaseException("Only one route can be default");this.defaultRoute=o}return this.matchers.push(o),a.isPresent(t.name)&&this.names.set(t.name,o),o.terminal},t.prototype._assertNoHashCollision=function(t,e){this.matchers.forEach(function(r){if(t==r.hash)throw new i.BaseException("Configuration '"+e+"' conflicts with existing route '"+r.path+"'")})},t.prototype.recognize=function(t){var e=[];return this.matchers.forEach(function(r){var n=r.recognize(t);a.isPresent(n)&&e.push(n)}),0==e.length&&a.isPresent(t)&&t.auxiliary.length>0?[u.PromiseWrapper.resolve(new c.PathMatch(null,null,t.auxiliary))]:e},t.prototype.recognizeAuxiliary=function(t){var e=this.auxRoutes.get(t.path);return a.isPresent(e)?[e.recognize(t)]:[u.PromiseWrapper.resolve(null)]},t.prototype.hasRoute=function(t){return this.names.has(t)},t.prototype.componentLoaded=function(t){return this.hasRoute(t)&&a.isPresent(this.names.get(t).handler.componentType)},t.prototype.loadComponent=function(t){return this.names.get(t).handler.resolveComponentType()},t.prototype.generate=function(t,e){var r=this.names.get(t);return a.isBlank(r)?null:r.generate(e)},t.prototype.generateAuxiliary=function(t,e){var r=this.auxNames.get(t);return a.isBlank(r)?null:r.generate(e)},t}();return e.ComponentRecognizer=h,n.define=o,r.exports}),System.register("angular2/src/router/route_config_nomalizer",["angular2/src/router/route_config_decorator","angular2/src/facade/lang","angular2/src/facade/exceptions"],!0,function(t,e,r){function n(t,e){if(t instanceof u.AsyncRoute){var r=o(t.loader,e);return new u.AsyncRoute({path:t.path,loader:r,name:t.name,data:t.data,useAsDefault:t.useAsDefault})}if(t instanceof u.Route||t instanceof u.Redirect||t instanceof u.AuxRoute)return t;if(+!!t.component+ +!!t.redirectTo+ +!!t.loader!=1)throw new l.BaseException('Route config should contain exactly one "component", "loader", or "redirectTo" property.');if(t.as&&t.name)throw new l.BaseException('Route config should contain exactly one "as" or "name" property.');if(t.as&&(t.name=t.as),t.loader){var r=o(t.loader,e);return new u.AsyncRoute({path:t.path,loader:r,name:t.name,data:t.data,useAsDefault:t.useAsDefault})}if(t.aux)return new u.AuxRoute({path:t.aux,component:t.component,name:t.name});if(t.component){if("object"==typeof t.component){var n=t.component;if("constructor"==n.type)return new u.Route({path:t.path,component:n.constructor,name:t.name,data:t.data,useAsDefault:t.useAsDefault});if("loader"==n.type)return new u.AsyncRoute({path:t.path,loader:n.loader,name:t.name,data:t.data,useAsDefault:t.useAsDefault});throw new l.BaseException('Invalid component type "'+n.type+'". Valid types are "constructor" and "loader".')}return new u.Route(t)}return t.redirectTo?new u.Redirect({path:t.path,redirectTo:t.redirectTo}):t}function o(t,e){return function(){return t().then(function(t){return e.configFromComponent(t),t})}}function a(t,e){if(!c.isType(t))throw new l.BaseException('Component for route "'+e+'" is not defined, or is not a class.')}var i=System.global,s=i.define;i.define=void 0;var u=t("angular2/src/router/route_config_decorator"),c=t("angular2/src/facade/lang"),l=t("angular2/src/facade/exceptions");return e.normalizeRouteConfig=n,e.assertComponentExists=a,i.define=s,r.exports}),System.register("angular2/src/router/location",["angular2/src/router/location_strategy","angular2/src/facade/async","angular2/core"],!0,function(t,e,r){function n(t,e){return t.length>0&&e.startsWith(t)?e.substring(t.length):e}function o(t){return/\/index.html$/g.test(t)?t.substring(0,t.length-11):t}function a(t){return/\/$/g.test(t)&&(t=t.substring(0,t.length-1)),t}var i=System.global,s=i.define;i.define=void 0;var u=this&&this.__decorate||function(t,e,r,n){var o,a=arguments.length,i=3>a?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(i=(3>a?o(i):a>3?o(e,r,i):o(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},c=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},l=t("angular2/src/router/location_strategy"),p=t("angular2/src/facade/async"),f=t("angular2/core"),h=function(){function t(t){var e=this;this.platformStrategy=t,this._subject=new p.EventEmitter;var r=this.platformStrategy.getBaseHref();this._baseHref=a(o(r)),this.platformStrategy.onPopState(function(t){p.ObservableWrapper.callEmit(e._subject,{url:e.path(),pop:!0,type:t.type})})}return t.prototype.path=function(){return this.normalize(this.platformStrategy.path())},t.prototype.normalize=function(t){return a(n(this._baseHref,o(t)))},t.prototype.prepareExternalUrl=function(t){return t.length>0&&!t.startsWith("/")&&(t="/"+t),this.platformStrategy.prepareExternalUrl(t)},t.prototype.go=function(t,e){void 0===e&&(e=""),this.platformStrategy.pushState(null,"",t,e)},t.prototype.replaceState=function(t,e){void 0===e&&(e=""),this.platformStrategy.replaceState(null,"",t,e)},t.prototype.forward=function(){this.platformStrategy.forward()},t.prototype.back=function(){this.platformStrategy.back()},t.prototype.subscribe=function(t,e,r){return void 0===e&&(e=null),void 0===r&&(r=null),p.ObservableWrapper.subscribe(this._subject,t,e,r)},t=u([f.Injectable(),c("design:paramtypes",[l.LocationStrategy])],t)}();return e.Location=h,i.define=s,r.exports}),System.register("angular2/src/router/route_lifecycle_reflector",["angular2/src/facade/lang","angular2/src/router/lifecycle_annotations_impl","angular2/src/core/reflection/reflection"],!0,function(t,e,r){function n(t,e){return e instanceof s.Type?t.name in e.prototype:!1}function o(t){for(var e=c.reflector.annotations(t),r=0;r<e.length;r+=1){var n=e[r];if(n instanceof u.CanActivate)return n.fn}return null}var a=System.global,i=a.define;a.define=void 0;var s=t("angular2/src/facade/lang"),u=t("angular2/src/router/lifecycle_annotations_impl"),c=t("angular2/src/core/reflection/reflection");return e.hasLifecycleHook=n,e.getCanActivateHook=o,a.define=i,r.exports}),System.register("angular2/src/router/router_outlet",["angular2/src/facade/async","angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/core","angular2/src/router/router","angular2/src/router/instruction","angular2/src/router/lifecycle_annotations","angular2/src/router/route_lifecycle_reflector"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=this&&this.__decorate||function(t,e,r,n){var o,a=arguments.length,i=3>a?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(i=(3>a?o(i):a>3?o(e,r,i):o(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=this&&this.__param||function(t,e){return function(r,n){e(r,n,t)}},u=t("angular2/src/facade/async"),c=t("angular2/src/facade/collection"),l=t("angular2/src/facade/lang"),p=t("angular2/src/facade/exceptions"),f=t("angular2/core"),h=t("angular2/src/router/router"),g=t("angular2/src/router/instruction"),m=t("angular2/src/router/lifecycle_annotations"),d=t("angular2/src/router/route_lifecycle_reflector"),_=u.PromiseWrapper.resolve(!0),y=function(){function t(t,e,r,n){this._elementRef=t,this._loader=e,this._parentRouter=r,this.name=null,this._componentRef=null,this._currentInstruction=null,l.isPresent(n)?(this.name=n,this._parentRouter.registerAuxOutlet(this)):this._parentRouter.registerPrimaryOutlet(this)}return t.prototype.activate=function(t){var e=this,r=this._currentInstruction;this._currentInstruction=t;var n=t.componentType,o=this._parentRouter.childRouter(n),a=f.Injector.resolve([f.provide(g.RouteData,{useValue:t.routeData}),f.provide(g.RouteParams,{useValue:new g.RouteParams(t.params)}),f.provide(h.Router,{useValue:o})]);return this._loader.loadNextToLocation(n,this._elementRef,a).then(function(o){return e._componentRef=o,d.hasLifecycleHook(m.routerOnActivate,n)?e._componentRef.instance.routerOnActivate(t,r):void 0})},t.prototype.reuse=function(t){var e=this._currentInstruction;if(this._currentInstruction=t,l.isBlank(this._componentRef))throw new p.BaseException("Cannot reuse an outlet that does not contain a component.");return u.PromiseWrapper.resolve(d.hasLifecycleHook(m.routerOnReuse,this._currentInstruction.componentType)?this._componentRef.instance.routerOnReuse(t,e):!0)},t.prototype.deactivate=function(t){var e=this,r=_;return l.isPresent(this._componentRef)&&l.isPresent(this._currentInstruction)&&d.hasLifecycleHook(m.routerOnDeactivate,this._currentInstruction.componentType)&&(r=u.PromiseWrapper.resolve(this._componentRef.instance.routerOnDeactivate(t,this._currentInstruction))),r.then(function(t){l.isPresent(e._componentRef)&&(e._componentRef.dispose(),e._componentRef=null)})},t.prototype.routerCanDeactivate=function(t){return l.isBlank(this._currentInstruction)?_:d.hasLifecycleHook(m.routerCanDeactivate,this._currentInstruction.componentType)?u.PromiseWrapper.resolve(this._componentRef.instance.routerCanDeactivate(t,this._currentInstruction)):_},t.prototype.routerCanReuse=function(t){var e;return e=l.isBlank(this._currentInstruction)||this._currentInstruction.componentType!=t.componentType?!1:d.hasLifecycleHook(m.routerCanReuse,this._currentInstruction.componentType)?this._componentRef.instance.routerCanReuse(t,this._currentInstruction):t==this._currentInstruction||l.isPresent(t.params)&&l.isPresent(this._currentInstruction.params)&&c.StringMapWrapper.equals(t.params,this._currentInstruction.params),u.PromiseWrapper.resolve(e)},t=a([f.Directive({selector:"router-outlet"}),s(3,f.Attribute("name")),i("design:paramtypes",[f.ElementRef,f.DynamicComponentLoader,h.Router,String])],t)}();return e.RouterOutlet=y,n.define=o,r.exports}),System.register("angular2/src/router/browser_platform_location",["angular2/core","angular2/src/router/platform_location","angular2/src/platform/dom/dom_adapter"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=this&&this.__decorate||function(t,e,r,n){var o,a=arguments.length,i=3>a?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(i=(3>a?o(i):a>3?o(e,r,i):o(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},s=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},u=t("angular2/core"),c=t("angular2/src/router/platform_location"),l=t("angular2/src/platform/dom/dom_adapter"),p=function(t){function e(){t.call(this),this._init()}return a(e,t),e.prototype._init=function(){this._location=l.DOM.getLocation(),this._history=l.DOM.getHistory()},Object.defineProperty(e.prototype,"location",{get:function(){return this._location},enumerable:!0,configurable:!0}),e.prototype.getBaseHrefFromDOM=function(){return l.DOM.getBaseHref()},e.prototype.onPopState=function(t){l.DOM.getGlobalEventTarget("window").addEventListener("popstate",t,!1)},e.prototype.onHashChange=function(t){l.DOM.getGlobalEventTarget("window").addEventListener("hashchange",t,!1)},Object.defineProperty(e.prototype,"pathname",{get:function(){return this._location.pathname},set:function(t){this._location.pathname=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"search",{get:function(){return this._location.search},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hash",{get:function(){return this._location.hash},enumerable:!0,configurable:!0}),e.prototype.pushState=function(t,e,r){this._history.pushState(t,e,r)},e.prototype.replaceState=function(t,e,r){this._history.replaceState(t,e,r)},e.prototype.forward=function(){this._history.forward()},e.prototype.back=function(){this._history.back()},e=i([u.Injectable(),s("design:paramtypes",[])],e)}(c.PlatformLocation);return e.BrowserPlatformLocation=p,n.define=o,r.exports}),System.register("angular2/src/router/route_recognizer",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/promise","angular2/src/facade/collection","angular2/src/router/instruction","angular2/src/router/path_recognizer"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=t("angular2/src/facade/lang"),s=t("angular2/src/facade/exceptions"),u=t("angular2/src/facade/promise"),c=t("angular2/src/facade/collection"),l=t("angular2/src/router/instruction"),p=t("angular2/src/router/path_recognizer"),f=function(){function t(){}return t}();e.RouteMatch=f;var h=function(t){function e(e,r,n){t.call(this),this.instruction=e,this.remaining=r,this.remainingAux=n}return a(e,t),e}(f);e.PathMatch=h;var g=function(t){function e(e,r){t.call(this),this.redirectTo=e,this.specificity=r}return a(e,t),e}(f);e.RedirectMatch=g;var m=function(){function t(t,e){this.path=t,this.redirectTo=e,this._pathRecognizer=new p.PathRecognizer(t),this.hash=this._pathRecognizer.hash}return t.prototype.recognize=function(t){var e=null;return i.isPresent(this._pathRecognizer.recognize(t))&&(e=new g(this.redirectTo,this._pathRecognizer.specificity)),u.PromiseWrapper.resolve(e)},t.prototype.generate=function(t){throw new s.BaseException("Tried to generate a redirect.")},t}();e.RedirectRecognizer=m;var d=function(){function t(t,e){this.path=t,this.handler=e,this.terminal=!0,this._cache=new c.Map,this._pathRecognizer=new p.PathRecognizer(t),this.specificity=this._pathRecognizer.specificity,this.hash=this._pathRecognizer.hash,this.terminal=this._pathRecognizer.terminal}return t.prototype.recognize=function(t){var e=this,r=this._pathRecognizer.recognize(t);return i.isBlank(r)?null:this.handler.resolveComponentType().then(function(t){var n=e._getInstruction(r.urlPath,r.urlParams,r.allParams);return new h(n,r.nextSegment,r.auxiliary)})},t.prototype.generate=function(t){var e=this._pathRecognizer.generate(t),r=e.urlPath,n=e.urlParams;return this._getInstruction(r,n,t)},t.prototype.generateComponentPathValues=function(t){return this._pathRecognizer.generate(t)},t.prototype._getInstruction=function(t,e,r){if(i.isBlank(this.handler.componentType))throw new s.BaseException("Tried to get instruction before the type was loaded.");var n=t+"?"+e.join("?");if(this._cache.has(n))return this._cache.get(n);var o=new l.ComponentInstruction(t,e,this.handler.data,this.handler.componentType,this.terminal,this.specificity,r);return this._cache.set(n,o),o},t}();return e.RouteRecognizer=d,n.define=o,r.expor